mongo_aggregation_dsl 0.0.6alpha → 0.0.7alpha

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
- SHA1:
3
- metadata.gz: eb7dd7cdef014f433b5b5295038a04aee5c908c2
4
- data.tar.gz: 86dfbb289a9c63f733568042e45f12ca64c1fe00
2
+ SHA256:
3
+ metadata.gz: 1bb71b95bf8ac9637c8586243cc0da4a8856a495b9fe7ff0ea8dc84b5cfd66b5
4
+ data.tar.gz: 9bb8825e50270ca5006215c6caa423eef9c78074dd639b0bb269c508d51dd11b
5
5
  SHA512:
6
- metadata.gz: 3607965c331e30b134162729d25a8c0975852eb74d4c62dd480d9cc1c4bec6f8b74ebe594ffa50cf5b5574160af8a5c2c52e57401309c90998aa1b94de42776f
7
- data.tar.gz: 1bcfa778ef87e84f9e46fb5dd9c6006f67f6c1b95756b6670624998d08da0185b8483c674ae61281ac8d3c25a3691fdd6fb469410f6bb7f5a674cd8dfbdee0d2
6
+ metadata.gz: d47315c07150405ccfe0b4f9d4544f6bf1f845eef05378fe548580ec13837c468e94733dd7040bb5789ff7b48e307ecfd99eadaf619680081c6a6b4a1681808a
7
+ data.tar.gz: b3b812346ee37367a60e0d22a72924cdda988ffbb375edd62fae424f79ec051e1644cf79be0aa7e424209122057f72b1361d46a089b170e031e92ab88bd7115b
data/.circleci/config.yml CHANGED
@@ -7,7 +7,7 @@ jobs:
7
7
  build:
8
8
  docker:
9
9
  # specify the version you desire here
10
- - image: circleci/ruby:2.3.4-node-browsers
10
+ - image: circleci/ruby:2.5.1-stretch
11
11
  environment:
12
12
 
13
13
  working_directory: ~/repo
data/.rubocop.yml CHANGED
@@ -1,51 +1,403 @@
1
- # https://github.com/bbatsov/rubocop/blob/master/config/default.yml
2
-
3
- Documentation:
4
- Enabled: false
1
+ require: rubocop-performance
5
2
 
6
3
  AllCops:
7
4
  TargetRubyVersion: 2.3
8
5
  Exclude:
9
- - "bin/**/*"
6
+ - 'vendor/**/*'
7
+ - 'db/schema.rb'
8
+ - 'dashboard/**/*'
9
+ - 'script/**/*'
10
+ - 'Guardfile'
11
+ - 'config.ru'
12
+ - 'bin/**/*'
13
+ - 'node_modules/**/*'
14
+ UseCache: false
10
15
 
11
- LineLength:
12
- Max: 150
13
-
14
- ## Multi-line method chaining should be done with leading dots.
16
+ Style/CollectionMethods:
17
+ Description: Preferred collection methods.
18
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
19
+ Enabled: true
20
+ PreferredMethods:
21
+ collect: map
22
+ collect!: map!
23
+ find: detect
24
+ find_all: select
25
+ inject: reduce
15
26
  Layout/DotPosition:
27
+ Description: Checks the position of the dot in multi-line method calls.
28
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
29
+ Enabled: true
16
30
  EnforcedStyle: trailing
17
-
18
- Layout/MultilineMethodCallIndentation:
31
+ SupportedStyles:
32
+ - leading
33
+ - trailing
34
+ Naming/FileName:
35
+ Description: Use snake_case for source file names.
36
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
37
+ Enabled: true
38
+ Exclude: []
39
+ Style/GuardClause:
40
+ Description: Check for conditionals that can be replaced with guard clauses
41
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
42
+ Enabled: true
43
+ MinBodyLength: 1
44
+ Style/IfUnlessModifier:
45
+ Description: Favor modifier if/unless usage when you have a single-line body.
46
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
19
47
  Enabled: false
20
-
21
- Layout/MultilineOperationIndentation:
48
+ Style/OptionHash:
49
+ Description: Don't use option hashes when you can use keyword arguments.
22
50
  Enabled: false
