app 0.9.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,18 @@
1
+ === 1.0.2 / 2010-12-27
2
+
3
+ * 2 minor bugfixes
4
+
5
+ * Always reload in development.
6
+ * Load before configuration.
7
+
8
+
9
+ === 0.9.1 / 2010-04-20
10
+
11
+ * 1 minor bugfix
12
+
13
+ * Kill deprecation noisemaker.
14
+
15
+
1
16
  === 0.9.0 / 2010-02-21
2
17
 
3
18
  * 1 major enhancement
data/lib/app.rb CHANGED
@@ -32,9 +32,8 @@ class Configurable
32
32
  alias configure class_eval
33
33
 
34
34
  def [](key)
35
- unless config.respond_to? key
35
+ config.respond_to? key or
36
36
  logger.warn "warning: undefined setting `#{key}' for #{__name__}:Class"
37
- end
38
37
 
39
38
  config.send key
40
39
  end
@@ -77,13 +76,18 @@ class Configurable
77
76
 
78
77
  if defined? Rails
79
78
  class Plugin < Rails::Railtie # :nodoc:
80
- initializer "configurable.require_app" do |app|
81
- begin
82
- require app.root.join "config", "app"
83
- require app.root.join "config", "app", Rails.env
84
- rescue LoadError
79
+ class << self
80
+ def load!
81
+ pathname = Rails.root.join 'config', 'app'
82
+ require_dependency pathname.to_s
83
+ require_dependency pathname.join(Rails.env).to_s
84
+ rescue LoadError => e
85
+ warn e.message
85
86
  end
86
87
  end
88
+
89
+ config.before_configuration { ::Configurable::Plugin.load! }
90
+ config.to_prepare { ::Configurable::Plugin.load! }
87
91
  end
88
92
  end
89
93
  end
@@ -1,6 +1,6 @@
1
1
  class App < Configurable # :nodoc:
2
2
  # Settings in config/app/* take precedence over those specified here.
3
- config.name = Rails::Application.instance.class.parent.name
3
+ config.name = Rails.application.class.parent.name
4
4
 
5
5
  # config.key = "value"
6
6
  end
metadata CHANGED
@@ -3,10 +3,10 @@ name: app
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
- - 0
7
- - 9
8
6
  - 1
9
- version: 0.9.1
7
+ - 0
8
+ - 2
9
+ version: 1.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Stephen Celis
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-20 00:00:00 -05:00
17
+ date: 2010-12-27 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies: []
20
20
 
@@ -46,6 +46,7 @@ rdoc_options:
46
46
  require_paths:
47
47
  - lib
48
48
  required_ruby_version: !ruby/object:Gem::Requirement
49
+ none: false
49
50
  requirements:
50
51
  - - ">="
51
52
  - !ruby/object:Gem::Version
@@ -53,6 +54,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
54
  - 0
54
55
  version: "0"
55
56
  required_rubygems_version: !ruby/object:Gem::Requirement
57
+ none: false
56
58
  requirements:
57
59
  - - ">="
58
60
  - !ruby/object:Gem::Version
@@ -62,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
64
  requirements: []
63
65
 
64
66
  rubyforge_project:
65
- rubygems_version: 1.3.6
67
+ rubygems_version: 1.3.7
66
68
  signing_key:
67
69
  specification_version: 3
68
70
  summary: Application configuration.