rspec-json_matchers 0.1.0.alpha.3 → 0.1.0.alpha.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +16 -0
  3. data/.rubocop.yml +477 -22
  4. data/.travis.yml +12 -3
  5. data/Appraisals +24 -4
  6. data/Gemfile +1 -0
  7. data/README.md +37 -20
  8. data/Rakefile +1 -0
  9. data/gemfiles/rspec_3_0.gemfile +2 -1
  10. data/gemfiles/rspec_3_1.gemfile +2 -1
  11. data/gemfiles/rspec_3_2.gemfile +2 -1
  12. data/gemfiles/rspec_3_3.gemfile +2 -1
  13. data/gemfiles/rspec_3_4.gemfile +7 -0
  14. data/gemfiles/rspec_3_5.gemfile +7 -0
  15. data/gemfiles/rspec_3_6.gemfile +7 -0
  16. data/lib/rspec/json_matchers/expectation.rb +6 -2
  17. data/lib/rspec/json_matchers/expectations/mixins/built_in.rb +84 -5
  18. data/lib/rspec/json_matchers/expectations/private.rb +4 -2
  19. data/lib/rspec/json_matchers/matchers.rb +0 -1
  20. data/lib/rspec/json_matchers/matchers/be_json_matcher.rb +0 -14
  21. data/lib/rspec/json_matchers/matchers/be_json_with_content_matcher.rb +144 -5
  22. data/lib/rspec/json_matchers/utils/key_path/extraction.rb +8 -8
  23. data/lib/rspec/json_matchers/utils/key_path/path.rb +1 -1
  24. data/lib/rspec/json_matchers/version.rb +1 -1
  25. data/rspec-json_matchers.gemspec +3 -2
  26. metadata +16 -13
  27. data/lib/rspec/json_matchers/comparers.rb +0 -13
  28. data/lib/rspec/json_matchers/comparers/abstract_comparer.rb +0 -323
  29. data/lib/rspec/json_matchers/comparers/comparison_result.rb +0 -22
  30. data/lib/rspec/json_matchers/comparers/exact_keys_comparer.rb +0 -27
  31. data/lib/rspec/json_matchers/comparers/include_keys_comparer.rb +0 -26
  32. data/lib/rspec/json_matchers/matchers/be_json_with_sizes_matcher.rb +0 -24
  33. data/lib/rspec/json_matchers/matchers/be_json_with_something_matcher.rb +0 -188
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91e5b7f422c49f7e1400992d4a279cf2d491c856
4
- data.tar.gz: 69a46b761332223e2745fa806dcb860479843bd2
3
+ metadata.gz: b0fa3b73163b59a8115dbc20683586c34e040722
4
+ data.tar.gz: 8bb92ab53ac16c8fdd7dd27ca65103d07125bf88
5
5
  SHA512:
6
- metadata.gz: 7d0fd77345e589549cdb269cf4862014d768e37df32e953fa03847906046f2ee7beadf31d3e77f75a592b18858c7e3fa22332fc3bd86ab22a49fbdd5d1feb51d
7
- data.tar.gz: b284ea87643590e87ba19e3a8ae9bc82f7113e0da2679e3b8d826d94015aac923ca373f3ad4d4b300963d0714022dacbe5df908175796d75fe5fbb9e9e5ff50b
6
+ metadata.gz: 42d3133b8cfb75688cab121cf09c9a13070aad223773a83e0c6094344ba757edcc0a0b3b48ea7cc3faed35574a2dc2657038b710c748c2866fbc5814aa9dca91
7
+ data.tar.gz: 3fd140aa04148a74cabb4c6cbd8dc3408b47888e11b985c0419a33370cca1bd49e4238bc617da26d8cd3f48efc3f9fbc60d62b31f6cd7cb4e749902a021588c4
data/.codeclimate.yml ADDED
@@ -0,0 +1,16 @@
1
+ ---
2
+ engines:
3
+ duplication:
4
+ enabled: true
5
+ config:
6
+ languages:
7
+ - ruby
8
+ fixme:
9
+ enabled: true
10
+ rubocop:
11
+ enabled: true
12
+ ratings:
13
+ paths:
14
+ - "**.rb"
15
+ exclude_paths:
16
+ - spec/
data/.rubocop.yml CHANGED
@@ -1,31 +1,486 @@
1
- Style/StringLiterals:
2
- EnforcedStyle: double_quotes
1
+ AllCops:
2
+ DisabledByDefault: true
3
+ Exclude:
4
+ - "spec/**/*"
3
5
 
