application_configuration 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -64,13 +64,16 @@ module Application
64
64
  attr_reader :last_reload_time #stores the last time settings were reloaded
65
65
  attr_reader :is_rails #stores whether or not we're in a rails app
66
66
  attr_reader :loaded_files
67
+ attr_accessor :whiny_config_missing
67
68
 
68
69
  def initialize
70
+ self.whiny_config_missing = false
69
71
  @loaded_files = []
70
72
  @final_configuration_settings = {}
71
73
  @last_reload_time = Time.now # set the first load time
72
74
  @is_rails = Object.const_defined?("RAILS_ENV") # set whether it's rails
73
75
  if self.is_rails
76
+ self.whiny_config_missing = true unless RAILS_ENV == "production"
74
77
  self.loaded_files << Application::Configuration::Location.new("#{RAILS_ROOT}/config/application_configuration.yml")
75
78
  self.loaded_files << Application::Configuration::Location.new("#{RAILS_ROOT}/config/application_configuration_#{RAILS_ENV}.yml")
76
79
  self.loaded_files.uniq!
@@ -140,7 +143,7 @@ module Application
140
143
  def method_missing(sym, *args)
141
144
  puts %{
142
145
  WARNING: Tried to access configuration parameter: #{sym}, but there is no configuration parameter defined with this name. This is not an error, just an informative message. There is no need to open a bug report for this. Sometimes developers only use a configuration parameter to help debug in testing or development, and there is no need to litter other configuration files with these unnecessary parameters. Thank you.
143
- }
146
+ } if self.whiny_config_missing
144
147
  return nil
145
148
  end
146
149
 
@@ -2,4 +2,4 @@
2
2
  gem_name: application_configuration
3
3
  package: application_configuration
4
4
  project: magrathea
5
- version: 1.1.4
5
+ version: 1.1.5
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: application_configuration
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.1.4
7
- date: 2007-10-02 00:00:00 -04:00
6
+ version: 1.1.5
7
+ date: 2007-10-09 00:00:00 -04:00
8
8
  summary: application_configuration
9
9
  require_paths:
10
10
  - lib