configreader 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gemspec +5 -3
- data/CHANGELOG.md +11 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +68 -72
- data/README.md +1 -3
- data/lib/configreader.rb +2 -0
- data/lib/configreader/env_configreader.rb +14 -5
- data/lib/configreader/flat_configreader.rb +4 -30
- data/lib/configreader/mixins/file_loading.rb +23 -0
- data/lib/configreader/version.rb +1 -1
- data/spec/config/fake_env.yml +2 -2
- data/spec/lib/env_configreader_spec.rb +17 -11
- data/spec/lib/flat_configreader_spec.rb +23 -2
- metadata +90 -81
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2f973d9c43db8e4a51ccd599d6f9e2f20681a9d7
|
4
|
+
data.tar.gz: 0e0fa11b219a3a3165eeafdfbd8e9d352a10e835
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 816eb2a0e074436ed1a6524bc873b249bdc23764f75a0c924bb6435883eaf626515040398b27158a0f12954a3191e6e5df01ff1fc06f141b3b3ff68d4c4bb04d
|
7
|
+
data.tar.gz: c5701951d4feec6174884ebba5567fe6dfbde7300db1be5c16263b62c15e5401fa6bf3dc89c7aefac9fe31ba50dff82249408c84b78db061c23b74ef9c7a9929
|
data/.gemspec
CHANGED
@@ -12,13 +12,15 @@ Gem::Specification.new do |s|
|
|
12
12
|
providing a more concise API to access your configuration data, by accessing methods instead of Hash keys. It also
|
13
13
|
allows you to configure environment aware configuration objects, and by so inverting the logic of
|
14
14
|
environment specific configuration into the ConfigReader.}
|
15
|
+
s.license = "MIT"
|
15
16
|
|
16
17
|
s.files = `git ls-files`.split("\n")
|
17
18
|
s.require_path = "lib"
|
18
19
|
s.test_files = Dir.glob('spec/lib/*_spec.rb')
|
19
20
|
|
20
21
|
|
21
|
-
s.add_dependency 'rails'
|
22
|
-
s.
|
23
|
-
s.add_development_dependency '
|
22
|
+
s.add_dependency 'rails', '> 3.0.0'
|
23
|
+
s.add_dependency 'hashie', '~> 3.0', '> 3.0.0'
|
24
|
+
s.add_development_dependency 'rake', '~> 0.9'
|
25
|
+
s.add_development_dependency 'rspec', '~> 2.11', '>= 2.11.0'
|
24
26
|
end
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
## 0.0.4
|
2
|
+
* Moved to Hashie - enables easy access to all underlying levels of hash
|
3
|
+
* Deep Merge - defaults now deep merge in EnvConfigReader (You can now put any default attributes under defaults)
|
4
|
+
|
5
|
+
|
6
|
+
## 0.0.2
|
7
|
+
* Added support for default environment
|
8
|
+
|
9
|
+
|
10
|
+
## 0.0.1
|
11
|
+
* Initial Release
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,79 +1,71 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
configreader (0.0.
|
5
|
-
|
4
|
+
configreader (0.0.4)
|
5
|
+
hashie (~> 3.0, > 3.0.0)
|
6
|
+
rails (> 3.0.0)
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: http://rubygems.org/
|
9
10
|
specs:
|
10
|
-
actionmailer (
|
11
|
-
actionpack (=
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
actionmailer (4.1.9)
|
12
|
+
actionpack (= 4.1.9)
|
13
|
+
actionview (= 4.1.9)
|
14
|
+
mail (~> 2.5, >= 2.5.4)
|
15
|
+
actionpack (4.1.9)
|
16
|
+
actionview (= 4.1.9)
|
17
|
+
activesupport (= 4.1.9)
|
18
|
+
rack (~> 1.5.2)
|
19
|
+
rack-test (~> 0.6.2)
|
20
|
+
actionview (4.1.9)
|
21
|
+
activesupport (= 4.1.9)
|
22
|
+
builder (~> 3.1)
|
17
23
|
erubis (~> 2.7.0)
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
tzinfo (~>
|
31
|
-
|
32
|
-
|
33
|
-
activesupport (= 3.2.8)
|
34
|
-
activesupport (3.2.8)
|
35
|
-
i18n (~> 0.6)
|
36
|
-
multi_json (~> 1.0)
|
37
|
-
arel (3.0.2)
|
38
|
-
builder (3.0.4)
|
24
|
+
activemodel (4.1.9)
|
25
|
+
activesupport (= 4.1.9)
|
26
|
+
builder (~> 3.1)
|
27
|
+
activerecord (4.1.9)
|
28
|
+
activemodel (= 4.1.9)
|
29
|
+
activesupport (= 4.1.9)
|
30
|
+
arel (~> 5.0.0)
|
31
|
+
activesupport (4.1.9)
|
32
|
+
i18n (~> 0.6, >= 0.6.9)
|
33
|
+
json (~> 1.7, >= 1.7.7)
|
34
|
+
minitest (~> 5.1)
|
35
|
+
thread_safe (~> 0.1)
|
36
|
+
tzinfo (~> 1.1)
|
37
|
+
arel (5.0.1.20140414130214)
|
38
|
+
builder (3.2.2)
|
39
39
|
diff-lcs (1.1.3)
|
40
40
|
erubis (2.7.0)
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
json (1.
|
45
|
-
mail (2.
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
rack (1.4.1)
|
53
|
-
rack-cache (1.2)
|
54
|
-
rack (>= 0.4)
|
55
|
-
rack-ssl (1.3.2)
|
56
|
-
rack
|
57
|
-
rack-test (0.6.2)
|
41
|
+
hashie (3.3.1)
|
42
|
+
hike (1.2.3)
|
43
|
+
i18n (0.6.11)
|
44
|
+
json (1.8.2)
|
45
|
+
mail (2.6.3)
|
46
|
+
mime-types (>= 1.16, < 3)
|
47
|
+
mime-types (2.4.3)
|
48
|
+
minitest (5.5.1)
|
49
|
+
multi_json (1.10.1)
|
50
|
+
rack (1.5.2)
|
51
|
+
rack-test (0.6.3)
|
58
52
|
rack (>= 1.0)
|
59
|
-
rails (
|
60
|
-
actionmailer (=
|
61
|
-
actionpack (=
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
53
|
+
rails (4.1.9)
|
54
|
+
actionmailer (= 4.1.9)
|
55
|
+
actionpack (= 4.1.9)
|
56
|
+
actionview (= 4.1.9)
|
57
|
+
activemodel (= 4.1.9)
|
58
|
+
activerecord (= 4.1.9)
|
59
|
+
activesupport (= 4.1.9)
|
60
|
+
bundler (>= 1.3.0, < 2.0)
|
61
|
+
railties (= 4.1.9)
|
62
|
+
sprockets-rails (~> 2.0)
|
63
|
+
railties (4.1.9)
|
64
|
+
actionpack (= 4.1.9)
|
65
|
+
activesupport (= 4.1.9)
|
71
66
|
rake (>= 0.8.7)
|
72
|
-
|
73
|
-
thor (>= 0.14.6, < 2.0)
|
67
|
+
thor (>= 0.18.1, < 2.0)
|
74
68
|
rake (0.9.2.2)
|
75
|
-
rdoc (3.12)
|
76
|
-
json (~> 1.4)
|
77
69
|
rspec (2.11.0)
|
78
70
|
rspec-core (~> 2.11.0)
|
79
71
|
rspec-expectations (~> 2.11.0)
|
@@ -82,21 +74,25 @@ GEM
|
|
82
74
|
rspec-expectations (2.11.3)
|
83
75
|
diff-lcs (~> 1.1.3)
|
84
76
|
rspec-mocks (2.11.3)
|
85
|
-
sprockets (2.
|
77
|
+
sprockets (2.12.3)
|
86
78
|
hike (~> 1.2)
|
79
|
+
multi_json (~> 1.0)
|
87
80
|
rack (~> 1.0)
|
88
81
|
tilt (~> 1.1, != 1.3.0)
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
82
|
+
sprockets-rails (2.2.4)
|
83
|
+
actionpack (>= 3.0)
|
84
|
+
activesupport (>= 3.0)
|
85
|
+
sprockets (>= 2.8, < 4.0)
|
86
|
+
thor (0.19.1)
|
87
|
+
thread_safe (0.3.4)
|
88
|
+
tilt (1.4.1)
|
89
|
+
tzinfo (1.2.2)
|
90
|
+
thread_safe (~> 0.1)
|
95
91
|
|
96
92
|
PLATFORMS
|
97
93
|
ruby
|
98
94
|
|
99
95
|
DEPENDENCIES
|
100
96
|
configreader!
|
101
|
-
rake
|
102
|
-
rspec
|
97
|
+
rake (~> 0.9)
|
98
|
+
rspec (~> 2.11, >= 2.11.0)
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# ConfigReader 0.0.
|
1
|
+
# ConfigReader 0.0.4 [![Build Status](https://secure.travis-ci.org/TheGiftsProject/configreader.png)](http://travis-ci.org/TheGiftsProject/configreader)
|
2
2
|
|
3
3
|
ConfigReader provides an easy way to load up your configuration YAML files into Ruby objects,
|
4
4
|
providing a more concise API to access your configuration data, by accessing methods instead of Hash keys. It also
|
@@ -6,8 +6,6 @@
|
|
6
6
|
|
7
7
|
You can use it to access your FACEBOOK / ANALYTICS configuration YAML's for instance.
|
8
8
|
|
9
|
-
Note: Only the first level YAML keys can be accessed as methods.
|
10
|
-
|
11
9
|
## Usage
|
12
10
|
|
13
11
|
Note: The examples are for a Rails 3 app.
|
data/lib/configreader.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'active_support/dependencies'
|
2
2
|
require 'configreader/config'
|
3
3
|
require 'yaml'
|
4
|
+
require 'hashie'
|
4
5
|
require 'pathname'
|
5
6
|
|
6
7
|
module ConfigReader
|
@@ -41,5 +42,6 @@ module ConfigReader
|
|
41
42
|
end
|
42
43
|
|
43
44
|
require 'configreader/engine'
|
45
|
+
require 'configreader/mixins/file_loading'
|
44
46
|
require 'configreader/flat_configreader'
|
45
47
|
require 'configreader/env_configreader'
|
@@ -2,14 +2,23 @@ require File.expand_path('../flat_configreader', __FILE__)
|
|
2
2
|
|
3
3
|
module ConfigReader
|
4
4
|
|
5
|
-
class EnvConfigReader <
|
5
|
+
class EnvConfigReader < Hashie::Mash
|
6
|
+
|
7
|
+
DEFAULT_KEY = 'defaults'
|
8
|
+
|
9
|
+
include ConfigReader::FileLoading
|
10
|
+
include Hashie::Extensions::DeepMerge
|
6
11
|
|
7
12
|
class EnvironmentNotFoundInYaml < StandardError ; end
|
8
13
|
|
9
|
-
def initialize(
|
10
|
-
|
11
|
-
|
12
|
-
|
14
|
+
def initialize(config)
|
15
|
+
config_data = load_config(config)
|
16
|
+
env_data = config_data[Rails.env] || {}
|
17
|
+
default_data = config_data[DEFAULT_KEY] || {}
|
18
|
+
|
19
|
+
super(default_data)
|
20
|
+
self.deep_merge!(env_data)
|
21
|
+
raise EnvironmentNotFoundInYaml.new(Rails.env) if self.empty?
|
13
22
|
end
|
14
23
|
|
15
24
|
end
|
@@ -1,37 +1,11 @@
|
|
1
1
|
module ConfigReader
|
2
2
|
|
3
|
-
class FlatConfigReader
|
3
|
+
class FlatConfigReader < Hashie::Mash
|
4
4
|
|
5
|
-
|
6
|
-
@data = config.is_a?(String) ? read_file(config) : config
|
7
|
-
|
8
|
-
remove_id_method
|
9
|
-
end
|
10
|
-
|
11
|
-
def method_missing(name)
|
12
|
-
@data[name.to_s]
|
13
|
-
end
|
14
|
-
|
15
|
-
#def local_constant_names
|
16
|
-
# nil
|
17
|
-
#end
|
18
|
-
|
19
|
-
protected
|
5
|
+
include ConfigReader::FileLoading
|
20
6
|
|
21
|
-
def
|
22
|
-
|
23
|
-
end
|
24
|
-
|
25
|
-
def full_path(file_name)
|
26
|
-
File.join(relative_path, file_name)
|
27
|
-
end
|
28
|
-
|
29
|
-
def read_file(file_name)
|
30
|
-
YAML.load_file(full_path(file_name))
|
31
|
-
end
|
32
|
-
|
33
|
-
def remove_id_method
|
34
|
-
instance_eval "undef id" if methods.any? { |method| method == "id" }
|
7
|
+
def initialize(config)
|
8
|
+
super(load_config(config))
|
35
9
|
end
|
36
10
|
|
37
11
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module ConfigReader
|
2
|
+
module FileLoading
|
3
|
+
|
4
|
+
def load_config(config)
|
5
|
+
config.is_a?(String) ? read_file(config) : config
|
6
|
+
end
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
def config_path
|
11
|
+
File.join(Rails.root, "config")
|
12
|
+
end
|
13
|
+
|
14
|
+
def full_path(file_name)
|
15
|
+
File.join(config_path, file_name)
|
16
|
+
end
|
17
|
+
|
18
|
+
def read_file(file_name)
|
19
|
+
YAML.load_file(full_path(file_name))
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
data/lib/configreader/version.rb
CHANGED
data/spec/config/fake_env.yml
CHANGED
@@ -1,37 +1,35 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
require File.expand_path('../../../lib/configreader/env_configreader', __FILE__)
|
3
2
|
|
4
3
|
describe ConfigReader::EnvConfigReader do
|
5
4
|
|
6
5
|
before do
|
7
|
-
ConfigReader::EnvConfigReader.any_instance.stub(:
|
6
|
+
ConfigReader::EnvConfigReader.any_instance.stub(:config_path => "#{ConfigReader::Engine.root}/spec/config")
|
8
7
|
end
|
9
8
|
|
10
9
|
subject { ConfigReader::EnvConfigReader.new("fake_env.yml") }
|
11
10
|
|
12
11
|
it "should let you access data under the right env" do
|
13
|
-
subject.devid.should
|
14
|
-
subject.appid.should
|
12
|
+
subject.devid.should eq "devid"
|
13
|
+
subject.appid.should eq "appid"
|
15
14
|
end
|
16
15
|
|
17
|
-
it "should not let you access data under other
|
16
|
+
it "should not let you access data under other environments" do
|
18
17
|
subject.only_production.should be_nil
|
19
|
-
subject.devid.should_not
|
18
|
+
subject.devid.should_not eq "productionDevId"
|
20
19
|
end
|
21
20
|
|
22
21
|
it "should enable you to read the id attribute" do
|
23
|
-
subject.id.should
|
22
|
+
subject.id.should eq "testID"
|
24
23
|
end
|
25
24
|
|
26
25
|
context 'when an environment does not exist in the configuration' do
|
27
26
|
|
28
27
|
it 'should fallback to default settings if defaults exist' do
|
29
28
|
Rails.stub(:env) { 'unknown' }
|
30
|
-
config = ConfigReader::EnvConfigReader.new 'fake_env.yml'
|
31
29
|
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
subject.id.should eq 'defaultID'
|
31
|
+
subject.appid.should eq 'defaultAppID'
|
32
|
+
subject.certid.should eq 'defaultCertID'
|
35
33
|
end
|
36
34
|
|
37
35
|
it 'should raise an EnvironmentNotFoundInYaml when loading if defaults do not exist' do
|
@@ -42,4 +40,12 @@ describe ConfigReader::EnvConfigReader do
|
|
42
40
|
|
43
41
|
end
|
44
42
|
|
43
|
+
context 'when an environment only exists partially' do
|
44
|
+
before { Rails.stub(:env) { 'production' } }
|
45
|
+
it 'should deep merge the defaults' do
|
46
|
+
subject.devid.should eq 'productionDevId'
|
47
|
+
subject.certid.should eq 'defaultCertID'
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
45
51
|
end
|
@@ -3,19 +3,28 @@ require 'spec_helper'
|
|
3
3
|
describe ConfigReader::FlatConfigReader do
|
4
4
|
|
5
5
|
before do
|
6
|
-
ConfigReader::FlatConfigReader.any_instance.stub(:
|
6
|
+
ConfigReader::FlatConfigReader.any_instance.stub(:config_path => "#{ConfigReader::Engine.root}/spec/config")
|
7
7
|
end
|
8
8
|
|
9
9
|
subject { ConfigReader::FlatConfigReader.new("fake_simple.yml") }
|
10
|
+
let(:string_value) {"my name"}
|
10
11
|
|
11
12
|
it "should enable you to read attributes from the yml" do
|
12
13
|
subject.boolean_value.should be_true
|
13
14
|
subject.integer_value.should == 3
|
14
|
-
subject.string_value.should ==
|
15
|
+
subject.string_value.should == string_value
|
15
16
|
subject.quoted_string_value.should == "qtd my name"
|
16
17
|
subject.complex_value.should == {'a' => 1, 'b' => 2}
|
17
18
|
end
|
18
19
|
|
20
|
+
it 'should act like a string hash' do
|
21
|
+
subject['string_value'].should eq string_value
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'should act like a symbol hash' do
|
25
|
+
subject[:string_value].should eq string_value
|
26
|
+
end
|
27
|
+
|
19
28
|
it "should enable you to read the id attribute" do
|
20
29
|
subject.id.should == "file"
|
21
30
|
end
|
@@ -30,5 +39,17 @@ describe ConfigReader::FlatConfigReader do
|
|
30
39
|
}.to raise_error(Errno::ENOENT)
|
31
40
|
end
|
32
41
|
|
42
|
+
describe :to_h do
|
43
|
+
let(:expected_hash) { YAML.load_file("spec/config/fake_simple.yml") }
|
44
|
+
|
45
|
+
it "should return a hash" do
|
46
|
+
subject.to_h.should be_a Hash
|
47
|
+
end
|
48
|
+
|
49
|
+
it "should return the correct data" do
|
50
|
+
subject.to_h.should eq expected_hash
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
33
54
|
|
34
55
|
end
|
metadata
CHANGED
@@ -1,82 +1,99 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: configreader
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 2
|
10
|
-
version: 0.0.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Itay Adler
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2015-02-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
21
14
|
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>'
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.0.0
|
20
|
+
type: :runtime
|
22
21
|
prerelease: false
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>'
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: hashie
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.0'
|
34
|
+
- - '>'
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 3.0.0
|
32
37
|
type: :runtime
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: rake
|
36
38
|
prerelease: false
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '3.0'
|
44
|
+
- - '>'
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 3.0.0
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rake
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.9'
|
46
54
|
type: :development
|
47
|
-
version_requirements: *id002
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: rspec
|
50
55
|
prerelease: false
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ~>
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0.9'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rspec
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ~>
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '2.11'
|
68
|
+
- - '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 2.11.0
|
60
71
|
type: :development
|
61
|
-
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '2.11'
|
78
|
+
- - '>='
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 2.11.0
|
62
81
|
description: |-
|
63
82
|
ConfigReader provides an easy way to load up your configuration YAML files into Ruby objects,
|
64
83
|
providing a more concise API to access your configuration data, by accessing methods instead of Hash keys. It also
|
65
84
|
allows you to configure environment aware configuration objects, and by so inverting the logic of
|
66
85
|
environment specific configuration into the ConfigReader.
|
67
|
-
email:
|
86
|
+
email:
|
68
87
|
- itayadler@gmail.com
|
69
88
|
executables: []
|
70
|
-
|
71
89
|
extensions: []
|
72
|
-
|
73
90
|
extra_rdoc_files: []
|
74
|
-
|
75
|
-
files:
|
91
|
+
files:
|
76
92
|
- .gemspec
|
77
93
|
- .gitignore
|
78
94
|
- .rspec
|
79
95
|
- .rvmrc
|
96
|
+
- CHANGELOG.md
|
80
97
|
- Gemfile
|
81
98
|
- Gemfile.lock
|
82
99
|
- README.md
|
@@ -86,6 +103,7 @@ files:
|
|
86
103
|
- lib/configreader/engine.rb
|
87
104
|
- lib/configreader/env_configreader.rb
|
88
105
|
- lib/configreader/flat_configreader.rb
|
106
|
+
- lib/configreader/mixins/file_loading.rb
|
89
107
|
- lib/configreader/version.rb
|
90
108
|
- spec/config/auto_create/env/fake_env.yml
|
91
109
|
- spec/config/auto_create/fake_simple.yml
|
@@ -98,39 +116,30 @@ files:
|
|
98
116
|
- spec/lib/flat_configreader_spec.rb
|
99
117
|
- spec/spec_helper.rb
|
100
118
|
homepage: https://github.com/TheGiftsProject/configreader
|
101
|
-
licenses:
|
102
|
-
|
119
|
+
licenses:
|
120
|
+
- MIT
|
121
|
+
metadata: {}
|
103
122
|
post_install_message:
|
104
123
|
rdoc_options: []
|
105
|
-
|
106
|
-
require_paths:
|
124
|
+
require_paths:
|
107
125
|
- lib
|
108
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
none: false
|
119
|
-
requirements:
|
120
|
-
- - ">="
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
hash: 3
|
123
|
-
segments:
|
124
|
-
- 0
|
125
|
-
version: "0"
|
126
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - '>='
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - '>='
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0'
|
126
136
|
requirements: []
|
127
|
-
|
128
137
|
rubyforge_project:
|
129
|
-
rubygems_version:
|
138
|
+
rubygems_version: 2.4.0
|
130
139
|
signing_key:
|
131
|
-
specification_version:
|
140
|
+
specification_version: 4
|
132
141
|
summary: ConfigReader - An easy way to manage your configuration files
|
133
|
-
test_files:
|
134
|
-
- spec/lib/flat_configreader_spec.rb
|
135
|
-
- spec/lib/env_configreader_spec.rb
|
142
|
+
test_files:
|
136
143
|
- spec/lib/config_spec.rb
|
144
|
+
- spec/lib/env_configreader_spec.rb
|
145
|
+
- spec/lib/flat_configreader_spec.rb
|