mongoid_aggregates 0.1.2 → 0.1.3

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MmQzMDM0OWZiOTYzNzQzNzM2YTg4MjEyOGI0NWIyOWQ4MTI3ZDk3Mg==
4
+ NzdlNGNlYzc4ZWI2Njc5Mzc3ZWVjNjU4NThkYTlkMTljNzU5ZDIzYQ==
5
5
  data.tar.gz: !binary |-
6
- OGRkNmVlYzhkNTQzY2Q3ZGUzYjYyMWQ1NjYzM2E4YmNjNGM4NDUzNQ==
6
+ NWI2Y2EwZDQyYTkwY2NiMTljNWFmY2RiOTM1OGE1YjQyNDg3Njc0ZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MDdmZmE0ODA4MjUyM2U4ZTcyYTk0ODlkMzkxYTFkY2U2ZjM2NzM4NjNmMGVi
10
- YTc4NWZmMzM0YTk1M2RlMjE1NDMxNDIwYTUzYzllODg3ZTc1ZTEwZTVlNWUx
11
- MDM0MTAwMjhjYzY0YjlhOGQ5NTMyYjcyOGEzODU0N2E3NTVmNDU=
9
+ OTdlMGI4ODYzZGVhNjc0MjRjMGI4ODAzNGVmOGYwYWJmYWI1NzQ4MmE2Yjkw
10
+ NzBmODFiNGJlZTgwN2I4MjY4NjNlOThlNWMwNjI2ZjhiYTYzYzNhMTAxZGYw
11
+ NTBjMGJiYzIwNjgwZjdiODYwMjVlM2U5NGJiNmQ2ODRhYTY0ZDM=
12
12
  data.tar.gz: !binary |-
13
- YjU4NzU5N2U1ZTNlNzQ2OTZiNmFlMmViNDU4MjI2NDQwMTZjNzk3NTE1YmRm
14
- ZTU0YzM3NDZmOWE5MWM2ODZmMmU4NjMxZjExMTFiMjYyYjliYWY3YTEzZWZl
15
- MmJjZmYyOTE1NGIxOTdkMjYyNDJjNzM5ODVjNWM0YjQ0YmE2MDk=
13
+ ZjlhMWYzZjU3OTE4ZDRlNjlhZGY2NDJkNjFkODI3ZTEzMDM5MWE2M2FkZmNl
14
+ YzMxMTk0M2ZlNDQzNTMzNGVhNGZhZGI3NGIzMmYzNGIzY2YxOWFmYWQxMTVj
15
+ NGYwMmI5YzY1ZjFhNDQyNGFmNDRjYTBjNGRiMTc1NzNlNzZhZDU=
@@ -2,6 +2,7 @@ require_relative "commands/base"
2
2
  require_relative "commands/match"
3
3
  require_relative "commands/group"
4
4
  require_relative "commands/sort"
5
+ require_relative "commands/project"
5
6
 
6
7
  module Mongoid
7
8
  module Contextual
@@ -22,6 +23,11 @@ module Mongoid
22
23
  self
23
24
  end
24
25
 
26
+ def project(*args)
27
+ @commands.push(Commands::Project.new(*args))
28
+ self
29
+ end
30
+
25
31
  def sort(*args)
26
32
  @commands.push(Commands::Sort.new(*args))
27
33
  self
@@ -0,0 +1,14 @@
1
+ module Mongoid
2
+ module Contextual
3
+ module Aggregable
4
+ module Commands
5
+ class Project < Base
6
+ def initialize(*args)
7
+ super('$project', *args)
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
14
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_aggregates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yair Levinson
@@ -20,6 +20,7 @@ files:
20
20
  - lib/mongoid/contextual/aggregable/commands/base.rb
21
21
  - lib/mongoid/contextual/aggregable/commands/group.rb
22
22
  - lib/mongoid/contextual/aggregable/commands/match.rb
23
+ - lib/mongoid/contextual/aggregable/commands/project.rb
23
24
  - lib/mongoid/contextual/aggregable/commands/sort.rb
24
25
  - lib/mongoid/contextual/aggregable/mongo_ex.rb
25
26
  - lib/mongoid_aggregates.rb