m2m_keygen 0.4.9 → 0.5.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.
- checksums.yaml +4 -4
- data/.overcommit.yml +4 -7
- data/.rubocop.yml +19 -16
- data/.ruby-version +1 -1
- data/.streerc +1 -0
- data/.tool-versions +1 -1
- data/CHANGELOG.md +70 -1
- data/Gemfile +2 -2
- data/Gemfile.lock +135 -158
- data/README.md +64 -78
- data/docs/MIGRATING.md +69 -0
- data/docs/SPEC.md +245 -0
- data/examples/nonce_store/postgres.rb +40 -0
- data/examples/nonce_store/redis.rb +23 -0
- data/gemfiles/rack_2.gemfile +5 -0
- data/gemfiles/rack_3.gemfile +5 -0
- data/lib/m2m_keygen/canonicalizer.rb +57 -0
- data/lib/m2m_keygen/nonce_store/disabled.rb +19 -0
- data/lib/m2m_keygen/nonce_store/memory.rb +64 -0
- data/lib/m2m_keygen/nonce_store.rb +18 -0
- data/lib/m2m_keygen/rack_validator.rb +86 -19
- data/lib/m2m_keygen/request_signer/signed_request.rb +10 -0
- data/lib/m2m_keygen/request_signer.rb +118 -0
- data/lib/m2m_keygen/signature.rb +41 -39
- data/lib/m2m_keygen/types/params_type.rb +6 -17
- data/lib/m2m_keygen/version.rb +1 -1
- data/lib/m2m_keygen.rb +6 -0
- data/m2m_keygen.gemspec +12 -14
- data/sorbet/config +1 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/{ast@2.4.2.rbi → ast@2.4.3.rbi} +45 -79
- data/sorbet/rbi/gems/{benchmark@0.2.0.rbi → benchmark@0.5.0.rbi} +91 -58
- data/sorbet/rbi/gems/bundler-audit@0.9.3.rbi +397 -0
- data/sorbet/rbi/gems/byebug@13.0.0.rbi +3651 -0
- data/sorbet/rbi/gems/childprocess@5.1.0.rbi +336 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.3.7.rbi +384 -0
- data/sorbet/rbi/gems/{diff-lcs@1.5.0.rbi → diff-lcs@1.6.2.rbi} +189 -199
- data/sorbet/rbi/gems/{docile@1.4.0.rbi → docile@1.4.1.rbi} +147 -147
- data/sorbet/rbi/gems/dotenv@3.2.0.rbi +267 -0
- data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
- data/sorbet/rbi/gems/{faker@2.22.0.rbi → faker@3.8.0.rbi} +8468 -3829
- data/sorbet/rbi/gems/{ffi@1.15.5.rbi → ffi@1.17.4.rbi} +1 -0
- data/sorbet/rbi/gems/{formatador@1.1.0.rbi → formatador@1.2.3.rbi} +1 -0
- data/sorbet/rbi/gems/{guard@2.18.0.rbi → guard@2.20.1.rbi} +1 -0
- data/sorbet/rbi/gems/{i18n@1.12.0.rbi → i18n@1.15.2.rbi} +687 -827
- data/sorbet/rbi/gems/io-console@0.8.2.rbi +9 -0
- data/sorbet/rbi/gems/{json@2.6.2.rbi → json@2.20.0.rbi} +994 -252
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +189 -0
- data/sorbet/rbi/gems/listen@3.10.0.rbi +9 -0
- data/sorbet/rbi/gems/logger@1.7.0.rbi +896 -0
- data/sorbet/rbi/gems/{lumberjack@1.2.8.rbi → lumberjack@1.4.2.rbi} +1 -0
- data/sorbet/rbi/gems/{method_source@1.0.0.rbi → method_source@1.1.0.rbi} +111 -90
- data/sorbet/rbi/gems/{overcommit@0.59.1.rbi → overcommit@0.71.0.rbi} +503 -647
- data/sorbet/rbi/gems/parallel@2.1.0.rbi +321 -0
- data/sorbet/rbi/gems/parser@3.3.11.1.rbi +5229 -0
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +878 -0
- data/sorbet/rbi/gems/prism@1.9.0.rbi +42224 -0
- data/sorbet/rbi/gems/pry-byebug@3.12.0.rbi +481 -0
- data/sorbet/rbi/gems/{pry@0.14.1.rbi → pry@0.16.0.rbi} +2567 -3550
- data/sorbet/rbi/gems/{racc@1.6.0.rbi → racc@1.8.1.rbi} +54 -40
- data/sorbet/rbi/gems/rack@3.2.6.rbi +4653 -0
- data/sorbet/rbi/gems/{rake@13.0.6.rbi → rake@13.4.2.rbi} +963 -732
- data/sorbet/rbi/gems/{rb-inotify@0.10.1.rbi → rb-inotify@0.11.1.rbi} +1 -0
- data/sorbet/rbi/gems/rbi@0.3.14.rbi +5519 -0
- data/sorbet/rbi/gems/rbs@4.0.3.rbi +6908 -0
- data/sorbet/rbi/gems/regexp_parser@2.12.0.rbi +3398 -0
- data/sorbet/rbi/gems/reline@0.6.3.rbi +2446 -0
- data/sorbet/rbi/gems/require-hooks@0.4.0.rbi +152 -0
- data/sorbet/rbi/gems/{rexml@3.2.5.rbi → rexml@3.4.4.rbi} +1085 -894
- data/sorbet/rbi/gems/rspec-core@3.13.6.rbi +9475 -0
- data/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi +6108 -0
- data/sorbet/rbi/gems/rspec-mocks@3.13.8.rbi +4787 -0
- data/sorbet/rbi/gems/rspec-support@3.13.7.rbi +1274 -0
- data/sorbet/rbi/gems/rspec@3.13.2.rbi +15 -0
- data/sorbet/rbi/gems/rspec_in_context@1.2.2.rbi +294 -0
- data/sorbet/rbi/gems/rubocop-ast@1.49.1.rbi +7140 -0
- data/sorbet/rbi/gems/rubocop-faker@1.3.0.rbi +88 -0
- data/sorbet/rbi/gems/rubocop-performance@1.26.1.rbi +3403 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi +2448 -0
- data/sorbet/rbi/gems/rubocop@1.88.1.rbi +63103 -0
- data/sorbet/rbi/gems/ruby-lsp@0.26.9.rbi +28 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +988 -0
- data/sorbet/rbi/gems/rubydex@0.2.7.rbi +836 -0
- data/sorbet/rbi/gems/simplecov-html@0.13.2.rbi +90 -0
- data/sorbet/rbi/gems/{simplecov@0.21.2.rbi → simplecov@0.22.0.rbi} +438 -578
- data/sorbet/rbi/gems/spoom@1.8.2.rbi +6691 -0
- data/sorbet/rbi/gems/syntax_tree@6.3.0.rbi +22090 -0
- data/sorbet/rbi/gems/tapioca@0.19.2.rbi +3597 -0
- data/sorbet/rbi/gems/{thor@1.2.1.rbi → thor@1.5.0.rbi} +1085 -1171
- data/sorbet/rbi/gems/tsort@0.2.0.rbi +389 -0
- data/sorbet/rbi/gems/unicode-display_width@3.2.0.rbi +130 -0
- data/sorbet/rbi/gems/unicode-emoji@4.2.0.rbi +332 -0
- data/sorbet/rbi/gems/{yard-sorbet@0.7.0.rbi → yard-sorbet@0.9.0.rbi} +142 -99
- data/sorbet/rbi/gems/{yard@0.9.28.rbi → yard@0.9.44.rbi} +5350 -6316
- data/sorbet/rbi/gems/zeitwerk@2.8.2.rbi +1178 -0
- metadata +105 -111
- data/.prettierrc.js +0 -4
- data/docs/M2mKeygen/Error.html +0 -135
- data/docs/M2mKeygen/ParamsEncoder.html +0 -321
- data/docs/M2mKeygen/RackValidator.html +0 -533
- data/docs/M2mKeygen/Signature.html +0 -680
- data/docs/M2mKeygen/Types.html +0 -147
- data/docs/M2mKeygen.html +0 -157
- data/docs/_index.html +0 -182
- data/docs/class_list.html +0 -51
- data/docs/css/common.css +0 -1
- data/docs/css/full_list.css +0 -58
- data/docs/css/style.css +0 -497
- data/docs/file.README.html +0 -230
- data/docs/file_list.html +0 -56
- data/docs/frames.html +0 -17
- data/docs/index.html +0 -230
- data/docs/js/app.js +0 -314
- data/docs/js/full_list.js +0 -216
- data/docs/js/jquery.js +0 -4
- data/docs/method_list.html +0 -139
- data/docs/top-level-namespace.html +0 -110
- data/lib/m2m_keygen/params_encoder.rb +0 -56
- data/package.json +0 -12
- data/sig/m2m_keygen.rbs +0 -4
- data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +0 -18608
- data/sorbet/rbi/gems/backport@1.2.0.rbi +0 -522
- data/sorbet/rbi/gems/bundler-audit@0.9.1.rbi +0 -308
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3603
- data/sorbet/rbi/gems/childprocess@4.1.0.rbi +0 -401
- data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +0 -11581
- data/sorbet/rbi/gems/dotenv@2.8.1.rbi +0 -234
- data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +0 -8
- data/sorbet/rbi/gems/haml@5.2.2.rbi +0 -3190
- data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +0 -19
- data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +0 -133
- data/sorbet/rbi/gems/kramdown@2.4.0.rbi +0 -3261
- data/sorbet/rbi/gems/listen@3.7.1.rbi +0 -1181
- data/sorbet/rbi/gems/minitest@5.16.3.rbi +0 -1459
- data/sorbet/rbi/gems/nokogiri@1.13.8.rbi +0 -6514
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +0 -277
- data/sorbet/rbi/gems/parser@3.1.2.1.rbi +0 -6826
- data/sorbet/rbi/gems/prettier@3.2.0.rbi +0 -22
- data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +0 -8
- data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1222
- data/sorbet/rbi/gems/rack@2.2.4.rbi +0 -5630
- data/sorbet/rbi/gems/rbi@0.0.15.rbi +0 -3007
- data/sorbet/rbi/gems/rbs@2.6.0.rbi +0 -8
- data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +0 -3366
- data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +0 -389
- data/sorbet/rbi/gems/rspec-core@3.11.0.rbi +0 -10786
- data/sorbet/rbi/gems/rspec-expectations@3.11.0.rbi +0 -8170
- data/sorbet/rbi/gems/rspec-mocks@3.11.1.rbi +0 -5385
- data/sorbet/rbi/gems/rspec-support@3.11.0.rbi +0 -1746
- data/sorbet/rbi/gems/rspec@3.11.0.rbi +0 -187
- data/sorbet/rbi/gems/rspec_in_context@1.1.0.3.rbi +0 -1113
- data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +0 -7044
- data/sorbet/rbi/gems/rubocop-faker@1.1.0.rbi +0 -106
- data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +0 -2982
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +0 -990
- data/sorbet/rbi/gems/rubocop@1.35.1.rbi +0 -52002
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -1239
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -219
- data/sorbet/rbi/gems/solargraph@0.46.0.rbi +0 -9075
- data/sorbet/rbi/gems/spoom@1.1.12.rbi +0 -2369
- data/sorbet/rbi/gems/syntax_tree-haml@1.3.1.rbi +0 -8
- data/sorbet/rbi/gems/syntax_tree-rbs@0.5.0.rbi +0 -8
- data/sorbet/rbi/gems/syntax_tree@3.5.0.rbi +0 -8
- data/sorbet/rbi/gems/tapioca@0.9.4.rbi +0 -2946
- data/sorbet/rbi/gems/temple@0.8.2.rbi +0 -1712
- data/sorbet/rbi/gems/tilt@2.0.11.rbi +0 -742
- data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +0 -5914
- data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +0 -48
- data/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -4529
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -2553
- data/sorbet/rbi/gems/zeitwerk@2.6.0.rbi +0 -867
- data/sorbet/rbi/manual.rbi +0 -7
- data/yarn.lock +0 -20
|
@@ -4,14 +4,62 @@
|
|
|
4
4
|
# This is an autogenerated file for types exported from the `diff-lcs` gem.
|
|
5
5
|
# Please instead update this file by running `bin/tapioca gem diff-lcs`.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:3
|
|
8
9
|
module Diff; end
|
|
9
10
|
|
|
10
|
-
#
|
|
11
|
+
# == How Diff Works (by Mark-Jason Dominus)
|
|
12
|
+
#
|
|
13
|
+
# I once read an article written by the authors of +diff+; they said that they
|
|
14
|
+
# hard worked very hard on the algorithm until they found the right one.
|
|
15
|
+
#
|
|
16
|
+
# I think what they ended up using (and I hope someone will correct me, because
|
|
17
|
+
# I am not very confident about this) was the `longest common subsequence'
|
|
18
|
+
# method. In the LCS problem, you have two sequences of items:
|
|
19
|
+
#
|
|
20
|
+
# a b c d f g h j q z
|
|
21
|
+
# a b c d e f g i j k r x y z
|
|
22
|
+
#
|
|
23
|
+
# and you want to find the longest sequence of items that is present in both
|
|
24
|
+
# original sequences in the same order. That is, you want to find a new
|
|
25
|
+
# sequence *S* which can be obtained from the first sequence by deleting some
|
|
26
|
+
# items, and from the second sequence by deleting other items. You also want
|
|
27
|
+
# *S* to be as long as possible. In this case *S* is:
|
|
28
|
+
#
|
|
29
|
+
# a b c d f g j z
|
|
30
|
+
#
|
|
31
|
+
# From there it's only a small step to get diff-like output:
|
|
32
|
+
#
|
|
33
|
+
# e h i k q r x y
|
|
34
|
+
# + - + + - + + +
|
|
35
|
+
#
|
|
36
|
+
# This module solves the LCS problem. It also includes a canned function to
|
|
37
|
+
# generate +diff+-like output.
|
|
38
|
+
#
|
|
39
|
+
# It might seem from the example above that the LCS of two sequences is always
|
|
40
|
+
# pretty obvious, but that's not always the case, especially when the two
|
|
41
|
+
# sequences have many repeated elements. For example, consider
|
|
42
|
+
#
|
|
43
|
+
# a x b y c z p d q
|
|
44
|
+
# a b c a x b y c z
|
|
45
|
+
#
|
|
46
|
+
# A naive approach might start by matching up the +a+ and +b+ that appear at
|
|
47
|
+
# the beginning of each sequence, like this:
|
|
48
|
+
#
|
|
49
|
+
# a x b y c z p d q
|
|
50
|
+
# a b c a b y c z
|
|
51
|
+
#
|
|
52
|
+
# This finds the common subsequence +a b c z+. But actually, the LCS is +a x b
|
|
53
|
+
# y c z+:
|
|
54
|
+
#
|
|
55
|
+
# a x b y c z p d q
|
|
56
|
+
# a b c a x b y c z
|
|
57
|
+
#
|
|
58
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:51
|
|
11
59
|
module Diff::LCS
|
|
12
60
|
# Returns the difference set between +self+ and +other+. See Diff::LCS#diff.
|
|
13
61
|
#
|
|
14
|
-
#
|
|
62
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:76
|
|
15
63
|
def diff(other, callbacks = T.unsafe(nil), &block); end
|
|
16
64
|
|
|
17
65
|
# Returns an Array containing the longest common subsequence(s) between
|
|
@@ -20,83 +68,78 @@ module Diff::LCS
|
|
|
20
68
|
# lcs = seq1.lcs(seq2)
|
|
21
69
|
#
|
|
22
70
|
# A note when using objects: Diff::LCS only works properly when each object
|
|
23
|
-
# can be used as a key in a Hash
|
|
24
|
-
#
|
|
25
|
-
# identically for key purposes. That is:
|
|
71
|
+
# can be used as a key in a Hash. This means that those objects must implement
|
|
72
|
+
# the methods +#hash+ and +#eql?+ such that two objects containing identical values
|
|
73
|
+
# compare identically for key purposes. That is:
|
|
26
74
|
#
|
|
27
|
-
# O.new('a').eql?(O.new('a')) == true
|
|
75
|
+
# O.new('a').eql?(O.new('a')) == true &&
|
|
76
|
+
# O.new('a').hash == O.new('a').hash
|
|
28
77
|
#
|
|
29
|
-
#
|
|
78
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:71
|
|
30
79
|
def lcs(other, &block); end
|
|
31
80
|
|
|
32
81
|
# Attempts to patch +self+ with the provided +patchset+. A new sequence based
|
|
33
82
|
# on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts
|
|
34
83
|
# to autodiscover the direction of the patch.
|
|
35
84
|
#
|
|
36
|
-
#
|
|
85
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:102
|
|
37
86
|
def patch(patchset); end
|
|
38
87
|
|
|
39
88
|
# Attempts to patch +self+ with the provided +patchset+. A new sequence based
|
|
40
89
|
# on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Does no
|
|
41
90
|
# patch direction autodiscovery.
|
|
42
91
|
#
|
|
43
|
-
#
|
|
92
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:110
|
|
44
93
|
def patch!(patchset); end
|
|
45
94
|
|
|
46
95
|
# Attempts to patch +self+ with the provided +patchset+, using #patch!. If
|
|
47
96
|
# the sequence this is used on supports #replace, the value of +self+ will be
|
|
48
97
|
# replaced. See Diff::LCS#patch. Does no patch direction autodiscovery.
|
|
49
98
|
#
|
|
50
|
-
#
|
|
99
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:124
|
|
51
100
|
def patch_me(patchset); end
|
|
52
101
|
|
|
53
102
|
# Returns the balanced ("side-by-side") difference set between +self+ and
|
|
54
103
|
# +other+. See Diff::LCS#sdiff.
|
|
55
104
|
#
|
|
56
|
-
#
|
|
105
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:82
|
|
57
106
|
def sdiff(other, callbacks = T.unsafe(nil), &block); end
|
|
58
107
|
|
|
59
108
|
# Traverses the discovered longest common subsequences between +self+ and
|
|
60
109
|
# +other+ using the alternate, balanced algorithm. See
|
|
61
110
|
# Diff::LCS#traverse_balanced.
|
|
62
111
|
#
|
|
63
|
-
#
|
|
112
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:95
|
|
64
113
|
def traverse_balanced(other, callbacks = T.unsafe(nil), &block); end
|
|
65
114
|
|
|
66
115
|
# Traverses the discovered longest common subsequences between +self+ and
|
|
67
116
|
# +other+. See Diff::LCS#traverse_sequences.
|
|
68
117
|
#
|
|
69
|
-
#
|
|
118
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:88
|
|
70
119
|
def traverse_sequences(other, callbacks = T.unsafe(nil), &block); end
|
|
71
120
|
|
|
72
|
-
#
|
|
73
|
-
# on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts
|
|
74
|
-
# to autodiscover the direction of the patch.
|
|
75
|
-
#
|
|
76
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs.rb:101
|
|
121
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:105
|
|
77
122
|
def unpatch(patchset); end
|
|
78
123
|
|
|
79
124
|
# Attempts to unpatch +self+ with the provided +patchset+. A new sequence
|
|
80
125
|
# based on +self+ and the +patchset+ will be created. See Diff::LCS#unpatch.
|
|
81
126
|
# Does no patch direction autodiscovery.
|
|
82
127
|
#
|
|
83
|
-
#
|
|
128
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:117
|
|
84
129
|
def unpatch!(patchset); end
|
|
85
130
|
|
|
86
131
|
# Attempts to unpatch +self+ with the provided +patchset+, using #unpatch!.
|
|
87
132
|
# If the sequence this is used on supports #replace, the value of +self+ will
|
|
88
133
|
# be replaced. See Diff::LCS#unpatch. Does no patch direction autodiscovery.
|
|
89
134
|
#
|
|
90
|
-
#
|
|
135
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:135
|
|
91
136
|
def unpatch_me(patchset); end
|
|
92
137
|
|
|
93
138
|
class << self
|
|
94
|
-
# :
|
|
95
|
-
#
|
|
96
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs.rb:144
|
|
139
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:158
|
|
97
140
|
def LCS(seq1, seq2, &block); end
|
|
98
141
|
|
|
99
|
-
#
|
|
142
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:52
|
|
100
143
|
def callbacks_for(callbacks); end
|
|
101
144
|
|
|
102
145
|
# #diff computes the smallest set of additions and deletions necessary to
|
|
@@ -109,12 +152,10 @@ module Diff::LCS
|
|
|
109
152
|
# initialise it. If the +callbacks+ object (possibly initialised) responds to
|
|
110
153
|
# #finish, it will be called.
|
|
111
154
|
#
|
|
112
|
-
#
|
|
155
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:169
|
|
113
156
|
def diff(seq1, seq2, callbacks = T.unsafe(nil), &block); end
|
|
114
157
|
|
|
115
|
-
# :
|
|
116
|
-
#
|
|
117
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs.rb:144
|
|
158
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:145
|
|
118
159
|
def lcs(seq1, seq2, &block); end
|
|
119
160
|
|
|
120
161
|
# Applies a +patchset+ to the sequence +src+ according to the +direction+
|
|
@@ -158,13 +199,13 @@ module Diff::LCS
|
|
|
158
199
|
# representations of those objects. Prior to application, array
|
|
159
200
|
# representations of Diff::LCS::Change objects will be reified.
|
|
160
201
|
#
|
|
161
|
-
#
|
|
202
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:627
|
|
162
203
|
def patch(src, patchset, direction = T.unsafe(nil)); end
|
|
163
204
|
|
|
164
205
|
# Given a set of patchset, convert the current version to the next version.
|
|
165
206
|
# Does no auto-discovery.
|
|
166
207
|
#
|
|
167
|
-
#
|
|
208
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:737
|
|
168
209
|
def patch!(src, patchset); end
|
|
169
210
|
|
|
170
211
|
# #sdiff computes all necessary components to show two sequences and their
|
|
@@ -196,7 +237,7 @@ module Diff::LCS
|
|
|
196
237
|
# end
|
|
197
238
|
# end
|
|
198
239
|
#
|
|
199
|
-
#
|
|
240
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:201
|
|
200
241
|
def sdiff(seq1, seq2, callbacks = T.unsafe(nil), &block); end
|
|
201
242
|
|
|
202
243
|
# #traverse_balanced is an alternative to #traverse_sequences. It uses a
|
|
@@ -229,7 +270,7 @@ module Diff::LCS
|
|
|
229
270
|
# occurred.
|
|
230
271
|
#
|
|
231
272
|
# #traverse_balanced might be a bit slower than #traverse_sequences,
|
|
232
|
-
#
|
|
273
|
+
# noticeable only while processing huge amounts of data.
|
|
233
274
|
#
|
|
234
275
|
# == Algorithm
|
|
235
276
|
#
|
|
@@ -273,7 +314,7 @@ module Diff::LCS
|
|
|
273
314
|
# The methods for <tt>callbacks#match</tt>, <tt>callbacks#discard_a</tt>,
|
|
274
315
|
# <tt>callbacks#discard_b</tt>, and <tt>callbacks#change</tt> are invoked
|
|
275
316
|
# with an event comprising the action ("=", "+", "-", or "!", respectively),
|
|
276
|
-
# the
|
|
317
|
+
# the indexes +i+ and +j+, and the elements <tt>A[i]</tt> and <tt>B[j]</tt>.
|
|
277
318
|
# Return values are discarded by #traverse_balanced.
|
|
278
319
|
#
|
|
279
320
|
# === Context
|
|
@@ -281,7 +322,7 @@ module Diff::LCS
|
|
|
281
322
|
# Note that +i+ and +j+ may not be the same index position, even if +a+ and
|
|
282
323
|
# +b+ are considered to be pointing to matching or changed elements.
|
|
283
324
|
#
|
|
284
|
-
#
|
|
325
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:476
|
|
285
326
|
def traverse_balanced(seq1, seq2, callbacks = T.unsafe(nil)); end
|
|
286
327
|
|
|
287
328
|
# #traverse_sequences is the most general facility provided by this module;
|
|
@@ -339,7 +380,7 @@ module Diff::LCS
|
|
|
339
380
|
#
|
|
340
381
|
# The methods for <tt>callbacks#match</tt>, <tt>callbacks#discard_a</tt>, and
|
|
341
382
|
# <tt>callbacks#discard_b</tt> are invoked with an event comprising the
|
|
342
|
-
# action ("=", "+", or "-", respectively), the
|
|
383
|
+
# action ("=", "+", or "-", respectively), the indexes +i+ and +j+, and the
|
|
343
384
|
# elements <tt>A[i]</tt> and <tt>B[j]</tt>. Return values are discarded by
|
|
344
385
|
# #traverse_sequences.
|
|
345
386
|
#
|
|
@@ -366,18 +407,18 @@ module Diff::LCS
|
|
|
366
407
|
# is reached, if +a+ has not yet reached the end of +A+ or +b+ has not yet
|
|
367
408
|
# reached the end of +B+.
|
|
368
409
|
#
|
|
369
|
-
#
|
|
410
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:286
|
|
370
411
|
def traverse_sequences(seq1, seq2, callbacks = T.unsafe(nil)); end
|
|
371
412
|
|
|
372
413
|
# Given a set of patchset, convert the current version to the prior version.
|
|
373
414
|
# Does no auto-discovery.
|
|
374
415
|
#
|
|
375
|
-
#
|
|
416
|
+
# pkg:gem/diff-lcs#lib/diff/lcs.rb:731
|
|
376
417
|
def unpatch!(src, patchset); end
|
|
377
418
|
|
|
378
419
|
private
|
|
379
420
|
|
|
380
|
-
#
|
|
421
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:4
|
|
381
422
|
def diff_traversal(method, seq1, seq2, callbacks, &block); end
|
|
382
423
|
end
|
|
383
424
|
end
|
|
@@ -387,39 +428,31 @@ end
|
|
|
387
428
|
#
|
|
388
429
|
# Diff::LCS.LCS(seq1, seq2, Diff::LCS::BalancedCallbacks)
|
|
389
430
|
#
|
|
390
|
-
#
|
|
431
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:50
|
|
391
432
|
Diff::LCS::BalancedCallbacks = Diff::LCS::DefaultCallbacks
|
|
392
433
|
|
|
393
434
|
# A block is an operation removing, adding, or changing a group of items.
|
|
394
435
|
# Basically, this is just a list of changes, where each change adds or
|
|
395
436
|
# deletes a single item. Used by bin/ldiff.
|
|
396
437
|
#
|
|
397
|
-
#
|
|
438
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/block.rb:6
|
|
398
439
|
class Diff::LCS::Block
|
|
399
|
-
#
|
|
400
|
-
#
|
|
401
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/block.rb:9
|
|
440
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/block.rb:9
|
|
402
441
|
def initialize(chunk); end
|
|
403
442
|
|
|
404
|
-
#
|
|
405
|
-
#
|
|
406
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/block.rb:7
|
|
443
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/block.rb:7
|
|
407
444
|
def changes; end
|
|
408
445
|
|
|
409
|
-
#
|
|
446
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/block.rb:21
|
|
410
447
|
def diff_size; end
|
|
411
448
|
|
|
412
|
-
#
|
|
413
|
-
#
|
|
414
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/block.rb:7
|
|
449
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/block.rb:7
|
|
415
450
|
def insert; end
|
|
416
451
|
|
|
417
|
-
#
|
|
452
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/block.rb:25
|
|
418
453
|
def op; end
|
|
419
454
|
|
|
420
|
-
#
|
|
421
|
-
#
|
|
422
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/block.rb:7
|
|
455
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/block.rb:7
|
|
423
456
|
def remove; end
|
|
424
457
|
end
|
|
425
458
|
|
|
@@ -427,87 +460,71 @@ end
|
|
|
427
460
|
# addition of an element from either the old or the new sequenced
|
|
428
461
|
# enumerable.
|
|
429
462
|
#
|
|
430
|
-
#
|
|
463
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:6
|
|
431
464
|
class Diff::LCS::Change
|
|
432
465
|
include ::Comparable
|
|
433
466
|
|
|
434
|
-
#
|
|
435
|
-
#
|
|
436
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/change.rb:27
|
|
467
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:27
|
|
437
468
|
def initialize(*args); end
|
|
438
469
|
|
|
439
|
-
#
|
|
470
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:65
|
|
440
471
|
def <=>(other); end
|
|
441
472
|
|
|
442
|
-
#
|
|
473
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:58
|
|
443
474
|
def ==(other); end
|
|
444
475
|
|
|
445
476
|
# Returns the action this Change represents.
|
|
446
477
|
#
|
|
447
|
-
#
|
|
478
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:20
|
|
448
479
|
def action; end
|
|
449
480
|
|
|
450
|
-
#
|
|
451
|
-
#
|
|
452
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/change.rb:72
|
|
481
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:72
|
|
453
482
|
def adding?; end
|
|
454
483
|
|
|
455
|
-
#
|
|
456
|
-
#
|
|
457
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/change.rb:84
|
|
484
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:84
|
|
458
485
|
def changed?; end
|
|
459
486
|
|
|
460
|
-
#
|
|
461
|
-
#
|
|
462
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/change.rb:76
|
|
487
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:76
|
|
463
488
|
def deleting?; end
|
|
464
489
|
|
|
465
490
|
# Returns the sequence element of the Change.
|
|
466
491
|
#
|
|
467
|
-
#
|
|
492
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:25
|
|
468
493
|
def element; end
|
|
469
494
|
|
|
470
|
-
#
|
|
471
|
-
#
|
|
472
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/change.rb:88
|
|
495
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:88
|
|
473
496
|
def finished_a?; end
|
|
474
497
|
|
|
475
|
-
#
|
|
476
|
-
#
|
|
477
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/change.rb:92
|
|
498
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:92
|
|
478
499
|
def finished_b?; end
|
|
479
500
|
|
|
480
|
-
#
|
|
501
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:34
|
|
481
502
|
def inspect(*_args); end
|
|
482
503
|
|
|
483
504
|
# Returns the position of the Change.
|
|
484
505
|
#
|
|
485
|
-
#
|
|
506
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:23
|
|
486
507
|
def position; end
|
|
487
508
|
|
|
488
|
-
#
|
|
509
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:38
|
|
489
510
|
def to_a; end
|
|
490
511
|
|
|
491
|
-
#
|
|
512
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:42
|
|
492
513
|
def to_ary; end
|
|
493
514
|
|
|
494
|
-
#
|
|
495
|
-
#
|
|
496
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/change.rb:80
|
|
515
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:80
|
|
497
516
|
def unchanged?; end
|
|
498
517
|
|
|
499
518
|
class << self
|
|
500
|
-
#
|
|
519
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:44
|
|
501
520
|
def from_a(arr); end
|
|
502
521
|
|
|
503
|
-
#
|
|
504
|
-
#
|
|
505
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/change.rb:15
|
|
522
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:15
|
|
506
523
|
def valid_action?(action); end
|
|
507
524
|
end
|
|
508
525
|
end
|
|
509
526
|
|
|
510
|
-
#
|
|
527
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:7
|
|
511
528
|
Diff::LCS::Change::IntClass = Integer
|
|
512
529
|
|
|
513
530
|
# The only actions valid for changes are '+' (add), '-' (delete), '='
|
|
@@ -515,60 +532,58 @@ Diff::LCS::Change::IntClass = Integer
|
|
|
515
532
|
# '>' (tail changes from second sequence). The last two ('<>') are only
|
|
516
533
|
# found with Diff::LCS::diff and Diff::LCS::sdiff.
|
|
517
534
|
#
|
|
518
|
-
#
|
|
535
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:13
|
|
519
536
|
Diff::LCS::Change::VALID_ACTIONS = T.let(T.unsafe(nil), Array)
|
|
520
537
|
|
|
521
538
|
# Represents a contextual change. Contains the position and values of the
|
|
522
539
|
# elements in the old and the new sequenced enumerables as well as the action
|
|
523
540
|
# taken.
|
|
524
541
|
#
|
|
525
|
-
#
|
|
542
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:100
|
|
526
543
|
class Diff::LCS::ContextChange < ::Diff::LCS::Change
|
|
527
|
-
#
|
|
528
|
-
#
|
|
529
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/change.rb:114
|
|
544
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:114
|
|
530
545
|
def initialize(*args); end
|
|
531
546
|
|
|
532
|
-
#
|
|
547
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:166
|
|
533
548
|
def <=>(other); end
|
|
534
549
|
|
|
535
|
-
#
|
|
550
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:157
|
|
536
551
|
def ==(other); end
|
|
537
552
|
|
|
538
553
|
# Returns the new element being changed.
|
|
539
554
|
#
|
|
540
|
-
#
|
|
555
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:112
|
|
541
556
|
def new_element; end
|
|
542
557
|
|
|
543
558
|
# Returns the new position being changed.
|
|
544
559
|
#
|
|
545
|
-
#
|
|
560
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:108
|
|
546
561
|
def new_position; end
|
|
547
562
|
|
|
548
563
|
# Returns the old element being changed.
|
|
549
564
|
#
|
|
550
|
-
#
|
|
565
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:110
|
|
551
566
|
def old_element; end
|
|
552
567
|
|
|
553
568
|
# Returns the old position being changed.
|
|
554
569
|
#
|
|
555
|
-
#
|
|
570
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:106
|
|
556
571
|
def old_position; end
|
|
557
572
|
|
|
558
|
-
#
|
|
573
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:122
|
|
559
574
|
def to_a; end
|
|
560
575
|
|
|
561
|
-
#
|
|
576
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:130
|
|
562
577
|
def to_ary; end
|
|
563
578
|
|
|
564
579
|
class << self
|
|
565
|
-
#
|
|
580
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:132
|
|
566
581
|
def from_a(arr); end
|
|
567
582
|
|
|
568
583
|
# Simplifies a context change for use in some diff callbacks. '<' actions
|
|
569
584
|
# are converted to '-' and '>' actions are converted to '+'.
|
|
570
585
|
#
|
|
571
|
-
#
|
|
586
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/change.rb:138
|
|
572
587
|
def simplify(event); end
|
|
573
588
|
end
|
|
574
589
|
end
|
|
@@ -649,15 +664,15 @@ end
|
|
|
649
664
|
# require 'pp'
|
|
650
665
|
# pp diffs.map { |e| e.map { |f| f.to_a } }
|
|
651
666
|
#
|
|
652
|
-
#
|
|
667
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:225
|
|
653
668
|
class Diff::LCS::ContextDiffCallbacks < ::Diff::LCS::DiffCallbacks
|
|
654
|
-
#
|
|
669
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:234
|
|
655
670
|
def change(event); end
|
|
656
671
|
|
|
657
|
-
#
|
|
672
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:226
|
|
658
673
|
def discard_a(event); end
|
|
659
674
|
|
|
660
|
-
#
|
|
675
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:230
|
|
661
676
|
def discard_b(event); end
|
|
662
677
|
end
|
|
663
678
|
|
|
@@ -670,28 +685,33 @@ end
|
|
|
670
685
|
#
|
|
671
686
|
# Diff::LCS.LCS(seq1, seq2, Diff::LCS::DefaultCallbacks)
|
|
672
687
|
#
|
|
673
|
-
#
|
|
688
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:14
|
|
674
689
|
class Diff::LCS::DefaultCallbacks
|
|
675
690
|
class << self
|
|
676
691
|
# Called when both the old and new values have changed.
|
|
677
692
|
#
|
|
678
|
-
#
|
|
693
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:32
|
|
679
694
|
def change(event); end
|
|
680
695
|
|
|
681
696
|
# Called when the old value is discarded in favour of the new value.
|
|
682
697
|
#
|
|
683
|
-
#
|
|
698
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:22
|
|
684
699
|
def discard_a(event); end
|
|
685
700
|
|
|
686
701
|
# Called when the new value is discarded in favour of the old value.
|
|
687
702
|
#
|
|
688
|
-
#
|
|
703
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:27
|
|
689
704
|
def discard_b(event); end
|
|
690
705
|
|
|
691
706
|
# Called when two items match.
|
|
692
707
|
#
|
|
693
|
-
#
|
|
708
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:17
|
|
694
709
|
def match(event); end
|
|
710
|
+
|
|
711
|
+
private
|
|
712
|
+
|
|
713
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:36
|
|
714
|
+
def new(*_arg0); end
|
|
695
715
|
end
|
|
696
716
|
end
|
|
697
717
|
|
|
@@ -745,38 +765,34 @@ end
|
|
|
745
765
|
# require 'pp'
|
|
746
766
|
# pp diffs.map { |e| e.map { |f| f.to_a } }
|
|
747
767
|
#
|
|
748
|
-
#
|
|
768
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:108
|
|
749
769
|
class Diff::LCS::DiffCallbacks
|
|
750
|
-
# :
|
|
751
|
-
#
|
|
752
|
-
# @return [DiffCallbacks] a new instance of DiffCallbacks
|
|
753
|
-
#
|
|
754
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/callbacks.rb:110
|
|
770
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:112
|
|
755
771
|
def initialize; end
|
|
756
772
|
|
|
757
773
|
# Returns the difference set collected during the diff process.
|
|
758
774
|
#
|
|
759
|
-
#
|
|
775
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:110
|
|
760
776
|
def diffs; end
|
|
761
777
|
|
|
762
|
-
#
|
|
778
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:135
|
|
763
779
|
def discard_a(event); end
|
|
764
780
|
|
|
765
|
-
#
|
|
781
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:139
|
|
766
782
|
def discard_b(event); end
|
|
767
783
|
|
|
768
784
|
# Finalizes the diff process. If an unprocessed hunk still exists, then it
|
|
769
785
|
# is appended to the diff list.
|
|
770
786
|
#
|
|
771
|
-
#
|
|
787
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:127
|
|
772
788
|
def finish; end
|
|
773
789
|
|
|
774
|
-
#
|
|
790
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:131
|
|
775
791
|
def match(_event); end
|
|
776
792
|
|
|
777
793
|
private
|
|
778
794
|
|
|
779
|
-
#
|
|
795
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:143
|
|
780
796
|
def finish_hunk; end
|
|
781
797
|
end
|
|
782
798
|
|
|
@@ -784,132 +800,110 @@ end
|
|
|
784
800
|
# each block. (So if we're not using context, every hunk will contain one
|
|
785
801
|
# block.) Used in the diff program (bin/ldiff).
|
|
786
802
|
#
|
|
787
|
-
#
|
|
803
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:8
|
|
788
804
|
class Diff::LCS::Hunk
|
|
789
805
|
# Create a hunk using references to both the old and new data, as well as the
|
|
790
806
|
# piece of data.
|
|
791
807
|
#
|
|
792
|
-
#
|
|
793
|
-
#
|
|
794
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/hunk.rb:16
|
|
808
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:16
|
|
795
809
|
def initialize(data_old, data_new, piece, flag_context, file_length_difference); end
|
|
796
810
|
|
|
797
|
-
#
|
|
798
|
-
#
|
|
799
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/hunk.rb:63
|
|
811
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:64
|
|
800
812
|
def blocks; end
|
|
801
813
|
|
|
802
814
|
# Returns a diff string based on a format.
|
|
803
815
|
#
|
|
804
|
-
#
|
|
816
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:115
|
|
805
817
|
def diff(format, last = T.unsafe(nil)); end
|
|
806
818
|
|
|
807
|
-
#
|
|
808
|
-
#
|
|
809
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/hunk.rb:65
|
|
819
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:66
|
|
810
820
|
def end_new; end
|
|
811
821
|
|
|
812
|
-
#
|
|
813
|
-
#
|
|
814
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/hunk.rb:65
|
|
822
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:66
|
|
815
823
|
def end_old; end
|
|
816
824
|
|
|
817
|
-
#
|
|
818
|
-
#
|
|
819
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/hunk.rb:66
|
|
825
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:67
|
|
820
826
|
def file_length_difference; end
|
|
821
827
|
|
|
822
828
|
# Change the "start" and "end" fields to note that context should be added
|
|
823
829
|
# to this hunk.
|
|
824
830
|
#
|
|
825
|
-
#
|
|
831
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:71
|
|
826
832
|
def flag_context; end
|
|
827
833
|
|
|
828
|
-
#
|
|
834
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:71
|
|
829
835
|
def flag_context=(context); end
|
|
830
836
|
|
|
831
837
|
# Merges this hunk and the provided hunk together if they overlap. Returns
|
|
832
838
|
# a truthy value so that if there is no overlap, you can know the merge
|
|
833
839
|
# was skipped.
|
|
834
840
|
#
|
|
835
|
-
#
|
|
841
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:97
|
|
836
842
|
def merge(hunk); end
|
|
837
843
|
|
|
838
|
-
#
|
|
839
|
-
#
|
|
840
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/hunk.rb:326
|
|
844
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:347
|
|
841
845
|
def missing_last_newline?(data); end
|
|
842
846
|
|
|
843
847
|
# Determines whether there is an overlap between this hunk and the
|
|
844
848
|
# provided hunk. This will be true if the difference between the two hunks
|
|
845
849
|
# start or end positions is within one position of each other.
|
|
846
850
|
#
|
|
847
|
-
#
|
|
848
|
-
#
|
|
849
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/hunk.rb:110
|
|
851
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:109
|
|
850
852
|
def overlaps?(hunk); end
|
|
851
853
|
|
|
852
|
-
#
|
|
853
|
-
#
|
|
854
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/hunk.rb:64
|
|
854
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:65
|
|
855
855
|
def start_new; end
|
|
856
856
|
|
|
857
|
-
#
|
|
858
|
-
#
|
|
859
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/hunk.rb:64
|
|
857
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:65
|
|
860
858
|
def start_old; end
|
|
861
859
|
|
|
862
|
-
#
|
|
863
|
-
# a truthy value so that if there is no overlap, you can know the merge
|
|
864
|
-
# was skipped.
|
|
865
|
-
#
|
|
866
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/hunk.rb:98
|
|
860
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:104
|
|
867
861
|
def unshift(hunk); end
|
|
868
862
|
|
|
869
863
|
private
|
|
870
864
|
|
|
871
|
-
#
|
|
865
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:222
|
|
872
866
|
def context_diff(last = T.unsafe(nil)); end
|
|
873
867
|
|
|
874
868
|
# Generate a range of item numbers to print. Only print 1 number if the
|
|
875
869
|
# range has only one item in it. Otherwise, it's 'start,end'
|
|
876
870
|
#
|
|
877
|
-
#
|
|
878
|
-
def context_range(mode, op
|
|
871
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:316
|
|
872
|
+
def context_range(mode, op); end
|
|
879
873
|
|
|
880
|
-
#
|
|
881
|
-
def ed_diff(format,
|
|
874
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:284
|
|
875
|
+
def ed_diff(format, last); end
|
|
882
876
|
|
|
883
|
-
#
|
|
877
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:360
|
|
884
878
|
def encode(literal, target_encoding = T.unsafe(nil)); end
|
|
885
879
|
|
|
886
|
-
#
|
|
880
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:364
|
|
887
881
|
def encode_as(string, *args); end
|
|
888
882
|
|
|
889
883
|
# Note that an old diff can't have any context. Therefore, we know that
|
|
890
884
|
# there's only one block in the hunk.
|
|
891
885
|
#
|
|
892
|
-
#
|
|
893
|
-
def old_diff(
|
|
886
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:134
|
|
887
|
+
def old_diff(last = T.unsafe(nil)); end
|
|
894
888
|
|
|
895
|
-
#
|
|
889
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:167
|
|
896
890
|
def unified_diff(last = T.unsafe(nil)); end
|
|
897
891
|
|
|
898
892
|
# Generate a range of item numbers to print for unified diff. Print number
|
|
899
893
|
# where block starts, followed by number of lines in the block
|
|
900
894
|
# (don't print number of lines if it's 1)
|
|
901
895
|
#
|
|
902
|
-
#
|
|
903
|
-
def unified_range(mode
|
|
896
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:331
|
|
897
|
+
def unified_range(mode); end
|
|
904
898
|
end
|
|
905
899
|
|
|
906
|
-
#
|
|
900
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:10
|
|
907
901
|
Diff::LCS::Hunk::ED_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash)
|
|
908
902
|
|
|
909
|
-
#
|
|
903
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:9
|
|
910
904
|
Diff::LCS::Hunk::OLD_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash)
|
|
911
905
|
|
|
912
|
-
#
|
|
906
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:29
|
|
913
907
|
module Diff::LCS::Internals
|
|
914
908
|
class << self
|
|
915
909
|
# This method will analyze the provided patchset to provide a single-pass
|
|
@@ -917,7 +911,7 @@ module Diff::LCS::Internals
|
|
|
917
911
|
# the object form of same) and detection of whether the patchset represents
|
|
918
912
|
# changes to be made.
|
|
919
913
|
#
|
|
920
|
-
#
|
|
914
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:102
|
|
921
915
|
def analyze_patchset(patchset, depth = T.unsafe(nil)); end
|
|
922
916
|
|
|
923
917
|
# Examine the patchset and the source to see in which direction the
|
|
@@ -928,7 +922,7 @@ module Diff::LCS::Internals
|
|
|
928
922
|
# Diff::LCS::Change as its source, as an array will cause the creation
|
|
929
923
|
# of one of the above.
|
|
930
924
|
#
|
|
931
|
-
#
|
|
925
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:147
|
|
932
926
|
def intuit_diff_direction(src, patchset, limit = T.unsafe(nil)); end
|
|
933
927
|
|
|
934
928
|
# Compute the longest common subsequence between the sequenced
|
|
@@ -940,7 +934,7 @@ module Diff::LCS::Internals
|
|
|
940
934
|
# assert_equal(a[i], b[e]) unless e.nil?
|
|
941
935
|
# end
|
|
942
936
|
#
|
|
943
|
-
#
|
|
937
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:41
|
|
944
938
|
def lcs(a, b); end
|
|
945
939
|
|
|
946
940
|
private
|
|
@@ -949,14 +943,14 @@ module Diff::LCS::Internals
|
|
|
949
943
|
# Enumerable, compute the inverse of +vector+ that maps this Enumerable
|
|
950
944
|
# onto the collection. (Currently unused.)
|
|
951
945
|
#
|
|
952
|
-
#
|
|
946
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:286
|
|
953
947
|
def inverse_vector(a, vector); end
|
|
954
948
|
|
|
955
949
|
# Returns a hash mapping each element of an Enumerable to the set of
|
|
956
950
|
# positions it occupies in the Enumerable, optionally restricted to the
|
|
957
951
|
# elements specified in the range of indexes specified by +interval+.
|
|
958
952
|
#
|
|
959
|
-
#
|
|
953
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:298
|
|
960
954
|
def position_hash(enum, interval); end
|
|
961
955
|
|
|
962
956
|
# Find the place at which +value+ would normally be inserted into the
|
|
@@ -968,7 +962,7 @@ module Diff::LCS::Internals
|
|
|
968
962
|
#
|
|
969
963
|
# This operation preserves the sort order.
|
|
970
964
|
#
|
|
971
|
-
#
|
|
965
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:252
|
|
972
966
|
def replace_next_larger(enum, value, last_index = T.unsafe(nil)); end
|
|
973
967
|
end
|
|
974
968
|
end
|
|
@@ -1038,32 +1032,26 @@ end
|
|
|
1038
1032
|
# require 'pp'
|
|
1039
1033
|
# pp diffs.map { |e| e.to_a }
|
|
1040
1034
|
#
|
|
1041
|
-
#
|
|
1035
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:303
|
|
1042
1036
|
class Diff::LCS::SDiffCallbacks
|
|
1043
|
-
# :
|
|
1044
|
-
#
|
|
1045
|
-
# @return [SDiffCallbacks] a new instance of SDiffCallbacks
|
|
1046
|
-
# @yield [_self]
|
|
1047
|
-
# @yieldparam _self [Diff::LCS::SDiffCallbacks] the object that the method was called on
|
|
1048
|
-
#
|
|
1049
|
-
# source://diff-lcs-1.5.0/lib/diff/lcs/callbacks.rb:305
|
|
1037
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:307
|
|
1050
1038
|
def initialize; end
|
|
1051
1039
|
|
|
1052
|
-
#
|
|
1040
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:324
|
|
1053
1041
|
def change(event); end
|
|
1054
1042
|
|
|
1055
1043
|
# Returns the difference set collected during the diff process.
|
|
1056
1044
|
#
|
|
1057
|
-
#
|
|
1045
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:305
|
|
1058
1046
|
def diffs; end
|
|
1059
1047
|
|
|
1060
|
-
#
|
|
1048
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:316
|
|
1061
1049
|
def discard_a(event); end
|
|
1062
1050
|
|
|
1063
|
-
#
|
|
1051
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:320
|
|
1064
1052
|
def discard_b(event); end
|
|
1065
1053
|
|
|
1066
|
-
#
|
|
1054
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:312
|
|
1067
1055
|
def match(event); end
|
|
1068
1056
|
end
|
|
1069
1057
|
|
|
@@ -1072,8 +1060,10 @@ end
|
|
|
1072
1060
|
#
|
|
1073
1061
|
# Diff::LCS.LCS(seq1, seq2, Diff::LCS::SequenceCallbacks)
|
|
1074
1062
|
#
|
|
1075
|
-
#
|
|
1063
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:44
|
|
1076
1064
|
Diff::LCS::SequenceCallbacks = Diff::LCS::DefaultCallbacks
|
|
1077
1065
|
|
|
1078
|
-
#
|
|
1066
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/version.rb:5
|
|
1079
1067
|
Diff::LCS::VERSION = T.let(T.unsafe(nil), String)
|
|
1068
|
+
|
|
1069
|
+
Integer::GMP_VERSION = T.let(T.unsafe(nil), String)
|