51
+ Naming/PredicateName:
52
+ Description: Check the names of predicate methods.
53
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
54
+ Enabled: true
55
+ NamePrefix:
56
+ - is_
57
+ - has_
58
+ - have_
59
+ NamePrefixBlacklist:
60
+ - is_
61
+ Naming/RescuedExceptionsVariableName:
62
+ PreferredName: error
23
63
 
64
+ Style/RaiseArgs:
65
+ Description: Checks the arguments passed to raise/fail.
66
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
67
+ Enabled: true
68
+ EnforcedStyle: exploded
69
+ SupportedStyles:
70
+ - compact
71
+ - exploded
72
+ Style/SignalException:
73
+ Description: Checks for proper usage of fail and raise.
74
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
75
+ Enabled: false
76
+ EnforcedStyle: semantic
77
+ SupportedStyles:
78
+ - only_raise
79
+ - only_fail
80
+ - semantic
81
+ Style/SingleLineBlockParams:
82
+ Description: Enforces the names of some block params.
83
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
84
+ Enabled: false
85
+ Methods:
86
+ - reduce:
87
+ - a
88
+ - e
89
+ - inject:
90
+ - a
91
+ - e
92
+ Style/SingleLineMethods:
93
+ Description: Avoid single-line methods.
94
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
95
+ Enabled: true
96
+ AllowIfMethodIsEmpty: true
97
+ Style/StringLiterals:
98
+ Description: Checks if uses of quotes match the configured preference.
99
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
100
+ Enabled: true
101
+ EnforcedStyle: double_quotes
102
+ SupportedStyles:
103
+ - single_quotes
104
+ - double_quotes
105
+ Style/StringLiteralsInInterpolation:
106
+ Description: Checks if uses of quotes inside expressions in interpolated strings
107
+ match the configured preference.
108
+ Enabled: true
109
+ EnforcedStyle: double_quotes
110
+ SupportedStyles:
111
+ - single_quotes
112
+ - double_quotes
113
+ Style/TrailingCommaInArguments:
114
+ Description: 'Checks for trailing comma in argument lists.'
115
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
116
+ Enabled: true
117
+ EnforcedStyleForMultiline: no_comma
118
+ SupportedStylesForMultiline:
119
+ - comma
120
+ - consistent_comma
121
+ - no_comma
122
+ Style/HashSyntax:
123
+ EnforcedStyle: ruby19
124
+ Enabled: true
125
+ SupportedStyles:
126
+ # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys
127
+ - ruby19
128
+ # checks for hash rocket syntax for all hashes
129
+ - hash_rockets
130
+ # forbids mixed key syntaxes (e.g. {a: 1, :b => 2})
131
+ - no_mixed_keys
132
+ # enforces both ruby19 and no_mixed_keys styles
133
+ - ruby19_no_mixed_keys
134
+ Layout/MultilineHashBraceLayout:
135
+ EnforcedStyle: symmetrical
136
+ Enabled: true
137
+ SupportedStyles:
138
+ # symmetrical: closing brace is positioned in same way as opening brace
139
+ # new_line: closing brace is always on a new line
140
+ # same_line: closing brace is always on same line as last element
141
+ - symmetrical
142
+ - new_line
143
+ - same_line
144
+ Style/TrailingCommaInArrayLiteral:
145
+ Description: 'Checks for trailing comma in array and hash literals.'
146
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
147
+ Enabled: true
148
+ EnforcedStyleForMultiline: no_comma
149
+ SupportedStylesForMultiline:
150
+ - comma
151
+ - consistent_comma
152
+ - no_comma
153
+ Style/TrailingCommaInHashLiteral:
154
+ Description: 'Checks for trailing comma in array and hash literals.'
155
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
156
+ Enabled: true
157
+ EnforcedStyleForMultiline: no_comma
158
+ SupportedStylesForMultiline:
159
+ - comma
160
+ - consistent_comma
161
+ - no_comma
162
+ Metrics/AbcSize:
163
+ Description: A calculated magnitude based on number of assignments, branches, and
164
+ conditions.
165
+ Enabled: true
166
+ Max: 15
167
+ Metrics/ClassLength:
168
+ Description: Avoid classes longer than 100 lines of code.
169
+ Enabled: true
170
+ CountComments: false
171
+ Max: 150
172
+ Metrics/ModuleLength:
173
+ CountComments: false
174
+ Max: 100
175
+ Description: Avoid modules longer than 100 lines of code.
176
+ Enabled: false
177
+ Metrics/CyclomaticComplexity:
178
+ Description: A complexity metric that is strongly correlated to the number of test
179
+ cases needed to validate a method.
180
+ Enabled: true
181
+ Max: 8
24
182
  Metrics/MethodLength:
183
+ Description: Avoid methods longer than 15 lines of code.
184
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
185
+ Enabled: true
186
+ CountComments: false
25
187
  Max: 15
188
+ Metrics/ParameterLists:
189
+ Description: Avoid parameter lists longer than three or four parameters.
190
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
191
+ Enabled: true
192
+ Max: 5
193
+ CountKeywordArgs: true
194
+ Metrics/PerceivedComplexity:
195
+ Description: A complexity metric geared towards measuring complexity for a human
196
+ reader.
197
+ Enabled: true
198
+ Max: 7
199
+ Lint/AssignmentInCondition:
200
+ Description: Don't use assignment in conditions.
201
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
202
+ Enabled: true
203
+ AllowSafeAssignment: true
204
+ Lint/DisjunctiveAssignmentInConstructor:
205
+ Enabled: false
206
+ Layout/AlignParameters:
207
+ Description: Align the parameters of a method call if they span more than one line.
208
+ Enabled: true
209
+ EnforcedStyle: with_first_parameter
210
+ Style/InlineComment:
211
+ Description: Avoid inline comments.
212
+ Enabled: false
213
+ Naming/AccessorMethodName:
214
+ Description: Check the naming of accessor methods for get_/set_.
215
+ Enabled: false
216
+ Style/Alias:
217
+ Description: Use alias_method instead of alias.
218
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
219
+ Enabled: true
220
+ Style/Documentation:
221
+ Description: Document classes and non-namespace modules.
222
+ Enabled: false
223
+ Style/DoubleNegation:
224
+ Description: Checks for uses of double negation (!!).
225
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
226
+ Enabled: false
227
+ Style/EachWithObject:
228
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
229
+ Enabled: false
230
+ Style/EmptyLiteral:
231
+ Description: Prefer literals to Array.new/Hash.new/String.new.
232
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
233
+ Enabled: true
234
+ Style/ModuleFunction:
235
+ Description: Checks for usage of `extend self` in modules.
236
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
237
+ Enabled: false
238
+ Style/OneLineConditional:
239
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
240
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
241
+ Enabled: false
242
+ Style/PerlBackrefs:
243
+ Description: Avoid Perl-style regex back references.
244
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
245
+ Enabled: true
246
+ Style/Send:
247
+ Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
248
+ may overlap with existing methods.
249
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
250
+ Enabled: false
251
+ Style/SpecialGlobalVars:
252
+ Description: Avoid Perl-style global variables.
253
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
254
+ Enabled: true
255
+ Style/VariableInterpolation:
256
+ Description: Don't interpolate global, instance and class variables directly in
257
+ strings.
258
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
259
+ Enabled: false
260
+ Style/WhenThen:
261
+ Description: Use when x then ... for one-line cases.
262
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
263
+ Enabled: false
264
+ Layout/TrailingBlankLines:
265
+ Description: 'Checks trailing blank lines and final newline.'
266
+ StyleGuide: '#newline-eof'
267
+ Enabled: false
268
+ Lint/EachWithObjectArgument:
269
+ Description: Check for immutable argument given to each_with_object.
270
+ Enabled: true
271
+ Lint/HandleExceptions:
272
+ Description: Don't suppress exception.
273
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
274
+ Enabled: true
275
+ Lint/LiteralAsCondition:
276
+ Description: Checks of literals used in conditions.
277
+ Enabled: false
278
+ Lint/LiteralInInterpolation:
279
+ Description: Checks for literals used in interpolation.
280
+ Enabled: false
281
+ RedundantBlockCall:
282
+ Enabled: false
283
+ Style/EmptyMethod:
284
+ Enabled: false
285
+ Naming/VariableNumber:
286
+ EnforcedStyle: snake_case
26
287
 
27
- StringLiterals:
28
- EnforcedStyle: double_quotes
29
-
30
- IndentHash:
31
- EnforcedStyle: consistent
288
+ Layout/BlockAlignment:
289
+ Description: 'Align block ends correctly.'
290
+ Enabled: true
291
+ # The value `start_of_block` means that the `end` should be aligned with line
292
+ # where the `do` keyword appears.
293
+ # The value `start_of_line` means it should be aligned with the whole
294
+ # expression's starting line.
295
+ # The value `either` means both are allowed.
296
+ EnforcedStyleAlignWith: either
297
+ SupportedStylesAlignWith:
298
+ - either
299
+ - start_of_block
300
+ - start_of_line
32
301
 
33
- # Indentation of `when`.
302
+ Layout/MultilineMethodCallIndentation:
303
+ EnforcedStyle: indented_relative_to_receiver
304
+ IndentationWidth: 4
305
+ Enabled: false
306
+ Layout/MultilineOperationIndentation:
307
+ EnforcedStyle: indented
308
+ IndentationWidth: 4
309
+ Enabled: false
310
+ Metrics/LineLength:
311
+ Max: 150
312
+ # TODO: Renable after exclusions cleaned up.
313
+ #Metrics/BlockLength:
314
+ # Exclude:
315
+ # - spec/**/*
316
+ # - lib/tasks/**/*
34
317
  Layout/CaseIndentation:
35
318
  EnforcedStyle: case
36
- SupportedStyles:
37
- - case
38
- - end
39
319
  IndentOneStep: true
40
- # By default, the indentation width from Style/IndentationWidth is used
41
- # But it can be overridden by setting this parameter
42
- # This only matters if IndentOneStep is true
43
- IndentationWidth: ~
44
-
45
- Metrics/ClassLength:
46
- Max: 150
320
+ Layout/IndentArray:
321
+ IndentationWidth: 4
322
+ Layout/IndentHash:
323
+ IndentationWidth: 4
324
+ Layout/FirstParameterIndentation:
325
+ IndentationWidth: 4
326
+ Style/FrozenStringLiteralComment:
327
+ Enabled: true
47
328
 
48
- Metrics/BlockLength:
49
- Exclude:
50
- - "spec/**/*"
51
- - "*.gemspec"
329
+ Layout/AlignHash:
330
+ Description: >-
331
+ Align the elements of a hash literal if they span more than
332
+ one line.
333
+ Enabled: true
334
+ VersionAdded: '0.49'
335
+ # Alignment of entries using hash rocket as separator. Valid values are:
336
+ #
337
+ # key - left alignment of keys
338
+ # 'a' => 2
339
+ # 'bb' => 3
340
+ # separator - alignment of hash rockets, keys are right aligned
341
+ # 'a' => 2
342
+ # 'bb' => 3
343
+ # table - left alignment of keys, hash rockets, and values
344
+ # 'a' => 2
345
+ # 'bb' => 3
346
+ EnforcedHashRocketStyle: table
347
+ SupportedHashRocketStyles:
348
+ - key
349
+ - separator
350
+ - table
351
+ # Alignment of entries using colon as separator. Valid values are:
352
+ #
353
+ # key - left alignment of keys
354
+ # a: 0
355
+ # bb: 1
356
+ # separator - alignment of colons, keys are right aligned
357
+ # a: 0
358
+ # bb: 1
359
+ # table - left alignment of keys and values
360
+ # a: 0
361
+ # bb: 1
362
+ EnforcedColonStyle: table
363
+ SupportedColonStyles:
364
+ - key
365
+ - separator
366
+ - table
367
+ # Select whether hashes that are the last argument in a method call should be
368
+ # inspected? Valid values are:
369
+ #
370
+ # always_inspect - Inspect both implicit and explicit hashes.
371
+ # Registers an offense for:
372
+ # function(a: 1,
373
+ # b: 2)
374
+ # Registers an offense for:
375
+ # function({a: 1,
376
+ # b: 2})
377
+ # always_ignore - Ignore both implicit and explicit hashes.
378
+ # Accepts:
379
+ # function(a: 1,
380
+ # b: 2)
381
+ # Accepts:
382
+ # function({a: 1,
383
+ # b: 2})
384
+ # ignore_implicit - Ignore only implicit hashes.
385
+ # Accepts:
386
+ # function(a: 1,
387
+ # b: 2)
388
+ # Registers an offense for:
389
+ # function({a: 1,
390
+ # b: 2})
391
+ # ignore_explicit - Ignore only explicit hashes.
392
+ # Accepts:
393
+ # function({a: 1,
394
+ # b: 2})
395
+ # Registers an offense for:
396
+ # function(a: 1,
397
+ # b: 2)
398
+ EnforcedLastArgumentHashStyle: always_inspect
399
+ SupportedLastArgumentHashStyles:
400
+ - always_inspect
401
+ - always_ignore
402
+ - ignore_implicit
403
+ - ignore_explicit
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.1
1
+ 2.5.3
data/Gemfile.lock CHANGED
@@ -1,20 +1,20 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mongo_aggregation_dsl (0.0.5alpha)
4
+ mongo_aggregation_dsl (0.0.7alpha)
5
5
  autoloaded (~> 2)
