emerald_odm 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/emerald_odm/version.rb +1 -1
- data/lib/emerald_odm.rb +3 -3
- 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: a866f6760fe767625d76410878bf70a9ecefc6b9e345b3f6cad8a86892beb01f
|
4
|
+
data.tar.gz: 293adf1cfdaceac75d774c40d1d0e3586cda397346eeb0571846a26c8514a358
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32bed49336b82fcd5726f5b455482338aad1929a104c256df817ad9f7976441ad762c94e3a68d8eb9d2eed5ecb2029e9d53449b01b690dd8e885443ac5b9b6c8
|
7
|
+
data.tar.gz: 7e3747ef67e4555fc3f94dde7878c286afed907428b497b45cd5866a5b06e6da0dbbc2812ed295cd53a40fb696e2aa29923072e4306501f6f7ef85d6015efef0
|
data/lib/emerald_odm/version.rb
CHANGED
data/lib/emerald_odm.rb
CHANGED
@@ -49,7 +49,7 @@ module EmeraldODM
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def nil?
|
52
|
-
|
52
|
+
_document.nil? || _document.empty?
|
53
53
|
end
|
54
54
|
|
55
55
|
def self.array_to_h(array)
|
@@ -67,7 +67,7 @@ module EmeraldODM
|
|
67
67
|
def to_h
|
68
68
|
hash = {}
|
69
69
|
known_fields = self.class.fields
|
70
|
-
unknown_fields =
|
70
|
+
unknown_fields = _document.keys - known_fields
|
71
71
|
unknown_fields.reject! { |field| field.start_with?('_') }
|
72
72
|
known_fields.each do |field|
|
73
73
|
value = send(field)
|
@@ -80,7 +80,7 @@ module EmeraldODM
|
|
80
80
|
end
|
81
81
|
end
|
82
82
|
unknown_fields.each do |field|
|
83
|
-
value =
|
83
|
+
value = _document[field]
|
84
84
|
hash[field] = value
|
85
85
|
end
|
86
86
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emerald_odm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mikael
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|