nice_hash 1.18.0 → 1.18.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nice/hash/set_values.rb +4 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db65b5feb3fcc8b21b275873835592202ac1eb6b82a27325d61f1cad19665712
4
- data.tar.gz: a1b5014b99126979bb8bf052db0574bd4e9e02b9311b7133a21d1d0467cbcd05
3
+ metadata.gz: 5eb4297991e401679fa80b27d5317ad1e7ed2454879b1717c920bd862f7de53f
4
+ data.tar.gz: beb646818a282748bb694d117533ea339d2a702ca7c024746846894e190ab05d
5
5
  SHA512:
6
- metadata.gz: 7ca4ced479153a9de0a527f6b9ceb0a7b248d263e7914e9b0fe498028fc164fafefbbfbe64e7d4abc7850572e760fa4911903e0cb56ac7809c3a2bc7c0bb116b
7
- data.tar.gz: cb8b29027ce6d232a46f493d20bbb3bc8031c3ff1772e90686097a8102b462e9e76917349bd723db7a3bd42dc4bc9f80f21fb0e28845eae9acd609a5470d363b
6
+ metadata.gz: 8332df937c26fc60091db0fb821c4b585029b60976a703d49439adef13f1df03af721b31bb68c1965413ed02bcbbf6ccb005f280ea44731a8b4c5af923610b59
7
+ data.tar.gz: d18ed3d408b262fcc9f982b4cc1bbbaf5795d1f701be3d4aa3ebd80c532156a88a6380e1c9c657d13b050c79ad77275b9a8792d502bdc5e3eb60fc7b306d0a8d
@@ -34,6 +34,7 @@ class NiceHash
34
34
  end
35
35
 
36
36
  end
37
+
37
38
  hash_array.each do |k, v|
38
39
  #for the case of using same_values: [:pwd1, :pwd2] => :'10:N' and supply hash_values: pwd1: 'a', pwd2: 'b'
39
40
  #instead of [:pwd1,:pwd2]=>'a'
@@ -69,8 +70,8 @@ class NiceHash
69
70
  hash_values.each do |kk,vv|
70
71
  if kk.to_s.match?(/^#{k}\./)
71
72
  kk = kk.to_s.gsub(/^#{k}\./, '').to_sym
72
- new_hash_values[kk] = vv
73
73
  end
74
+ new_hash_values[kk] = vv
74
75
  end
75
76
  hashv[k] = NiceHash.set_values(v, new_hash_values)
76
77
  else
@@ -81,9 +82,11 @@ class NiceHash
81
82
  end
82
83
  end
83
84
  end
85
+
84
86
  hash_values.each do |k, v|
85
87
  hashv = NiceHash.set_nested(hashv, k, v, true) if k.is_a?(Hash)
86
88
  end
89
+
87
90
  return hashv
88
91
  elsif hash_array.is_a?(Array) and hash_array.size > 0
89
92
  hashv = Array.new
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nice_hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-26 00:00:00.000000000 Z
11
+ date: 2023-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: string_pattern