super_diff 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +65 -26
  3. data/lib/super_diff/active_record/differs/active_record_relation.rb +1 -2
  4. data/lib/super_diff/active_record/differs.rb +1 -1
  5. data/lib/super_diff/active_record/object_inspection/inspection_tree_builders/active_record_model.rb +5 -13
  6. data/lib/super_diff/active_record/object_inspection/inspection_tree_builders/active_record_relation.rb +1 -3
  7. data/lib/super_diff/active_record/object_inspection/inspection_tree_builders.rb +2 -2
  8. data/lib/super_diff/active_record/object_inspection.rb +1 -1
  9. data/lib/super_diff/active_record/operation_tree_builders/active_record_model.rb +1 -2
  10. data/lib/super_diff/active_record/operation_tree_builders/active_record_relation.rb +1 -2
  11. data/lib/super_diff/active_record/operation_tree_builders.rb +2 -2
  12. data/lib/super_diff/active_record/operation_tree_flatteners.rb +1 -1
  13. data/lib/super_diff/active_record/operation_trees.rb +1 -1
  14. data/lib/super_diff/active_record.rb +7 -15
  15. data/lib/super_diff/active_support/differs/hash_with_indifferent_access.rb +5 -6
  16. data/lib/super_diff/active_support/differs.rb +1 -1
  17. data/lib/super_diff/active_support/object_inspection/inspection_tree_builders/hash_with_indifferent_access.rb +3 -9
  18. data/lib/super_diff/active_support/object_inspection/inspection_tree_builders.rb +1 -1
  19. data/lib/super_diff/active_support/object_inspection.rb +1 -1
  20. data/lib/super_diff/active_support/operation_tree_builders/hash_with_indifferent_access.rb +5 -6
  21. data/lib/super_diff/active_support/operation_tree_builders.rb +1 -1
  22. data/lib/super_diff/active_support/operation_tree_flatteners.rb +1 -1
  23. data/lib/super_diff/active_support/operation_trees.rb +1 -1
  24. data/lib/super_diff/active_support.rb +6 -11
  25. data/lib/super_diff/colorized_document_extensions.rb +2 -4
  26. data/lib/super_diff/configuration.rb +14 -8
  27. data/lib/super_diff/csi/color.rb +4 -4
  28. data/lib/super_diff/csi/colorized_document.rb +12 -16
  29. data/lib/super_diff/csi/document.rb +8 -19
  30. data/lib/super_diff/csi/eight_bit_color.rb +19 -19
  31. data/lib/super_diff/csi/four_bit_color.rb +82 -31
  32. data/lib/super_diff/csi/twenty_four_bit_color.rb +12 -11
  33. data/lib/super_diff/csi/uncolorized_document.rb +2 -6
  34. data/lib/super_diff/csi.rb +10 -14
  35. data/lib/super_diff/diff_formatters/collection.rb +35 -41
  36. data/lib/super_diff/differs/default_object.rb +1 -1
  37. data/lib/super_diff/differs/defaults.rb +1 -1
  38. data/lib/super_diff/differs/main.rb +2 -13
  39. data/lib/super_diff/equality_matchers/array.rb +10 -12
  40. data/lib/super_diff/equality_matchers/base.rb +1 -1
  41. data/lib/super_diff/equality_matchers/default.rb +2 -4
  42. data/lib/super_diff/equality_matchers/defaults.rb +1 -1
  43. data/lib/super_diff/equality_matchers/hash.rb +10 -12
  44. data/lib/super_diff/equality_matchers/multiline_string.rb +11 -13
  45. data/lib/super_diff/equality_matchers/primitive.rb +10 -12
  46. data/lib/super_diff/equality_matchers/singleline_string.rb +10 -12
  47. data/lib/super_diff/equality_matchers.rb +1 -1
  48. data/lib/super_diff/errors.rb +3 -3
  49. data/lib/super_diff/gem_version.rb +3 -3
  50. data/lib/super_diff/helpers.rb +10 -10
  51. data/lib/super_diff/implementation_checks.rb +2 -2
  52. data/lib/super_diff/line.rb +3 -3
  53. data/lib/super_diff/object_inspection/inspection_tree.rb +46 -60
  54. data/lib/super_diff/object_inspection/inspection_tree_builders/array.rb +2 -6
  55. data/lib/super_diff/object_inspection/inspection_tree_builders/custom_object.rb +3 -9
  56. data/lib/super_diff/object_inspection/inspection_tree_builders/default_object.rb +5 -14
  57. data/lib/super_diff/object_inspection/inspection_tree_builders/defaults.rb +1 -1
  58. data/lib/super_diff/object_inspection/inspection_tree_builders/hash.rb +4 -12
  59. data/lib/super_diff/object_inspection/inspection_tree_builders/time_like.rb +6 -23
  60. data/lib/super_diff/object_inspection/inspection_tree_builders.rb +9 -9
  61. data/lib/super_diff/object_inspection/nodes/as_lines_when_rendering_to_lines.rb +8 -20
  62. data/lib/super_diff/object_inspection/nodes/as_prefix_when_rendering_to_lines.rb +1 -5
  63. data/lib/super_diff/object_inspection/nodes/as_prelude_when_rendering_to_lines.rb +1 -5
  64. data/lib/super_diff/object_inspection/nodes/as_single_line.rb +3 -7
  65. data/lib/super_diff/object_inspection/nodes/base.rb +9 -14
  66. data/lib/super_diff/object_inspection/nodes/inspection.rb +26 -34
  67. data/lib/super_diff/object_inspection/nodes/nesting.rb +1 -1
  68. data/lib/super_diff/object_inspection/nodes/only_when.rb +2 -6
  69. data/lib/super_diff/object_inspection/nodes/text.rb +1 -5
  70. data/lib/super_diff/object_inspection/nodes/when_empty.rb +2 -6
  71. data/lib/super_diff/object_inspection/nodes/when_non_empty.rb +2 -6
  72. data/lib/super_diff/object_inspection/nodes/when_rendering_to_lines.rb +1 -1
  73. data/lib/super_diff/object_inspection/nodes/when_rendering_to_string.rb +1 -5
  74. data/lib/super_diff/object_inspection/nodes.rb +7 -7
  75. data/lib/super_diff/object_inspection.rb +3 -3
  76. data/lib/super_diff/operation_tree_builders/array.rb +12 -11
  77. data/lib/super_diff/operation_tree_builders/base.rb +17 -15
  78. data/lib/super_diff/operation_tree_builders/custom_object.rb +8 -6
  79. data/lib/super_diff/operation_tree_builders/default_object.rb +29 -21
  80. data/lib/super_diff/operation_tree_builders/hash.rb +23 -24
  81. data/lib/super_diff/operation_tree_builders/main.rb +4 -11
  82. data/lib/super_diff/operation_tree_builders/multiline_string.rb +3 -3
  83. data/lib/super_diff/operation_tree_builders/time_like.rb +1 -11
  84. data/lib/super_diff/operation_tree_builders.rb +1 -1
  85. data/lib/super_diff/operation_tree_flatteners/base.rb +1 -5
  86. data/lib/super_diff/operation_tree_flatteners/collection.rb +13 -16
  87. data/lib/super_diff/operation_tree_flatteners/default_object.rb +1 -2
  88. data/lib/super_diff/operation_tree_flatteners/hash.rb +2 -10
  89. data/lib/super_diff/operation_tree_flatteners/multiline_string.rb +2 -1
  90. data/lib/super_diff/operation_tree_flatteners.rb +3 -3
  91. data/lib/super_diff/operation_trees/base.rb +3 -5
  92. data/lib/super_diff/operation_trees/default_object.rb +1 -3
  93. data/lib/super_diff/operations/binary_operation.rb +2 -2
  94. data/lib/super_diff/operations/unary_operation.rb +1 -1
  95. data/lib/super_diff/rails.rb +2 -1
  96. data/lib/super_diff/recursion_guard.rb +5 -4
  97. data/lib/super_diff/rspec/augmented_matcher.rb +4 -5
  98. data/lib/super_diff/rspec/differ.rb +6 -13
  99. data/lib/super_diff/rspec/differs/collection_containing_exactly.rb +3 -2
  100. data/lib/super_diff/rspec/differs/collection_including.rb +1 -1
  101. data/lib/super_diff/rspec/differs/hash_including.rb +1 -1
  102. data/lib/super_diff/rspec/differs.rb +3 -3
  103. data/lib/super_diff/rspec/matcher_text_builders/base.rb +13 -15
  104. data/lib/super_diff/rspec/matcher_text_builders/be_predicate.rb +5 -7
  105. data/lib/super_diff/rspec/matcher_text_builders/have_predicate.rb +3 -5
  106. data/lib/super_diff/rspec/matcher_text_builders/raise_error.rb +1 -5
  107. data/lib/super_diff/rspec/matcher_text_builders/respond_to.rb +2 -6
  108. data/lib/super_diff/rspec/matcher_text_builders.rb +5 -8
  109. data/lib/super_diff/rspec/matcher_text_template.rb +13 -16
  110. data/lib/super_diff/rspec/monkey_patches.rb +122 -116
  111. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/collection_including.rb +8 -6
  112. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/double.rb +11 -16
  113. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/hash_including.rb +2 -1
  114. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/instance_of.rb +8 -6
  115. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/kind_of.rb +8 -6
  116. data/lib/super_diff/rspec/object_inspection/inspection_tree_builders.rb +9 -9
  117. data/lib/super_diff/rspec/object_inspection.rb +1 -1
  118. data/lib/super_diff/rspec/operation_tree_builders/collection_containing_exactly.rb +11 -10
  119. data/lib/super_diff/rspec/operation_tree_builders/collection_including.rb +7 -6
  120. data/lib/super_diff/rspec/operation_tree_builders/hash_including.rb +11 -10
  121. data/lib/super_diff/rspec/operation_tree_builders/object_having_attributes.rb +22 -17
  122. data/lib/super_diff/rspec/operation_tree_builders.rb +4 -4
  123. data/lib/super_diff/rspec.rb +11 -13
  124. data/lib/super_diff/tiered_lines_elider.rb +87 -115
  125. data/lib/super_diff/tiered_lines_formatter.rb +5 -9
  126. data/lib/super_diff/version.rb +1 -1
  127. data/lib/super_diff.rb +4 -9
  128. data/spec/examples.txt +493 -485
  129. data/spec/integration/rails/active_record_spec.rb +3 -1
  130. data/spec/integration/rails/engines_spec.rb +20 -0
  131. data/spec/integration/rails/hash_with_indifferent_access_spec.rb +3 -1
  132. data/spec/integration/rspec/be_falsey_matcher_spec.rb +40 -35
  133. data/spec/integration/rspec/be_matcher_spec.rb +360 -320
  134. data/spec/integration/rspec/be_nil_matcher_spec.rb +38 -34
  135. data/spec/integration/rspec/be_predicate_matcher_spec.rb +376 -359
  136. data/spec/integration/rspec/be_truthy_matcher_spec.rb +38 -33
  137. data/spec/integration/rspec/contain_exactly_matcher_spec.rb +242 -239
  138. data/spec/integration/rspec/eq_matcher_spec.rb +595 -557
  139. data/spec/integration/rspec/have_attributes_matcher_spec.rb +294 -286
  140. data/spec/integration/rspec/have_predicate_matcher_spec.rb +291 -297
  141. data/spec/integration/rspec/include_matcher_spec.rb +317 -215
  142. data/spec/integration/rspec/match_array_matcher_spec.rb +276 -273
  143. data/spec/integration/rspec/match_matcher_spec.rb +847 -834
  144. data/spec/integration/rspec/raise_error_matcher_spec.rb +468 -453
  145. data/spec/integration/rspec/respond_to_matcher_spec.rb +702 -697
  146. data/spec/integration/rspec/third_party_matcher_spec.rb +142 -138
  147. data/spec/integration/rspec/unhandled_errors_spec.rb +88 -84
  148. data/spec/spec_helper.rb +17 -20
  149. data/spec/support/command_runner.rb +34 -57
  150. data/spec/support/integration/helpers.rb +35 -28
  151. data/spec/support/integration/matchers/produce_output_when_run_matcher.rb +28 -23
  152. data/spec/support/integration/test_programs/base.rb +12 -17
  153. data/spec/support/integration/test_programs/plain.rb +6 -0
  154. data/spec/support/integration/test_programs/rspec_active_record.rb +4 -1
  155. data/spec/support/integration/test_programs/rspec_active_support.rb +4 -1
  156. data/spec/support/integration/test_programs/rspec_rails.rb +4 -1
  157. data/spec/support/integration/test_programs/rspec_rails_engine.rb +30 -0
  158. data/spec/support/models/active_record/person.rb +6 -4
  159. data/spec/support/models/active_record/shipping_address.rb +9 -10
  160. data/spec/support/models/customer.rb +2 -4
  161. data/spec/support/models/player.rb +3 -6
  162. data/spec/support/models/shipping_address.rb +4 -13
  163. data/spec/support/shared_examples/active_record.rb +232 -214
  164. data/spec/support/shared_examples/active_support.rb +53 -51
  165. data/spec/support/shared_examples/elided_diffs.rb +405 -381
  166. data/spec/support/shared_examples/hash_with_indifferent_access.rb +424 -388
  167. data/spec/support/shared_examples/key.rb +123 -0
  168. data/spec/support/unit/helpers.rb +1 -3
  169. data/spec/support/unit/matchers/match_output.rb +12 -13
  170. data/spec/unit/active_record/object_inspection_spec.rb +222 -206
  171. data/spec/unit/equality_matchers/main_spec.rb +1049 -984
  172. data/spec/unit/helpers_spec.rb +14 -21
  173. data/spec/unit/operation_tree_flatteners/array_spec.rb +557 -524
  174. data/spec/unit/operation_tree_flatteners/custom_object_spec.rb +619 -601
  175. data/spec/unit/operation_tree_flatteners/default_object_spec.rb +619 -621
  176. data/spec/unit/operation_tree_flatteners/hash_spec.rb +595 -556
  177. data/spec/unit/operation_tree_flatteners/multiline_string_spec.rb +102 -92
  178. data/spec/unit/rspec/matchers/be_compared_to_spec.rb +3 -3
  179. data/spec/unit/rspec/matchers/be_predicate_spec.rb +3 -3
  180. data/spec/unit/rspec/matchers/contain_exactly_spec.rb +1 -1
  181. data/spec/unit/rspec/matchers/have_attributes_spec.rb +1 -1
  182. data/spec/unit/rspec/matchers/have_predicate_spec.rb +2 -2
  183. data/spec/unit/rspec/matchers/include_spec.rb +2 -2
  184. data/spec/unit/rspec/matchers/match_array_spec.rb +2 -2
  185. data/spec/unit/rspec/matchers/raise_error_spec.rb +5 -5
  186. data/spec/unit/rspec/matchers/respond_to_spec.rb +23 -16
  187. data/spec/unit/rspec/object_inspection_spec.rb +349 -324
  188. data/spec/unit/super_diff_spec.rb +1542 -1449
  189. data/spec/unit/tiered_lines_elider_spec.rb +3508 -3536
  190. data/spec/unit/tiered_lines_formatter_spec.rb +54 -116
  191. data/super_diff.gemspec +13 -12
  192. metadata +73 -73
  193. data/spec/tmp/warnings_logger/all_warnings.txt +0 -2
