rails_config 0.1.8 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.bundle/config +2 -0
- data/.gitignore +3 -0
- data/Gemfile +4 -5
- data/Gemfile.lock +15 -17
- data/Rakefile +6 -21
- data/autotest/discover.rb +2 -0
- data/lib/rails_config/railtie.rb +2 -2
- data/lib/rails_config/version.rb +3 -0
- data/rails_config.gemspec +18 -28
- metadata +50 -28
- data/TODO +0 -8
data/.bundle/config
ADDED
data/.gitignore
ADDED
data/Gemfile
CHANGED
@@ -2,8 +2,7 @@ source 'http://rubygems.org'
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
|
6
|
-
gem "ruby-
|
7
|
-
|
8
|
-
|
9
|
-
gem "growl-glue", ">= 0"
|
5
|
+
group :development do
|
6
|
+
gem "ruby-debug", :platforms => :mri_18
|
7
|
+
gem "ruby-debug19", :platforms => :mri_19
|
8
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,35 +1,33 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rails_config (0.
|
4
|
+
rails_config (0.2.0)
|
5
5
|
activesupport (~> 3.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activesupport (3.0.
|
10
|
+
activesupport (3.0.2)
|
11
11
|
archive-tar-minitar (0.5.2)
|
12
|
-
autotest (4.3
|
13
|
-
columnize (0.3.
|
12
|
+
autotest (4.4.3)
|
13
|
+
columnize (0.3.2)
|
14
14
|
diff-lcs (1.1.2)
|
15
15
|
growl-glue (1.0.7)
|
16
16
|
linecache (0.43)
|
17
17
|
linecache19 (0.5.11)
|
18
18
|
ruby_core_source (>= 0.1.4)
|
19
|
-
rspec (2.
|
20
|
-
rspec-core (
|
21
|
-
rspec-expectations (
|
22
|
-
rspec-mocks (
|
23
|
-
rspec-core (2.
|
24
|
-
rspec-expectations (2.
|
25
|
-
diff-lcs (
|
26
|
-
rspec-mocks (2.
|
27
|
-
|
28
|
-
rspec-expectations (= 2.0.0)
|
29
|
-
ruby-debug (0.10.3)
|
19
|
+
rspec (2.1.0)
|
20
|
+
rspec-core (~> 2.1.0)
|
21
|
+
rspec-expectations (~> 2.1.0)
|
22
|
+
rspec-mocks (~> 2.1.0)
|
23
|
+
rspec-core (2.1.0)
|
24
|
+
rspec-expectations (2.1.0)
|
25
|
+
diff-lcs (~> 1.1.2)
|
26
|
+
rspec-mocks (2.1.0)
|
27
|
+
ruby-debug (0.10.4)
|
30
28
|
columnize (>= 0.1)
|
31
|
-
ruby-debug-base (~> 0.10.
|
32
|
-
ruby-debug-base (0.10.
|
29
|
+
ruby-debug-base (~> 0.10.4.0)
|
30
|
+
ruby-debug-base (0.10.4)
|
33
31
|
linecache (>= 0.3)
|
34
32
|
ruby-debug-base19 (0.11.24)
|
35
33
|
columnize (>= 0.3.1)
|
data/Rakefile
CHANGED
@@ -1,24 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
require 'rake/gempackagetask'
|
6
|
-
|
7
|
-
gemspec = eval(File.read('rails_config.gemspec'))
|
8
|
-
Rake::GemPackageTask.new(gemspec) do |pkg|
|
9
|
-
pkg.gem_spec = gemspec
|
10
|
-
end
|
11
|
-
|
12
|
-
desc "build the gem and release it to rubygems.org"
|
13
|
-
task :release => :gem do
|
14
|
-
puts "Tagging #{gemspec.version}..."
|
15
|
-
system "git tag -a #{gemspec.version} -m 'Tagging #{gemspec.version}'"
|
16
|
-
puts "Pushing to Github..."
|
17
|
-
system "git push --tags"
|
18
|
-
puts "Pushing to rubygems.org..."
|
19
|
-
system "gem push pkg/#{gemspec.name}-#{gemspec.version}.gem"
|
1
|
+
begin
|
2
|
+
require "bundler"
|
3
|
+
Bundler::GemHelper.install_tasks
|
4
|
+
rescue Exception => e
|
20
5
|
end
|
21
6
|
|
7
|
+
require "rake"
|
22
8
|
require "rspec"
|
23
9
|
require "rspec/core/rake_task"
|
24
10
|
|
@@ -34,10 +20,9 @@ end
|
|
34
20
|
require "rake/rdoctask"
|
35
21
|
Rake::RDocTask.new do |rdoc|
|
36
22
|
rdoc.rdoc_dir = "rdoc"
|
37
|
-
rdoc.title = "Rails Config #{
|
23
|
+
rdoc.title = "Rails Config #{RailsConfig::VERSION}"
|
38
24
|
rdoc.rdoc_files.include("README*")
|
39
25
|
rdoc.rdoc_files.include("lib/**/*.rb")
|
40
26
|
end
|
41
27
|
|
42
|
-
|
43
28
|
task :default => :spec
|
data/lib/rails_config/railtie.rb
CHANGED
@@ -9,7 +9,7 @@ if defined?(Rails::Railtie)
|
|
9
9
|
end
|
10
10
|
|
11
11
|
# Parse the settings before any of the initializers
|
12
|
-
ActiveSupport.on_load :
|
12
|
+
ActiveSupport.on_load :before_initialize, :yield => true do
|
13
13
|
RailsConfig.load_and_set_settings(
|
14
14
|
Rails.root.join("config", "settings.yml").to_s,
|
15
15
|
Rails.root.join("config", "settings", "#{Rails.env}.yml").to_s,
|
@@ -21,7 +21,7 @@ if defined?(Rails::Railtie)
|
|
21
21
|
if Rails.env.development?
|
22
22
|
initializer :rails_config_reload_on_development do
|
23
23
|
ActionController::Base.class_eval do
|
24
|
-
prepend_before_filter { ::
|
24
|
+
prepend_before_filter { ::RailsConfig.const_name.constantize.reload! }
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
data/rails_config.gemspec
CHANGED
@@ -1,34 +1,24 @@
|
|
1
|
-
|
2
|
-
s.name = "rails_config"
|
3
|
-
s.version = "0.1.8"
|
4
|
-
|
5
|
-
s.authors = ["Jacques Crocker", "Fred Wu"]
|
6
|
-
s.summary = "Provides a Settings helper for rails3 that reads from config/settings.yml"
|
7
|
-
s.description = "Easy to use Settings helper that loads its data in from config/settings.yml. Handles adding multiple sources, and easy reloading."
|
8
|
-
s.email = ["railsjedi@gmail.com", "ifredwu@gmail.com"]
|
9
|
-
s.homepage = "http://github.com/railsjedi/rails_config"
|
10
|
-
|
11
|
-
s.require_paths = ["lib"]
|
12
|
-
s.files = Dir['lib/**/*',
|
13
|
-
'spec/**/*',
|
14
|
-
'rails_config.gemspec',
|
15
|
-
'Gemfile',
|
16
|
-
'Gemfile.lock',
|
17
|
-
'LICENSE',
|
18
|
-
'Rakefile',
|
19
|
-
'README.md',
|
20
|
-
'TODO']
|
1
|
+
require File.dirname(__FILE__) + "/lib/rails_config/version"
|
21
2
|
|
22
|
-
|
23
|
-
s.
|
24
|
-
s.
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = "rails_config"
|
5
|
+
s.version = RailsConfig::VERSION
|
6
|
+
s.date = Date.today.to_s
|
7
|
+
s.authors = ["Jacques Crocker", "Fred Wu"]
|
8
|
+
s.email = ["railsjedi@gmail.com", "ifredwu@gmail.com"]
|
9
|
+
s.summary = "Provides a Settings helper for rails3 that reads from config/settings.yml"
|
10
|
+
s.description = "Easy to use Settings helper that loads its data in from config/settings.yml. Handles adding multiple sources, and easy reloading."
|
11
|
+
s.homepage = "http://github.com/railsjedi/rails_config"
|
12
|
+
s.extra_rdoc_files = ["README.md"]
|
13
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
14
|
+
s.require_paths = ["lib"]
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
29
18
|
|
30
19
|
s.add_runtime_dependency "activesupport", "~> 3.0"
|
31
20
|
s.add_development_dependency "rspec", "~> 2.0"
|
32
|
-
|
21
|
+
s.add_development_dependency "autotest", ">= 0"
|
22
|
+
s.add_development_dependency "growl-glue", ">= 0"
|
33
23
|
end
|
34
24
|
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 11
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
version: 0.2.0
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Jacques Crocker
|
@@ -16,39 +15,63 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date: 2010-
|
18
|
+
date: 2010-11-16 00:00:00 +11:00
|
20
19
|
default_executable:
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
22
|
name: activesupport
|
26
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
27
25
|
none: false
|
28
26
|
requirements:
|
29
27
|
- - ~>
|
30
28
|
- !ruby/object:Gem::Version
|
31
|
-
hash: 7
|
32
29
|
segments:
|
33
30
|
- 3
|
34
31
|
- 0
|
35
32
|
version: "3.0"
|
36
|
-
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
37
35
|
- !ruby/object:Gem::Dependency
|
38
|
-
type: :development
|
39
|
-
prerelease: false
|
40
36
|
name: rspec
|
41
|
-
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
42
39
|
none: false
|
43
40
|
requirements:
|
44
41
|
- - ~>
|
45
42
|
- !ruby/object:Gem::Version
|
46
|
-
hash: 3
|
47
43
|
segments:
|
48
44
|
- 2
|
49
45
|
- 0
|
50
46
|
version: "2.0"
|
51
|
-
|
47
|
+
type: :development
|
48
|
+
version_requirements: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: autotest
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
60
|
+
type: :development
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: growl-glue
|
64
|
+
prerelease: false
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
segments:
|
71
|
+
- 0
|
72
|
+
version: "0"
|
73
|
+
type: :development
|
74
|
+
version_requirements: *id004
|
52
75
|
description: Easy to use Settings helper that loads its data in from config/settings.yml. Handles adding multiple sources, and easy reloading.
|
53
76
|
email:
|
54
77
|
- railsjedi@gmail.com
|
@@ -58,21 +81,29 @@ executables: []
|
|
58
81
|
extensions: []
|
59
82
|
|
60
83
|
extra_rdoc_files:
|
61
|
-
- LICENSE
|
62
84
|
- README.md
|
63
|
-
- TODO
|
64
85
|
files:
|
86
|
+
- .bundle/config
|
87
|
+
- .gitignore
|
88
|
+
- Gemfile
|
89
|
+
- Gemfile.lock
|
90
|
+
- LICENSE
|
91
|
+
- README.md
|
92
|
+
- Rakefile
|
93
|
+
- autotest/discover.rb
|
65
94
|
- lib/generators/rails_config/install_generator.rb
|
66
95
|
- lib/generators/rails_config/templates/rails_config.rb
|
96
|
+
- lib/generators/rails_config/templates/settings.yml
|
67
97
|
- lib/generators/rails_config/templates/settings/development.yml
|
68
98
|
- lib/generators/rails_config/templates/settings/production.yml
|
69
99
|
- lib/generators/rails_config/templates/settings/test.yml
|
70
|
-
- lib/
|
100
|
+
- lib/rails_config.rb
|
71
101
|
- lib/rails_config/options.rb
|
72
102
|
- lib/rails_config/railtie.rb
|
73
103
|
- lib/rails_config/sources/yaml_source.rb
|
74
104
|
- lib/rails_config/vendor/deep_merge.rb
|
75
|
-
- lib/rails_config.rb
|
105
|
+
- lib/rails_config/version.rb
|
106
|
+
- rails_config.gemspec
|
76
107
|
- spec/fixtures/bool_override/config1.yml
|
77
108
|
- spec/fixtures/bool_override/config2.yml
|
78
109
|
- spec/fixtures/custom_types/hash.yml
|
@@ -89,13 +120,6 @@ files:
|
|
89
120
|
- spec/rails_config_spec.rb
|
90
121
|
- spec/sources/yaml_source_spec.rb
|
91
122
|
- spec/spec_helper.rb
|
92
|
-
- rails_config.gemspec
|
93
|
-
- Gemfile
|
94
|
-
- Gemfile.lock
|
95
|
-
- LICENSE
|
96
|
-
- Rakefile
|
97
|
-
- README.md
|
98
|
-
- TODO
|
99
123
|
has_rdoc: true
|
100
124
|
homepage: http://github.com/railsjedi/rails_config
|
101
125
|
licenses: []
|
@@ -110,7 +134,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
134
|
requirements:
|
111
135
|
- - ">="
|
112
136
|
- !ruby/object:Gem::Version
|
113
|
-
hash: 3
|
114
137
|
segments:
|
115
138
|
- 0
|
116
139
|
version: "0"
|
@@ -119,7 +142,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
142
|
requirements:
|
120
143
|
- - ">="
|
121
144
|
- !ruby/object:Gem::Version
|
122
|
-
hash: 3
|
123
145
|
segments:
|
124
146
|
- 0
|
125
147
|
version: "0"
|
data/TODO
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
- Change part of the install generator to `rails_config:override` that creates an config/rails_config.rb initializer and disables the default initialzer
|
2
|
-
|
3
|
-
DONE:
|
4
|
-
- Add a Rails before_filter that triggers Settings.reload! for each development request
|
5
|
-
- Add generator `rails_config:install` to create the default setting files
|
6
|
-
- Allow user to customize the name of the global setting object (Settings)
|
7
|
-
- Abstract OpenStruct to RailsConfig::Options
|
8
|
-
- Add ability to define multiple sources (Start with YAMLSource)
|