6
6
  contracts-lite
7
- mongo (~> 2.6.2)
8
- mongoid (~> 5.2.0)
9
- origin (~> 2.3.1)
7
+ mongo
8
+ mongoid
9
+ origin
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activemodel (4.2.11)
15
- activesupport (= 4.2.11)
14
+ activemodel (4.2.11.1)
15
+ activesupport (= 4.2.11.1)
16
16
  builder (~> 3.1)
17
- activesupport (4.2.11)
17
+ activesupport (4.2.11.1)
18
18
  i18n (~> 0.7)
19
19
  minitest (~> 5.1)
20
20
  thread_safe (~> 0.3, >= 0.3.4)
@@ -27,7 +27,7 @@ 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.4.0)
30
+ brakeman (4.5.0)
31
31
  bson (4.4.2)
32
32
  builder (3.2.3)
33
33
  code_analyzer (0.4.8)
@@ -41,7 +41,7 @@ GEM
41
41
  coercible (1.0.0)
42
42
  descendants_tracker (~> 0.0.1)
43
43
  colorize (0.8.1)
44
- concurrent-ruby (1.1.4)
44
+ concurrent-ruby (1.1.5)
45
45
  contracts-lite (0.15.0)
46
46
  database_cleaner (1.7.0)
47
47
  descendants_tracker (0.0.4)
@@ -52,25 +52,25 @@ GEM
52
52
  erubis (2.7.0)
53
53
  faraday (0.15.4)
54
54
  multipart-post (>= 1.2, < 3)
55
- fasterer (0.4.2)
55
+ fasterer (0.5.1)
56
56
  colorize (~> 0.7)
57
- ruby_parser (>= 3.12.0)
57
+ ruby_parser (>= 3.13.0)
58
58
  gem-release (2.0.1)
59
- gitlab (4.9.0)
59
+ gitlab (4.11.0)
60
60
  httparty (~> 0.14, >= 0.14.0)
61
61
  terminal-table (~> 1.5, >= 1.5.1)
62
- httparty (0.16.3)
62
+ httparty (0.17.0)
63
63
  mime-types (~> 3.0)
64
64
  multi_xml (>= 0.5.2)
65
65
  i18n (0.9.5)
66
66
  concurrent-ruby (~> 1.0)
67
67
  ice_nine (0.11.2)
68
68
  jaro_winkler (1.5.2)
69
- json (2.1.0)
69
+ json (2.2.0)
70
70
  kwalify (0.7.2)
71
71
  mime-types (3.2.2)
72
72
  mime-types-data (~> 3.2015)
73
- mime-types-data (3.2018.0812)
73
+ mime-types-data (3.2019.0331)
74
74
  minitest (5.11.3)
75
75
  mongo (2.6.4)
76
76
  bson (>= 4.3.0, < 5.0.0)
@@ -81,13 +81,12 @@ GEM
81
81
  tzinfo (>= 0.3.37)
82
82
  multi_xml (0.6.0)
83
83
  multipart-post (2.0.0)
84
- octokit (4.13.0)
84
+ octokit (4.14.0)
85
85
  sawyer (~> 0.8.0, >= 0.5.3)
86
86
  origin (2.3.1)
87
- parallel (1.13.0)
88
- parser (2.6.0.0)
87
+ parallel (1.17.0)
88
+ parser (2.6.2.1)
89
89
  ast (~> 2.4.0)
90
- powerpack (0.1.2)
91
90
  pronto (0.10.0)
92
91
  gitlab (~> 4.0, >= 4.0.0)
93
92
  httparty (>= 0.13.7)
@@ -124,7 +123,7 @@ GEM
124
123
  ruby-progressbar