4
- Style/TrailingComma:
5
- # If EnforcedStyleForMultiline is comma, the cop requires a comma after the
6
- # last item of a list, but only for lists where each item is on its own line.
7
- # If EnforcedStyleForMultiline is consistent_comma, the cop requires a comma
8
- # after the last item of a list, for all lists.
9
- EnforcedStyleForMultiline: comma
6
+ Lint/AmbiguousOperator:
7
+ Enabled: true
8
+ Severity: warning
9
+ Lint/AmbiguousRegexpLiteral:
10
+ Enabled: true
11
+ Severity: warning
12
+ Lint/AssignmentInCondition:
13
+ Enabled: true
14
+ Severity: warning
15
+ Lint/BlockAlignment:
16
+ Enabled: true
17
+ Severity: warning
18
+ Lint/CircularArgumentReference:
19
+ Enabled: true
20
+ Severity: warning
21
+ Lint/ConditionPosition:
22
+ Enabled: true
23
+ Severity: warning
24
+ Lint/DefEndAlignment:
25
+ Enabled: true
26
+ Severity: warning
27
+ Lint/DeprecatedClassMethods:
28
+ Enabled: true
29
+ Severity: warning
30
+ Lint/DuplicateCaseCondition:
31
+ Enabled: true
32
+ Severity: warning
33
+ Lint/DuplicateMethods:
34
+ Enabled: true
35
+ Severity: warning
36
+ Lint/DuplicatedKey:
37
+ Enabled: true
38
+ Severity: warning
39
+ Lint/EachWithObjectArgument:
40
+ Enabled: true
41
+ Severity: warning
42
+ Lint/ElseLayout:
43
+ Enabled: true
44
+ Severity: warning
45
+ Lint/EmptyEnsure:
46
+ Enabled: true
47
+ Severity: warning
48
+ Lint/EmptyExpression:
49
+ Enabled: true
50
+ Severity: warning
51
+ Lint/EmptyInterpolation:
52
+ Enabled: true
53
+ Severity: warning
54
+ Lint/EmptyWhen:
55
+ Enabled: true
56
+ Severity: warning
57
+ Lint/EndAlignment:
58
+ Enabled: true
59
+ Severity: warning
60
+ EnforcedStyleAlignWith: start_of_line
61
+ Lint/EndInMethod:
62
+ Enabled: true
63
+ Severity: warning
64
+ Lint/EnsureReturn:
65
+ Enabled: true
66
+ Severity: warning
67
+ Lint/InheritException:
68
+ Enabled: true
69
+ Severity: warning
70
+ Lint/LiteralInCondition:
71
+ Enabled: true
72
+ Severity: warning
73
+ Lint/LiteralInInterpolation:
74
+ Enabled: true
75
+ Severity: warning
76
+ Lint/Loop:
77
+ Enabled: true
78
+ Severity: warning
79
+ Lint/MultipleCompare:
80
+ Enabled: true
81
+ Severity: warning
82
+ Lint/NestedMethodDefinition:
83
+ Enabled: true
84
+ Severity: warning
85
+ Lint/ParenthesesAsGroupedExpression:
86
+ Enabled: true
87
+ Severity: warning
88
+ Lint/RequireParentheses:
89
+ Enabled: true
90
+ Severity: warning
91
+ Lint/RescueException:
92
+ Enabled: true
93
+ Severity: warning
94
+ Lint/SafeNavigationChain:
95
+ Enabled: true
96
+ Severity: warning
97
+ Lint/ShadowingOuterLocalVariable:
98
+ Enabled: true
99
+ Severity: warning
100
+ Lint/StringConversionInInterpolation:
101
+ Enabled: true
102
+ Severity: warning
103
+ Lint/UnderscorePrefixedVariableName:
104
+ Enabled: true
105
+ Severity: warning
106
+ Lint/UnneededDisable:
107
+ Enabled: true
108
+ Severity: warning
109
+ Lint/UnneededSplatExpansion:
110
+ Enabled: true
111
+ Severity: warning
112
+ Lint/UnreachableCode:
113
+ Enabled: true
114
+ Severity: warning
115
+ Lint/UnusedMethodArgument:
116
+ Enabled: true
117
+ Severity: warning
118
+ Lint/UselessAssignment:
119
+ Enabled: true
120
+ Severity: warning
121
+ Lint/UselessComparison:
122
+ Enabled: true
123
+ Severity: warning
124
+ Lint/Void:
125
+ Enabled: true
126
+ Severity: warning
10
127
 
