super_diff 0.5.3 → 0.6.1

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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +46 -19
  3. data/lib/super_diff.rb +1 -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 +1 -1
  8. data/lib/super_diff/diff_formatters/multiline_string.rb +4 -4
  9. data/lib/super_diff/equality_matchers/array.rb +2 -2
  10. data/lib/super_diff/equality_matchers/default.rb +2 -2
  11. data/lib/super_diff/equality_matchers/hash.rb +2 -2
  12. data/lib/super_diff/equality_matchers/multiline_string.rb +2 -2
  13. data/lib/super_diff/equality_matchers/primitive.rb +2 -2
  14. data/lib/super_diff/equality_matchers/singleline_string.rb +2 -2
  15. data/lib/super_diff/gem_version.rb +45 -0
  16. data/lib/super_diff/rspec.rb +7 -0
  17. data/lib/super_diff/rspec/matcher_text_builders/base.rb +7 -7
  18. data/lib/super_diff/rspec/matcher_text_builders/be_predicate.rb +6 -6
  19. data/lib/super_diff/rspec/matcher_text_builders/contain_exactly.rb +1 -1
  20. data/lib/super_diff/rspec/matcher_text_builders/have_predicate.rb +4 -4
  21. data/lib/super_diff/rspec/matcher_text_builders/raise_error.rb +1 -1
  22. data/lib/super_diff/rspec/matcher_text_builders/respond_to.rb +5 -5
  23. data/lib/super_diff/rspec/monkey_patches.rb +21 -13
  24. data/lib/super_diff/rspec/operation_tree_builders/collection_containing_exactly.rb +12 -1
  25. data/lib/super_diff/version.rb +1 -1
  26. data/spec/examples.txt +390 -5
  27. data/spec/integration/rspec/be_falsey_matcher_spec.rb +10 -10
  28. data/spec/integration/rspec/be_matcher_spec.rb +100 -100
  29. data/spec/integration/rspec/be_nil_matcher_spec.rb +10 -10
  30. data/spec/integration/rspec/be_predicate_matcher_spec.rb +103 -103
  31. data/spec/integration/rspec/be_truthy_matcher_spec.rb +10 -10
  32. data/spec/integration/rspec/contain_exactly_matcher_spec.rb +107 -107
  33. data/spec/integration/rspec/eq_matcher_spec.rb +230 -230
  34. data/spec/integration/rspec/have_attributes_matcher_spec.rb +129 -129
  35. data/spec/integration/rspec/have_predicate_matcher_spec.rb +65 -65
  36. data/spec/integration/rspec/include_matcher_spec.rb +73 -73
  37. data/spec/integration/rspec/match_array_matcher_spec.rb +119 -119
  38. data/spec/integration/rspec/match_matcher_spec.rb +274 -274
  39. data/spec/integration/rspec/raise_error_matcher_spec.rb +86 -86
  40. data/spec/integration/rspec/respond_to_matcher_spec.rb +240 -240
  41. data/spec/integration/rspec/third_party_matcher_spec.rb +8 -8
  42. data/spec/integration/rspec/unhandled_errors_spec.rb +5 -5
  43. data/spec/spec_helper.rb +22 -13
  44. data/spec/support/integration/helpers.rb +6 -2
  45. data/spec/support/integration/matchers/produce_output_when_run_matcher.rb +1 -1
  46. data/spec/support/integration/test_programs/base.rb +2 -0
  47. data/spec/support/integration/test_programs/rspec_active_record.rb +1 -1
  48. data/spec/support/integration/test_programs/rspec_active_support.rb +17 -0
  49. data/spec/support/integration/test_programs/rspec_rails.rb +1 -1
  50. data/spec/support/shared_examples/active_record.rb +108 -108
  51. data/spec/support/shared_examples/hash_with_indifferent_access.rb +196 -232
  52. data/spec/tmp/integration_spec.rb +15 -0
  53. data/spec/unit/equality_matchers/main_spec.rb +403 -403
  54. data/super_diff.gemspec +1 -1
  55. metadata +11 -3
data/super_diff.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  SuperDiff is a gem that hooks into RSpec to intelligently display the
13
13
  differences between two data structures of any type.
14
14
  DESC
15
- s.required_ruby_version = "~> 2.4"
15
+ s.required_ruby_version = [">= 2.4", "< 4"]
16
16
 
17
17
  s.files = ["README.md", "super_diff.gemspec"] + Dir["lib/**/*"]
18
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.3
4
+ version: 0.6.1
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-12-21 00:00:00.000000000 Z
11
+ date: 2021-02-11 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
@@ -250,6 +251,7 @@ files:
250
251
  - spec/support/integration/test_programs/base.rb
251
252
  - spec/support/integration/test_programs/plain.rb
252
253
  - spec/support/integration/test_programs/rspec_active_record.rb
254
+ - spec/support/integration/test_programs/rspec_active_support.rb
253
255
  - spec/support/integration/test_programs/rspec_rails.rb
254
256
  - spec/support/models/a.rb
255
257
  - spec/support/models/active_record/person.rb
@@ -266,6 +268,7 @@ files:
266
268
  - spec/support/ruby_versions.rb
267
269
  - spec/support/shared_examples/active_record.rb
268
270
  - spec/support/shared_examples/hash_with_indifferent_access.rb
271
+ - spec/tmp/integration_spec.rb
269
272
  - spec/unit/equality_matchers/main_spec.rb
270
273
  - spec/unit/object_inspection_spec.rb
271
274
  - spec/unit/rspec/matchers/be_compared_to_spec.rb
@@ -294,9 +297,12 @@ require_paths:
294
297
  - lib
295
298
  required_ruby_version: !ruby/object:Gem::Requirement
296
299
  requirements:
297
- - - "~>"
300
+ - - ">="
298
301
  - !ruby/object:Gem::Version
299
302
  version: '2.4'
303
+ - - "<"
304
+ - !ruby/object:Gem::Version
305
+ version: '4'
300
306
  required_rubygems_version: !ruby/object:Gem::Requirement
301
307
  requirements:
302
308
  - - ">="
@@ -349,6 +355,7 @@ test_files:
349
355
  - spec/support/integration/test_programs/base.rb
350
356
  - spec/support/integration/test_programs/rspec_rails.rb
351
357
  - spec/support/integration/test_programs/plain.rb
358
+ - spec/support/integration/test_programs/rspec_active_support.rb
352
359
  - spec/support/integration/test_programs/rspec_active_record.rb
353
360
  - spec/support/integration/helpers.rb
354
361
  - spec/support/integration/matchers.rb
@@ -369,3 +376,4 @@ test_files:
369
376
  - spec/support/colorizer.rb
370
377
  - spec/support/shared_examples/hash_with_indifferent_access.rb
371
378
  - spec/support/shared_examples/active_record.rb
379
+ - spec/tmp/integration_spec.rb