diffy 3.0.6 → 3.0.7
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of diffy might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CONTRIBUTORS +1 -0
- data/README.md +10 -6
- data/lib/diffy/diff.rb +11 -6
- data/lib/diffy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cd5d2b187c4063456f8a018845cfa199d09b345
|
4
|
+
data.tar.gz: 9e83a4e588db04b655db5c64c30e8fda39201b4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b031cbc1697f4334aa62df5eff024c51e89546225f386a38345feac5e73590bb7992862032c7fd99741a0c1e4fb47e7819c06348b72a7efbc70d88ce46172ec5
|
7
|
+
data.tar.gz: e524bece45facd115127d8f1a8814f0b8acc94b77e54caa87931312db00693d8ab55ebff76c00321733d13f04c8635d3d242c11389881f1ff83ad3a3748fe64a
|
data/CONTRIBUTORS
CHANGED
data/README.md
CHANGED
@@ -30,25 +30,29 @@ Installation
|
|
30
30
|
|
31
31
|
###on Windows:
|
32
32
|
|
33
|
-
1.
|
34
|
-
your search path.
|
33
|
+
1. Ensure that you have a working `diff` on your machine and in your search path.
|
35
34
|
|
36
|
-
There are
|
35
|
+
There are several options:
|
37
36
|
|
38
|
-
|
37
|
+
1. Install [Diff::LCS](https://github.com/halostatue/diff-lcs), which includes `ldiff`. [RSpec](https://www.relishapp.com/rspec/docs/gettingstarted)
|
38
|
+
depends on Diff::LCS so you may already have it installed.
|
39
|
+
|
40
|
+
1. If you're using [RubyInstaller](http://rubyinstaller.org), install the [devkit](http://rubyinstaller.org/add-ons/devkit).
|
41
|
+
|
42
|
+
1. Install unxutils <http://sourceforge.net/projects/unxutils>
|
39
43
|
|
40
44
|
note that these tools contain diff 2.7 which has a different handling
|
41
45
|
of whitespace in the diff results. This makes Diffy spec tests
|
42
46
|
yielding one fail on Windows.
|
43
47
|
|
44
|
-
|
48
|
+
1. Install these two individually from the gnuwin32 project
|
45
49
|
<http://gnuwin32.sourceforge.net/>
|
46
50
|
|
47
51
|
note that this delivers diff 2.8 which makes Diffy spec pass
|
48
52
|
even on Windows.
|
49
53
|
|
50
54
|
|
51
|
-
2.
|
55
|
+
2. Install the gem by
|
52
56
|
|
53
57
|
gem install diffy
|
54
58
|
|
data/lib/diffy/diff.rb
CHANGED
@@ -51,7 +51,7 @@ module Diffy
|
|
51
51
|
|
52
52
|
if WINDOWS
|
53
53
|
# don't use open3 on windows
|
54
|
-
cmd = "
|
54
|
+
cmd = sprintf '"%s" %s %s', diff_bin, diff_options.join(' '), paths.map { |s| %("#{s}") }.join(' ')
|
55
55
|
diff = `#{cmd}`
|
56
56
|
else
|
57
57
|
diff = Open3.popen3(diff_bin, *(diff_options + paths)) { |i, o, e| o.read }
|
@@ -142,15 +142,20 @@ module Diffy
|
|
142
142
|
def diff_bin
|
143
143
|
return @@bin if @@bin
|
144
144
|
|
145
|
-
@@bin
|
146
|
-
|
147
|
-
|
145
|
+
if @@bin = ENV['DIFFY_DIFF']
|
146
|
+
# system() trick from Minitest
|
147
|
+
raise "Can't execute diff program '#@@bin'" unless system(@@bin, __FILE__, __FILE__)
|
148
|
+
return @@bin
|
148
149
|
end
|
149
|
-
@@bin = `which diff`.chomp if @@bin.empty?
|
150
150
|
|
151
|
-
|
151
|
+
diffs = ['diff', 'ldiff']
|
152
|
+
diffs.first << '.exe' if WINDOWS # ldiff does not have exe extension
|
153
|
+
@@bin = diffs.find { |name| system(name, __FILE__, __FILE__) }
|
154
|
+
|
155
|
+
if @@bin.nil?
|
152
156
|
raise "Can't find a diff executable in PATH #{ENV['PATH']}"
|
153
157
|
end
|
158
|
+
|
154
159
|
@@bin
|
155
160
|
end
|
156
161
|
|
data/lib/diffy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diffy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Goldstein
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|