configoro 1.2.4 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Gemfile.lock +95 -69
- data/VERSION +1 -1
- data/configoro.gemspec +5 -5
- data/lib/configoro/hash.rb +12 -4
- metadata +5 -5
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,100 +1,126 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
actionmailer (
|
5
|
-
actionpack (=
|
4
|
+
actionmailer (4.0.0)
|
5
|
+
actionpack (= 4.0.0)
|
6
6
|
mail (~> 2.5.3)
|
7
|
-
actionpack (
|
8
|
-
|
9
|
-
|
10
|
-
builder (~> 3.0.0)
|
7
|
+
actionpack (4.0.0)
|
8
|
+
activesupport (= 4.0.0)
|
9
|
+
builder (~> 3.1.0)
|
11
10
|
erubis (~> 2.7.0)
|
12
|
-
|
13
|
-
rack (~>
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
builder (3.
|
11
|
+
rack (~> 1.5.2)
|
12
|
+
rack-test (~> 0.6.2)
|
13
|
+
activemodel (4.0.0)
|
14
|
+
activesupport (= 4.0.0)
|
15
|
+
builder (~> 3.1.0)
|
16
|
+
activerecord (4.0.0)
|
17
|
+
activemodel (= 4.0.0)
|
18
|
+
activerecord-deprecated_finders (~> 1.0.2)
|
19
|
+
activesupport (= 4.0.0)
|
20
|
+
arel (~> 4.0.0)
|
21
|
+
activerecord-deprecated_finders (1.0.3)
|
22
|
+
activesupport (4.0.0)
|
23
|
+
i18n (~> 0.6, >= 0.6.4)
|
24
|
+
minitest (~> 4.2)
|
25
|
+
multi_json (~> 1.3)
|
26
|
+
thread_safe (~> 0.1)
|
27
|
+
tzinfo (~> 0.3.37)
|
28
|
+
addressable (2.3.5)
|
29
|
+
arel (4.0.0)
|
30
|
+
atomic (1.1.10)
|
31
|
+
builder (3.1.4)
|
33
32
|
diff-lcs (1.2.4)
|
34
33
|
erubis (2.7.0)
|
34
|
+
faraday (0.8.7)
|
35
|
+
multipart-post (~> 1.1)
|
35
36
|
git (1.2.5)
|
36
|
-
|
37
|
-
|
38
|
-
|
37
|
+
github_api (0.10.1)
|
38
|
+
addressable
|
39
|
+
faraday (~> 0.8.1)
|
40
|
+
hashie (>= 1.2)
|
41
|
+
multi_json (~> 1.4)
|
42
|
+
nokogiri (~> 1.5.2)
|
43
|
+
oauth2
|
44
|
+
hashie (2.0.5)
|
45
|
+
highline (1.6.19)
|
46
|
+
hike (1.2.3)
|
47
|
+
httpauth (0.2.0)
|
48
|
+
i18n (0.6.4)
|
49
|
+
jeweler (1.8.6)
|
50
|
+
builder
|
39
51
|
bundler (~> 1.0)
|
40
52
|
git (>= 1.2.5)
|
53
|
+
github_api (= 0.10.1)
|
54
|
+
highline (>= 1.6.15)
|
55
|
+
nokogiri (= 1.5.10)
|
41
56
|
rake
|
42
57
|
rdoc
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
58
|
+
json (1.8.0)
|
59
|
+
jwt (0.1.8)
|
60
|
+
multi_json (>= 1.5)
|
61
|
+
mail (2.5.4)
|
47
62
|
mime-types (~> 1.16)
|
48
63
|
treetop (~> 1.4.8)
|
49
64
|
mime-types (1.23)
|
50
|
-
|
65
|
+
minitest (4.7.5)
|
66
|
+
multi_json (1.7.7)
|
67
|
+
multi_xml (0.5.4)
|
68
|
+
multipart-post (1.2.0)
|
69
|
+
nokogiri (1.5.10)
|
70
|
+
oauth2 (0.9.2)
|
71
|
+
faraday (~> 0.8)
|
72
|
+
httpauth (~> 0.2)
|
73
|
+
jwt (~> 0.1.4)
|
74
|
+
multi_json (~> 1.0)
|
75
|
+
multi_xml (~> 0.5)
|
76
|
+
rack (~> 1.2)
|
51
77
|
polyglot (0.3.3)
|
52
|
-
rack (1.
|
53
|
-
rack-cache (1.2)
|
54
|
-
rack (>= 0.4)
|
55
|
-
rack-ssl (1.3.3)
|
56
|
-
rack
|
78
|
+
rack (1.5.2)
|
57
79
|
rack-test (0.6.2)
|
58
80
|
rack (>= 1.0)
|
59
|
-
rails (
|
60
|
-
actionmailer (=
|
61
|
-
actionpack (=
|
62
|
-
activerecord (=
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
railties (
|
68
|
-
actionpack (=
|
69
|
-
activesupport (=
|
70
|
-
rack-ssl (~> 1.3.2)
|
81
|
+
rails (4.0.0)
|
82
|
+
actionmailer (= 4.0.0)
|
83
|
+
actionpack (= 4.0.0)
|
84
|
+
activerecord (= 4.0.0)
|
85
|
+
activesupport (= 4.0.0)
|
86
|
+
bundler (>= 1.3.0, < 2.0)
|
87
|
+
railties (= 4.0.0)
|
88
|
+
sprockets-rails (~> 2.0.0)
|
89
|
+
railties (4.0.0)
|
90
|
+
actionpack (= 4.0.0)
|
91
|
+
activesupport (= 4.0.0)
|
71
92
|
rake (>= 0.8.7)
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
rdoc (3.12.2)
|
93
|
+
thor (>= 0.18.1, < 2.0)
|
94
|
+
rake (10.1.0)
|
95
|
+
rdoc (4.0.1)
|
76
96
|
json (~> 1.4)
|
77
|
-
redcarpet (2.
|
78
|
-
rspec (2.
|
79
|
-
rspec-core (~> 2.
|
80
|
-
rspec-expectations (~> 2.
|
81
|
-
rspec-mocks (~> 2.
|
82
|
-
rspec-core (2.
|
83
|
-
rspec-expectations (2.
|
97
|
+
redcarpet (2.3.0)
|
98
|
+
rspec (2.14.0)
|
99
|
+
rspec-core (~> 2.14.0)
|
100
|
+
rspec-expectations (~> 2.14.0)
|
101
|
+
rspec-mocks (~> 2.14.0)
|
102
|
+
rspec-core (2.14.1)
|
103
|
+
rspec-expectations (2.14.0)
|
84
104
|
diff-lcs (>= 1.1.3, < 2.0)
|
85
|
-
rspec-mocks (2.
|
86
|
-
sprockets (2.
|
105
|
+
rspec-mocks (2.14.1)
|
106
|
+
sprockets (2.10.0)
|
87
107
|
hike (~> 1.2)
|
88
108
|
multi_json (~> 1.0)
|
89
109
|
rack (~> 1.0)
|
90
110
|
tilt (~> 1.1, != 1.3.0)
|
111
|
+
sprockets-rails (2.0.0)
|
112
|
+
actionpack (>= 3.0)
|
113
|
+
activesupport (>= 3.0)
|
114
|
+
sprockets (~> 2.8)
|
91
115
|
thor (0.18.1)
|
92
|
-
|
93
|
-
|
116
|
+
thread_safe (0.1.0)
|
117
|
+
atomic
|
118
|
+
tilt (1.4.1)
|
119
|
+
treetop (1.4.14)
|
94
120
|
polyglot
|
95
121
|
polyglot (>= 0.3.1)
|
96
122
|
tzinfo (0.3.37)
|
97
|
-
yard (0.8.6.
|
123
|
+
yard (0.8.6.2)
|
98
124
|
|
99
125
|
PLATFORMS
|
100
126
|
ruby
|
@@ -103,7 +129,7 @@ DEPENDENCIES
|
|
103
129
|
activesupport
|
104
130
|
bundler
|
105
131
|
jeweler
|
106
|
-
rails (>=
|
132
|
+
rails (>= 4.0)
|
107
133
|
redcarpet
|
108
134
|
rspec
|
109
135
|
yard
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.3.0
|
data/configoro.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "configoro"
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.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 = ["Tim Morgan"]
|
12
|
-
s.date = "2013-
|
12
|
+
s.date = "2013-07-09"
|
13
13
|
s.description = "Creates a YourApp::Configuration object whose methods are generated from environment-specific YAML files."
|
14
14
|
s.email = "git@timothymorgan.info"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -57,7 +57,7 @@ Gem::Specification.new do |s|
|
|
57
57
|
|
58
58
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
59
59
|
s.add_runtime_dependency(%q<activesupport>, [">= 0"])
|
60
|
-
s.add_development_dependency(%q<rails>, [">=
|
60
|
+
s.add_development_dependency(%q<rails>, [">= 4.0"])
|
61
61
|
s.add_development_dependency(%q<rspec>, [">= 0"])
|
62
62
|
s.add_development_dependency(%q<yard>, [">= 0"])
|
63
63
|
s.add_development_dependency(%q<redcarpet>, [">= 0"])
|
@@ -65,7 +65,7 @@ Gem::Specification.new do |s|
|
|
65
65
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
66
66
|
else
|
67
67
|
s.add_dependency(%q<activesupport>, [">= 0"])
|
68
|
-
s.add_dependency(%q<rails>, [">=
|
68
|
+
s.add_dependency(%q<rails>, [">= 4.0"])
|
69
69
|
s.add_dependency(%q<rspec>, [">= 0"])
|
70
70
|
s.add_dependency(%q<yard>, [">= 0"])
|
71
71
|
s.add_dependency(%q<redcarpet>, [">= 0"])
|
@@ -74,7 +74,7 @@ Gem::Specification.new do |s|
|
|
74
74
|
end
|
75
75
|
else
|
76
76
|
s.add_dependency(%q<activesupport>, [">= 0"])
|
77
|
-
s.add_dependency(%q<rails>, [">=
|
77
|
+
s.add_dependency(%q<rails>, [">= 4.0"])
|
78
78
|
s.add_dependency(%q<rspec>, [">= 0"])
|
79
79
|
s.add_dependency(%q<yard>, [">= 0"])
|
80
80
|
s.add_dependency(%q<redcarpet>, [">= 0"])
|
data/lib/configoro/hash.rb
CHANGED
@@ -101,11 +101,19 @@ module Configoro
|
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
104
|
-
def convert_value(value)
|
105
|
-
if value.is_a?
|
106
|
-
|
104
|
+
def convert_value(value, options={})
|
105
|
+
if value.is_a? ::Hash
|
106
|
+
if options[:for] == :to_hash
|
107
|
+
value.to_hash
|
108
|
+
else
|
109
|
+
#value.nested_under_indifferent_access
|
110
|
+
self.class.new_from_hash_copying_default(value)
|
111
|
+
end
|
107
112
|
elsif value.is_a?(Array)
|
108
|
-
|
113
|
+
unless options[:for] == :assignment
|
114
|
+
value = value.dup
|
115
|
+
end
|
116
|
+
value.map! { |e| convert_value(e, options) }
|
109
117
|
else
|
110
118
|
value
|
111
119
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: configoro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
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: 2013-
|
12
|
+
date: 2013-07-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
requirements:
|
35
35
|
- - ! '>='
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: '
|
37
|
+
version: '4.0'
|
38
38
|
type: :development
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: '
|
45
|
+
version: '4.0'
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: rspec
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -175,7 +175,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
175
175
|
version: '0'
|
176
176
|
segments:
|
177
177
|
- 0
|
178
|
-
hash:
|
178
|
+
hash: 704424154197936209
|
179
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
180
|
none: false
|
181
181
|
requirements:
|