mongo_aggregation_dsl 0.0.3alpha → 0.0.4alpha

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: b0bfb829de9382240792a0899fc54f54dad1bfcc
4
- data.tar.gz: ded7e2f31ee34100a8e0eaf6ea7acb8ec04d6b00
3
+ metadata.gz: 7ca795d5bc02393dc8705996df3485f429985075
4
+ data.tar.gz: 24c94a02ca131fc6dfa78a125f8e8c3d50dcd2eb
5
5
  SHA512:
6
- metadata.gz: 9347a316bf8cbe67e159f501018d5147093ebd4bccd778680bcd7b49a65836de17ddb31100e76238b54cef4934eb0672217e3ac0220fff3cd55ea82633745d4a
7
- data.tar.gz: f90f48e5e50f24d890b0d45a76f5a92071fccd7d47e06ebf82f1e6d8fb3f33c1f4b5c084fbcb4b9d58e096348446e8af11799e1c143309f1bc9dfb58c282def7
6
+ metadata.gz: 8b879d8959a225b6386591589b5bf4f731d5c0f01be3641c5c7ce2b848dd492145d476110926118c74526f5ff57f440f34de8ee14b1115ea52a906d68f1156bf
7
+ data.tar.gz: 897c1c4eeb741a966d5b54a62f635d5b8af73d77218b6b61f06fee41b4e09a57fb3a7efe31f1d93e500aaa7d33712a3ee6472ce48cf9e3d2a88f919e90726362
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mongo_aggregation_dsl (0.0.3alpha)
4
+ mongo_aggregation_dsl (0.0.4alpha)
5
5
  autoloaded (~> 2)
6
6
  contracts-lite
7
7
  mongo (~> 2.6.2)
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aggregate
4
+ module Stages
5
+ # Represents an aggregation group
6
+ # https://docs.mongodb.com/manual/reference/operator/aggregation/group/#pipe._S_group
7
+ class Limit < Base
8
+ Contract Integer => Any
9
+ def initialize(options)
10
+ super(options)
11
+ end
12
+
13
+ def transpose
14
+ { '$limit': options }
15
+ end
16
+ end
17
+ end
18
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "mongo_aggregation_dsl"
5
- spec.version = "0.0.3alpha"
5
+ spec.version = "0.0.4alpha"
6
6
  spec.authors = ["KrimsonKla"]
7
7
  spec.email = ["admin@cardtapp.com"]
8
8
  spec.date = "2018-09-10"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo_aggregation_dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3alpha
4
+ version: 0.0.4alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - KrimsonKla
@@ -342,6 +342,7 @@ files:
342
342
  - lib/aggregate/stages/facet.rb
343
343
  - lib/aggregate/stages/group.rb
344
344
  - lib/aggregate/stages/hash_base.rb
345
+ - lib/aggregate/stages/limit.rb
345
346
  - lib/aggregate/stages/lookup.rb
346
347
  - lib/aggregate/stages/match.rb
347
348
  - lib/aggregate/stages/project.rb