mongo_aggregation_dsl 0.0.4alpha → 0.0.5alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +54 -50
- data/lib/aggregate/stages/sort.rb +18 -0
- data/lib/aggregate/stages/unwind.rb +1 -1
- data/mongo_aggregation_dsl.gemspec +3 -4
- metadata +6 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b2b35c20b81a211bc93e3e96d107a9284e46ea5
|
4
|
+
data.tar.gz: 29ac1f0f52a776606ebb7573fc3048bcbe7f26e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8e2592ea63bb5d0789b23895e3365c872c2a59dd27f61d13ccd3976b87222db62cedc4753cba5cef35c9352d2f59ccda2f7664d7c8e92a65e2867e7a1a5dd1c
|
7
|
+
data.tar.gz: ba74e8eada38545064e989357c93c364c5bce75cefc85fbd6fa08e8b49b6539dc7e779332f7aaf552309f97ddc3c0d1c7c8b05f5a9f94c32844da0d426ead442
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mongo_aggregation_dsl (0.0.
|
4
|
+
mongo_aggregation_dsl (0.0.5alpha)
|
5
5
|
autoloaded (~> 2)
|
6
6
|
contracts-lite
|
7
7
|
mongo (~> 2.6.2)
|
@@ -11,10 +11,10 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
activemodel (4.2.
|
15
|
-
activesupport (= 4.2.
|
14
|
+
activemodel (4.2.11)
|
15
|
+
activesupport (= 4.2.11)
|
16
16
|
builder (~> 3.1)
|
17
|
-
activesupport (4.2.
|
17
|
+
activesupport (4.2.11)
|
18
18
|
i18n (~> 0.7)
|
19
19
|
minitest (~> 5.1)
|
20
20
|
thread_safe (~> 0.3, >= 0.3.4)
|
@@ -27,21 +27,21 @@ GEM
|
|
27
27
|
descendants_tracker (~> 0.0.4)
|
28
28
|
ice_nine (~> 0.11.0)
|
29
29
|
thread_safe (~> 0.3, >= 0.3.1)
|
30
|
-
brakeman (4.
|
31
|
-
bson (4.
|
30
|
+
brakeman (4.4.0)
|
31
|
+
bson (4.4.2)
|
32
32
|
builder (3.2.3)
|
33
33
|
code_analyzer (0.4.8)
|
34
34
|
sexp_processor
|
35
35
|
codeclimate-engine-rb (0.4.1)
|
36
36
|
virtus (~> 1.0)
|
37
|
-
codecov (0.1.
|
37
|
+
codecov (0.1.14)
|
38
38
|
json
|
39
39
|
simplecov
|
40
40
|
url
|
41
41
|
coercible (1.0.0)
|
42
42
|
descendants_tracker (~> 0.0.1)
|
43
43
|
colorize (0.8.1)
|
44
|
-
concurrent-ruby (1.
|
44
|
+
concurrent-ruby (1.1.4)
|
45
45
|
contracts-lite (0.15.0)
|
46
46
|
database_cleaner (1.7.0)
|
47
47
|
descendants_tracker (0.0.4)
|
@@ -50,25 +50,29 @@ GEM
|
|
50
50
|
docile (1.3.1)
|
51
51
|
equalizer (0.0.11)
|
52
52
|
erubis (2.7.0)
|
53
|
-
faraday (0.15.
|
53
|
+
faraday (0.15.4)
|
54
54
|
multipart-post (>= 1.2, < 3)
|
55
|
-
fasterer (0.4.
|
55
|
+
fasterer (0.4.2)
|
56
56
|
colorize (~> 0.7)
|
57
|
-
ruby_parser (
|
57
|
+
ruby_parser (>= 3.12.0)
|
58
58
|
gem-release (2.0.1)
|
59
|
-
gitlab (4.
|
60
|
-
httparty (>= 0.14.0)
|
61
|
-
terminal-table (>= 1.5.1)
|
62
|
-
httparty (0.16.
|
59
|
+
gitlab (4.9.0)
|
60
|
+
httparty (~> 0.14, >= 0.14.0)
|
61
|
+
terminal-table (~> 1.5, >= 1.5.1)
|
62
|
+
httparty (0.16.3)
|
63
|
+
mime-types (~> 3.0)
|
63
64
|
multi_xml (>= 0.5.2)
|
64
65
|
i18n (0.9.5)
|
65
66
|
concurrent-ruby (~> 1.0)
|
66
67
|
ice_nine (0.11.2)
|
67
|
-
jaro_winkler (1.5.
|
68
|
+
jaro_winkler (1.5.2)
|
68
69
|
json (2.1.0)
|
69
70
|
kwalify (0.7.2)
|
71
|
+
mime-types (3.2.2)
|
72
|
+
mime-types-data (~> 3.2015)
|
73
|
+
mime-types-data (3.2018.0812)
|
70
74
|
minitest (5.11.3)
|
71
|
-
mongo (2.6.
|
75
|
+
mongo (2.6.4)
|
72
76
|
bson (>= 4.3.0, < 5.0.0)
|
73
77
|
mongoid (5.2.1)
|
74
78
|
activemodel (~> 4.0)
|
@@ -77,39 +81,40 @@ GEM
|
|
77
81
|
tzinfo (>= 0.3.37)
|
78
82
|
multi_xml (0.6.0)
|
79
83
|
multipart-post (2.0.0)
|
80
|
-
octokit (4.
|
84
|
+
octokit (4.13.0)
|
81
85
|
sawyer (~> 0.8.0, >= 0.5.3)
|
82
86
|
origin (2.3.1)
|
83
|
-
parallel (1.
|
84
|
-
parser (2.
|
87
|
+
parallel (1.13.0)
|
88
|
+
parser (2.6.0.0)
|
85
89
|
ast (~> 2.4.0)
|
86
90
|
powerpack (0.1.2)
|
87
|
-
pronto (0.
|
91
|
+
pronto (0.10.0)
|
88
92
|
gitlab (~> 4.0, >= 4.0.0)
|
89
93
|
httparty (>= 0.13.7)
|
90
94
|
octokit (~> 4.7, >= 4.7.0)
|
91
|
-
rainbow (
|
95
|
+
rainbow (>= 2.2, < 4.0)
|
92
96
|
rugged (~> 0.24, >= 0.23.0)
|
93
|
-
thor (~> 0.
|
94
|
-
pronto-brakeman (0.
|
97
|
+
thor (~> 0.20.0)
|
98
|
+
pronto-brakeman (0.10.0)
|
95
99
|
brakeman (>= 3.2.0)
|
96
|
-
pronto (~> 0.
|
100
|
+
pronto (~> 0.10.0)
|
97
101
|
pronto-circleci (1.0.1)
|
98
102
|
pronto (~> 0.9)
|
99
|
-
pronto-fasterer (0.
|
103
|
+
pronto-fasterer (0.10.0)
|
100
104
|
fasterer (~> 0.3, >= 0.3.0)
|
101
|
-
pronto (~> 0.
|
102
|
-
pronto-rails_best_practices (0.
|
103
|
-
pronto (~> 0.
|
105
|
+
pronto (~> 0.10.0)
|
106
|
+
pronto-rails_best_practices (0.10.0)
|
107
|
+
pronto (~> 0.10.0)
|
104
108
|
rails_best_practices (~> 1.16, >= 1.15.0)
|
105
|
-
pronto-reek (0.
|
106
|
-
pronto (~> 0.
|
109
|
+
pronto-reek (0.10.0)
|
110
|
+
pronto (~> 0.10.0)
|
107
111
|
reek (>= 4.2, < 6.0)
|
108
|
-
pronto-rubocop (0.
|
109
|
-
pronto (~> 0.
|
112
|
+
pronto-rubocop (0.10.0)
|
113
|
+
pronto (~> 0.10.0)
|
110
114
|
rubocop (~> 0.50, >= 0.49.1)
|
115
|
+
psych (3.1.0)
|
111
116
|
public_suffix (3.0.3)
|
112
|
-
rails_best_practices (1.19.
|
117
|
+
rails_best_practices (1.19.4)
|
113
118
|
activesupport
|
114
119
|
code_analyzer (>= 0.4.8)
|
115
120
|
erubis
|
@@ -117,13 +122,13 @@ GEM
|
|
117
122
|
json
|
118
123
|
require_all (~> 2.0)
|
119
124
|
ruby-progressbar
|
120
|
-
rainbow (
|
121
|
-
|
122
|
-
|
123
|
-
reek (5.0.2)
|
125
|
+
rainbow (3.0.0)
|
126
|
+
rake (12.3.2)
|
127
|
+
reek (5.3.1)
|
124
128
|
codeclimate-engine-rb (~> 0.4.0)
|
125
129
|
kwalify (~> 0.7.0)
|
126
|
-
parser (>= 2.5.0.0, < 2.
|
130
|
+
parser (>= 2.5.0.0, < 2.7, != 2.5.1.1)
|
131
|
+
psych (~> 3.1.0)
|
127
132
|
rainbow (>= 2.0, < 4.0)
|
128
133
|
require_all (2.0.0)
|
129
134
|
rspec (3.8.0)
|
@@ -132,27 +137,27 @@ GEM
|
|
132
137
|
rspec-mocks (~> 3.8.0)
|
133
138
|
rspec-core (3.8.0)
|
134
139
|
rspec-support (~> 3.8.0)
|
135
|
-
rspec-expectations (3.8.
|
140
|
+
rspec-expectations (3.8.2)
|
136
141
|
diff-lcs (>= 1.2.0, < 2.0)
|
137
142
|
rspec-support (~> 3.8.0)
|
138
143
|
rspec-mocks (3.8.0)
|
139
144
|
diff-lcs (>= 1.2.0, < 2.0)
|
140
145
|
rspec-support (~> 3.8.0)
|
141
146
|
rspec-support (3.8.0)
|
142
|
-
rspec_junit_formatter (0.
|
147
|
+
rspec_junit_formatter (0.4.1)
|
143
148
|
rspec-core (>= 2, < 4, != 2.12.0)
|
144
|
-
rubocop (0.
|
149
|
+
rubocop (0.64.0)
|
145
150
|
jaro_winkler (~> 1.5.1)
|
146
151
|
parallel (~> 1.10)
|
147
152
|
parser (>= 2.5, != 2.5.1.1)
|
148
153
|
powerpack (~> 0.1)
|
149
154
|
rainbow (>= 2.2.2, < 4.0)
|
150
155
|
ruby-progressbar (~> 1.7)
|
151
|
-
unicode-display_width (~> 1.
|
156
|
+
unicode-display_width (~> 1.4.0)
|
152
157
|
ruby-progressbar (1.10.0)
|
153
|
-
ruby_parser (3.
|
158
|
+
ruby_parser (3.12.0)
|
154
159
|
sexp_processor (~> 4.9)
|
155
|
-
rugged (0.27.
|
160
|
+
rugged (0.27.7)
|
156
161
|
sawyer (0.8.1)
|
157
162
|
addressable (>= 2.3.5, < 2.6)
|
158
163
|
faraday (~> 0.8, < 1.0)
|
@@ -166,11 +171,11 @@ GEM
|
|
166
171
|
simplecov (>= 0.4.1)
|
167
172
|
terminal-table (1.8.0)
|
168
173
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
169
|
-
thor (0.
|
174
|
+
thor (0.20.3)
|
170
175
|
thread_safe (0.3.6)
|
171
176
|
tzinfo (1.2.5)
|
172
177
|
thread_safe (~> 0.1)
|
173
|
-
unicode-display_width (1.4.
|
178
|
+
unicode-display_width (1.4.1)
|
174
179
|
url (0.3.2)
|
175
180
|
virtus (1.0.5)
|
176
181
|
axiom-types (~> 0.1)
|
@@ -182,7 +187,6 @@ PLATFORMS
|
|
182
187
|
ruby
|
183
188
|
|
184
189
|
DEPENDENCIES
|
185
|
-
bundler (~> 1.16)
|
186
190
|
codecov (~> 0.1.0, ~> 0.1)
|
187
191
|
database_cleaner
|
188
192
|
gem-release
|
@@ -194,9 +198,9 @@ DEPENDENCIES
|
|
194
198
|
pronto-rails_best_practices
|
195
199
|
pronto-reek
|
196
200
|
pronto-rubocop
|
197
|
-
rake (~>
|
201
|
+
rake (~> 12.3)
|
198
202
|
rspec (~> 3.0)
|
199
|
-
rspec_junit_formatter (~> 0.
|
203
|
+
rspec_junit_formatter (~> 0.4.1)
|
200
204
|
rubocop
|
201
205
|
simplecov
|
202
206
|
simplecov-rcov
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'contracts'
|
4
|
+
module Aggregate
|
5
|
+
module Stages
|
6
|
+
# Represents an aggregation sort
|
7
|
+
# https://docs.mongodb.com/manual/reference/operator/aggregation/sort/
|
8
|
+
class Sort < HashBase
|
9
|
+
Contract HashOf[Symbol, Int] => Any
|
10
|
+
def initialize(options)
|
11
|
+
super
|
12
|
+
end
|
13
|
+
def transpose
|
14
|
+
{ '$sort': 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.
|
5
|
+
spec.version = "0.0.5alpha"
|
6
6
|
spec.authors = ["KrimsonKla"]
|
7
7
|
spec.email = ["admin@cardtapp.com"]
|
8
8
|
spec.date = "2018-09-10"
|
@@ -23,7 +23,6 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_dependency "mongoid", "~> 5.2.0"
|
24
24
|
spec.add_dependency "origin", "~> 2.3.1"
|
25
25
|
|
26
|
-
spec.add_development_dependency "bundler", "~> 1.16"
|
27
26
|
spec.add_development_dependency "codecov", "~> 0.1", "~> 0.1.0"
|
28
27
|
spec.add_development_dependency "database_cleaner"
|
29
28
|
spec.add_development_dependency "pronto"
|
@@ -33,9 +32,9 @@ Gem::Specification.new do |spec|
|
|
33
32
|
spec.add_development_dependency "pronto-rails_best_practices"
|
34
33
|
spec.add_development_dependency "pronto-reek"
|
35
34
|
spec.add_development_dependency "pronto-rubocop"
|
36
|
-
spec.add_development_dependency "rake", "~>
|
35
|
+
spec.add_development_dependency "rake", "~> 12.3"
|
37
36
|
spec.add_development_dependency "rspec", "~> 3.0"
|
38
|
-
spec.add_development_dependency "rspec_junit_formatter", "~> 0.
|
37
|
+
spec.add_development_dependency "rspec_junit_formatter", "~> 0.4.1"
|
39
38
|
spec.add_development_dependency "rubocop"
|
40
39
|
spec.add_development_dependency "simplecov"
|
41
40
|
spec.add_development_dependency "simplecov-rcov"
|
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.
|
4
|
+
version: 0.0.5alpha
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KrimsonKla
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 2.3.1
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: bundler
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '1.16'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '1.16'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: codecov
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -232,14 +218,14 @@ dependencies:
|
|
232
218
|
requirements:
|
233
219
|
- - "~>"
|
234
220
|
- !ruby/object:Gem::Version
|
235
|
-
version: '
|
221
|
+
version: '12.3'
|
236
222
|
type: :development
|
237
223
|
prerelease: false
|
238
224
|
version_requirements: !ruby/object:Gem::Requirement
|
239
225
|
requirements:
|
240
226
|
- - "~>"
|
241
227
|
- !ruby/object:Gem::Version
|
242
|
-
version: '
|
228
|
+
version: '12.3'
|
243
229
|
- !ruby/object:Gem::Dependency
|
244
230
|
name: rspec
|
245
231
|
requirement: !ruby/object:Gem::Requirement
|
@@ -260,14 +246,14 @@ dependencies:
|
|
260
246
|
requirements:
|
261
247
|
- - "~>"
|
262
248
|
- !ruby/object:Gem::Version
|
263
|
-
version: 0.
|
249
|
+
version: 0.4.1
|
264
250
|
type: :development
|
265
251
|
prerelease: false
|
266
252
|
version_requirements: !ruby/object:Gem::Requirement
|
267
253
|
requirements:
|
268
254
|
- - "~>"
|
269
255
|
- !ruby/object:Gem::Version
|
270
|
-
version: 0.
|
256
|
+
version: 0.4.1
|
271
257
|
- !ruby/object:Gem::Dependency
|
272
258
|
name: rubocop
|
273
259
|
requirement: !ruby/object:Gem::Requirement
|
@@ -347,6 +333,7 @@ files:
|
|
347
333
|
- lib/aggregate/stages/match.rb
|
348
334
|
- lib/aggregate/stages/project.rb
|
349
335
|
- lib/aggregate/stages/replace_root.rb
|
336
|
+
- lib/aggregate/stages/sort.rb
|
350
337
|
- lib/aggregate/stages/unwind.rb
|
351
338
|
- lib/aggregate/values.rb
|
352
339
|
- lib/aggregate/values/array.rb
|