mongous 0.1.5 → 0.1.6

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
  SHA256:
3
- metadata.gz: 6616ba889ba858cb82f877ba24bb755ec8e205aa9b8c70738864ce855d5ebb52
4
- data.tar.gz: d733c6a2bcaeec6725f51f2e7638f8fd9cd99c7decfe568fcf0b80ee98cd3ebb
3
+ metadata.gz: '099aa151de9cf50a6c25b861ad877eafc6e16972f12f463181d735d8fb4ae71f'
4
+ data.tar.gz: b41e34b02325dcb2933ec9e195452d5e2a027ee375d56cb0fe44a2144b275928
5
5
  SHA512:
6
- metadata.gz: 7ae43077eadf5806fe60e766050a58dfb926de35ebe50f7af0e2f7a37b3b9675112cdd3a80ca95837c93513b0286154caab863f125b3f33d0e4958ed14b6237a
7
- data.tar.gz: 2e21b03862a403e6839ca2c6e569879c06e3c6f3f5e6fb63409ee6799a0257443a8e2c6612bf4a35956aa4cd931f108c2c3640c8a71c8749fa90b8913b7ac98d
6
+ metadata.gz: a058325e628afba439934ea18e82a2cbc80e4053c00aff7c7ca3326da6be2b588a37361152c359e4ed558f375ab2c7bc1e77f6fe8968a62bdc432733298fc660
7
+ data.tar.gz: 8bc4c0bdef2be7e1c4bad582a5c0dc28f167fb0f99a7a74b800793b84c19db68a5a20564d8f7a6d6d41d210c78c78670bdd63ef12aec20f2375c56bb83237120
@@ -30,7 +30,7 @@ module Mongous
30
30
  filter ||= conditions
31
31
  condition = case filter
32
32
  when Hash
33
- filter
33
+ Filter.new( self ).filter( filter ).to_condition
34
34
  when Filter
35
35
  filter.to_condition
36
36
  else
@@ -1,3 +1,3 @@
1
1
  module Mongous
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -12,7 +12,7 @@ Book.new( title: "complex 2", author: "Bob", style: "A5", price: 2000, page: 2
12
12
  Book.new( title: "complex 3", author: "Candy", style: "A6", price: 3000, page: 300 ).save
13
13
 
14
14
  filter1 = Book.filter( title: /comp/ )
15
- filter2 = Book.not( author: /Candy/ )
15
+ filter2 = Book.not( price: (2000...3000) )
16
16
  filter3 = Book.and( filter1, filter2 ).select( _id: 0 )
17
17
  filter4 = Book.or( filter1, filter2 ).select( _id: 0 )
18
18
  p filter1.to_condition
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongous
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - arimay
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-02 00:00:00.000000000 Z
11
+ date: 2020-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongo