config_default 0.4.0 → 0.5.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92dd218f8a1be7a70e0db01df45c8fada10764d21630cc9f2c3d23f2e2d1f410
4
- data.tar.gz: ebba8ce2e496548c2eab5654ae929843f1fec470e47e7dd5c4c5991443fdd436
3
+ metadata.gz: e18808a5f2ea835adf5cb69e332b686f1a34e58c13f396d55de0ab865ec16be4
4
+ data.tar.gz: bbce3cfeeb754de1c14608d62891de2cf96b31c3be23d5b09216feb462f552dc
5
5
  SHA512:
6
- metadata.gz: 3200b3c18516614f756faab457fd7cef675874d0511edde29f4aacaf3348c2e1339222fbb6602a23ec923ba80598e23fca343fe61057dae9bab168bfc7b1492c
7
- data.tar.gz: 6c238c29a8bc7343f13d71e07ee1da68b32263eabee089d8d8671f2d2d1f91ad9444a24bbd46d030a62475a72cb92bd24c07498f8a8ea3c70399924012f6292f
6
+ metadata.gz: eab8e5e61ff42816385f67590d885d2a58e27375016ceda006c9db84e3b3cddc47c7c278fcc8c9f1c2a31181e2f492e8ed307314a17322717c8c11699f28a8b4
7
+ data.tar.gz: 675178593c2f779a6fa430a165a62bae5a45225423aa269b37ed19bff78d0c51d16c5f90658ca0062d8929743e43562ff780fe982b0104120da3a3ca47d8a0d9
data/Gemfile.lock CHANGED
@@ -1,37 +1,37 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- config_default (0.4.0)
4
+ config_default (0.5.1)
5
5
  activesupport (>= 6)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- action_text-trix (2.1.15)
10
+ action_text-trix (2.1.16)
11
11
  railties
12
- actioncable (8.1.1)
13
- actionpack (= 8.1.1)
14
- activesupport (= 8.1.1)
12
+ actioncable (8.1.2)
13
+ actionpack (= 8.1.2)
14
+ activesupport (= 8.1.2)
15
15
  nio4r (~> 2.0)
16
16
  websocket-driver (>= 0.6.1)
17
17
  zeitwerk (~> 2.6)
18
- actionmailbox (8.1.1)
19
- actionpack (= 8.1.1)
20
- activejob (= 8.1.1)
21
- activerecord (= 8.1.1)
22
- activestorage (= 8.1.1)
23
- activesupport (= 8.1.1)
18
+ actionmailbox (8.1.2)
19
+ actionpack (= 8.1.2)
20
+ activejob (= 8.1.2)
21
+ activerecord (= 8.1.2)
22
+ activestorage (= 8.1.2)
23
+ activesupport (= 8.1.2)
24
24
  mail (>= 2.8.0)
25
- actionmailer (8.1.1)
26
- actionpack (= 8.1.1)
27
- actionview (= 8.1.1)
28
- activejob (= 8.1.1)
29
- activesupport (= 8.1.1)
25
+ actionmailer (8.1.2)
26
+ actionpack (= 8.1.2)
27
+ actionview (= 8.1.2)
28
+ activejob (= 8.1.2)
29
+ activesupport (= 8.1.2)
30
30
  mail (>= 2.8.0)
31
31
  rails-dom-testing (~> 2.2)
32
- actionpack (8.1.1)
33
- actionview (= 8.1.1)
34
- activesupport (= 8.1.1)
32
+ actionpack (8.1.2)
33
+ actionview (= 8.1.2)
34
+ activesupport (= 8.1.2)
35
35
  nokogiri (>= 1.8.5)
36
36
  rack (>= 2.2.4)
37
37
  rack-session (>= 1.0.1)
@@ -39,36 +39,36 @@ GEM
39
39
  rails-dom-testing (~> 2.2)
40
40
  rails-html-sanitizer (~> 1.6)
41
41
  useragent (~> 0.16)
42
- actiontext (8.1.1)
42
+ actiontext (8.1.2)
43
43
  action_text-trix (~> 2.1.15)
