[Groonga-commit] groonga/gcs.groonga.org [gh-pages] Use open-uri standard library instead of external gem

Back to archive index

null+****@clear***** null+****@clear*****
2012年 7月 20日 (金) 18:28:20 JST


Kouhei Sutou	2012-07-20 18:28:20 +0900 (Fri, 20 Jul 2012)

  New Revision: b382bb94c17214df6c1183265b8b1a2e37450cde
  https://github.com/groonga/gcs.groonga.org/commit/b382bb94c17214df6c1183265b8b1a2e37450cde

  Log:
    Use open-uri standard library instead of external gem

  Modified files:
    _tools/update-version.rb

  Modified: _tools/update-version.rb (+4 -4)
===================================================================
--- _tools/update-version.rb    2012-07-20 17:56:55 +0900 (83b055b)
+++ _tools/update-version.rb    2012-07-20 18:28:20 +0900 (b5cc631)
@@ -1,6 +1,6 @@
 #!/usr/bin/ruby1.9.1
 
-require "httpclient"
+require "open-uri"
 require "json"
 require "fileutils"
 
@@ -11,9 +11,9 @@ def version
 end
 
 def fetch_master_version
-  client = HTTPClient.new
-  manifest = client.get_content(PACKAGE_JSON_URL)
-  manifest = JSON.parse(manifest)
+  manifest = open(PACKAGE_JSON_URL) do |package_json|
+    JSON.parse(package_json.read)
+  end
   manifest["version"]
 end
 
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
下载 



Groonga-commit メーリングリストの案内
Back to archive index