youthtree-settings 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ require 'erb'
4
4
  module YouthTree
5
5
  class Settings
6
6
 
7
- VERSION = "0.2.1".freeze
7
+ VERSION = "0.3.0".freeze
8
8
 
9
9
  cattr_reader :settings_path
10
10
  def self.settings_path
@@ -78,6 +78,13 @@ module YouthTree
78
78
  end
79
79
  end
80
80
 
81
+ def reset!
82
+ @@__default = nil
83
+ default # Force us to reload the settings
84
+ YouthTree::Settings.setup_mailer!
85
+ true
86
+ end
87
+
81
88
  def method_missing(name, *args, &blk)
82
89
  default.send(name, *args, &blk)
83
90
  end
@@ -152,9 +159,7 @@ module YouthTree
152
159
 
153
160
  if defined?(Rails::Railtie)
154
161
  class Railtie < Rails::Railtie
155
- initializer "youthtree.settings" do
156
- YouthTree::Settings.setup_mailer!
157
- end
162
+ config.to_prepare { YouthTree::Settings.reset! }
158
163
  end
159
164
  end
160
165
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{youthtree-settings}
8
- s.version = "0.2.1"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Darcy Laycock"]
12
- s.date = %q{2011-03-31}
12
+ s.date = %q{2011-05-17}
13
13
  s.description = %q{Lets you use config/settings.yml in a rails application to manage settings on a per-env basis.}
14
14
  s.email = %q{sutto@sutto.net}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: youthtree-settings
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
9
- - 1
10
- version: 0.2.1
8
+ - 3
9
+ - 0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Darcy Laycock
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-31 00:00:00 +08:00
18
+ date: 2011-05-17 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency