super_diff 0.5.1 → 0.6.2

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.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +49 -22
  3. data/lib/super_diff.rb +25 -7
  4. data/lib/super_diff/colorized_document_extensions.rb +4 -4
  5. data/lib/super_diff/configuration.rb +32 -22
  6. data/lib/super_diff/csi.rb +2 -1
  7. data/lib/super_diff/diff_formatters/collection.rb +2 -2
  8. data/lib/super_diff/diff_formatters/multiline_string.rb +4 -4
  9. data/lib/super_diff/equality_matchers/array.rb +4 -4
  10. data/lib/super_diff/equality_matchers/default.rb +4 -4
  11. data/lib/super_diff/equality_matchers/hash.rb +4 -4
  12. data/lib/super_diff/equality_matchers/multiline_string.rb +4 -4
  13. data/lib/super_diff/equality_matchers/primitive.rb +4 -4
  14. data/lib/super_diff/equality_matchers/singleline_string.rb +4 -4
  15. data/lib/super_diff/gem_version.rb +45 -0
  16. data/lib/super_diff/object_inspection.rb +0 -8
  17. data/lib/super_diff/object_inspection/nodes/inspection.rb +1 -1
  18. data/lib/super_diff/operation_trees/base.rb +2 -0
  19. data/lib/super_diff/recursion_guard.rb +2 -0
  20. data/lib/super_diff/rspec.rb +7 -0
  21. data/lib/super_diff/rspec/matcher_text_builders/base.rb +7 -7
  22. data/lib/super_diff/rspec/matcher_text_builders/be_predicate.rb +6 -6
  23. data/lib/super_diff/rspec/matcher_text_builders/contain_exactly.rb +1 -1
  24. data/lib/super_diff/rspec/matcher_text_builders/have_predicate.rb +4 -4
  25. data/lib/super_diff/rspec/matcher_text_builders/raise_error.rb +1 -1
  26. data/lib/super_diff/rspec/matcher_text_builders/respond_to.rb +5 -5
  27. data/lib/super_diff/rspec/monkey_patches.rb +353 -306
  28. data/lib/super_diff/rspec/operation_tree_builders/collection_containing_exactly.rb +12 -1
  29. data/lib/super_diff/version.rb +1 -1
  30. data/spec/combustion/Gemfile.lock +173 -0
  31. data/spec/examples.txt +406 -5
  32. data/spec/integration/rspec/be_falsey_matcher_spec.rb +10 -10
  33. data/spec/integration/rspec/be_matcher_spec.rb +100 -100
  34. data/spec/integration/rspec/be_nil_matcher_spec.rb +10 -10
  35. data/spec/integration/rspec/be_predicate_matcher_spec.rb +103 -103
  36. data/spec/integration/rspec/be_truthy_matcher_spec.rb +10 -10
  37. data/spec/integration/rspec/contain_exactly_matcher_spec.rb +107 -107
  38. data/spec/integration/rspec/eq_matcher_spec.rb +230 -230
  39. data/spec/integration/rspec/have_attributes_matcher_spec.rb +129 -129
  40. data/spec/integration/rspec/have_predicate_matcher_spec.rb +65 -65
  41. data/spec/integration/rspec/include_matcher_spec.rb +73 -73
  42. data/spec/integration/rspec/match_array_matcher_spec.rb +149 -107
  43. data/spec/integration/rspec/match_matcher_spec.rb +274 -274
  44. data/spec/integration/rspec/raise_error_matcher_spec.rb +86 -86
  45. data/spec/integration/rspec/respond_to_matcher_spec.rb +240 -240
  46. data/spec/integration/rspec/third_party_matcher_spec.rb +8 -8
  47. data/spec/integration/rspec/unhandled_errors_spec.rb +5 -5
  48. data/spec/spec_helper.rb +30 -13
  49. data/spec/support/integration/helpers.rb +6 -2
  50. data/spec/support/integration/matchers/produce_output_when_run_matcher.rb +1 -1
  51. data/spec/support/integration/test_programs/base.rb +2 -0
  52. data/spec/support/integration/test_programs/rspec_active_record.rb +1 -1
  53. data/spec/support/integration/test_programs/rspec_active_support.rb +17 -0
  54. data/spec/support/integration/test_programs/rspec_rails.rb +1 -1
  55. data/spec/support/shared_examples/active_record.rb +108 -108
  56. data/spec/support/shared_examples/hash_with_indifferent_access.rb +196 -232
  57. data/spec/unit/equality_matchers/main_spec.rb +403 -403
  58. data/spec/unit/{object_inspection_spec.rb → super_diff_spec.rb} +136 -76
  59. data/super_diff.gemspec +2 -1
  60. metadata +15 -6
data/super_diff.gemspec CHANGED
@@ -7,11 +7,12 @@ Gem::Specification.new do |s|
7
7
  s.email = ["elliot.winkler@gmail.com"]
8
8
  s.homepage = "https://github.com/mcmire/super_diff"
9
9
  s.summary = "A better way to view differences between complex data structures in RSpec."
10
+ s.license = "MIT"
10
11
  s.description = <<~DESC
