Skip to content

Commit

Permalink
CRUISE_DATA_ROOT is once again a root-level namespace constant. Fixes t…
Browse files Browse the repository at this point in the history
  • Loading branch information
bguthrie committed Jun 11, 2011
1 parent feb50af commit 1665c2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions config/application.rb
Expand Up @@ -38,16 +38,11 @@ def self.data_root
@data_root ||= Pathname.new( ENV['CRUISE_DATA_ROOT'] || File.join(CruiseControl.home_directory, ".cruise") )
end

class Application < Rails::Application
unless defined? CRUISE_DATA_ROOT
CRUISE_DATA_ROOT = CruiseControl.data_root.to_s
puts "cruise data root = '#{CRUISE_DATA_ROOT}'"
end

class Application < Rails::Application
# Add additional load paths for your own custom dirs
config.autoload_paths << Rails.root.join('lib')
config.autoload_paths << File.join(CRUISE_DATA_ROOT, 'builder_plugins')
config.autoload_paths << Rails.root.join('lib', 'builder_plugins')
config.autoload_paths << CruiseControl.data_root.join('builder_plugins')

config.after_initialize do
require Rails.root.join('config', 'configuration')
Expand All @@ -60,4 +55,9 @@ class Application < Rails::Application
BuilderPlugin.load_all
end
end
end

unless defined? CRUISE_DATA_ROOT
CRUISE_DATA_ROOT = CruiseControl.data_root.to_s
puts "cruise data root = '#{CRUISE_DATA_ROOT}'"
end
2 changes: 1 addition & 1 deletion config/configuration.rb
Expand Up @@ -29,7 +29,7 @@ def data_root=(root)
end

def data_root
@data_root ||= Pathname.new(CruiseControl::Application::CRUISE_DATA_ROOT)
@data_root ||= CruiseControl.data_root
end

def projects_root
Expand Down

0 comments on commit 1665c2e

Please sign in to comment.