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.
- checksums.yaml +4 -4
- data/README.md +65 -26
- data/lib/super_diff/active_record/differs/active_record_relation.rb +1 -2
- data/lib/super_diff/active_record/differs.rb +1 -1
- data/lib/super_diff/active_record/object_inspection/inspection_tree_builders/active_record_model.rb +5 -13
- data/lib/super_diff/active_record/object_inspection/inspection_tree_builders/active_record_relation.rb +1 -3
- data/lib/super_diff/active_record/object_inspection/inspection_tree_builders.rb +2 -2
- data/lib/super_diff/active_record/object_inspection.rb +1 -1
- data/lib/super_diff/active_record/operation_tree_builders/active_record_model.rb +1 -2
- data/lib/super_diff/active_record/operation_tree_builders/active_record_relation.rb +1 -2
- data/lib/super_diff/active_record/operation_tree_builders.rb +2 -2
- data/lib/super_diff/active_record/operation_tree_flatteners.rb +1 -1
- data/lib/super_diff/active_record/operation_trees.rb +1 -1
- data/lib/super_diff/active_record.rb +7 -15
- data/lib/super_diff/active_support/differs/hash_with_indifferent_access.rb +5 -6
- data/lib/super_diff/active_support/differs.rb +1 -1
- data/lib/super_diff/active_support/object_inspection/inspection_tree_builders/hash_with_indifferent_access.rb +3 -9
- data/lib/super_diff/active_support/object_inspection/inspection_tree_builders.rb +1 -1
- data/lib/super_diff/active_support/object_inspection.rb +1 -1
- data/lib/super_diff/active_support/operation_tree_builders/hash_with_indifferent_access.rb +5 -6
- data/lib/super_diff/active_support/operation_tree_builders.rb +1 -1
- data/lib/super_diff/active_support/operation_tree_flatteners.rb +1 -1
- data/lib/super_diff/active_support/operation_trees.rb +1 -1
- data/lib/super_diff/active_support.rb +6 -11
- data/lib/super_diff/colorized_document_extensions.rb +2 -4
- data/lib/super_diff/configuration.rb +14 -8
- data/lib/super_diff/csi/color.rb +4 -4
- data/lib/super_diff/csi/colorized_document.rb +12 -16
- data/lib/super_diff/csi/document.rb +8 -19
- data/lib/super_diff/csi/eight_bit_color.rb +19 -19
- data/lib/super_diff/csi/four_bit_color.rb +82 -31
- data/lib/super_diff/csi/twenty_four_bit_color.rb +12 -11
- data/lib/super_diff/csi/uncolorized_document.rb +2 -6
- data/lib/super_diff/csi.rb +10 -14
- data/lib/super_diff/diff_formatters/collection.rb +35 -41
- data/lib/super_diff/differs/default_object.rb +1 -1
- data/lib/super_diff/differs/defaults.rb +1 -1
- data/lib/super_diff/differs/main.rb +2 -13
- data/lib/super_diff/equality_matchers/array.rb +10 -12
- data/lib/super_diff/equality_matchers/base.rb +1 -1
- data/lib/super_diff/equality_matchers/default.rb +2 -4
- data/lib/super_diff/equality_matchers/defaults.rb +1 -1
- data/lib/super_diff/equality_matchers/hash.rb +10 -12
- data/lib/super_diff/equality_matchers/multiline_string.rb +11 -13
- data/lib/super_diff/equality_matchers/primitive.rb +10 -12
- data/lib/super_diff/equality_matchers/singleline_string.rb +10 -12
- data/lib/super_diff/equality_matchers.rb +1 -1
- data/lib/super_diff/errors.rb +3 -3
- data/lib/super_diff/gem_version.rb +3 -3
- data/lib/super_diff/helpers.rb +10 -10
- data/lib/super_diff/implementation_checks.rb +2 -2
- data/lib/super_diff/line.rb +3 -3
- data/lib/super_diff/object_inspection/inspection_tree.rb +46 -60
- data/lib/super_diff/object_inspection/inspection_tree_builders/array.rb +2 -6
- data/lib/super_diff/object_inspection/inspection_tree_builders/custom_object.rb +3 -9
- data/lib/super_diff/object_inspection/inspection_tree_builders/default_object.rb +5 -14
- data/lib/super_diff/object_inspection/inspection_tree_builders/defaults.rb +1 -1
- data/lib/super_diff/object_inspection/inspection_tree_builders/hash.rb +4 -12
- data/lib/super_diff/object_inspection/inspection_tree_builders/time_like.rb +6 -23
- data/lib/super_diff/object_inspection/inspection_tree_builders.rb +9 -9
- data/lib/super_diff/object_inspection/nodes/as_lines_when_rendering_to_lines.rb +8 -20
- data/lib/super_diff/object_inspection/nodes/as_prefix_when_rendering_to_lines.rb +1 -5
- data/lib/super_diff/object_inspection/nodes/as_prelude_when_rendering_to_lines.rb +1 -5
- data/lib/super_diff/object_inspection/nodes/as_single_line.rb +3 -7
- data/lib/super_diff/object_inspection/nodes/base.rb +9 -14
- data/lib/super_diff/object_inspection/nodes/inspection.rb +26 -34
- data/lib/super_diff/object_inspection/nodes/nesting.rb +1 -1
- data/lib/super_diff/object_inspection/nodes/only_when.rb +2 -6
- data/lib/super_diff/object_inspection/nodes/text.rb +1 -5
- data/lib/super_diff/object_inspection/nodes/when_empty.rb +2 -6
- data/lib/super_diff/object_inspection/nodes/when_non_empty.rb +2 -6
- data/lib/super_diff/object_inspection/nodes/when_rendering_to_lines.rb +1 -1
- data/lib/super_diff/object_inspection/nodes/when_rendering_to_string.rb +1 -5
- data/lib/super_diff/object_inspection/nodes.rb +7 -7
- data/lib/super_diff/object_inspection.rb +3 -3
- data/lib/super_diff/operation_tree_builders/array.rb +12 -11
- data/lib/super_diff/operation_tree_builders/base.rb +17 -15
- data/lib/super_diff/operation_tree_builders/custom_object.rb +8 -6
- data/lib/super_diff/operation_tree_builders/default_object.rb +29 -21
- data/lib/super_diff/operation_tree_builders/hash.rb +23 -24
- data/lib/super_diff/operation_tree_builders/main.rb +4 -11
- data/lib/super_diff/operation_tree_builders/multiline_string.rb +3 -3
- data/lib/super_diff/operation_tree_builders/time_like.rb +1 -11
- data/lib/super_diff/operation_tree_builders.rb +1 -1
- data/lib/super_diff/operation_tree_flatteners/base.rb +1 -5
- data/lib/super_diff/operation_tree_flatteners/collection.rb +13 -16
- data/lib/super_diff/operation_tree_flatteners/default_object.rb +1 -2
- data/lib/super_diff/operation_tree_flatteners/hash.rb +2 -10
- data/lib/super_diff/operation_tree_flatteners/multiline_string.rb +2 -1
- data/lib/super_diff/operation_tree_flatteners.rb +3 -3
- data/lib/super_diff/operation_trees/base.rb +3 -5
- data/lib/super_diff/operation_trees/default_object.rb +1 -3
- data/lib/super_diff/operations/binary_operation.rb +2 -2
- data/lib/super_diff/operations/unary_operation.rb +1 -1
- data/lib/super_diff/rails.rb +2 -1
- data/lib/super_diff/recursion_guard.rb +5 -4
- data/lib/super_diff/rspec/augmented_matcher.rb +4 -5
- data/lib/super_diff/rspec/differ.rb +6 -13
- data/lib/super_diff/rspec/differs/collection_containing_exactly.rb +3 -2
- data/lib/super_diff/rspec/differs/collection_including.rb +1 -1
- data/lib/super_diff/rspec/differs/hash_including.rb +1 -1
- data/lib/super_diff/rspec/differs.rb +3 -3
- data/lib/super_diff/rspec/matcher_text_builders/base.rb +13 -15
- data/lib/super_diff/rspec/matcher_text_builders/be_predicate.rb +5 -7
- data/lib/super_diff/rspec/matcher_text_builders/have_predicate.rb +3 -5
- data/lib/super_diff/rspec/matcher_text_builders/raise_error.rb +1 -5
- data/lib/super_diff/rspec/matcher_text_builders/respond_to.rb +2 -6
- data/lib/super_diff/rspec/matcher_text_builders.rb +5 -8
- data/lib/super_diff/rspec/matcher_text_template.rb +13 -16
- data/lib/super_diff/rspec/monkey_patches.rb +122 -116
- data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/collection_including.rb +8 -6
- data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/double.rb +11 -16
- data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/hash_including.rb +2 -1
- data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/instance_of.rb +8 -6
- data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/kind_of.rb +8 -6
- data/lib/super_diff/rspec/object_inspection/inspection_tree_builders.rb +9 -9
- data/lib/super_diff/rspec/object_inspection.rb +1 -1
- data/lib/super_diff/rspec/operation_tree_builders/collection_containing_exactly.rb +11 -10
- data/lib/super_diff/rspec/operation_tree_builders/collection_including.rb +7 -6
- data/lib/super_diff/rspec/operation_tree_builders/hash_including.rb +11 -10
- data/lib/super_diff/rspec/operation_tree_builders/object_having_attributes.rb +22 -17
- data/lib/super_diff/rspec/operation_tree_builders.rb +4 -4
- data/lib/super_diff/rspec.rb +11 -13
- data/lib/super_diff/tiered_lines_elider.rb +87 -115
- data/lib/super_diff/tiered_lines_formatter.rb +5 -9
- data/lib/super_diff/version.rb +1 -1
- data/lib/super_diff.rb +4 -9
- data/spec/examples.txt +493 -485
- data/spec/integration/rails/active_record_spec.rb +3 -1
- data/spec/integration/rails/engines_spec.rb +20 -0
- data/spec/integration/rails/hash_with_indifferent_access_spec.rb +3 -1
- data/spec/integration/rspec/be_falsey_matcher_spec.rb +40 -35
- data/spec/integration/rspec/be_matcher_spec.rb +360 -320
- data/spec/integration/rspec/be_nil_matcher_spec.rb +38 -34
- data/spec/integration/rspec/be_predicate_matcher_spec.rb +376 -359
- data/spec/integration/rspec/be_truthy_matcher_spec.rb +38 -33
- data/spec/integration/rspec/contain_exactly_matcher_spec.rb +242 -239
- data/spec/integration/rspec/eq_matcher_spec.rb +595 -557
- data/spec/integration/rspec/have_attributes_matcher_spec.rb +294 -286
- data/spec/integration/rspec/have_predicate_matcher_spec.rb +291 -297
- data/spec/integration/rspec/include_matcher_spec.rb +317 -215
- data/spec/integration/rspec/match_array_matcher_spec.rb +276 -273
- data/spec/integration/rspec/match_matcher_spec.rb +847 -834
- data/spec/integration/rspec/raise_error_matcher_spec.rb +468 -453
- data/spec/integration/rspec/respond_to_matcher_spec.rb +702 -697
- data/spec/integration/rspec/third_party_matcher_spec.rb +142 -138
- data/spec/integration/rspec/unhandled_errors_spec.rb +88 -84
- data/spec/spec_helper.rb +17 -20
- data/spec/support/command_runner.rb +34 -57
- data/spec/support/integration/helpers.rb +35 -28
- data/spec/support/integration/matchers/produce_output_when_run_matcher.rb +28 -23
- data/spec/support/integration/test_programs/base.rb +12 -17
- data/spec/support/integration/test_programs/plain.rb +6 -0
- data/spec/support/integration/test_programs/rspec_active_record.rb +4 -1
- data/spec/support/integration/test_programs/rspec_active_support.rb +4 -1
- data/spec/support/integration/test_programs/rspec_rails.rb +4 -1
- data/spec/support/integration/test_programs/rspec_rails_engine.rb +30 -0
- data/spec/support/models/active_record/person.rb +6 -4
- data/spec/support/models/active_record/shipping_address.rb +9 -10
- data/spec/support/models/customer.rb +2 -4
- data/spec/support/models/player.rb +3 -6
- data/spec/support/models/shipping_address.rb +4 -13
- data/spec/support/shared_examples/active_record.rb +232 -214
- data/spec/support/shared_examples/active_support.rb +53 -51
- data/spec/support/shared_examples/elided_diffs.rb +405 -381
- data/spec/support/shared_examples/hash_with_indifferent_access.rb +424 -388
- data/spec/support/shared_examples/key.rb +123 -0
- data/spec/support/unit/helpers.rb +1 -3
- data/spec/support/unit/matchers/match_output.rb +12 -13
- data/spec/unit/active_record/object_inspection_spec.rb +222 -206
- data/spec/unit/equality_matchers/main_spec.rb +1049 -984
- data/spec/unit/helpers_spec.rb +14 -21
- data/spec/unit/operation_tree_flatteners/array_spec.rb +557 -524
- data/spec/unit/operation_tree_flatteners/custom_object_spec.rb +619 -601
- data/spec/unit/operation_tree_flatteners/default_object_spec.rb +619 -621
- data/spec/unit/operation_tree_flatteners/hash_spec.rb +595 -556
- data/spec/unit/operation_tree_flatteners/multiline_string_spec.rb +102 -92
- data/spec/unit/rspec/matchers/be_compared_to_spec.rb +3 -3
- data/spec/unit/rspec/matchers/be_predicate_spec.rb +3 -3
- data/spec/unit/rspec/matchers/contain_exactly_spec.rb +1 -1
- data/spec/unit/rspec/matchers/have_attributes_spec.rb +1 -1
- data/spec/unit/rspec/matchers/have_predicate_spec.rb +2 -2
- data/spec/unit/rspec/matchers/include_spec.rb +2 -2
- data/spec/unit/rspec/matchers/match_array_spec.rb +2 -2
- data/spec/unit/rspec/matchers/raise_error_spec.rb +5 -5
- data/spec/unit/rspec/matchers/respond_to_spec.rb +23 -16
- data/spec/unit/rspec/object_inspection_spec.rb +349 -324
- data/spec/unit/super_diff_spec.rb +1542 -1449
- data/spec/unit/tiered_lines_elider_spec.rb +3508 -3536
- data/spec/unit/tiered_lines_formatter_spec.rb +54 -116
- data/super_diff.gemspec +13 -12
- metadata +73 -73
- 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
|
-
|
8
|
-
|
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:
|
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:
|
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:
|
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
|
-
|
55
|
-
|
56
|
-
|
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:
|
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:
|
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 =
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
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
|
5
|
-
s.version
|
6
|
-
s.authors
|
7
|
-
s.email
|
8
|
-
s.homepage
|
9
|
-
s.summary
|
10
|
-
|
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 =
|
16
|
+
s.required_ruby_version = ">= 3"
|
16
17
|
|
17
|
-
s.files
|
18
|
-
s.test_files
|
19
|
-
s.executables
|
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",
|
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.
|
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:
|
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: '
|
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
|
-
|
337
|
-
|
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/
|
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/
|
378
|
-
- spec/integration/rspec/
|
379
|
-
- spec/integration/rspec/
|
380
|
-
- spec/integration/rspec/
|
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/
|
388
|
-
- spec/integration/
|
389
|
-
- spec/integration/
|
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/
|
392
|
-
- spec/support/
|
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/
|
399
|
-
- spec/support/integration/
|
400
|
-
- spec/support/integration/
|
401
|
-
- spec/support/models/
|
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/
|
409
|
-
- spec/support/models/
|
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/
|
413
|
-
- spec/support/
|
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/
|
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
|