11
12
  SuperDiff is a gem that hooks into RSpec to intelligently display the
12
13
  differences between two data structures of any type.
13
14
  DESC
14
- s.required_ruby_version = "~> 2.4"
15
+ s.required_ruby_version = [">= 2.4", "< 4"]
15
16
 
16
17
  s.files = ["README.md", "super_diff.gemspec"] + Dir["lib/**/*"]
17
18
  s.test_files = Dir["spec/**/*"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super_diff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elliot Winkler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-19 00:00:00.000000000 Z
11
+ date: 2021-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: attr_extras
@@ -138,6 +138,7 @@ files:
138
138
  - lib/super_diff/errors/no_diff_formatter_available_error.rb
139
139
  - lib/super_diff/errors/no_differ_available_error.rb
140
140
  - lib/super_diff/errors/no_operational_sequencer_available_error.rb
141
+ - lib/super_diff/gem_version.rb
141
142
  - lib/super_diff/helpers.rb
142
143
  - lib/super_diff/implementation_checks.rb
143
144
  - lib/super_diff/object_inspection.rb
@@ -222,6 +223,7 @@ files:
222
223
  - lib/super_diff/rspec/operation_tree_builders/hash_including.rb
223
224
  - lib/super_diff/rspec/operation_tree_builders/object_having_attributes.rb
224
225
  - lib/super_diff/version.rb
226
+ - spec/combustion/Gemfile.lock
225
227
  - spec/examples.txt
226
228
  - spec/integration/rails/active_record_spec.rb
227
229
  - spec/integration/rails/hash_with_indifferent_access_spec.rb
@@ -250,6 +252,7 @@ files:
250
252
  - spec/support/integration/test_programs/base.rb
251
253
  - spec/support/integration/test_programs/plain.rb
252
254
  - spec/support/integration/test_programs/rspec_active_record.rb
255
+ - spec/support/integration/test_programs/rspec_active_support.rb
253
256
  - spec/support/integration/test_programs/rspec_rails.rb
254
257
  - spec/support/models/a.rb
255
258
  - spec/support/models/active_record/person.rb
@@ -267,7 +270,6 @@ files:
267
270
  - spec/support/shared_examples/active_record.rb
268
271
  - spec/support/shared_examples/hash_with_indifferent_access.rb
269
272
  - spec/unit/equality_matchers/main_spec.rb
270
- - spec/unit/object_inspection_spec.rb
271
273
  - spec/unit/rspec/matchers/be_compared_to_spec.rb
272
274
  - spec/unit/rspec/matchers/be_falsey_spec.rb
273
275
  - spec/unit/rspec/matchers/be_nil_spec.rb
@@ -283,9 +285,11 @@ files:
283
285
  - spec/unit/rspec/matchers/match_spec.rb
284
286
  - spec/unit/rspec/matchers/raise_error_spec.rb
285
287
  - spec/unit/rspec/matchers/respond_to_spec.rb
288
+ - spec/unit/super_diff_spec.rb
286
289
  - super_diff.gemspec
287
290
  homepage: https://github.com/mcmire/super_diff
288
- licenses: []
291
+ licenses:
292
+ - MIT
289
293
  metadata: {}
290
294
  post_install_message:
291
295
  rdoc_options: []
@@ -293,9 +297,12 @@ require_paths:
293
297
  - lib
294
298
  required_ruby_version: !ruby/object:Gem::Requirement
295
299
  requirements:
296
- - - "~>"
300
+ - - ">="
297
301
  - !ruby/object:Gem::Version
298
302
  version: '2.4'
303
+ - - "<"
304
+ - !ruby/object:Gem::Version
305
+ version: '4'
299
306
  required_rubygems_version: !ruby/object:Gem::Requirement
300
307
  requirements:
301
308
  - - ">="
@@ -309,7 +316,7 @@ summary: A better way to view differences between complex data structures in RSp
309
316
  test_files:
310
317
  - spec/spec_helper.rb
311
318
  - spec/unit/equality_matchers/main_spec.rb
312
- - spec/unit/object_inspection_spec.rb
319
+ - spec/unit/super_diff_spec.rb
313
320
  - spec/unit/rspec/matchers/contain_exactly_spec.rb
314
321
  - spec/unit/rspec/matchers/be_predicate_spec.rb
315
322
  - spec/unit/rspec/matchers/raise_error_spec.rb
@@ -348,6 +355,7 @@ test_files:
348
355
  - spec/support/integration/test_programs/base.rb
349
356
  - spec/support/integration/test_programs/rspec_rails.rb
350
357
  - spec/support/integration/test_programs/plain.rb
358
+ - spec/support/integration/test_programs/rspec_active_support.rb
351
359
  - spec/support/integration/test_programs/rspec_active_record.rb
352
360
  - spec/support/integration/helpers.rb
353
361
  - spec/support/integration/matchers.rb
@@ -368,3 +376,4 @@ test_files:
368
376
  - spec/support/colorizer.rb
369
377
  - spec/support/shared_examples/hash_with_indifferent_access.rb
370
378
  - spec/support/shared_examples/active_record.rb
379
+ - spec/combustion/Gemfile.lock