mongo-parser-rb 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3a58b44007f8b742abfe589c9182b839a70eaa9
|
4
|
+
data.tar.gz: f2e40e2eb6870f62b0daf5ac4ff7311ddd0484e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d21bbdf37312f90431e1cd9c7843ceca3a512173e77a2fe6f01c39683198f9a62d691c5c65e8e4ac8b5d9403a81f45e505c99bfb164cfa5087e9e632bf6cf18
|
7
|
+
data.tar.gz: d5b1516dba68c439e41f764577558a3c2fd438091ded9e40d819ce12d65a8733484c37bd83c4b7a03d6214414c91b853d4037249a59b5839e0812a7f594cc03b
|
@@ -27,6 +27,11 @@ class FieldTest < MiniTest::Unit::TestCase
|
|
27
27
|
field = MongoParserRB::Field.new(:"something.array.0")
|
28
28
|
assert_equal 1, field.value_in_document(:something => {:array => [1,2]})
|
29
29
|
end
|
30
|
+
|
31
|
+
def test_returning_empty_array
|
32
|
+
field = MongoParserRB::Field.new(:"something.array.name")
|
33
|
+
assert_equal [], field.value_in_document(:something => {:array => []})
|
34
|
+
end
|
30
35
|
|
31
36
|
def test_returning_hash_in_array
|
32
37
|
field = MongoParserRB::Field.new(:"something.array.0.key")
|
@@ -142,6 +142,11 @@ class QueryTest < MiniTest::Unit::TestCase
|
|
142
142
|
assert query.matches_document?(:custom_data => {:value => 5})
|
143
143
|
refute query.matches_document?({})
|
144
144
|
end
|
145
|
+
|
146
|
+
def test_nil_by_empty
|
147
|
+
query = MongoParserRB::Query.parse({:"user_event_summaries.name" => {:$ne => "second-support"}})
|
148
|
+
assert query.matches_document?({"user_event_summaries" => []})
|
149
|
+
end
|
145
150
|
|
146
151
|
def test_integer_in
|
147
152
|
query = MongoParserRB::Query.parse(:integer_key => {:$in => [1,2]})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongo-parser-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben McRedmond
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Parse and evaluate mongo queries in Ruby
|
14
14
|
email:
|
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
52
|
version: '0'
|
53
53
|
requirements: []
|
54
54
|
rubyforge_project:
|
55
|
-
rubygems_version: 2.0.
|
55
|
+
rubygems_version: 2.0.3
|
56
56
|
signing_key:
|
57
57
|
specification_version: 4
|
58
58
|
summary: Parse and evaluate mongo queries in Ruby
|