binarylogic / settingslogic

A simple and straightforward settings solution that uses an ERB enabled YAML file and a singleton design pattern.
http://rdoc.info/projects/binarylogic/settingslogic
MIT License
1.4k stars 187 forks source link

source does not accept multiple filenames #35

Open bodaro opened 12 years ago

bodaro commented 12 years ago

From the readme.rdoc:

If multiple files are passed on the source line, comma-separated, they will be loaded in order, with settings in later files overriding any existing keys. This allows you to, for instance, maintain a global settings file in source control, while allowing each developer to override individual settings as needed. Files that are specified but which do not exist will simply be ignored. Thus you can safely do the following without requiring the presence of application_local.yml:

class Settings < Settingslogic source "#{Rails.root}/config/application.yml", "#{Rails.root}/config/application_local.yml" namespace Rails.env end

And yet when I pass 2 args I get this error: /Users/mpapper/.rvm/gems/ruby-1.9.2-p290@dfc-site/gems/settingslogic-2.0.8/lib/settingslogic.rb:23:in source': wrong number of arguments (2 for 1) (ArgumentError) from /Users/mpapper/work/devforce/dfc-site/vendor/engines/dfc-base/lib/cfg.rb:17:inclass:Cfg'

Heres my line 17: base_source = "siome filename" app_source = "some other filename" source base_source, app_source

My Gemfile.lock shows settingslogic (2.0.8)

Also, I tries this git here: https://gist.github.com/1462080 but insyance.deep_merge! is not supported.

bodaro commented 12 years ago

any updates for this?