125
124
  rainbow (3.0.0)
126
125
  rake (12.3.2)
127
- reek (5.3.1)
126
+ reek (5.3.2)
128
127
  codeclimate-engine-rb (~> 0.4.0)
129
128
  kwalify (~> 0.7.0)
130
129
  parser (>= 2.5.0.0, < 2.7, != 2.5.1.1)
@@ -137,7 +136,7 @@ GEM
137
136
  rspec-mocks (~> 3.8.0)
138
137
  rspec-core (3.8.0)
139
138
  rspec-support (~> 3.8.0)
140
- rspec-expectations (3.8.2)
139
+ rspec-expectations (3.8.3)
141
140
  diff-lcs (>= 1.2.0, < 2.0)
142
141
  rspec-support (~> 3.8.0)
143
142
  rspec-mocks (3.8.0)
@@ -146,22 +145,24 @@ GEM
146
145
  rspec-support (3.8.0)
147
146
  rspec_junit_formatter (0.4.1)
148
147
  rspec-core (>= 2, < 4, != 2.12.0)
149
- rubocop (0.64.0)
148
+ rubocop (0.67.2)
150
149
  jaro_winkler (~> 1.5.1)
151
150
  parallel (~> 1.10)
152
151
  parser (>= 2.5, != 2.5.1.1)
153
- powerpack (~> 0.1)
152
+ psych (>= 3.1.0)
154
153
  rainbow (>= 2.2.2, < 4.0)
155
154
  ruby-progressbar (~> 1.7)
156
- unicode-display_width (~> 1.4.0)
155
+ unicode-display_width (>= 1.4.0, < 1.6)
156
+ rubocop-performance (1.1.0)
157
+ rubocop (>= 0.67.0)
157
158
  ruby-progressbar (1.10.0)
158
- ruby_parser (3.12.0)
159
+ ruby_parser (3.13.1)
159
160
  sexp_processor (~> 4.9)
160
- rugged (0.27.7)
161
+ rugged (0.28.1)
161
162
  sawyer (0.8.1)
162
163
  addressable (>= 2.3.5, < 2.6)
163
164
  faraday (~> 0.8, < 1.0)
164
- sexp_processor (4.11.0)
165
+ sexp_processor (4.12.0)
165
166
  simplecov (0.16.1)
166
167
  docile (~> 1.1)
167
168
  json (>= 1.8, < 3)
@@ -175,7 +176,7 @@ GEM
175
176
  thread_safe (0.3.6)
176
177
  tzinfo (1.2.5)
177
178
  thread_safe (~> 0.1)
178
- unicode-display_width (1.4.1)
179
+ unicode-display_width (1.5.0)
179
180
  url (0.3.2)
180
181
  virtus (1.0.5)
181
182
  axiom-types (~> 0.1)
@@ -202,8 +203,9 @@ DEPENDENCIES
202
203
  rspec (~> 3.0)
203
204
  rspec_junit_formatter (~> 0.4.1)
204
205
  rubocop
206
+ rubocop-performance
205
207
  simplecov
206
208
  simplecov-rcov
207
209
 
208
210
  BUNDLED WITH
209
- 1.16.4
211
+ 1.17.3
@@ -7,7 +7,7 @@ module Aggregate
7
7
  class Facet < HashBase
8
8
  Contract And[
9
9
  C::HashMinLength[1],
10
- HashOf[Symbol, Aggregate::Pipeline]] => Any
10
+ HashOf[Symbol, Aggregate::Pipeline]] => Any
11
11
  def initialize(options)
12
12
  super(options)
13
13
  end
@@ -8,7 +8,7 @@ module Aggregate
8
8
  Contract And[
9
9
  Not[C::HashValueType[0, Hash]],
10
10
  C::HashValueType[1..-1, Hash]
11
- ] => Any
11
+ ] => Any
12
12
  def initialize(options)
13
13
  super(options)
14
14
  end
@@ -16,7 +16,7 @@ module Aggregate
16
16
  as: String,
17
17
  let: And[HashOf[Symbol, Symbol], C::HashMinLength[1]],
18
18
  pipeline: Aggregate::Pipeline]
19
- ] => Any
19
+ ] => Any
20
20
  def initialize(options)
21
21
  super(options)
