YUKI Hiroshi
null+****@clear*****
Fri Sep 27 17:47:25 JST 2013
YUKI Hiroshi 2013-09-27 17:47:25 +0900 (Fri, 27 Sep 2013) New Revision: 914d501aa43509cb17330434e0e0450d5e652e3b https://github.com/droonga/fluent-plugin-droonga/commit/914d501aa43509cb17330434e0e0450d5e652e3b Message: Allow to specify the path to the catalog file, via an environment variable "DROONGA_CATALOG". Modified files: lib/droonga/catalog.rb Modified: lib/droonga/catalog.rb (+3 -1) =================================================================== --- lib/droonga/catalog.rb 2013-09-27 16:41:55 +0900 (5e85df0) +++ lib/droonga/catalog.rb 2013-09-27 17:47:25 +0900 (831ed0e) @@ -29,7 +29,9 @@ module Droonga CATALOG_FILE_PATH = 'catalog.json' def initialize - open(CATALOG_FILE_PATH) do |file| + catalog_path = ENV["DROONGA_CATALOG"] || CATALOG_FILE_PATH + catalog_path = File.expand_path("~/groonga/") + open(catalog_path) do |file| @catalog = JSON.parse(file.read) end @catalog["datasets"].each do |name, dataset| -------------- next part -------------- HTML����������������������������... Download