mingo 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/mingo/changes.rb +9 -3
- data/lib/mingo/persistence.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a579e94fd7e2a8aec302b92521e82fa6c2b549d4
|
4
|
+
data.tar.gz: e6c468d34b474a4926df466d7d814f2dea94c638
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 200239ed6548f02b4a5ff21d61c4f32c4799d2c77ae822f90e4cc2f5a283a29f37c7efb15c6117e695fe8da0bd27577da2788fcc0d99afe249241951b3cac5cf
|
7
|
+
data.tar.gz: da295d88f2184028838cb97ec6fd14d73d77b8304d2162d67d79590e7c2d55b45982dffd69b19166ef75247f75fe6bad48cb59ea550c2b1972482e1264f653ab
|
data/Rakefile
CHANGED
data/lib/mingo/changes.rb
CHANGED
@@ -35,11 +35,17 @@ class Mingo
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def values_for_update
|
38
|
-
changes.inject(
|
38
|
+
changes.inject({}) do |doc, (key, values)|
|
39
39
|
value = values[1]
|
40
|
-
|
40
|
+
if value
|
41
|
+
doc['$set'] ||= {}
|
42
|
+
doc['$set'][key] = value
|
43
|
+
else
|
44
|
+
doc['$unset'] ||= {}
|
45
|
+
doc['$unset'][key] = 1
|
46
|
+
end
|
41
47
|
doc
|
42
48
|
end
|
43
49
|
end
|
44
50
|
end
|
45
|
-
end
|
51
|
+
end
|
data/lib/mingo/persistence.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mingo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mislav Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongo
|
@@ -61,9 +61,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
version: '0'
|
62
62
|
requirements: []
|
63
63
|
rubyforge_project:
|
64
|
-
rubygems_version: 2.4.5
|
64
|
+
rubygems_version: 2.4.5.1
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: Minimal Mongo
|
68
68
|
test_files: []
|
69
|
-
has_rdoc:
|