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 CHANGED
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
3
3
  gem 'activesupport'
4
4
 
5
5
  group :development do
6
- gem 'rails', '>= 3.0'
6
+ gem 'rails', '>= 4.0'
7
7
 
8
8
  # SPECS
9
9
  gem 'rspec'
data/Gemfile.lock CHANGED
@@ -1,100 +1,126 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- actionmailer (3.2.13)
5
- actionpack (= 3.2.13)
4
+ actionmailer (4.0.0)
5
+ actionpack (= 4.0.0)
6
6
  mail (~> 2.5.3)
7
- actionpack (3.2.13)
8
- activemodel (= 3.2.13)
9
- activesupport (= 3.2.13)
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
- journey (~> 1.0.4)
13
- rack (~> 1.4.5)
14
- rack-cache (~> 1.2)
15
- rack-test (~> 0.6.1)
16
- sprockets (~> 2.2.1)
17
- activemodel (3.2.13)
18
- activesupport (= 3.2.13)
19
- builder (~> 3.0.0)
20
- activerecord (3.2.13)
21
- activemodel (= 3.2.13)
22
- activesupport (= 3.2.13)
23
- arel (~> 3.0.2)
24
- tzinfo (~> 0.3.29)
25
- activeresource (3.2.13)
26
- activemodel (= 3.2.13)
27
- activesupport (= 3.2.13)
28
- activesupport (3.2.13)
29
- i18n (= 0.6.1)
30
- multi_json (~> 1.0)
31
- arel (3.0.2)
32
- builder (3.0.4)
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
- hike (1.2.2)
37
- i18n (0.6.1)
38
- jeweler (1.8.4)
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
- journey (1.0.4)
44
- json (1.7.7)
45
- mail (2.5.3)
46
- i18n (>= 0.4.0)
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
- multi_json (1.7.2)
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.4.5)
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 (3.2.13)
60
- actionmailer (= 3.2.13)
61
- actionpack (= 3.2.13)
62
- activerecord (= 3.2.13)
63
- activeresource (= 3.2.13)
64
- activesupport (= 3.2.13)
65
- bundler (~> 1.0)
66
- railties (= 3.2.13)
67
- railties (3.2.13)
68
- actionpack (= 3.2.13)
69
- activesupport (= 3.2.13)
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
- rdoc (~> 3.4)
73
- thor (>= 0.14.6, < 2.0)
74
- rake (10.0.4)
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.2.2)
78
- rspec (2.13.0)
79
- rspec-core (~> 2.13.0)
80
- rspec-expectations (~> 2.13.0)
81
- rspec-mocks (~> 2.13.0)
82
- rspec-core (2.13.1)
83
- rspec-expectations (2.13.0)
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.13.1)
86
- sprockets (2.2.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
- tilt (1.3.7)
93
- treetop (1.4.12)
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.1)
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 (>= 3.0)
132
+ rails (>= 4.0)
107
133
  redcarpet
108
134
  rspec
109
135
  yard
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.4
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.2.4"
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-04-26"
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>, [">= 3.0"])
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>, [">= 3.0"])
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>, [">= 3.0"])
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"])
@@ -101,11 +101,19 @@ module Configoro
101
101
  end
102
102
  end
103
103
 
104
- def convert_value(value)
105
- if value.is_a?(::Hash)
106
- self.class.new_from_hash_copying_default(value)
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
- value.dup.replace(value.map { |e| convert_value(e) })
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.2.4
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-04-26 00:00:00.000000000 Z
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: '3.0'
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: '3.0'
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: -1144284965917323099
178
+ hash: 704424154197936209
179
179
  required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  none: false
181
181
  requirements: