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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c7490e33e2a56a7770fd6a64a415d50ffddbea782c67d9655fd76af656c681f
4
- data.tar.gz: 5081274169e6e77f1247f2aa6c7d1a0c4844cbc500edaeb3a20a339b7ddc0d8e
3
+ metadata.gz: 700ed605bf255b877e119d9146b59f124672e6b9ca19aa193cba75d46e93f570
4
+ data.tar.gz: 7ad66b56b6e44eba2a90bbadac1029beb5dc2add24e8831d26a328c61ab49d71
5
5
  SHA512:
6
- metadata.gz: 57490d14a5779bbe3143da9d2083f0584fc17345f4065cc525255a0ce60fd2f751205bdee1c8926f6e0b282d8195400996e0821d01c1513dede2c06cb2e00b18
7
- data.tar.gz: 44f04a61fcd89cad723d3482d7a09567ddd636542462fae1f8d83cd636a1b3c546e58593e3750fed3306cef577405a586586047ce00e3a8e92cf8d3b42e60170
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.1](https://www.rubydoc.info/gems/arstotzka/1.6.1)
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
  ---------------
@@ -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('.')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Arstotzka
4
- VERSION = '1.6.1'
4
+ VERSION = '1.6.2'
5
5
  end
@@ -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.1
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: 2020-05-20 00:00:00.000000000 Z
11
+ date: 2021-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport