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.
- checksums.yaml +4 -4
- data/lib/nice/hash/set_values.rb +4 -1
- 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: 5eb4297991e401679fa80b27d5317ad1e7ed2454879b1717c920bd862f7de53f
|
|
4
|
+
data.tar.gz: beb646818a282748bb694d117533ea339d2a702ca7c024746846894e190ab05d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8332df937c26fc60091db0fb821c4b585029b60976a703d49439adef13f1df03af721b31bb68c1965413ed02bcbbf6ccb005f280ea44731a8b4c5af923610b59
|
|
7
|
+
data.tar.gz: d18ed3d408b262fcc9f982b4cc1bbbaf5795d1f701be3d4aa3ebd80c532156a88a6380e1c9c657d13b050c79ad77275b9a8792d502bdc5e3eb60fc7b306d0a8d
|
data/lib/nice/hash/set_values.rb
CHANGED
|
@@ -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.
|
|
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-
|
|
11
|
+
date: 2023-01-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: string_pattern
|