Skip to content

Commit

Permalink
Added the ability to set the root path in Configatron::Rails.init
Browse files Browse the repository at this point in the history
  • Loading branch information
markbates committed Aug 26, 2009
1 parent 26be433 commit 152c4e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -4,7 +4,7 @@ require 'gemstub'
Gemstub.test_framework = :rspec

Gemstub.gem_spec do |s|
s.version = "2.4.0"
s.version = "2.4.1"
s.summary = "A powerful Ruby configuration system."
s.rubyforge_project = "magrathea"
s.add_dependency('yamler', '>=0.1.0')
Expand Down
2 changes: 1 addition & 1 deletion configatron.gemspec
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |s|
s.name = %q{configatron}
s.version = "2.4.0.20090826115559"
s.version = "2.4.1.20090826153428"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["markbates"]
Expand Down
4 changes: 2 additions & 2 deletions lib/configatron/rails.rb
Expand Up @@ -16,10 +16,10 @@ module Rails
# <RAILS_ROOT>/config/configatron/<RAILS_ENV>/defaults.rb
# <RAILS_ROOT>/config/configatron/<RAILS_ENV>/bar.rb
# <RAILS_ROOT>/config/configatron/<RAILS_ENV>/foo.rb
def self.init
def self.init(root = RAILS_ROOT)
config_files = []

base_dir = File.expand_path(File.join(RAILS_ROOT, 'config', 'configatron'))
base_dir = File.expand_path(File.join(root, 'config', 'configatron'))
config_files << File.join(base_dir, 'defaults.rb')
config_files << File.join(base_dir, "#{RAILS_ENV}.rb")

Expand Down

0 comments on commit 152c4e5

Please sign in to comment.