patience_diff 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/History.txt +5 -0
- data/Rakefile +2 -3
- data/bin/patience_diff +10 -10
- data/lib/patience_diff.rb +1 -1
- metadata +21 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ba503ae74842e740bb08c06a49d22672717bbad0cf00a5569eee6235ef021183
|
4
|
+
data.tar.gz: 6d280ee2817ac1108a40e947aa937a569a309c999a2e31e0865f7fe7046913a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba3bfdb540dd20e29cebb7d46d39201ee4d760964b774d812ebe29c476702b4b28cf54aa89bb4ef04d3d29b9b30ead8716c0cea3adb61cbe34859741ca4bb07f
|
7
|
+
data.tar.gz: d6ddac1875f078bc60b79c2c49a8ecbe53d70783a58c29a08ed2cd91c055b35f7a13ef3f918e07b2f444f7badb25481be76c522f2862f0b40a7d355707c2e1cb
|
data/History.txt
CHANGED
data/Rakefile
CHANGED
data/bin/patience_diff
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'English'
|
3
3
|
require 'pathname'
|
4
|
-
require '
|
4
|
+
require 'optimist'
|
5
5
|
|
6
6
|
lib_path = Pathname(File.join(File.dirname(__FILE__),"..","lib")).realpath
|
7
7
|
$LOAD_PATH.unshift(lib_path)
|
@@ -9,25 +9,25 @@ require 'patience_diff'
|
|
9
9
|
|
10
10
|
begin
|
11
11
|
program_name = File.basename($PROGRAM_NAME)
|
12
|
-
opts =
|
12
|
+
opts = Optimist::options do
|
13
13
|
banner <<-EOF.gsub(/^\s*/, '')
|
14
14
|
Usage: #{program_name} [options] left-file right-file (left-file-2 right-file-2 ...)
|
15
15
|
Options:
|
16
16
|
EOF
|
17
|
-
|
17
|
+
|
18
18
|
version "#{program_name} #{PatienceDiff::VERSION}"
|
19
|
-
|
19
|
+
|
20
20
|
opt :debug, "Debugging mode"
|
21
21
|
opt :context, "Lines of context", :default => 3
|
22
22
|
opt :all_context, "Don't collapse common sections; output entire files. Ignored in html format."
|
23
23
|
opt :format, "Specify output format. Currently 'text' and 'html' are supported.", :default => "text"
|
24
|
-
opt :ignore_whitespace,
|
24
|
+
opt :ignore_whitespace,
|
25
25
|
"Ignore trailing whitespace, and treat leading whitespace as either present or not. This switch is for compatibility with diff's -b option.",
|
26
26
|
:short => '-b'
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
raise PatienceDiff::UsageError unless ARGV.length and ARGV.length % 2 == 0
|
30
|
-
|
30
|
+
|
31
31
|
differ = PatienceDiff::Differ.new(opts)
|
32
32
|
formatter = case opts.delete(:format)
|
33
33
|
when 'text'
|
@@ -37,7 +37,7 @@ begin
|
|
37
37
|
else
|
38
38
|
raise PatienceDiff::UsageError
|
39
39
|
end.new(differ)
|
40
|
-
|
40
|
+
|
41
41
|
formatter.format do |diff|
|
42
42
|
ARGV.each_slice(2) do |(left_file, right_file)|
|
43
43
|
diff.files left_file, right_file
|
@@ -45,9 +45,9 @@ begin
|
|
45
45
|
end.tap do |result|
|
46
46
|
print result
|
47
47
|
end
|
48
|
-
|
48
|
+
|
49
49
|
rescue PatienceDiff::UsageError => e
|
50
|
-
|
50
|
+
Optimist.module_eval do
|
51
51
|
@last_parser.educate($stderr)
|
52
52
|
end
|
53
53
|
rescue StandardError => e
|
data/lib/patience_diff.rb
CHANGED
metadata
CHANGED
@@ -1,57 +1,63 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: patience_diff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Watt
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: optimist
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '4.0'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '7'
|
34
37
|
type: :development
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '4.0'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '7'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: hoe
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3.
|
53
|
+
version: '3.22'
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: '3.
|
60
|
+
version: '3.22'
|
55
61
|
description: |-
|
56
62
|
A Ruby implementation of the Patience diff algorithm.
|
57
63
|
|
@@ -92,8 +98,9 @@ files:
|
|
92
98
|
homepage: http://github.com/watt/ruby_patience_diff
|
93
99
|
licenses:
|
94
100
|
- MIT
|
95
|
-
metadata:
|
96
|
-
|
101
|
+
metadata:
|
102
|
+
homepage_uri: http://github.com/watt/ruby_patience_diff
|
103
|
+
post_install_message:
|
97
104
|
rdoc_options:
|
98
105
|
- "--main"
|
99
106
|
- README.md
|
@@ -110,9 +117,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
117
|
- !ruby/object:Gem::Version
|
111
118
|
version: '0'
|
112
119
|
requirements: []
|
113
|
-
|
114
|
-
|
115
|
-
signing_key:
|
120
|
+
rubygems_version: 3.1.2
|
121
|
+
signing_key:
|
116
122
|
specification_version: 4
|
117
123
|
summary: A Ruby implementation of the Patience diff algorithm
|
118
124
|
test_files: []
|