11
- Style/SignalException:
12
- EnforcedStyle: only_fail
128
+ Metrics/LineLength:
129
+ Enabled: true
130
+ Severity: warning
131
+ Max: 100
132
+ Metrics/ParameterLists:
133
+ Enabled: true
134
+ Severity: warning
13
135
 
14
- # Multi-line method chaining should be done with leading dots.
15
- Style/DotPosition:
16
- EnforcedStyle: trailing
136
+ Performance/Casecmp:
137
+ Enabled: true
138
+ Severity: warning
139
+ Performance/Count:
140
+ Enabled: true
141
+ Severity: warning
142
+ Performance/Detect:
143
+ Enabled: true
144
+ Severity: warning
145
+ Performance/DoubleStartEndWith:
146
+ Enabled: true
147
+ Severity: warning
148
+ Performance/EndWith:
149
+ Enabled: true
150
+ Severity: warning
151
+ Performance/FlatMap:
152
+ Enabled: true
153
+ Severity: warning
154
+ Performance/HashEachMethods:
155
+ Enabled: true
156
+ Severity: warning
157
+ Performance/RangeInclude:
158
+ Enabled: true
159
+ Severity: warning
160
+ Performance/RedundantBlockCall:
161
+ Enabled: true
162
+ Severity: warning
163
+ Performance/RedundantMatch:
164
+ Enabled: true
165
+ Severity: warning
166
+ Performance/RedundantMerge:
167
+ Enabled: true
168
+ Severity: warning
169
+ Performance/RegexpMatch:
170
+ Enabled: true
171
+ Severity: warning
172
+ Performance/ReverseEach:
173
+ Enabled: true
174
+ Severity: warning
175
+ Performance/Sample:
176
+ Enabled: true
177
+ Severity: warning
178
+ Performance/Size:
179
+ Enabled: true
180
+ Severity: warning
181
+ Performance/StartWith:
182
+ Enabled: true
183
+ Severity: warning
184
+ Performance/StringReplacement:
185
+ Enabled: true
186
+ Severity: warning
187
+ Performance/TimesMap:
188
+ Enabled: true
189
+ Severity: warning
17
190
 
18
- Style/MultilineOperationIndentation:
19
- EnforcedStyle: indented
191
+ Security/Eval:
192
+ Enabled: true
193
+ Severity: error
194
+ Security/JSONLoad:
195
+ Enabled: true
196
+ Severity: warning
197
+ Security/MarshalLoad:
198
+ Enabled: true
199
+ Severity: warning
200
+ Security/YAMLLoad:
201
+ Enabled: true
202
+ Severity: warning
20
203
 
204
+ Style/AccessorMethodName:
205
+ Enabled: true
206
+ Severity: warning
207
+ Style/AlignArray:
208
+ Enabled: true
209
+ Severity: warning
210
+ Style/AlignHash:
211
+ Enabled: false
212
+ Severity: warning
213
+ EnforcedHashRocketStyle: table
214
+ EnforcedColonStyle: table
21
215
  Style/AlignParameters:
22
- EnforcedStyle: with_fixed_indentation
23
-
216
+ Enabled: true
217
+ Severity: warning
218
+ Style/AndOr:
219
+ Enabled: true
220
+ Severity: warning
221
+ Style/AsciiIdentifiers:
222
+ Enabled: true
223
+ Severity: warning
224
+ Style/Attr:
225
+ Enabled: true
226
+ Severity: warning
227
+ Style/AutoResourceCleanup:
228
+ Enabled: true
229
+ Severity: warning
230
+ Style/BeginBlock:
231
+ Enabled: true
232
+ Severity: warning
233
+ Style/BlockEndNewline:
234
+ Enabled: true
235
+ Severity: warning
236
+ Style/ClassAndModuleCamelCase:
237
+ Enabled: true
238
+ Severity: warning
239
+ Style/ClassMethods:
240
+ Enabled: true
241
+ Severity: warning
242
+ Style/ClassVars:
243
+ Enabled: true
244
+ Severity: warning
24
245
  Style/ClosingParenthesisIndentation:
246
+ Enabled: true
247
+ Severity: warning
248
+ Style/ColonMethodCall:
249
+ Enabled: true
250
+ Severity: warning
251
+ Style/ConditionalAssignment:
252
+ Enabled: true
253
+ Severity: warning
254
+ Style/ConstantName:
255
+ Enabled: true
256
+ Severity: warning
257
+ Style/DefWithParentheses:
258
+ Enabled: true
259
+ Severity: warning
260
+ Style/DotPosition:
261
+ Enabled: true
262
+ Severity: warning
263
+ EnforcedStyle: trailing
264
+ Style/EachForSimpleLoop:
265
+ Enabled: true
266
+ Severity: warning
267
+ Style/EachWithObject:
268
+ Enabled: true
269
+ Severity: warning
270
+ Style/ElseAlignment:
25
271
  Enabled: false