@@ -3,167 +3,105 @@ require "spec_helper"
3
3
  RSpec.describe SuperDiff::TieredLinesFormatter, type: :unit do
4
4
  it "formats the given lines as an array of strings with appropriate colors and indentation" do
5
5
  tiered_lines = [
6
- line(
7
- type: :noop,
8
- indentation_level: 0,
9
- value: %([),
10
- ),
11
- line(
12
- type: :noop,
13
- indentation_level: 1,
14
- value: %("foo"),
15
- add_comma: true,
16
- ),
17
- line(
18
- type: :noop,
19
- indentation_level: 1,
20
- value: %({),
21
- ),
6
+ line(type: :noop, indentation_level: 0, value: "["),
7
+ line(type: :noop, indentation_level: 1, value: %("foo"), add_comma: true),
8
+ line(type: :noop, indentation_level: 1, value: "{"),
22
9
  line(
23
10
  type: :noop,
24
11
  indentation_level: 2,
25
- prefix: %(one: ),
12
+ prefix: "one: ",
26
13
  value: %("fish"),
27
- add_comma: true,
14
+ add_comma: true
28
15
  ),
29
16
  line(
30
17
  type: :delete,
31
18
  indentation_level: 2,
32
- prefix: %(two: ),
19
+ prefix: "two: ",
33
20
  value: %("fish"),
34
- add_comma: true,
21
+ add_comma: true
35
22
  ),
36
23
  line(
37
24
  type: :insert,
38
25
  indentation_level: 2,
39
- prefix: %(two: ),
26
+ prefix: "two: ",
40
27
  value: %("FISH"),
41
- add_comma: true,
42
- ),
43
- line(
44
- type: :noop,
45
- indentation_level: 2,
46
- prefix: %(hard: ),
47
- value: %([),
28
+ add_comma: true
48
29
  ),
30
+ line(type: :noop, indentation_level: 2, prefix: "hard: ", value: "["),
49
31
  elision(
50
32
  indentation_level: 3,
51
- value: %(# ...),
33
+ value: "# ...",
52
34
  children: [
53
- line(
54
- type: :noop,
55
- indentation_level: 3,
56
- value: %("a"),
57
- ),
58
- line(
59
- type: :noop,
60
- indentation_level: 3,
61
- value: %("b"),
62
- ),
63
- line(
64
- type: :noop,
65
- indentation_level: 3,
66
- value: %("c"),
67
- ),
68
- ],
69
- ),
70
- line(
71
- type: :noop,
72
- indentation_level: 2,
73
- value: %(]),
74
- add_comma: true,
35
+ line(type: :noop, indentation_level: 3, value: %("a")),
36
+ line(type: :noop, indentation_level: 3, value: %("b")),
37
+ line(type: :noop, indentation_level: 3, value: %("c"))
38
+ ]
75
39
  ),
40
+ line(type: :noop, indentation_level: 2, value: "]", add_comma: true),
76
41
  line(
77
42
  type: :insert,
78
43
  indentation_level: 2,
79
- prefix: %(blue: ),
44
+ prefix: "blue: ",
80
45
  value: %("fish"),
81
- add_comma: true,
46
+ add_comma: true
82
47
  ),
83
48
  line(
84
49
  type: :insert,
85
50
  indentation_level: 2,
86
- prefix: %(stew: ),
87
- value: %("fish"),
88
- ),
89
- line(
90
- type: :noop,
91
- indentation_level: 1,
92
- value: %(}),
93
- add_comma: true,
94
- ),
95
- line(
96
- type: :noop,
97
- indentation_level: 1,
98
- value: %(∙∙∙),
99
- add_comma: true,
51
+ prefix: "stew: ",
52
+ value: %("fish")
100
53
  ),
54
+ line(type: :noop, indentation_level: 1, value: "}", add_comma: true),
55
+ line(type: :noop, indentation_level: 1, value: "∙∙∙", add_comma: true),
101
56
  line(
102
57
  type: :delete,
103
58
  indentation_level: 1,
104
59
  value: %("baz"),
105
- add_comma: true,
106
- ),
107
- line(
108
- type: :insert,
109
- indentation_level: 1,
110
- value: %(2),
111
- add_comma: true,
112
- ),
113
- line(
114
- type: :noop,
115
- indentation_level: 1,
116
- value: %("qux"),
117
- add_comma: true,
60
+ add_comma: true
118
61
  ),
62
+ line(type: :insert, indentation_level: 1, value: "2", add_comma: true),
63
+ line(type: :noop, indentation_level: 1, value: %("qux"), add_comma: true),
119
64
  line(
120
65
  type: :delete,
121
66
  indentation_level: 1,
122
67
  value: %("blargh"),
123
- add_comma: true,
68
+ add_comma: true
124
69
  ),
125
70
  line(
126
71
  type: :delete,
127
72
  indentation_level: 1,
128
73
  value: %("zig"),
129
- add_comma: true,
130
- ),
131
- line(
132
- type: :delete,
133
- indentation_level: 1,
134
- value: %("zag"),
135
- ),
136
- line(
137
- type: :noop,
138
- indentation_level: 0,
139
- value: %(]),
74
+ add_comma: true
140
75
  ),
76
+ line(type: :delete, indentation_level: 1, value: %("zag")),
77
+ line(type: :noop, indentation_level: 0, value: "]")
141
78
  ]
