active_orm 5.0.3 → 5.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_orm/redis/base.rb +4 -8
- data/lib/active_orm/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af20f90880d90de4a8427cb1ed8926a1947629ae
|
4
|
+
data.tar.gz: 6fbc5fbf4bbc15b2b5cf4d4f7d4a7ced993fed10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz: '
|
6
|
+
metadata.gz: 91ebd1efb30c45a41f255b374f12353bac1520fe6fa54f2e72b467612f040b0d45cc494c1b1721e4063ee0f2dde2f1c45fdfac3e245bef6528333dcd5330cb49
|
7
|
+
data.tar.gz: '091be6e8f6b1c1119a9910ce13ac99fd32e0d55b0463324c568375fc019d6d35326935c4bf9e16689eae73986b5874d6c34539698f773a9b6465f133007e6f4f'
|
@@ -26,13 +26,13 @@ class ActiveOrm::Redis::Base
|
|
26
26
|
order.to_s == 'append'
|
27
27
|
end
|
28
28
|
|
29
|
-
# rubocop:disable
|
29
|
+
# rubocop:disable Security/Eval
|
30
30
|
def metaform(value)
|
31
|
-
|
32
|
-
rescue
|
31
|
+
eval(value.to_s)
|
32
|
+
rescue StandardError
|
33
33
|
value
|
34
34
|
end
|
35
|
-
# rubocop:enable
|
35
|
+
# rubocop:enable Security/Eval
|
36
36
|
|
37
37
|
def metaform_array(datum)
|
38
38
|
datum.map { |val| metaform(val) }
|
@@ -43,8 +43,6 @@ class ActiveOrm::Redis::Base
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def metamorph_array(datum)
|
46
|
-
datum = metaform(datum)
|
47
|
-
|
48
46
|
case datum.first.class.name
|
49
47
|
when 'Array' then datum.map { |arr| metaform_array(arr) }
|
50
48
|
when 'Hash' then datum.map { |hsh| metaform_hash(hsh) }
|
@@ -53,8 +51,6 @@ class ActiveOrm::Redis::Base
|
|
53
51
|
end
|
54
52
|
|
55
53
|
def metamorph(datum)
|
56
|
-
datum = metaform(datum)
|
57
|
-
|
58
54
|
case datum.class.name
|
59
55
|
when 'Array' then metamorph_array(datum)
|
60
56
|
when 'Hash' then metaform_hash(datum)
|
data/lib/active_orm/version.rb
CHANGED