[Groonga-commit] groonga/groonga at f4bf9bd [master] Set CA certification file by myself on Windows

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Oct 19 10:56:44 JST 2015


Kouhei Sutou	2015-10-19 10:56:44 +0900 (Mon, 19 Oct 2015)

  New Revision: f4bf9bd01adc2c70d3278902c04a64873594be50
  https://github.com/groonga/groonga/commit/f4bf9bd01adc2c70d3278902c04a64873594be50

  Message:
    Set CA certification file by myself on Windows

  Modified files:
    vendor/download_mecab.rb

  Modified: vendor/download_mecab.rb (+10 -0)
===================================================================
--- vendor/download_mecab.rb    2015-10-19 10:54:50 +0900 (fdab614)
+++ vendor/download_mecab.rb    2015-10-19 10:56:44 +0900 (2a8d076)
@@ -43,6 +43,16 @@ def download(url, base)
   FileUtils.rm_rf(tar_gz)
 end
 
+if /mingw/ =~ RUBY_PLATFORM
+  cacert_pem_path = "cacert.pem"
+  open("http://curl.haxx.se/ca/cacert.pem") do |remote_cacert_pem|
+    File.open(cacert_pem_path, "wb") do |local_cacert_pem|
+      local_cacert_pem.print(remote_cacert_pem.read)
+    end
+  end
+  ENV["SSL_CERT_FILE"] = File.expand_path(cacert_pem_path)
+end
+
 download("https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7cENtOXlicTFaRUE",
          mecab_base)
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index