arstotzka 1.6.1 → 1.6.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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/arstotzka/options.rb +1 -1
- data/lib/arstotzka/version.rb +1 -1
- data/spec/lib/arstotzka/options_spec.rb +26 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 700ed605bf255b877e119d9146b59f124672e6b9ca19aa193cba75d46e93f570
|
|
4
|
+
data.tar.gz: 7ad66b56b6e44eba2a90bbadac1029beb5dc2add24e8831d26a328c61ab49d71
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f9840c3921c7c89bce80f0a67a59f5639177ff8160f9a1563987b027d0e67d5ed783671e084ed2596199ada367839d0c10bc00d34901a56e4e0867048ee5bd6
|
|
7
|
+
data.tar.gz: 25ce6b02ba42827bd62f54da08eaa1f2302ee7461016c9d67dff8bbe32c1e8752cf6503ecc44161b071cd130087f56e932f0314f40ab76c849ed99695c095925
|
data/README.md
CHANGED
|
@@ -21,7 +21,7 @@ JSON keys)
|
|
|
21
21
|
|
|
22
22
|
Yard Documentation
|
|
23
23
|
-------------------
|
|
24
|
-
[https://www.rubydoc.info/gems/arstotzka/1.6.
|
|
24
|
+
[https://www.rubydoc.info/gems/arstotzka/1.6.2](https://www.rubydoc.info/gems/arstotzka/1.6.2)
|
|
25
25
|
|
|
26
26
|
Instalation
|
|
27
27
|
---------------
|
data/lib/arstotzka/options.rb
CHANGED
|
@@ -283,7 +283,7 @@ module Arstotzka
|
|
|
283
283
|
#
|
|
284
284
|
# @return [Array<String>]
|
|
285
285
|
def keys
|
|
286
|
-
return full_path.split('.') if full_path
|
|
286
|
+
return full_path.to_s.split('.') if full_path
|
|
287
287
|
return [key.to_s] unless path&.present?
|
|
288
288
|
|
|
289
289
|
[path, key].compact.join('.').split('.')
|
data/lib/arstotzka/version.rb
CHANGED
|
@@ -291,5 +291,31 @@ describe Arstotzka::Options do
|
|
|
291
291
|
end
|
|
292
292
|
end
|
|
293
293
|
end
|
|
294
|
+
|
|
295
|
+
context 'when full_path is a symbol' do
|
|
296
|
+
let(:full_path) { :account }
|
|
297
|
+
|
|
298
|
+
context 'when path is nil' do
|
|
299
|
+
it 'returns splitted full path' do
|
|
300
|
+
expect(options.keys).to eq(%w[account])
|
|
301
|
+
end
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
context 'when path is empty' do
|
|
305
|
+
let(:path) { '' }
|
|
306
|
+
|
|
307
|
+
it 'returns splitted full path' do
|
|
308
|
+
expect(options.keys).to eq(%w[account])
|
|
309
|
+
end
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
context 'when path is not empty' do
|
|
313
|
+
let(:path) { 'account.person' }
|
|
314
|
+
|
|
315
|
+
it 'returns splitted full path' do
|
|
316
|
+
expect(options.keys).to eq(%w[account])
|
|
317
|
+
end
|
|
318
|
+
end
|
|
319
|
+
end
|
|
294
320
|
end
|
|
295
321
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: arstotzka
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Darthjee
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-04-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|