44
- actionpack (= 8.1.1)
45
- activerecord (= 8.1.1)
46
- activestorage (= 8.1.1)
47
- activesupport (= 8.1.1)
44
+ actionpack (= 8.1.2)
45
+ activerecord (= 8.1.2)
46
+ activestorage (= 8.1.2)
47
+ activesupport (= 8.1.2)
48
48
  globalid (>= 0.6.0)
49
49
  nokogiri (>= 1.8.5)
50
- actionview (8.1.1)
51
- activesupport (= 8.1.1)
50
+ actionview (8.1.2)
51
+ activesupport (= 8.1.2)
52
52
  builder (~> 3.1)
53
53
  erubi (~> 1.11)
54
54
  rails-dom-testing (~> 2.2)
55
55
  rails-html-sanitizer (~> 1.6)
56
- activejob (8.1.1)
57
- activesupport (= 8.1.1)
56
+ activejob (8.1.2)
57
+ activesupport (= 8.1.2)
58
58
  globalid (>= 0.3.6)
59
- activemodel (8.1.1)
60
- activesupport (= 8.1.1)
61
- activerecord (8.1.1)
62
- activemodel (= 8.1.1)
63
- activesupport (= 8.1.1)
59
+ activemodel (8.1.2)
60
+ activesupport (= 8.1.2)
61
+ activerecord (8.1.2)
62
+ activemodel (= 8.1.2)
63
+ activesupport (= 8.1.2)
64
64
  timeout (>= 0.4.0)
65
- activestorage (8.1.1)
66
- actionpack (= 8.1.1)
67
- activejob (= 8.1.1)
68
- activerecord (= 8.1.1)
69
- activesupport (= 8.1.1)
65
+ activestorage (8.1.2)
66
+ actionpack (= 8.1.2)
67
+ activejob (= 8.1.2)
68
+ activerecord (= 8.1.2)
69
+ activesupport (= 8.1.2)
70
70
  marcel (~> 1.0)
71
- activesupport (8.1.1)
71
+ activesupport (8.1.2)
72
72
  base64
73
73
  bigdecimal
74
74
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -99,11 +99,12 @@ GEM
99
99
  i18n (1.14.8)
100
100
  concurrent-ruby (~> 1.0)
101
101
  io-console (0.8.2)
102
- irb (1.16.0)
102
+ irb (1.17.0)
103
103
  pp (>= 0.6.0)
104
+ prism (>= 1.3.0)
104
105
  rdoc (>= 4.0.0)
105
106
  reline (>= 0.4.2)
106
- json (2.18.0)
107
+ json (2.18.1)
107
108
  language_server-protocol (3.17.0.5)
108
109
  lint_roller (1.1.0)
109
110
  logger (1.7.0)
@@ -119,10 +120,9 @@ GEM
119
120
  marcel (1.1.0)
120
121
  method_source (1.1.0)
121
122
  mini_mime (1.1.5)
122
- mini_portile2 (2.8.9)
123
- minitest (6.0.0)
123
+ minitest (6.0.1)
124
124
  prism (~> 1.5)
125
- net-imap (0.6.2)
125
+ net-imap (0.6.3)
126
126
  date
127
127
  net-protocol
128
128
  net-pop (0.1.2)
@@ -132,31 +132,29 @@ GEM
132
132
  net-smtp (0.5.1)
133
133
  net-protocol
134
134
  nio4r (2.7.5)
135
- nokogiri (1.18.10)
136
- mini_portile2 (~> 2.8.2)
135
+ nokogiri (1.19.1-arm64-darwin)
137
136
  racc (~> 1.4)
138
- nokogiri (1.18.10-arm64-darwin)
137
+ nokogiri (1.19.1-x86_64-darwin)
139
138
  racc (~> 1.4)
140
- nokogiri (1.18.10-x86_64-darwin)
141
- racc (~> 1.4)
142
- nokogiri (1.18.10-x86_64-linux-gnu)
139
+ nokogiri (1.19.1-x86_64-linux-gnu)
143
140
  racc (~> 1.4)
144
141
  parallel (1.27.0)