142
79
 
143
80
  actual_diff = described_class.call(tiered_lines)
144
81
 
145
- expected_diff = colored do
146
- plain_line %( [)
147
- plain_line %( "foo",)
148
- plain_line %( {)
149
- plain_line %( one: "fish",)
150
- expected_line %(- two: "fish",)
151
- actual_line %(+ two: "FISH",)
152
- plain_line %( hard: [)
153
- elision_marker_line %( # ...)
154
- plain_line %( ],)
155
- actual_line %(+ blue: "fish",)
156
- actual_line %(+ stew: "fish")
157
- plain_line %( },)
158
- plain_line %( ∙∙∙,)
159
- expected_line %(- "baz",)
160
- actual_line %(+ 2,)
161
- plain_line %( "qux",)
162
- expected_line %(- "blargh",)
163
- expected_line %(- "zig",)
164
- expected_line %(- "zag")
165
- plain_line %( ])
166
- end
82
+ expected_diff =
83
+ colored do
84
+ plain_line " ["
85
+ plain_line %( "foo",)
86
+ plain_line " {"
87
+ plain_line %( one: "fish",)
88
+ expected_line %(- two: "fish",)
89
+ actual_line %(+ two: "FISH",)
90
+ plain_line " hard: ["
91
+ elision_marker_line " # ..."
92
+ plain_line " ],"
93
+ actual_line %(+ blue: "fish",)
94
+ actual_line %(+ stew: "fish")
95
+ plain_line " },"
96
+ plain_line " ∙∙∙,"
97
+ expected_line %(- "baz",)
98
+ actual_line "+ 2,"
99
+ plain_line %( "qux",)
100
+ expected_line %(- "blargh",)
101
+ expected_line %(- "zig",)
102
+ expected_line %(- "zag")
103
+ plain_line " ]"
104
+ end
167
105
 
168
106
  expect(actual_diff).to eq(expected_diff)
169
107
  end
@@ -175,7 +113,7 @@ RSpec.describe SuperDiff::TieredLinesFormatter, type: :unit do
175
113
  indentation_level: indentation_level,
176
114
  prefix: prefix,
177
115
  value: value,
178
- add_comma?: add_comma,
116
+ add_comma?: add_comma
179
117
  )