272
+ Severity: warning
273
+ Style/EmptyCaseCondition:
274
+ Enabled: true
275
+ Severity: warning
276
+ Style/EmptyElse:
277
+ Enabled: true
278
+ Severity: warning
279
+ Style/EmptyLinesAroundAccessModifier:
280
+ Enabled: true
281
+ Severity: warning
282
+ Style/EmptyMethod:
283
+ Enabled: true
284
+ Severity: warning
285
+ Style/EndBlock:
286
+ Enabled: true
287
+ Severity: warning
288
+ Style/EvenOdd:
289
+ Enabled: true
290
+ Severity: warning
291
+ Style/FirstArrayElementLineBreak:
292
+ Enabled: true
293
+ Severity: warning
294
+ Style/FirstHashElementLineBreak:
295
+ Enabled: true
296
+ Severity: warning
297
+ Style/FirstMethodArgumentLineBreak:
298
+ Enabled: true
299
+ Severity: warning
300
+ Style/FirstMethodParameterLineBreak:
301
+ Enabled: true
302
+ Severity: warning
303
+ Style/FirstParameterIndentation:
304
+ Enabled: true
305
+ Severity: warning
306
+ Style/FlipFlop:
307
+ Enabled: true
308
+ Severity: warning
309
+ Style/For:
310
+ Enabled: true
311
+ Severity: warning
312
+ Style/FrozenStringLiteralComment:
313
+ Enabled: true
314
+ Severity: warning
315
+ Style/GlobalVars:
316
+ Enabled: true
317
+ Severity: error
318
+ Style/GuardClause:
319
+ Enabled: true
320
+ Severity: warning
321
+ Style/HashSyntax:
322
+ Enabled: true
323
+ Severity: warning
324
+ EnforcedStyle: ruby19_no_mixed_keys
325
+ Style/IfInsideElse:
326
+ Enabled: true
327
+ Severity: warning
328
+ Style/IfUnlessModifier:
329
+ Enabled: true
330
+ Severity: warning
331
+ Style/IndentArray:
332
+ Enabled: true
333
+ Severity: warning
334
+ Style/IndentAssignment:
335
+ Enabled: true
336
+ Severity: warning
337
+ Style/IndentationConsistency:
338
+ Enabled: true
339
+ Severity: warning
340
+ Style/IndentationWidth:
341
+ Enabled: true
342
+ Severity: warning
343
+ Style/InfiniteLoop:
344
+ Enabled: true
345
+ Severity: warning
346
+ Style/InlineComment:
347
+ Enabled: true
348
+ Severity: warning
349
+ Style/LambdaCall:
350
+ Enabled: true
351
+ Severity: warning
352
+ Style/MethodCallWithArgsParentheses:
353
+ Enabled: true
354
+ Severity: warning
355
+ IgnoredMethods:
356
+ # require
357
+ - require
358
+ - require_relative
359
+ # include, extend
360
+ - include
361
+ - extend
362
+ # Class method calls
363
+ - attr_reader
364
+ - attr_writer
365
+ - attr_accessor
366
+ - alias_method
367
+ - private_constant
368
+ - private_class_method
369
+ # Common debug
370
+ - puts
371
+ # error
372
+ - raise
373
+ - fail
374
+ # Gems
375
+ - Contract
376
+ - memoize
377
+ # RSpec
378
+ - describe
379
+ - context
380
+ - it
381
+ - to
382
+ - to_not
383
+ - not_to
384
+ - should
385
+ - should_not
386
+ - it_behaves_like
387
+ Style/MethodCallWithoutArgsParentheses:
388
+ Enabled: true
389
+ Severity: warning
390
+ Style/MethodName:
391
+ Enabled: true
392
+ Severity: warning
393
+ Style/MultilineBlockLayout:
394
+ Enabled: true
395
+ Severity: warning
396
+ Style/MultilineMemoization:
397
+ Enabled: true
398
+ Severity: warning
399
+ Style/MutableConstant:
400
+ Enabled: true
401
+ Severity: warning
402
+ Style/NestedParenthesizedCalls:
403
+ Enabled: true
404
+ Severity: warning
405
+ Style/Next:
406
+ Enabled: true
407
+ Severity: warning
408
+ Style/NilComparison:
409
+ Enabled: true
410
+ Severity: warning
411
+ Style/NonNilCheck:
412
+ Enabled: true
413
+ Severity: warning
414
+ Style/Not:
415
+ Enabled: true
416
+ Severity: warning
417
+ Style/NumericLiterals:
418
+ Enabled: true
419
+ Severity: warning
420
+ Style/NumericPredicate:
421
+ Enabled: true
422
+ Severity: warning
423
+ Style/OpMethod:
424
+ Enabled: true
425
+ Severity: warning
426
+ Style/OptionHash:
427
+ Enabled: true
428
+ Severity: warning
429
+ Style/OptionalArguments:
430
+ Enabled: true
431
+ Severity: warning
432
+ Style/ParallelAssignment:
433
+ Enabled: true
434
+ Severity: warning
435
+ Style/RedundantBegin:
436
+ Enabled: true
437
+ Severity: warning
438
+ Style/RedundantFreeze:
439
+ Enabled: true
440
+ Severity: warning
441
+ Style/RedundantParentheses:
442
+ Enabled: true
443
+ Severity: warning
444
+ Style/RescueEnsureAlignment:
445
+ Enabled: true
446
+ Severity: warning
447
+ Style/SelfAssignment:
448
+ Enabled: true
449
+ Severity: warning
450
+ Style/StabbyLambdaParentheses:
451
+ Enabled: true
452
+ Severity: warning
453
+ Style/Tab:
454
+ Enabled: true
455
+ Severity: warning
456
+ Style/TrailingBlankLines:
457
+ Enabled: true
458
+ Severity: warning
459
+ Style/TrailingCommaInArguments:
460
+ Enabled: true
461
+ Severity: warning
462
+ EnforcedStyleForMultiline: consistent_comma
463
+ Style/TrailingCommaInLiteral:
464
+ Enabled: true
465
+ Severity: warning
466
+ EnforcedStyleForMultiline: comma
467
+ Style/TrailingWhitespace:
468
+ Enabled: true
469
+ Severity: warning
470
+ Style/UnlessElse:
471
+ Enabled: true
472
+ Severity: warning
473
+ Style/VariableName:
474
+ Enabled: true
475
+ Severity: warning
476
+ Style/VariableNumber:
477
+ Enabled: true
478
+ Severity: warning
479
+ EnforcedStyle: snake_case
480
+ Style/ZeroLengthPredicate:
481
+ Enabled: true
482
+ Severity: warning
26
483
 
27
- Style/FileName:
28
- Enabled: false
29
-
30
- Style/PredicateName:
31
- Enabled: false
484
+ Bundler/DuplicatedGem:
485
+ Enabled: true
486
+ Severity: warning