145
- parser (3.3.10.0)
142
+ parser (3.3.10.2)
146
143
  ast (~> 2.4.1)
147
144
  racc
148
145
  pp (0.6.3)
149
146
  prettyprint
150
147
  prettyprint (0.2.0)
151
- prism (1.7.0)
152
- pry (0.15.2)
148
+ prism (1.9.0)
149
+ pry (0.16.0)
153
150
  coderay (~> 1.1)
154
151
  method_source (~> 1.0)
152
+ reline (>= 0.6.0)
155
153
  psych (5.3.1)
156
154
  date
157
155
  stringio
158
156
  racc (1.8.1)
159
- rack (3.2.4)
157
+ rack (3.2.5)
160
158
  rack-session (2.1.1)
161
159
  base64 (>= 0.1.0)
162
160
  rack (>= 3.0.0)
@@ -164,20 +162,20 @@ GEM
164
162
  rack (>= 1.3)
165
163
  rackup (2.3.1)
166
164
  rack (>= 3)
167
- rails (8.1.1)
168
- actioncable (= 8.1.1)
169
- actionmailbox (= 8.1.1)
170
- actionmailer (= 8.1.1)
171
- actionpack (= 8.1.1)
172
- actiontext (= 8.1.1)
173
- actionview (= 8.1.1)
174
- activejob (= 8.1.1)
175
- activemodel (= 8.1.1)
176
- activerecord (= 8.1.1)
177
- activestorage (= 8.1.1)
178
- activesupport (= 8.1.1)
165
+ rails (8.1.2)
166
+ actioncable (= 8.1.2)
167
+ actionmailbox (= 8.1.2)
168
+ actionmailer (= 8.1.2)
169
+ actionpack (= 8.1.2)
170
+ actiontext (= 8.1.2)
171
+ actionview (= 8.1.2)
172
+ activejob (= 8.1.2)
173
+ activemodel (= 8.1.2)
174
+ activerecord (= 8.1.2)
175
+ activestorage (= 8.1.2)
176
+ activesupport (= 8.1.2)
179
177
  bundler (>= 1.15.0)
180
- railties (= 8.1.1)
178
+ railties (= 8.1.2)
181
179
  rails-dom-testing (2.3.0)
182
180
  activesupport (>= 5.0.0)
183
181
  minitest
@@ -185,9 +183,9 @@ GEM
185
183
  rails-html-sanitizer (1.6.2)
186
184
  loofah (~> 2.21)
187
185
  nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
188
- railties (8.1.1)
189
- actionpack (= 8.1.1)
190
- activesupport (= 8.1.1)
186
+ railties (8.1.2)
187
+ actionpack (= 8.1.2)
188
+ activesupport (= 8.1.2)
191
189
  irb (~> 1.13)
192
190
  rackup (>= 1.0.0)
193
191
  rake (>= 12.2)
@@ -196,7 +194,7 @@ GEM
196
194
  zeitwerk (~> 2.6)
197
195
  rainbow (3.1.1)
198
196
  rake (13.3.1)
199
- rdoc (7.0.3)
197
+ rdoc (7.2.0)
200
198
  erb
201
199
  psych (>= 4.0.0)
202
200
  tsort
@@ -215,8 +213,8 @@ GEM
215
213
  rspec-mocks (3.13.7)
216
214
  diff-lcs (>= 1.2.0, < 2.0)
217
215
  rspec-support (~> 3.13.0)
218
- rspec-support (3.13.6)
219
- rubocop (1.81.7)
216
+ rspec-support (3.13.7)
217
+ rubocop (1.82.1)
220
218
  json (~> 2.3)
221
219
  language_server-protocol (~> 3.17.0.2)
222
220
  lint_roller (~> 1.1.0)
@@ -224,28 +222,28 @@ GEM
224
222
  parser (>= 3.3.0.2)
225
223
  rainbow (>= 2.2.2, < 4.0)
226
224
  regexp_parser (>= 2.9.3, < 3.0)
227
- rubocop-ast (>= 1.47.1, < 2.0)
225
+ rubocop-ast (>= 1.48.0, < 2.0)
228
226
  ruby-progressbar (~> 1.7)
