mongo-parser-rb 0.0.7 → 0.0.8

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.
@@ -134,6 +134,8 @@ module MongoParserRB
134
134
  @arguments.include?(value_for_field)
135
135
  end
136
136
  end
137
+ rescue ArgumentError
138
+ false
137
139
  end
138
140
  end
139
141
  end
@@ -1,3 +1,3 @@
1
1
  module MongoParserRB
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -191,4 +191,9 @@ class QueryTest < MiniTest::Unit::TestCase
191
191
  assert query.matches_document?(:array_key => [1,2])
192
192
  end
193
193
 
194
+ def test_datatype_mismatch
195
+ query = MongoParserRB::Query.parse(:integer_key => {:$gt => 5})
196
+ refute query.matches_document?(:integer_key => "hello")
197
+ end
198
+
194
199
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo-parser-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-05 00:00:00.000000000 Z
12
+ date: 2013-09-17 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Parse and evaluate mongo queries in Ruby
15
15
  email: