super_diff 0.6.2 → 0.9.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 +0 -1
- data/lib/super_diff/active_record/differs/active_record_relation.rb +3 -13
- data/lib/super_diff/active_record/object_inspection/{inspectors → inspection_tree_builders}/active_record_model.rb +19 -20
- data/lib/super_diff/active_record/object_inspection/{inspectors → inspection_tree_builders}/active_record_relation.rb +9 -8
- data/lib/super_diff/active_record/object_inspection/inspection_tree_builders.rb +16 -0
- data/lib/super_diff/active_record/object_inspection.rb +2 -6
- data/lib/super_diff/active_record/operation_tree_flatteners/active_record_relation.rb +17 -0
- data/lib/super_diff/active_record/operation_tree_flatteners.rb +10 -0
- data/lib/super_diff/active_record/operation_trees/active_record_relation.rb +8 -7
- data/lib/super_diff/active_record.rb +7 -7
- data/lib/super_diff/active_support/differs/hash_with_indifferent_access.rb +3 -13
- data/lib/super_diff/active_support/object_inspection/inspection_tree_builders/hash_with_indifferent_access.rb +37 -0
- data/lib/super_diff/active_support/object_inspection/{inspectors.rb → inspection_tree_builders.rb} +2 -2
- data/lib/super_diff/active_support/object_inspection.rb +2 -6
- data/lib/super_diff/active_support/operation_tree_builders/hash_with_indifferent_access.rb +17 -0
- data/lib/super_diff/active_support/operation_tree_flatteners/hash_with_indifferent_access.rb +17 -0
- data/lib/super_diff/active_support/operation_tree_flatteners.rb +10 -0
- data/lib/super_diff/active_support/operation_trees/hash_with_indifferent_access.rb +4 -7
- data/lib/super_diff/active_support.rb +8 -8
- data/lib/super_diff/colorized_document_extensions.rb +9 -6
- data/lib/super_diff/configuration.rb +81 -8
- data/lib/super_diff/csi/four_bit_color.rb +0 -2
- data/lib/super_diff/csi.rb +1 -2
- data/lib/super_diff/differs/array.rb +1 -1
- data/lib/super_diff/differs/base.rb +3 -21
- data/lib/super_diff/differs/custom_object.rb +1 -1
- data/lib/super_diff/differs/default_object.rb +1 -1
- data/lib/super_diff/differs/hash.rb +1 -1
- data/lib/super_diff/differs/main.rb +1 -7
- data/lib/super_diff/differs/multiline_string.rb +1 -1
- data/lib/super_diff/differs/time_like.rb +1 -1
- data/lib/super_diff/equality_matchers/array.rb +2 -2
- data/lib/super_diff/equality_matchers/default.rb +2 -2
- data/lib/super_diff/equality_matchers/hash.rb +2 -2
- data/lib/super_diff/equality_matchers/multiline_string.rb +2 -2
- data/lib/super_diff/equality_matchers/primitive.rb +4 -7
- data/lib/super_diff/equality_matchers/singleline_string.rb +2 -2
- data/lib/super_diff/helpers.rb +56 -2
- data/lib/super_diff/line.rb +83 -0
- data/lib/super_diff/object_inspection/inspection_tree.rb +183 -81
- data/lib/super_diff/object_inspection/inspection_tree_builders/array.rb +38 -0
- data/lib/super_diff/object_inspection/inspection_tree_builders/base.rb +27 -0
- data/lib/super_diff/object_inspection/inspection_tree_builders/custom_object.rb +37 -0
- data/lib/super_diff/object_inspection/inspection_tree_builders/default_object.rb +63 -0
- data/lib/super_diff/object_inspection/{inspectors → inspection_tree_builders}/defaults.rb +1 -2
- data/lib/super_diff/object_inspection/inspection_tree_builders/hash.rb +46 -0
- data/lib/super_diff/object_inspection/{inspectors → inspection_tree_builders}/main.rb +5 -10
- data/lib/super_diff/object_inspection/inspection_tree_builders/primitive.rb +21 -0
- data/lib/super_diff/object_inspection/inspection_tree_builders/time_like.rb +64 -0
- data/lib/super_diff/object_inspection/inspection_tree_builders.rb +44 -0
- data/lib/super_diff/object_inspection/nodes/as_lines_when_rendering_to_lines.rb +97 -0
- data/lib/super_diff/object_inspection/nodes/as_prefix_when_rendering_to_lines.rb +27 -0
- data/lib/super_diff/object_inspection/nodes/as_prelude_when_rendering_to_lines.rb +27 -0
- data/lib/super_diff/object_inspection/nodes/as_single_line.rb +33 -0
- data/lib/super_diff/object_inspection/nodes/base.rb +55 -20
- data/lib/super_diff/object_inspection/nodes/inspection.rb +47 -7
- data/lib/super_diff/object_inspection/nodes/nesting.rb +16 -5
- data/lib/super_diff/object_inspection/nodes/only_when.rb +54 -0
- data/lib/super_diff/object_inspection/nodes/text.rb +16 -2
- data/lib/super_diff/object_inspection/nodes/when_empty.rb +21 -6
- data/lib/super_diff/object_inspection/nodes/when_non_empty.rb +20 -5
- data/lib/super_diff/object_inspection/nodes/when_rendering_to_lines.rb +27 -0
- data/lib/super_diff/object_inspection/nodes/when_rendering_to_string.rb +27 -0
- data/lib/super_diff/object_inspection/nodes.rb +33 -32
- data/lib/super_diff/object_inspection/prefix_for_next_node.rb +6 -0
- data/lib/super_diff/object_inspection/prelude_for_next_node.rb +6 -0
- data/lib/super_diff/object_inspection.rb +12 -1
- data/lib/super_diff/operation_tree_builders/array.rb +7 -10
- data/lib/super_diff/operation_tree_builders/base.rb +6 -6
- data/lib/super_diff/operation_tree_builders/custom_object.rb +5 -2
- data/lib/super_diff/operation_tree_builders/default_object.rb +1 -1
- data/lib/super_diff/operation_tree_builders/defaults.rb +1 -1
- data/lib/super_diff/operation_tree_builders/hash.rb +1 -8
- data/lib/super_diff/operation_tree_builders/multiline_string.rb +2 -6
- data/lib/super_diff/operation_tree_builders/time_like.rb +2 -2
- data/lib/super_diff/operation_tree_flatteners/array.rb +15 -0
- data/lib/super_diff/operation_tree_flatteners/base.rb +54 -0
- data/lib/super_diff/operation_tree_flatteners/collection.rb +139 -0
- data/lib/super_diff/operation_tree_flatteners/custom_object.rb +28 -0
- data/lib/super_diff/operation_tree_flatteners/default_object.rb +32 -0
- data/lib/super_diff/operation_tree_flatteners/hash.rb +41 -0
- data/lib/super_diff/operation_tree_flatteners/multiline_string.rb +17 -0
- data/lib/super_diff/operation_tree_flatteners.rb +20 -0
- data/lib/super_diff/operation_trees/array.rb +4 -7
- data/lib/super_diff/operation_trees/base.rb +39 -16
- data/lib/super_diff/operation_trees/custom_object.rb +4 -8
- data/lib/super_diff/operation_trees/default_object.rb +28 -13
- data/lib/super_diff/operation_trees/hash.rb +4 -7
- data/lib/super_diff/operation_trees/main.rb +1 -1
- data/lib/super_diff/operation_trees/multiline_string.rb +4 -7
- data/lib/super_diff/operations/binary_operation.rb +1 -6
- data/lib/super_diff/operations/unary_operation.rb +2 -30
- data/lib/super_diff/recursion_guard.rb +3 -3
- data/lib/super_diff/rspec/differs/collection_including.rb +4 -2
- data/lib/super_diff/rspec/differs/hash_including.rb +4 -2
- data/lib/super_diff/rspec/monkey_patches.rb +2 -2
- data/lib/super_diff/rspec/object_inspection/{inspectors → inspection_tree_builders}/collection_containing_exactly.rb +9 -8
- data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/collection_including.rb +34 -0
- data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/double.rb +103 -0
- data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/hash_including.rb +36 -0
- data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/instance_of.rb +26 -0
- data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/kind_of.rb +26 -0
- data/lib/super_diff/rspec/object_inspection/{inspectors → inspection_tree_builders}/object_having_attributes.rb +10 -12
- data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/primitive.rb +10 -0
- data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/value_within.rb +33 -0
- data/lib/super_diff/rspec/object_inspection/inspection_tree_builders.rb +44 -0
- data/lib/super_diff/rspec/object_inspection.rb +4 -1
- data/lib/super_diff/rspec/operation_tree_builders/collection_containing_exactly.rb +0 -3
- data/lib/super_diff/rspec/operation_tree_builders/collection_including.rb +10 -3
- data/lib/super_diff/rspec/operation_tree_builders/hash_including.rb +10 -3
- data/lib/super_diff/rspec.rb +34 -13
- data/lib/super_diff/tiered_lines.rb +4 -0
- data/lib/super_diff/tiered_lines_elider.rb +490 -0
- data/lib/super_diff/tiered_lines_formatter.rb +79 -0
- data/lib/super_diff/version.rb +1 -1
- data/lib/super_diff.rb +28 -6
- data/spec/examples.txt +482 -403
- data/spec/integration/rails/active_support_spec.rb +19 -0
- data/spec/integration/rspec/contain_exactly_matcher_spec.rb +12 -6
- data/spec/integration/rspec/eq_matcher_spec.rb +33 -87
- data/spec/integration/rspec/have_attributes_matcher_spec.rb +17 -8
- data/spec/integration/rspec/match_array_matcher_spec.rb +14 -7
- data/spec/integration/rspec/match_matcher_spec.rb +93 -5
- data/spec/spec_helper.rb +4 -1
- data/spec/support/command_runner.rb +15 -25
- data/spec/support/helpers.rb +21 -0
- data/spec/support/integration/helpers.rb +2 -0
- data/spec/support/integration/matchers/produce_output_when_run_matcher.rb +3 -3
- data/spec/support/integration/test_programs/base.rb +36 -10
- data/spec/support/shared_examples/active_record.rb +3 -2
- data/spec/support/shared_examples/active_support.rb +65 -0
- data/spec/support/shared_examples/elided_diffs.rb +914 -0
- data/spec/support/shared_examples/hash_with_indifferent_access.rb +16 -16
- data/spec/support/unit/helpers.rb +15 -0
- data/spec/support/unit/matchers/match_output.rb +41 -0
- data/spec/tmp/warnings_logger/all_warnings.txt +2 -0
- data/spec/unit/active_record/object_inspection_spec.rb +273 -0
- data/spec/unit/equality_matchers/main_spec.rb +55 -75
- data/spec/unit/helpers_spec.rb +75 -0
- data/spec/unit/operation_tree_flatteners/array_spec.rb +604 -0
- data/spec/unit/operation_tree_flatteners/custom_object_spec.rb +667 -0
- data/spec/unit/operation_tree_flatteners/default_object_spec.rb +687 -0
- data/spec/unit/operation_tree_flatteners/hash_spec.rb +632 -0
- data/spec/unit/operation_tree_flatteners/multiline_string_spec.rb +121 -0
- data/spec/unit/rspec/object_inspection_spec.rb +446 -0
- data/spec/unit/super_diff_spec.rb +1530 -800
- data/spec/unit/tiered_lines_elider_spec.rb +6356 -0
- data/spec/unit/tiered_lines_formatter_spec.rb +193 -0
- metadata +91 -52
- data/lib/super_diff/active_record/diff_formatters/active_record_relation.rb +0 -23
- data/lib/super_diff/active_record/diff_formatters.rb +0 -10
- data/lib/super_diff/active_record/object_inspection/inspectors.rb +0 -16
- data/lib/super_diff/active_support/diff_formatters/hash_with_indifferent_access.rb +0 -36
- data/lib/super_diff/active_support/diff_formatters.rb +0 -10
- data/lib/super_diff/active_support/object_inspection/inspectors/hash_with_indifferent_access.rb +0 -28
- data/lib/super_diff/diff_formatters/array.rb +0 -21
- data/lib/super_diff/diff_formatters/base.rb +0 -33
- data/lib/super_diff/diff_formatters/custom_object.rb +0 -30
- data/lib/super_diff/diff_formatters/default_object.rb +0 -46
- data/lib/super_diff/diff_formatters/defaults.rb +0 -10
- data/lib/super_diff/diff_formatters/hash.rb +0 -34
- data/lib/super_diff/diff_formatters/main.rb +0 -41
- data/lib/super_diff/diff_formatters.rb +0 -14
- data/lib/super_diff/object_inspection/inspectors/array.rb +0 -32
- data/lib/super_diff/object_inspection/inspectors/base.rb +0 -36
- data/lib/super_diff/object_inspection/inspectors/custom_object.rb +0 -37
- data/lib/super_diff/object_inspection/inspectors/default_object.rb +0 -61
- data/lib/super_diff/object_inspection/inspectors/hash.rb +0 -32
- data/lib/super_diff/object_inspection/inspectors/primitive.rb +0 -28
- data/lib/super_diff/object_inspection/inspectors/string.rb +0 -23
- data/lib/super_diff/object_inspection/inspectors/time_like.rb +0 -23
- data/lib/super_diff/object_inspection/inspectors.rb +0 -23
- data/lib/super_diff/object_inspection/nodes/break.rb +0 -15
- data/lib/super_diff/object_inspection/nodes/when_multiline.rb +0 -22
- data/lib/super_diff/object_inspection/nodes/when_singleline.rb +0 -24
- data/lib/super_diff/rspec/object_inspection/inspectors/collection_including.rb +0 -28
- data/lib/super_diff/rspec/object_inspection/inspectors/hash_including.rb +0 -31
- data/lib/super_diff/rspec/object_inspection/inspectors/instance_of.rb +0 -23
- data/lib/super_diff/rspec/object_inspection/inspectors/kind_of.rb +0 -23
- data/lib/super_diff/rspec/object_inspection/inspectors/primitive.rb +0 -13
- data/lib/super_diff/rspec/object_inspection/inspectors/value_within.rb +0 -29
- data/lib/super_diff/rspec/object_inspection/inspectors.rb +0 -40
- data/spec/combustion/Gemfile.lock +0 -173
- data/spec/support/object_id.rb +0 -27
- data/spec/support/ruby_versions.rb +0 -11
@@ -1,29 +0,0 @@
|
|
1
|
-
module SuperDiff
|
2
|
-
module RSpec
|
3
|
-
module ObjectInspection
|
4
|
-
module Inspectors
|
5
|
-
class ValueWithin < SuperDiff::ObjectInspection::Inspectors::Base
|
6
|
-
def self.applies_to?(value)
|
7
|
-
SuperDiff::RSpec.a_value_within_something?(value)
|
8
|
-
end
|
9
|
-
|
10
|
-
protected
|
11
|
-
|
12
|
-
def inspection_tree
|
13
|
-
SuperDiff::ObjectInspection::InspectionTree.new do
|
14
|
-
add_text "#<a value within "
|
15
|
-
|
16
|
-
add_inspection_of do |aliased_matcher|
|
17
|
-
aliased_matcher.base_matcher.instance_variable_get("@delta")
|
18
|
-
end
|
19
|
-
|
20
|
-
add_text " of "
|
21
|
-
add_inspection_of(&:expected)
|
22
|
-
add_text ">"
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
module SuperDiff
|
2
|
-
module RSpec
|
3
|
-
module ObjectInspection
|
4
|
-
module Inspectors
|
5
|
-
autoload(
|
6
|
-
:CollectionContainingExactly,
|
7
|
-
"super_diff/rspec/object_inspection/inspectors/collection_containing_exactly",
|
8
|
-
)
|
9
|
-
autoload(
|
10
|
-
:CollectionIncluding,
|
11
|
-
"super_diff/rspec/object_inspection/inspectors/collection_including",
|
12
|
-
)
|
13
|
-
autoload(
|
14
|
-
:HashIncluding,
|
15
|
-
"super_diff/rspec/object_inspection/inspectors/hash_including",
|
16
|
-
)
|
17
|
-
autoload(
|
18
|
-
:InstanceOf,
|
19
|
-
"super_diff/rspec/object_inspection/inspectors/instance_of",
|
20
|
-
)
|
21
|
-
autoload(
|
22
|
-
:KindOf,
|
23
|
-
"super_diff/rspec/object_inspection/inspectors/kind_of",
|
24
|
-
)
|
25
|
-
autoload(
|
26
|
-
:ObjectHavingAttributes,
|
27
|
-
"super_diff/rspec/object_inspection/inspectors/object_having_attributes",
|
28
|
-
)
|
29
|
-
autoload(
|
30
|
-
:Primitive,
|
31
|
-
"super_diff/rspec/object_inspection/inspectors/primitive",
|
32
|
-
)
|
33
|
-
autoload(
|
34
|
-
:ValueWithin,
|
35
|
-
"super_diff/rspec/object_inspection/inspectors/value_within",
|
36
|
-
)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
@@ -1,173 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
actioncable (6.1.2.1)
|
5
|
-
actionpack (= 6.1.2.1)
|
6
|
-
activesupport (= 6.1.2.1)
|
7
|
-
nio4r (~> 2.0)
|
8
|
-
websocket-driver (>= 0.6.1)
|
9
|
-
actionmailbox (6.1.2.1)
|
10
|
-
actionpack (= 6.1.2.1)
|
11
|
-
activejob (= 6.1.2.1)
|
12
|
-
activerecord (= 6.1.2.1)
|
13
|
-
activestorage (= 6.1.2.1)
|
14
|
-
activesupport (= 6.1.2.1)
|
15
|
-
mail (>= 2.7.1)
|
16
|
-
actionmailer (6.1.2.1)
|
17
|
-
actionpack (= 6.1.2.1)
|
18
|
-
actionview (= 6.1.2.1)
|
19
|
-
activejob (= 6.1.2.1)
|
20
|
-
activesupport (= 6.1.2.1)
|
21
|
-
mail (~> 2.5, >= 2.5.4)
|
22
|
-
rails-dom-testing (~> 2.0)
|
23
|
-
actionpack (6.1.2.1)
|
24
|
-
actionview (= 6.1.2.1)
|
25
|
-
activesupport (= 6.1.2.1)
|
26
|
-
rack (~> 2.0, >= 2.0.9)
|
27
|
-
rack-test (>= 0.6.3)
|
28
|
-
rails-dom-testing (~> 2.0)
|
29
|
-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
30
|
-
actiontext (6.1.2.1)
|
31
|
-
actionpack (= 6.1.2.1)
|
32
|
-
activerecord (= 6.1.2.1)
|
33
|
-
activestorage (= 6.1.2.1)
|
34
|
-
activesupport (= 6.1.2.1)
|
35
|
-
nokogiri (>= 1.8.5)
|
36
|
-
actionview (6.1.2.1)
|
37
|
-
activesupport (= 6.1.2.1)
|
38
|
-
builder (~> 3.1)
|
39
|
-
erubi (~> 1.4)
|
40
|
-
rails-dom-testing (~> 2.0)
|
41
|
-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
42
|
-
activejob (6.1.2.1)
|
43
|
-
activesupport (= 6.1.2.1)
|
44
|
-
globalid (>= 0.3.6)
|
45
|
-
activemodel (6.1.2.1)
|
46
|
-
activesupport (= 6.1.2.1)
|
47
|
-
activerecord (6.1.2.1)
|
48
|
-
activemodel (= 6.1.2.1)
|
49
|
-
activesupport (= 6.1.2.1)
|
50
|
-
activestorage (6.1.2.1)
|
51
|
-
actionpack (= 6.1.2.1)
|
52
|
-
activejob (= 6.1.2.1)
|
53
|
-
activerecord (= 6.1.2.1)
|
54
|
-
activesupport (= 6.1.2.1)
|
55
|
-
marcel (~> 0.3.1)
|
56
|
-
mimemagic (~> 0.3.2)
|
57
|
-
activesupport (6.1.2.1)
|
58
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
59
|
-
i18n (>= 1.6, < 2)
|
60
|
-
minitest (>= 5.1)
|
61
|
-
tzinfo (~> 2.0)
|
62
|
-
zeitwerk (~> 2.3)
|
63
|
-
attr_extras (6.2.4)
|
64
|
-
builder (3.2.4)
|
65
|
-
combustion (1.3.1)
|
66
|
-
activesupport (>= 3.0.0)
|
67
|
-
railties (>= 3.0.0)
|
68
|
-
thor (>= 0.14.6)
|
69
|
-
concurrent-ruby (1.1.8)
|
70
|
-
crass (1.0.6)
|
71
|
-
diff-lcs (1.4.4)
|
72
|
-
erubi (1.10.0)
|
73
|
-
globalid (0.4.2)
|
74
|
-
activesupport (>= 4.2.0)
|
75
|
-
i18n (1.8.8)
|
76
|
-
concurrent-ruby (~> 1.0)
|
77
|
-
loofah (2.9.0)
|
78
|
-
crass (~> 1.0.2)
|
79
|
-
nokogiri (>= 1.5.9)
|
80
|
-
mail (2.7.1)
|
81
|
-
mini_mime (>= 0.1.1)
|
82
|
-
marcel (0.3.3)
|
83
|
-
mimemagic (~> 0.3.2)
|
84
|
-
method_source (1.0.0)
|
85
|
-
mimemagic (0.3.5)
|
86
|
-
mini_mime (1.0.2)
|
87
|
-
mini_portile2 (2.5.0)
|
88
|
-
minitest (5.14.3)
|
89
|
-
nio4r (2.5.5)
|
90
|
-
nokogiri (1.11.1)
|
91
|
-
mini_portile2 (~> 2.5.0)
|
92
|
-
racc (~> 1.4)
|
93
|
-
patience_diff (1.1.0)
|
94
|
-
trollop (~> 1.16)
|
95
|
-
racc (1.5.2)
|
96
|
-
rack (2.2.3)
|
97
|
-
rack-test (1.1.0)
|
98
|
-
rack (>= 1.0, < 3)
|
99
|
-
rails (6.1.2.1)
|
100
|
-
actioncable (= 6.1.2.1)
|
101
|
-
actionmailbox (= 6.1.2.1)
|
102
|
-
actionmailer (= 6.1.2.1)
|
103
|
-
actionpack (= 6.1.2.1)
|
104
|
-
actiontext (= 6.1.2.1)
|
105
|
-
actionview (= 6.1.2.1)
|
106
|
-
activejob (= 6.1.2.1)
|
107
|
-
activemodel (= 6.1.2.1)
|
108
|
-
activerecord (= 6.1.2.1)
|
109
|
-
activestorage (= 6.1.2.1)
|
110
|
-
activesupport (= 6.1.2.1)
|
111
|
-
bundler (>= 1.15.0)
|
112
|
-
railties (= 6.1.2.1)
|
113
|
-
sprockets-rails (>= 2.0.0)
|
114
|
-
rails-dom-testing (2.0.3)
|
115
|
-
activesupport (>= 4.2.0)
|
116
|
-
nokogiri (>= 1.6)
|
117
|
-
rails-html-sanitizer (1.3.0)
|
118
|
-
loofah (~> 2.3)
|
119
|
-
railties (6.1.2.1)
|
120
|
-
actionpack (= 6.1.2.1)
|
121
|
-
activesupport (= 6.1.2.1)
|
122
|
-
method_source
|
123
|
-
rake (>= 0.8.7)
|
124
|
-
thor (~> 1.0)
|
125
|
-
rake (13.0.3)
|
126
|
-
rspec-core (3.10.1)
|
127
|
-
rspec-support (~> 3.10.0)
|
128
|
-
rspec-expectations (3.10.1)
|
129
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
130
|
-
rspec-support (~> 3.10.0)
|
131
|
-
rspec-mocks (3.10.2)
|
132
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
133
|
-
rspec-support (~> 3.10.0)
|
134
|
-
rspec-rails (4.0.2)
|
135
|
-
actionpack (>= 4.2)
|
136
|
-
activesupport (>= 4.2)
|
137
|
-
railties (>= 4.2)
|
138
|
-
rspec-core (~> 3.10)
|
139
|
-
rspec-expectations (~> 3.10)
|
140
|
-
rspec-mocks (~> 3.10)
|
141
|
-
rspec-support (~> 3.10)
|
142
|
-
rspec-support (3.10.2)
|
143
|
-
sprockets (4.0.2)
|
144
|
-
concurrent-ruby (~> 1.0)
|
145
|
-
rack (> 1, < 3)
|
146
|
-
sprockets-rails (3.2.2)
|
147
|
-
actionpack (>= 4.0)
|
148
|
-
activesupport (>= 4.0)
|
149
|
-
sprockets (>= 3.0.0)
|
150
|
-
super_diff (0.5.3)
|
151
|
-
attr_extras (>= 6.2.4)
|
152
|
-
diff-lcs
|
153
|
-
patience_diff
|
154
|
-
thor (1.1.0)
|
155
|
-
trollop (1.16.2)
|
156
|
-
tzinfo (2.0.4)
|
157
|
-
concurrent-ruby (~> 1.0)
|
158
|
-
websocket-driver (0.7.3)
|
159
|
-
websocket-extensions (>= 0.1.0)
|
160
|
-
websocket-extensions (0.1.5)
|
161
|
-
zeitwerk (2.4.2)
|
162
|
-
|
163
|
-
PLATFORMS
|
164
|
-
ruby
|
165
|
-
|
166
|
-
DEPENDENCIES
|
167
|
-
combustion
|
168
|
-
rails
|
169
|
-
rspec-rails
|
170
|
-
super_diff (= 0.5.3)
|
171
|
-
|
172
|
-
BUNDLED WITH
|
173
|
-
2.1.4
|
data/spec/support/object_id.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
require "json"
|
2
|
-
require_relative "ruby_versions"
|
3
|
-
|
4
|
-
if !SuperDiff::Test.jruby? && SuperDiff::Test.version_match?(">= 2.7.0")
|
5
|
-
require "objspace"
|
6
|
-
end
|
7
|
-
|
8
|
-
module SuperDiff
|
9
|
-
module Test
|
10
|
-
if jruby?
|
11
|
-
def self.object_id_hex(object)
|
12
|
-
# Source: <https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/RubyBasicObject.java>
|
13
|
-
"0x%x" % object.hash
|
14
|
-
end
|
15
|
-
elsif version_match?(">= 2.7.0")
|
16
|
-
def self.object_id_hex(object)
|
17
|
-
# Sources: <https://bugs.ruby-lang.org/issues/15408> and <https://bugs.ruby-lang.org/issues/15626#Object-ID>
|
18
|
-
address = JSON.parse(ObjectSpace.dump(object))["address"]
|
19
|
-
"0x%016x" % Integer(address, 16)
|
20
|
-
end
|
21
|
-
else
|
22
|
-
def self.object_id_hex(object)
|
23
|
-
"0x%016x" % (object.object_id * 2)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|