rails_config_loader 0.1.1 → 0.1.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.
- data/VERSION +1 -1
- data/lib/rails_config_loader.rb +4 -0
- data/rails_config_loader.gemspec +2 -2
- data/spec/config_loader/yaml_spec.rb +18 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/rails_config_loader.rb
CHANGED
data/rails_config_loader.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "rails_config_loader"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kristian Mandrup"]
|
12
|
-
s.date = "2012-05-
|
12
|
+
s.date = "2012-05-09"
|
13
13
|
s.description = "Load yaml and json config files and \n make the structures easily available for use in the app."
|
14
14
|
s.email = "kmandrup@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -6,6 +6,10 @@ module Rails
|
|
6
6
|
end
|
7
7
|
end
|
8
8
|
|
9
|
+
class LoadMe
|
10
|
+
include ConfigLoader
|
11
|
+
end
|
12
|
+
|
9
13
|
describe ConfigLoader::Yaml do
|
10
14
|
subject { config }
|
11
15
|
let(:config) { ConfigLoader::Yaml.new('facebook.yml') }
|
@@ -36,6 +40,20 @@ describe ConfigLoader::Yaml do
|
|
36
40
|
end
|
37
41
|
end
|
38
42
|
|
43
|
+
describe ConfigLoader do
|
44
|
+
subject { loadme }
|
45
|
+
|
46
|
+
let(:loadme) { LoadMe.new }
|
47
|
+
|
48
|
+
describe '.load' do
|
49
|
+
specify { subject.load('htc.yml').as_hash.domain.should == 'www.htc.com' }
|
50
|
+
end
|
51
|
+
|
52
|
+
describe '.load_hash' do
|
53
|
+
specify { subject.load_hash('htc.yml').domain.should == 'www.htc.com' }
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
39
57
|
describe 'Delegator' do
|
40
58
|
subject { config }
|
41
59
|
let(:config) { MainApp.config }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_config_loader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hashie
|
@@ -169,7 +169,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
segments:
|
171
171
|
- 0
|
172
|
-
hash:
|
172
|
+
hash: -2060976259246285744
|
173
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
174
|
none: false
|
175
175
|
requirements:
|