229
227
  unicode-display_width (>= 2.4.0, < 4.0)
230
- rubocop-ast (1.48.0)
228
+ rubocop-ast (1.49.0)
231
229
  parser (>= 3.3.7.2)
232
- prism (~> 1.4)
233
- rubocop-config-umbrellio (1.81.109)
234
- rubocop (~> 1.81.0)
235
- rubocop-factory_bot (~> 2.27.0)
230
+ prism (~> 1.7)
231
+ rubocop-config-umbrellio (1.82.117)
232
+ rubocop (~> 1.82.0)
233
+ rubocop-factory_bot (~> 2.28.0)
236
234
  rubocop-performance (~> 1.26.0)
237
- rubocop-rails (~> 2.33.0)
235
+ rubocop-rails (~> 2.34.0)
238
236
  rubocop-rake (~> 0.7.0)
239
- rubocop-rspec (~> 3.7.0)
237
+ rubocop-rspec (~> 3.9.0)
240
238
  rubocop-sequel (~> 0.4.0)
241
- rubocop-factory_bot (2.27.1)
239
+ rubocop-factory_bot (2.28.0)
242
240
  lint_roller (~> 1.1)
243
241
  rubocop (~> 1.72, >= 1.72.1)
244
242
  rubocop-performance (1.26.1)
245
243
  lint_roller (~> 1.1)
246
244
  rubocop (>= 1.75.0, < 2.0)
247
245
  rubocop-ast (>= 1.47.1, < 2.0)
248
- rubocop-rails (2.33.4)
246
+ rubocop-rails (2.34.3)
249
247
  activesupport (>= 4.2.0)
250
248
  lint_roller (~> 1.1)
251
249
  rack (>= 1.1)
@@ -254,16 +252,16 @@ GEM
254
252
  rubocop-rake (0.7.1)
255
253
  lint_roller (~> 1.1)
256
254
  rubocop (>= 1.72.1)
257
- rubocop-rspec (3.7.0)
255
+ rubocop-rspec (3.9.0)
258
256
  lint_roller (~> 1.1)
259
- rubocop (~> 1.72, >= 1.72.1)
257
+ rubocop (~> 1.81)
260
258
  rubocop-sequel (0.4.1)
261
259
  lint_roller (~> 1.1)
262
260
  rubocop (>= 1.72.1, < 2)
263
261
  ruby-progressbar (1.13.0)
264
262
  securerandom (0.4.1)
265
263
  stringio (3.2.0)
266
- thor (1.4.0)
264
+ thor (1.5.0)
267
265
  timeout (0.6.0)
268
266
  tsort (0.2.0)
269
267
  tzinfo (2.0.6)
@@ -293,4 +291,4 @@ DEPENDENCIES
293
291
  rubocop-config-umbrellio
294
292
 
295
293
  BUNDLED WITH
296
- 4.0.3
294
+ 4.0.4
@@ -54,6 +54,8 @@ class ConfigDefault::Struct
54
54
  def define_methods!
55
55
  @attributes.each do |key, value|
56
56
  next if RESERVED_METHODS.include?(key.to_sym)
57
+
58
+ value.freeze
57
59
  define_singleton_method(key) { value }
58
60
  end
59
61
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ConfigDefault
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.1"
5
5
  end
@@ -26,9 +26,12 @@ module ConfigDefault
26
26
  default_config = load_file("#{name}.#{config.postfix}")
27
27
  config = load_file(name)
28
28
 
29
- data = default_config.deep_merge(config)
30
- data = data[key] if key
29
+ if key
30
+ default_config = default_config[key] || {}
31
+ config = config[key] || {}
32
+ end
31
33
 
34
+ data = default_config.deep_merge(config)
32
35
  return {} if data.nil?
33
36
 
34
37
  if deep_symbolize_keys
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: config_default
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stepan Kirushkin
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 4.0.3
72
+ rubygems_version: 4.0.4
73
73
  specification_version: 4
74
74
  summary: A simple way to manage default and env configuration in Rails.
75
75
  test_files: []