super_diff 0.17.0 → 0.18.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f84c14c100aff4bd5ec41c27530ecc6e7a586a90d770a07617b2a591fb438658
4
- data.tar.gz: b441eb9beafd67394df0f3b6a13d0bfafc5cd94d06593acf5780b8df7cc59df0
3
+ metadata.gz: 37e66ee8a26406e1aa13a554cd457192cdfbbe2fc23ce0657875ac15b1d3eb99
4
+ data.tar.gz: 2bd8e0afbde52a4b3f8735645b0561c988977bdddfed24027dd59026b2b63579
5
5
  SHA512:
6
- metadata.gz: 0a581414c9306226bd8a65cd5c92d8d64e35586a969beefdf2f53f08d7c97bd57d78d30dcf98fcd1f1b7f33446a2eda4f719510ac42106818e83022f3f7b0307
7
- data.tar.gz: a5efcec3c3818c5849110701813c04dd66f8fe8edebbd3f4db031fddbb30916303331ae20489421e94dc24f0dd047af9e8e03e810d5ba5bc90a30cbe9d995524
6
+ metadata.gz: a2d2b35cbd46653fba718db0c30fe0cea8ea5b5669685b2886f9b74bb8236c3c52d02bb0dc0bb6387654e05ddbe6ee4d7fb4505c797cbff13f093eba5d9c79e9
7
+ data.tar.gz: 5aa0e9bba24d471de9b04c369b93979cc2d9882326caf80f0654d6c31adbd37ec2bdb2e76a8402f0497bf4c8edaeb380bb24b004fb1d6611596f87f6fcc4349a
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SuperDiff
4
+ module ActionDispatch
5
+ module InspectionTreeBuilders
6
+ class Request < Core::AbstractInspectionTreeBuilder
7
+ def self.applies_to?(value)
8
+ value.is_a?(::ActionDispatch::Request)
9
+ end
10
+
11
+ def call
12
+ Core::InspectionTree.new do |t1|
13
+ t1.as_lines_when_rendering_to_lines do |t2|
14
+ t2.add_text object.inspect
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SuperDiff
4
+ module ActionDispatch
5
+ module InspectionTreeBuilders
6
+ autoload(
7
+ :Request,
8
+ 'super_diff/action_dispatch/inspection_tree_builders/request'
9
+ )
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'super_diff/action_dispatch/inspection_tree_builders'
4
+
5
+ module SuperDiff
6
+ module ActionDispatch
7
+ SuperDiff.configure do |config|
8
+ config.prepend_extra_inspection_tree_builder_classes(
9
+ InspectionTreeBuilders::Request
10
+ )
11
+ end
12
+ end
13
+ end
@@ -11,7 +11,7 @@ module SuperDiff
11
11
  protected
12
12
 
13
13
  def unary_operations
14
- unary_operations_using_variant_of_patience_algorithm
14
+ unary_operations_using_longest_common_key_subsequence
15
15
  end
16
16
 
17
17
  def build_operation_tree
@@ -20,7 +20,7 @@ module SuperDiff
20
20
 
21
21
  private
22
22
 
23
- def unary_operations_using_variant_of_patience_algorithm
23
+ def unary_operations_using_longest_common_key_subsequence
24
24
  aks = actual.keys
25
25
  eks = expected.keys
26
26
 
@@ -2,3 +2,4 @@
2
2
 
3
3
  require 'super_diff/active_support'
4
4
  require 'super_diff/active_record' if defined?(ActiveRecord)
5
+ require 'super_diff/action_dispatch' if defined?(ActionDispatch)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SuperDiff
4
- VERSION = '0.17.0'
4
+ VERSION = '0.18.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super_diff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elliot Winkler
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-10-24 00:00:00.000000000 Z
12
+ date: 2025-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: attr_extras
@@ -64,6 +64,9 @@ extra_rdoc_files: []
64
64
  files:
65
65
  - README.md
66
66
  - lib/super_diff.rb
67
+ - lib/super_diff/action_dispatch.rb
68
+ - lib/super_diff/action_dispatch/inspection_tree_builders.rb
69
+ - lib/super_diff/action_dispatch/inspection_tree_builders/request.rb
67
70
  - lib/super_diff/active_record.rb
68
71
  - lib/super_diff/active_record/differs.rb
69
72
  - lib/super_diff/active_record/differs/active_record_relation.rb