tsumanne 0.0.2 → 0.0.4
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/.dockerignore +8 -0
- data/.mdlrc +6 -0
- data/.rubocop.yml +20 -12
- data/Dockerfile +24 -0
- data/README.md +0 -4
- data/Rakefile +19 -16
- data/exe/tsumanne +2 -1
- data/lib/tsumanne/api.rb +22 -21
- data/lib/tsumanne/cli.rb +153 -2
- data/lib/tsumanne/models/get_threads.rb +8 -3
- data/lib/tsumanne/models/register_thread.rb +5 -1
- data/lib/tsumanne/models/search_indexes.rb +7 -2
- data/lib/tsumanne/models/search_thread_from_uri.rb +14 -2
- data/lib/tsumanne/version.rb +1 -1
- data/mise.toml +42 -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.5.0.rbi +621 -0
- data/sorbet/rbi/gems/{chef-utils@18.2.7.rbi → chef-utils@18.8.54.rbi} +1 -0
- data/sorbet/rbi/gems/{concurrent-ruby@1.2.2.rbi → concurrent-ruby@1.3.5.rbi} +1 -0
- data/sorbet/rbi/gems/{diff-lcs@1.5.0.rbi → diff-lcs@1.6.2.rbi} +183 -199
- data/sorbet/rbi/gems/docile@1.4.0.rbi +147 -147
- data/sorbet/rbi/gems/{erubi@1.12.0.rbi → erubi@1.13.1.rbi} +36 -26
- data/sorbet/rbi/gems/{json@2.6.3.rbi → json@2.19.4.rbi} +920 -251
- data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +32 -63
- data/sorbet/rbi/gems/{kramdown@2.4.0.rbi → kramdown@2.5.1.rbi} +896 -711
- 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/logger@1.7.0.rbi +896 -0
- data/sorbet/rbi/gems/{mdl@0.12.0.rbi → mdl@0.15.0.rbi} +109 -113
- data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +35 -41
- data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +147 -142
- data/sorbet/rbi/gems/{mixlib-shellout@3.2.7.rbi → mixlib-shellout@3.3.9.rbi} +127 -150
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +45 -56
- data/sorbet/rbi/gems/optimist@3.2.1.rbi +895 -0
- data/sorbet/rbi/gems/parallel@1.28.0.rbi +270 -0
- data/sorbet/rbi/gems/parser@3.3.11.1.rbi +5229 -0
- data/sorbet/rbi/gems/prism@1.9.0.rbi +42224 -0
- data/sorbet/rbi/gems/{racc@1.7.1.rbi → racc@1.8.1.rbi} +48 -44
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +101 -141
- data/sorbet/rbi/gems/{rake@13.0.6.rbi → rake@13.4.2.rbi} +867 -761
- data/sorbet/rbi/gems/rbi@0.3.10.rbi +5520 -0
- data/sorbet/rbi/gems/rbs@4.0.2.rbi +6908 -0
- data/sorbet/rbi/gems/regexp_parser@2.12.0.rbi +3398 -0
- data/sorbet/rbi/gems/require-hooks@0.4.0.rbi +152 -0
- data/sorbet/rbi/gems/{rexml@3.2.6.rbi → rexml@3.4.4.rbi} +1032 -908
- data/sorbet/rbi/gems/{rspec-core@3.12.2.rbi → rspec-core@3.13.6.rbi} +2860 -4206
- data/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi +6108 -0
- data/sorbet/rbi/gems/{rspec-mocks@3.12.6.rbi → rspec-mocks@3.13.7.rbi} +1264 -1787
- data/sorbet/rbi/gems/rspec-support@3.13.6.rbi +1274 -0
- data/sorbet/rbi/gems/rspec@3.13.2.rbi +15 -0
- data/sorbet/rbi/gems/rubocop-ast@1.49.1.rbi +7212 -0
- data/sorbet/rbi/gems/rubocop-performance@1.26.1.rbi +3403 -0
- data/sorbet/rbi/gems/{rubocop-rake@0.6.0.rbi → rubocop-rake@0.7.1.rbi} +89 -103
- data/sorbet/rbi/gems/rubocop-rspec@3.9.0.rbi +7606 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi +2448 -0
- data/sorbet/rbi/gems/rubocop@1.86.1.rbi +62232 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +326 -655
- data/sorbet/rbi/gems/rubydex@0.1.0.beta14.rbi +655 -0
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +24 -158
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +450 -606
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +32 -166
- data/sorbet/rbi/gems/spoom@1.7.13.rbi +6151 -0
- data/sorbet/rbi/gems/{tapioca@0.11.8.rbi → tapioca@0.19.1.rbi} +1609 -1379
- data/sorbet/rbi/gems/{thor@1.2.2.rbi → thor@1.5.0.rbi} +1075 -1170
- data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +1 -0
- 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
- metadata +69 -66
- data/.ruby-version +0 -1
- data/sorbet/rbi/gems/base64@0.1.1.rbi +0 -172
- data/sorbet/rbi/gems/ffi-compiler@1.0.1.rbi +0 -206
- data/sorbet/rbi/gems/ffi@1.15.5.rbi +0 -1994
- data/sorbet/rbi/gems/http-parser@1.2.3.rbi +0 -422
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14237
- data/sorbet/rbi/gems/mhtml@0.1.6.rbi +0 -353
- data/sorbet/rbi/gems/parallel@1.23.0.rbi +0 -273
- data/sorbet/rbi/gems/parser@3.2.2.3.rbi +0 -7253
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +0 -951
- data/sorbet/rbi/gems/rbi@0.0.17.rbi +0 -2967
- data/sorbet/rbi/gems/regexp_parser@2.8.1.rbi +0 -3749
- data/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi +0 -8100
- data/sorbet/rbi/gems/rspec-support@3.12.1.rbi +0 -1609
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +0 -82
- data/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi +0 -7144
- data/sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi +0 -827
- data/sorbet/rbi/gems/rubocop-factory_bot@2.23.1.rbi +0 -812
- data/sorbet/rbi/gems/rubocop-performance@1.19.0.rbi +0 -3157
- data/sorbet/rbi/gems/rubocop-rspec@2.23.2.rbi +0 -7691
- data/sorbet/rbi/gems/rubocop-sorbet@0.7.3.rbi +0 -1226
- data/sorbet/rbi/gems/rubocop@1.56.2.rbi +0 -56541
- data/sorbet/rbi/gems/spoom@1.2.3.rbi +0 -3199
- data/sorbet/rbi/gems/syntax_tree@6.1.1.rbi +0 -22855
- data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +0 -65
- data/sorbet/rbi/gems/unparser@0.6.8.rbi +0 -4525
- data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +0 -425
- data/sorbet/rbi/gems/yard@0.9.34.rbi +0 -18219
|
@@ -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//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//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//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//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//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//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//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//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//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//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//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//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//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//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//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//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,31 +685,32 @@ 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
|
|
695
710
|
|
|
696
711
|
private
|
|
697
712
|
|
|
713
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:36
|
|
698
714
|
def new(*_arg0); end
|
|
699
715
|
end
|
|
700
716
|
end
|
|
@@ -749,38 +765,34 @@ end
|
|
|
749
765
|
# require 'pp'
|
|
750
766
|
# pp diffs.map { |e| e.map { |f| f.to_a } }
|
|
751
767
|
#
|
|
752
|
-
#
|
|
768
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:108
|
|
753
769
|
class Diff::LCS::DiffCallbacks
|
|
754
|
-
# :
|
|
755
|
-
#
|
|
756
|
-
# @return [DiffCallbacks] a new instance of DiffCallbacks
|
|
757
|
-
#
|
|
758
|
-
# source://diff-lcs//lib/diff/lcs/callbacks.rb#110
|
|
770
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:112
|
|
759
771
|
def initialize; end
|
|
760
772
|
|
|
761
773
|
# Returns the difference set collected during the diff process.
|
|
762
774
|
#
|
|
763
|
-
#
|
|
775
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:110
|
|
764
776
|
def diffs; end
|
|
765
777
|
|
|
766
|
-
#
|
|
778
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:135
|
|
767
779
|
def discard_a(event); end
|
|
768
780
|
|
|
769
|
-
#
|
|
781
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:139
|
|
770
782
|
def discard_b(event); end
|
|
771
783
|
|
|
772
784
|
# Finalizes the diff process. If an unprocessed hunk still exists, then it
|
|
773
785
|
# is appended to the diff list.
|
|
774
786
|
#
|
|
775
|
-
#
|
|
787
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:127
|
|
776
788
|
def finish; end
|
|
777
789
|
|
|
778
|
-
#
|
|
790
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:131
|
|
779
791
|
def match(_event); end
|
|
780
792
|
|
|
781
793
|
private
|
|
782
794
|
|
|
783
|
-
#
|
|
795
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:143
|
|
784
796
|
def finish_hunk; end
|
|
785
797
|
end
|
|
786
798
|
|
|
@@ -788,132 +800,110 @@ end
|
|
|
788
800
|
# each block. (So if we're not using context, every hunk will contain one
|
|
789
801
|
# block.) Used in the diff program (bin/ldiff).
|
|
790
802
|
#
|
|
791
|
-
#
|
|
803
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:8
|
|
792
804
|
class Diff::LCS::Hunk
|
|
793
805
|
# Create a hunk using references to both the old and new data, as well as the
|
|
794
806
|
# piece of data.
|
|
795
807
|
#
|
|
796
|
-
#
|
|
797
|
-
#
|
|
798
|
-
# source://diff-lcs//lib/diff/lcs/hunk.rb#16
|
|
808
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:16
|
|
799
809
|
def initialize(data_old, data_new, piece, flag_context, file_length_difference); end
|
|
800
810
|
|
|
801
|
-
#
|
|
802
|
-
#
|
|
803
|
-
# source://diff-lcs//lib/diff/lcs/hunk.rb#63
|
|
811
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:64
|
|
804
812
|
def blocks; end
|
|
805
813
|
|
|
806
814
|
# Returns a diff string based on a format.
|
|
807
815
|
#
|
|
808
|
-
#
|
|
816
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:115
|
|
809
817
|
def diff(format, last = T.unsafe(nil)); end
|
|
810
818
|
|
|
811
|
-
#
|
|
812
|
-
#
|
|
813
|
-
# source://diff-lcs//lib/diff/lcs/hunk.rb#65
|
|
819
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:66
|
|
814
820
|
def end_new; end
|
|
815
821
|
|
|
816
|
-
#
|
|
817
|
-
#
|
|
818
|
-
# source://diff-lcs//lib/diff/lcs/hunk.rb#65
|
|
822
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:66
|
|
819
823
|
def end_old; end
|
|
820
824
|
|
|
821
|
-
#
|
|
822
|
-
#
|
|
823
|
-
# source://diff-lcs//lib/diff/lcs/hunk.rb#66
|
|
825
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:67
|
|
824
826
|
def file_length_difference; end
|
|
825
827
|
|
|
826
828
|
# Change the "start" and "end" fields to note that context should be added
|
|
827
829
|
# to this hunk.
|
|
828
830
|
#
|
|
829
|
-
#
|
|
831
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:71
|
|
830
832
|
def flag_context; end
|
|
831
833
|
|
|
832
|
-
#
|
|
834
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:71
|
|
833
835
|
def flag_context=(context); end
|
|
834
836
|
|
|
835
837
|
# Merges this hunk and the provided hunk together if they overlap. Returns
|
|
836
838
|
# a truthy value so that if there is no overlap, you can know the merge
|
|
837
839
|
# was skipped.
|
|
838
840
|
#
|
|
839
|
-
#
|
|
841
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:97
|
|
840
842
|
def merge(hunk); end
|
|
841
843
|
|
|
842
|
-
#
|
|
843
|
-
#
|
|
844
|
-
# source://diff-lcs//lib/diff/lcs/hunk.rb#326
|
|
844
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:347
|
|
845
845
|
def missing_last_newline?(data); end
|
|
846
846
|
|
|
847
847
|
# Determines whether there is an overlap between this hunk and the
|
|
848
848
|
# provided hunk. This will be true if the difference between the two hunks
|
|
849
849
|
# start or end positions is within one position of each other.
|
|
850
850
|
#
|
|
851
|
-
#
|
|
852
|
-
#
|
|
853
|
-
# source://diff-lcs//lib/diff/lcs/hunk.rb#110
|
|
851
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:109
|
|
854
852
|
def overlaps?(hunk); end
|
|
855
853
|
|
|
856
|
-
#
|
|
857
|
-
#
|
|
858
|
-
# source://diff-lcs//lib/diff/lcs/hunk.rb#64
|
|
854
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:65
|
|
859
855
|
def start_new; end
|
|
860
856
|
|
|
861
|
-
#
|
|
862
|
-
#
|
|
863
|
-
# source://diff-lcs//lib/diff/lcs/hunk.rb#64
|
|
857
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:65
|
|
864
858
|
def start_old; end
|
|
865
859
|
|
|
866
|
-
#
|
|
867
|
-
# a truthy value so that if there is no overlap, you can know the merge
|
|
868
|
-
# was skipped.
|
|
869
|
-
#
|
|
870
|
-
# source://diff-lcs//lib/diff/lcs/hunk.rb#98
|
|
860
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:104
|
|
871
861
|
def unshift(hunk); end
|
|
872
862
|
|
|
873
863
|
private
|
|
874
864
|
|
|
875
|
-
#
|
|
865
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:222
|
|
876
866
|
def context_diff(last = T.unsafe(nil)); end
|
|
877
867
|
|
|
878
868
|
# Generate a range of item numbers to print. Only print 1 number if the
|
|
879
869
|
# range has only one item in it. Otherwise, it's 'start,end'
|
|
880
870
|
#
|
|
881
|
-
#
|
|
882
|
-
def context_range(mode, op
|
|
871
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:316
|
|
872
|
+
def context_range(mode, op); end
|
|
883
873
|
|
|
884
|
-
#
|
|
885
|
-
def ed_diff(format,
|
|
874
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:284
|
|
875
|
+
def ed_diff(format, last); end
|
|
886
876
|
|
|
887
|
-
#
|
|
877
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:360
|
|
888
878
|
def encode(literal, target_encoding = T.unsafe(nil)); end
|
|
889
879
|
|
|
890
|
-
#
|
|
880
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:364
|
|
891
881
|
def encode_as(string, *args); end
|
|
892
882
|
|
|
893
883
|
# Note that an old diff can't have any context. Therefore, we know that
|
|
894
884
|
# there's only one block in the hunk.
|
|
895
885
|
#
|
|
896
|
-
#
|
|
897
|
-
def old_diff(
|
|
886
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:134
|
|
887
|
+
def old_diff(last = T.unsafe(nil)); end
|
|
898
888
|
|
|
899
|
-
#
|
|
889
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:167
|
|
900
890
|
def unified_diff(last = T.unsafe(nil)); end
|
|
901
891
|
|
|
902
892
|
# Generate a range of item numbers to print for unified diff. Print number
|
|
903
893
|
# where block starts, followed by number of lines in the block
|
|
904
894
|
# (don't print number of lines if it's 1)
|
|
905
895
|
#
|
|
906
|
-
#
|
|
907
|
-
def unified_range(mode
|
|
896
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:331
|
|
897
|
+
def unified_range(mode); end
|
|
908
898
|
end
|
|
909
899
|
|
|
910
|
-
#
|
|
900
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:10
|
|
911
901
|
Diff::LCS::Hunk::ED_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash)
|
|
912
902
|
|
|
913
|
-
#
|
|
903
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/hunk.rb:9
|
|
914
904
|
Diff::LCS::Hunk::OLD_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash)
|
|
915
905
|
|
|
916
|
-
#
|
|
906
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:29
|
|
917
907
|
module Diff::LCS::Internals
|
|
918
908
|
class << self
|
|
919
909
|
# This method will analyze the provided patchset to provide a single-pass
|
|
@@ -921,7 +911,7 @@ module Diff::LCS::Internals
|
|
|
921
911
|
# the object form of same) and detection of whether the patchset represents
|
|
922
912
|
# changes to be made.
|
|
923
913
|
#
|
|
924
|
-
#
|
|
914
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:102
|
|
925
915
|
def analyze_patchset(patchset, depth = T.unsafe(nil)); end
|
|
926
916
|
|
|
927
917
|
# Examine the patchset and the source to see in which direction the
|
|
@@ -932,7 +922,7 @@ module Diff::LCS::Internals
|
|
|
932
922
|
# Diff::LCS::Change as its source, as an array will cause the creation
|
|
933
923
|
# of one of the above.
|
|
934
924
|
#
|
|
935
|
-
#
|
|
925
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:147
|
|
936
926
|
def intuit_diff_direction(src, patchset, limit = T.unsafe(nil)); end
|
|
937
927
|
|
|
938
928
|
# Compute the longest common subsequence between the sequenced
|
|
@@ -944,7 +934,7 @@ module Diff::LCS::Internals
|
|
|
944
934
|
# assert_equal(a[i], b[e]) unless e.nil?
|
|
945
935
|
# end
|
|
946
936
|
#
|
|
947
|
-
#
|
|
937
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:41
|
|
948
938
|
def lcs(a, b); end
|
|
949
939
|
|
|
950
940
|
private
|
|
@@ -953,14 +943,14 @@ module Diff::LCS::Internals
|
|
|
953
943
|
# Enumerable, compute the inverse of +vector+ that maps this Enumerable
|
|
954
944
|
# onto the collection. (Currently unused.)
|
|
955
945
|
#
|
|
956
|
-
#
|
|
946
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:286
|
|
957
947
|
def inverse_vector(a, vector); end
|
|
958
948
|
|
|
959
949
|
# Returns a hash mapping each element of an Enumerable to the set of
|
|
960
950
|
# positions it occupies in the Enumerable, optionally restricted to the
|
|
961
951
|
# elements specified in the range of indexes specified by +interval+.
|
|
962
952
|
#
|
|
963
|
-
#
|
|
953
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:298
|
|
964
954
|
def position_hash(enum, interval); end
|
|
965
955
|
|
|
966
956
|
# Find the place at which +value+ would normally be inserted into the
|
|
@@ -972,7 +962,7 @@ module Diff::LCS::Internals
|
|
|
972
962
|
#
|
|
973
963
|
# This operation preserves the sort order.
|
|
974
964
|
#
|
|
975
|
-
#
|
|
965
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/internals.rb:252
|
|
976
966
|
def replace_next_larger(enum, value, last_index = T.unsafe(nil)); end
|
|
977
967
|
end
|
|
978
968
|
end
|
|
@@ -1042,32 +1032,26 @@ end
|
|
|
1042
1032
|
# require 'pp'
|
|
1043
1033
|
# pp diffs.map { |e| e.to_a }
|
|
1044
1034
|
#
|
|
1045
|
-
#
|
|
1035
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:303
|
|
1046
1036
|
class Diff::LCS::SDiffCallbacks
|
|
1047
|
-
# :
|
|
1048
|
-
#
|
|
1049
|
-
# @return [SDiffCallbacks] a new instance of SDiffCallbacks
|
|
1050
|
-
# @yield [_self]
|
|
1051
|
-
# @yieldparam _self [Diff::LCS::SDiffCallbacks] the object that the method was called on
|
|
1052
|
-
#
|
|
1053
|
-
# source://diff-lcs//lib/diff/lcs/callbacks.rb#305
|
|
1037
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:307
|
|
1054
1038
|
def initialize; end
|
|
1055
1039
|
|
|
1056
|
-
#
|
|
1040
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:324
|
|
1057
1041
|
def change(event); end
|
|
1058
1042
|
|
|
1059
1043
|
# Returns the difference set collected during the diff process.
|
|
1060
1044
|
#
|
|
1061
|
-
#
|
|
1045
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:305
|
|
1062
1046
|
def diffs; end
|
|
1063
1047
|
|
|
1064
|
-
#
|
|
1048
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:316
|
|
1065
1049
|
def discard_a(event); end
|
|
1066
1050
|
|
|
1067
|
-
#
|
|
1051
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:320
|
|
1068
1052
|
def discard_b(event); end
|
|
1069
1053
|
|
|
1070
|
-
#
|
|
1054
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:312
|
|
1071
1055
|
def match(event); end
|
|
1072
1056
|
end
|
|
1073
1057
|
|
|
@@ -1076,8 +1060,8 @@ end
|
|
|
1076
1060
|
#
|
|
1077
1061
|
# Diff::LCS.LCS(seq1, seq2, Diff::LCS::SequenceCallbacks)
|
|
1078
1062
|
#
|
|
1079
|
-
#
|
|
1063
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/callbacks.rb:44
|
|
1080
1064
|
Diff::LCS::SequenceCallbacks = Diff::LCS::DefaultCallbacks
|
|
1081
1065
|
|
|
1082
|
-
#
|
|
1066
|
+
# pkg:gem/diff-lcs#lib/diff/lcs/version.rb:5
|
|
1083
1067
|
Diff::LCS::VERSION = T.let(T.unsafe(nil), String)
|