null+****@clear*****
null+****@clear*****
Tue Feb 14 20:50:20 JST 2012
SHIMADA Koji 2012-02-14 20:50:20 +0900 (Tue, 14 Feb 2012) New Revision: 85476c2f29ef27ba9b8f8ca085794bbea32da1d9 Merged b0ee22d: Merge pull request #43 from logaling/extract-config-object Log: Use load_config_and_merge_options for setup config Modified files: lib/logaling/config.rb Modified: lib/logaling/config.rb (+2 -3) =================================================================== --- lib/logaling/config.rb 2012-02-14 20:48:16 +0900 (fadba84) +++ lib/logaling/config.rb 2012-02-14 20:50:20 +0900 (78cbbc7) @@ -25,9 +25,8 @@ module Logaling def add(config_path, key, value) raise Logaling::CommandFailed, "#{key} is unsupported option" unless support?(key) - config = load_config(config_path) - config = merge_options({key => value}, config) - self.new(config).save(config_path) + config = load_config_and_merge_options(nil, config_path, {key => value}) + config.save(config_path) end def load_config_and_merge_options(project_config_path, global_config_path, options)