diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/alaveteli_external_command.rb | 4 | ||||
-rw-r--r-- | lib/configuration.rb | 4 | ||||
-rw-r--r-- | lib/tasks/themes.rake | 10 | ||||
-rw-r--r-- | lib/tasks/translation.rake | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/lib/alaveteli_external_command.rb b/lib/alaveteli_external_command.rb index 24b4b1aa8..ac91a5867 100644 --- a/lib/alaveteli_external_command.rb +++ b/lib/alaveteli_external_command.rb @@ -21,14 +21,14 @@ module AlaveteliExternalCommand program_path = program_name else found = false - Configuration::utility_search_path.each do |d| + AlaveteliConfiguration::utility_search_path.each do |d| program_path = File.join(d, program_name) if File.file? program_path and File.executable? program_path found = true break end end - raise "Could not find #{program_name} in any of #{Configuration::utility_search_path.join(', ')}" if !found + raise "Could not find #{program_name} in any of #{AlaveteliConfiguration::utility_search_path.join(', ')}" if !found end xc = ExternalCommand.new(program_path, *args) diff --git a/lib/configuration.rb b/lib/configuration.rb index d239b95f0..6d2bed66d 100644 --- a/lib/configuration.rb +++ b/lib/configuration.rb @@ -12,7 +12,7 @@ MySociety::Config.load_default # TODO: Make this return different values depending on the current rails environment -module Configuration +module AlaveteliConfiguration DEFAULTS = { :ADMIN_BASE_URL => '', :ADMIN_PASSWORD => '', @@ -68,7 +68,7 @@ module Configuration :WORKING_OR_CALENDAR_DAYS => 'working', } - def Configuration.method_missing(name) + def AlaveteliConfiguration.method_missing(name) key = name.to_s.upcase if DEFAULTS.has_key?(key.to_sym) MySociety::Config.get(key, DEFAULTS[key.to_sym]) diff --git a/lib/tasks/themes.rake b/lib/tasks/themes.rake index 14aa15551..cbd3d123e 100644 --- a/lib/tasks/themes.rake +++ b/lib/tasks/themes.rake @@ -31,7 +31,7 @@ namespace :themes do if system(clone_command) Dir.chdir install_path do # First try to checkout a specific branch of the theme - tag_checked_out = checkout_remote_branch(Configuration::theme_branch) if Configuration::theme_branch + tag_checked_out = checkout_remote_branch(AlaveteliConfiguration::theme_branch) if AlaveteliConfiguration::theme_branch if !tag_checked_out # try to checkout a tag exactly matching ALAVETELI VERSION tag_checked_out = checkout_tag(ALAVETELI_VERSION) @@ -94,10 +94,10 @@ namespace :themes do desc "Install themes specified in the config file's THEME_URLS" task :install => :environment do verbose = true - Configuration::theme_urls.each{ |theme_url| install_theme(theme_url, verbose) } - if ! Configuration::theme_url.blank? + AlaveteliConfiguration::theme_urls.each{ |theme_url| install_theme(theme_url, verbose) } + if ! AlaveteliConfiguration::theme_url.blank? # Old version of the above, for backwards compatibility - install_theme(Configuration::theme_url, verbose, deprecated=true) + install_theme(AlaveteliConfiguration::theme_url, verbose, deprecated=true) end end -end
\ No newline at end of file +end diff --git a/lib/tasks/translation.rake b/lib/tasks/translation.rake index aab327d5b..351faef2c 100644 --- a/lib/tasks/translation.rake +++ b/lib/tasks/translation.rake @@ -156,7 +156,7 @@ namespace :translation do write_email(event_digest_email, 'Alerts on things the user is tracking', output_file) # user mailer - site_name = Configuration::site_name + site_name = AlaveteliConfiguration::site_name reasons = { :web => "", :email => _("Then you can sign in to {{site_name}}", :site_name => site_name), |