22
22
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'contracts'
3
+ require "contracts"
4
4
  module Aggregate
5
5
  module Stages
6
6
  # Represents an aggregation sort
@@ -10,6 +10,7 @@ module Aggregate
10
10
  def initialize(options)
11
11
  super
12
12
  end
13
+
13
14
  def transpose
14
15
  { '$sort': options }
15
16
  end
@@ -8,11 +8,11 @@ module Aggregate
8
8
  Contract Or[
9
9
  And[String, C::StartsWith["$"]],
10
10
  KeywordArgs[
11
- path: And[String, C::StartsWith["$"]],
12
- includeArrayIndex: Optional[String],
11
+ path: And[String, C::StartsWith["$"]],
12
+ includeArrayIndex: Optional[String],
13
13
  preserveNullAndEmptyArrays: Optional[Boolean]
14
14
  ],
15
- ] => Any
15
+ ] => Any
16
16
  def initialize(options)
17
17
  super(options)
18
18
  end
@@ -7,7 +7,7 @@ module Aggregate
7
7
  class Symbol < Base
8
8
  # rubocop:disable Layout/AlignArray
9
9
  EXPRESSION_OPERATORS = %i[
10
- abs add ceil divide exp floor ln log log10 mod pow sqrt subtract trunc
10
+ abs add ceil divide exp floor ln log log10 mod pow sqrt subtract trunc
11
11
  arrayElemAt arrayToObject concatArrays filter in indexOfArray isArray map objectToArray
12
12
  range reduce reverseArray size slice zip
13
13
  and not or
@@ -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.6alpha"
5
+ spec.version = "0.0.7alpha"
6
6
  spec.authors = ["KrimsonKla"]
7
7
  spec.email = ["admin@cardtapp.com"]
8
8
  spec.date = "2018-09-10"
@@ -19,9 +19,9 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.add_dependency "autoloaded", "~> 2"
21
21
  spec.add_dependency "contracts-lite"
22
- spec.add_dependency "mongo", "~> 2.6.2"
23
- spec.add_dependency "mongoid", "~> 5.2.0"
24
- spec.add_dependency "origin", "~> 2.3.1"
22
+ spec.add_dependency "mongo"
23
+ spec.add_dependency "mongoid"
24
+ spec.add_dependency "origin"
25
25
 
26
26
  spec.add_development_dependency "codecov", "~> 0.1", "~> 0.1.0"
27
27
  spec.add_development_dependency "database_cleaner"
@@ -36,6 +36,7 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "rspec", "~> 3.0"
37
37
  spec.add_development_dependency "rspec_junit_formatter", "~> 0.4.1"
38
38
  spec.add_development_dependency "rubocop"
39
+ spec.add_development_dependency "rubocop-performance"
39
40
  spec.add_development_dependency "simplecov"
40
41
  spec.add_development_dependency "simplecov-rcov"
41
42
  end
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.6alpha
4
+ version: 0.0.7alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - KrimsonKla
@@ -42,44 +42,44 @@ dependencies:
42
42
  name: mongo
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 2.6.2
47
+ version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 2.6.2
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: mongoid
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 5.2.0
61
+ version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 5.2.0
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: origin
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 2.3.1
75
+ version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 2.3.1
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: codecov
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -268,6 +268,20 @@ dependencies:
268
268
  - - ">="
269
269
  - !ruby/object:Gem::Version
270
270
  version: '0'
271
+ - !ruby/object:Gem::Dependency
272
+ name: rubocop-performance
273
+ requirement: !ruby/object:Gem::Requirement
274
+ requirements:
275
+ - - ">="
276
+ - !ruby/object:Gem::Version
277
+ version: '0'
278
+ type: :development
279
+ prerelease: false
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ requirements:
282
+ - - ">="
283
+ - !ruby/object:Gem::Version
284
+ version: '0'
271
285
  - !ruby/object:Gem::Dependency
272
286
  name: simplecov
273
287
  requirement: !ruby/object:Gem::Requirement
@@ -364,7 +378,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
364
378
  version: 1.3.1
365
379
  requirements: []
366
380
  rubyforge_project:
367
- rubygems_version: 2.5.1
381
+ rubygems_version: 2.7.6
368
382
  signing_key:
369
383
  specification_version: 4
370
384
  summary: An aggregation DSL for use with mongo ruby driver