180
118
  end
181
119
 
@@ -187,7 +125,7 @@ RSpec.describe SuperDiff::TieredLinesFormatter, type: :unit do
187
125
  prefix: "",
188
126
  value: value,
189
127
  add_comma?: false,
190
- children: children,
128
+ children: children
191
129
  )
192
130
  end
193
131
  end
data/super_diff.gemspec CHANGED
@@ -1,24 +1,25 @@
1
1
  require File.expand_path("lib/super_diff/version", __dir__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
- s.name = "super_diff"
5
- s.version = SuperDiff::VERSION
6
- s.authors = ["Elliot Winkler"]
7
- s.email = ["elliot.winkler@gmail.com"]
8
- s.homepage = "https://github.com/mcmire/super_diff"
9
- s.summary = "A better way to view differences between complex data structures in RSpec."
10
- s.license = "MIT"
4
+ s.name = "super_diff"
5
+ s.version = SuperDiff::VERSION
6
+ s.authors = ["Elliot Winkler"]
7
+ s.email = ["elliot.winkler@gmail.com"]
8
+ s.homepage = "https://github.com/mcmire/super_diff"
9
+ s.summary =
10
+ "A better way to view differences between complex data structures in RSpec."
11
+ s.license = "MIT"
11
12
  s.description = <<~DESC
12
13
  SuperDiff is a gem that hooks into RSpec to intelligently display the
13
14
  differences between two data structures of any type.
14
15
  DESC
15
- s.required_ruby_version = [">= 2.4", "< 4"]
16
+ s.required_ruby_version = ">= 3"
16
17
 
17
- s.files = ["README.md", "super_diff.gemspec"] + Dir["lib/**/*"]
18
- s.test_files = Dir["spec/**/*"]
19
- s.executables = Dir["exe/**/*"].map { |f| File.basename(f) }
18
+ s.files = %w[README.md super_diff.gemspec] + Dir["lib/**/*"]
19
+ s.test_files = Dir["spec/**/*"]
20
+ s.executables = Dir["exe/**/*"].map { |f| File.basename(f) }
20
21
 
21
- s.add_dependency "attr_extras", '>= 6.2.4'
22
+ s.add_dependency "attr_extras", ">= 6.2.4"
22
23
  s.add_dependency "diff-lcs"
23
24
  s.add_dependency "patience_diff"
24
25
  end
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.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elliot Winkler
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-26 00:00:00.000000000 Z
11
+ date: 2023-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: attr_extras
@@ -236,6 +236,7 @@ files:
236
236
  - spec/examples.txt
237
237
  - spec/integration/rails/active_record_spec.rb
238
238
  - spec/integration/rails/active_support_spec.rb
239
+ - spec/integration/rails/engines_spec.rb
239
240
  - spec/integration/rails/hash_with_indifferent_access_spec.rb
240
241
  - spec/integration/rspec/be_falsey_matcher_spec.rb
241
242
  - spec/integration/rspec/be_matcher_spec.rb
@@ -265,6 +266,7 @@ files:
265
266
  - spec/support/integration/test_programs/rspec_active_record.rb
266
267
  - spec/support/integration/test_programs/rspec_active_support.rb
267
268
  - spec/support/integration/test_programs/rspec_rails.rb
269
+ - spec/support/integration/test_programs/rspec_rails_engine.rb
268
270
  - spec/support/models/a.rb
269
271
  - spec/support/models/active_record/person.rb
270
272
  - spec/support/models/active_record/query.rb
@@ -280,9 +282,9 @@ files:
280
282
  - spec/support/shared_examples/active_support.rb
281
283
  - spec/support/shared_examples/elided_diffs.rb
282
284
  - spec/support/shared_examples/hash_with_indifferent_access.rb
285
+ - spec/support/shared_examples/key.rb
283
286
  - spec/support/unit/helpers.rb
284
287
  - spec/support/unit/matchers/match_output.rb
285
- - spec/tmp/warnings_logger/all_warnings.txt
286
288
  - spec/unit/active_record/object_inspection_spec.rb
287
289
  - spec/unit/equality_matchers/main_spec.rb
288
290
  - spec/unit/helpers_spec.rb
@@ -315,7 +317,7 @@ homepage: https://github.com/mcmire/super_diff
315
317
  licenses:
316
318
  - MIT
317
319
  metadata: {}
318
- post_install_message:
320
+ post_install_message:
319
321
  rdoc_options: []
320
322
  require_paths:
321
323
  - lib
@@ -323,96 +325,94 @@ required_ruby_version: !ruby/object:Gem::Requirement
323
325
  requirements:
324
326
  - - ">="
325
327
  - !ruby/object:Gem::Version
326
- version: '2.4'
327
- - - "<"
328
- - !ruby/object:Gem::Version
329
- version: '4'
328
+ version: '3'
330
329
  required_rubygems_version: !ruby/object:Gem::Requirement
331
330
  requirements:
332
331
  - - ">="
333
332
  - !ruby/object:Gem::Version
334
333
  version: '0'
335
334
  requirements: []
336
- rubyforge_project:
337
- rubygems_version: 2.7.6.3
338
- signing_key:
335
+ rubygems_version: 3.4.6
336
+ signing_key:
339
337
  specification_version: 4
340
338
  summary: A better way to view differences between complex data structures in RSpec.
341
339
  test_files:
342
- - spec/spec_helper.rb
343
- - spec/unit/tiered_lines_formatter_spec.rb
344
- - spec/unit/operation_tree_flatteners/default_object_spec.rb
345
- - spec/unit/operation_tree_flatteners/multiline_string_spec.rb
346
- - spec/unit/operation_tree_flatteners/custom_object_spec.rb
347
- - spec/unit/operation_tree_flatteners/array_spec.rb
348
- - spec/unit/operation_tree_flatteners/hash_spec.rb
349
- - spec/unit/equality_matchers/main_spec.rb
350
- - spec/unit/active_record/object_inspection_spec.rb
351
- - spec/unit/helpers_spec.rb
352
- - spec/unit/super_diff_spec.rb
353
- - spec/unit/tiered_lines_elider_spec.rb
354
- - spec/unit/rspec/object_inspection_spec.rb
355
- - spec/unit/rspec/matchers/contain_exactly_spec.rb
356
- - spec/unit/rspec/matchers/be_predicate_spec.rb
357
- - spec/unit/rspec/matchers/raise_error_spec.rb
358
- - spec/unit/rspec/matchers/have_predicate_spec.rb
359
- - spec/unit/rspec/matchers/eq_spec.rb
360
- - spec/unit/rspec/matchers/have_attributes_spec.rb
361
- - spec/unit/rspec/matchers/match_spec.rb
362
- - spec/unit/rspec/matchers/be_spec.rb
363
- - spec/unit/rspec/matchers/be_compared_to_spec.rb
364
- - spec/unit/rspec/matchers/respond_to_spec.rb
365
- - spec/unit/rspec/matchers/match_array_spec.rb
366
- - spec/unit/rspec/matchers/be_nil_spec.rb
367
- - spec/unit/rspec/matchers/be_falsey_spec.rb
368
- - spec/unit/rspec/matchers/be_truthy_spec.rb
369
- - spec/unit/rspec/matchers/include_spec.rb
370
340
  - spec/examples.txt
371
- - spec/integration/rspec/be_predicate_matcher_spec.rb
341
+ - spec/integration/rails/active_record_spec.rb
342
+ - spec/integration/rails/active_support_spec.rb
343
+ - spec/integration/rails/engines_spec.rb
344
+ - spec/integration/rails/hash_with_indifferent_access_spec.rb
372
345
  - spec/integration/rspec/be_falsey_matcher_spec.rb
373
- - spec/integration/rspec/be_truthy_matcher_spec.rb
374
- - spec/integration/rspec/be_nil_matcher_spec.rb
375
- - spec/integration/rspec/unhandled_errors_spec.rb
376
346
  - spec/integration/rspec/be_matcher_spec.rb
377
- - spec/integration/rspec/respond_to_matcher_spec.rb
378
- - spec/integration/rspec/match_matcher_spec.rb
379
- - spec/integration/rspec/match_array_matcher_spec.rb
380
- - spec/integration/rspec/third_party_matcher_spec.rb
381
- - spec/integration/rspec/have_attributes_matcher_spec.rb
382
- - spec/integration/rspec/raise_error_matcher_spec.rb
347
+ - spec/integration/rspec/be_nil_matcher_spec.rb
348
+ - spec/integration/rspec/be_predicate_matcher_spec.rb
349
+ - spec/integration/rspec/be_truthy_matcher_spec.rb
350
+ - spec/integration/rspec/contain_exactly_matcher_spec.rb
383
351
  - spec/integration/rspec/eq_matcher_spec.rb
352
+ - spec/integration/rspec/have_attributes_matcher_spec.rb
384
353
  - spec/integration/rspec/have_predicate_matcher_spec.rb
385
- - spec/integration/rspec/contain_exactly_matcher_spec.rb
386
354
  - spec/integration/rspec/include_matcher_spec.rb
387
- - spec/integration/rails/active_support_spec.rb
388
- - spec/integration/rails/active_record_spec.rb
389
- - spec/integration/rails/hash_with_indifferent_access_spec.rb
355
+ - spec/integration/rspec/match_array_matcher_spec.rb
356
+ - spec/integration/rspec/match_matcher_spec.rb
357
+ - spec/integration/rspec/raise_error_matcher_spec.rb
358
+ - spec/integration/rspec/respond_to_matcher_spec.rb
359
+ - spec/integration/rspec/third_party_matcher_spec.rb
360
+ - spec/integration/rspec/unhandled_errors_spec.rb
361
+ - spec/spec_helper.rb
362
+ - spec/support/colorizer.rb
363
+ - spec/support/command_runner.rb
390
364
  - spec/support/helpers.rb
391
- - spec/support/unit/helpers.rb
392
- - spec/support/unit/matchers/match_output.rb
365
+ - spec/support/integration/helpers.rb
366
+ - spec/support/integration/matchers/produce_output_when_run_matcher.rb
367
+ - spec/support/integration/matchers.rb
393
368
  - spec/support/integration/test_programs/base.rb
394
- - spec/support/integration/test_programs/rspec_rails.rb
395
369
  - spec/support/integration/test_programs/plain.rb
396
- - spec/support/integration/test_programs/rspec_active_support.rb
397
370
  - spec/support/integration/test_programs/rspec_active_record.rb
398
- - spec/support/integration/helpers.rb
399
- - spec/support/integration/matchers.rb
400
- - spec/support/integration/matchers/produce_output_when_run_matcher.rb
401
- - spec/support/models/item.rb
402
- - spec/support/models/customer.rb
403
- - spec/support/models/empty_class.rb
404
- - spec/support/models/player.rb
405
- - spec/support/models/active_record/shipping_address.rb
371
+ - spec/support/integration/test_programs/rspec_active_support.rb
372
+ - spec/support/integration/test_programs/rspec_rails.rb
373
+ - spec/support/integration/test_programs/rspec_rails_engine.rb
374
+ - spec/support/models/a.rb
406
375
  - spec/support/models/active_record/person.rb
407
376
  - spec/support/models/active_record/query.rb
408
- - spec/support/models/a.rb
409
- - spec/support/models/shipping_address.rb
377
+ - spec/support/models/active_record/shipping_address.rb
378
+ - spec/support/models/customer.rb
379
+ - spec/support/models/empty_class.rb
380
+ - spec/support/models/item.rb
410
381
  - spec/support/models/order.rb
411
382
  - spec/support/models/person.rb
412
- - spec/support/command_runner.rb
413
- - spec/support/colorizer.rb
414
- - spec/support/shared_examples/hash_with_indifferent_access.rb
415
- - spec/support/shared_examples/elided_diffs.rb
383
+ - spec/support/models/player.rb
384
+ - spec/support/models/shipping_address.rb
416
385
  - spec/support/shared_examples/active_record.rb
417
386
  - spec/support/shared_examples/active_support.rb
418
- - spec/tmp/warnings_logger/all_warnings.txt
387
+ - spec/support/shared_examples/elided_diffs.rb
388
+ - spec/support/shared_examples/hash_with_indifferent_access.rb
389
+ - spec/support/shared_examples/key.rb
390
+ - spec/support/unit/helpers.rb
391
+ - spec/support/unit/matchers/match_output.rb
392
+ - spec/unit/active_record/object_inspection_spec.rb
393
+ - spec/unit/equality_matchers/main_spec.rb
394
+ - spec/unit/helpers_spec.rb
395
+ - spec/unit/operation_tree_flatteners/array_spec.rb
396
+ - spec/unit/operation_tree_flatteners/custom_object_spec.rb
397
+ - spec/unit/operation_tree_flatteners/default_object_spec.rb
398
+ - spec/unit/operation_tree_flatteners/hash_spec.rb
399
+ - spec/unit/operation_tree_flatteners/multiline_string_spec.rb
400
+ - spec/unit/rspec/matchers/be_compared_to_spec.rb
401
+ - spec/unit/rspec/matchers/be_falsey_spec.rb
402
+ - spec/unit/rspec/matchers/be_nil_spec.rb
403
+ - spec/unit/rspec/matchers/be_predicate_spec.rb
404
+ - spec/unit/rspec/matchers/be_spec.rb
405
+ - spec/unit/rspec/matchers/be_truthy_spec.rb
406
+ - spec/unit/rspec/matchers/contain_exactly_spec.rb
407
+ - spec/unit/rspec/matchers/eq_spec.rb
408
+ - spec/unit/rspec/matchers/have_attributes_spec.rb
409
+ - spec/unit/rspec/matchers/have_predicate_spec.rb
410
+ - spec/unit/rspec/matchers/include_spec.rb
411
+ - spec/unit/rspec/matchers/match_array_spec.rb
412
+ - spec/unit/rspec/matchers/match_spec.rb
413
+ - spec/unit/rspec/matchers/raise_error_spec.rb
414
+ - spec/unit/rspec/matchers/respond_to_spec.rb
415
+ - spec/unit/rspec/object_inspection_spec.rb
416
+ - spec/unit/super_diff_spec.rb
417
+ - spec/unit/tiered_lines_elider_spec.rb
418
+ - spec/unit/tiered_lines_formatter_spec.rb
@@ -1,2 +0,0 @@
1
-
2
- RSpec is shutting down and will print the summary report... Interrupt again to force quit.