diffy 3.1.0 → 3.2.0
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/.travis.yml +16 -5
- data/CONTRIBUTORS +1 -0
- data/Gemfile +1 -4
- data/README.md +2 -12
- data/Rakefile +2 -0
- data/diffy.gemspec +2 -2
- data/lib/diffy/diff.rb +13 -11
- data/lib/diffy/version.rb +1 -1
- data/spec/diffy_spec.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb3152afec5714e6d4d53141e64f7b38ff4d5d56
|
4
|
+
data.tar.gz: b62571f6f39522143e47dcd050a6d14ab58b8a24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 263e73f0eca76d22efa7e31642a04a5c1ace9141d19b5a0a82e5f8f99ca0e5ae9765c277533d45562fd0d60115133440d2df16c218e732e3d858a9b10fe8fbf4
|
7
|
+
data.tar.gz: 56b3365be58e311517718a44bbf56561b61c1e82fb5538c55e667810e035c8a2004250dc98be655e4b13d6479d44c266cdc65cabee6af53979db89fddcd712c3
|
data/.travis.yml
CHANGED
@@ -1,8 +1,19 @@
|
|
1
1
|
language: ruby
|
2
|
+
sudo: false
|
2
3
|
rvm:
|
3
4
|
- 1.8.7
|
4
|
-
- 1.9.
|
5
|
-
-
|
6
|
-
- 2.
|
7
|
-
- 2.
|
8
|
-
- 2.
|
5
|
+
- 1.9.3-p551
|
6
|
+
- 2.0.0-p648
|
7
|
+
- 2.1.9
|
8
|
+
- 2.2.6
|
9
|
+
- 2.3.3
|
10
|
+
- 2.4.0
|
11
|
+
- jruby-9.1.5.0
|
12
|
+
- rbx
|
13
|
+
- rbx-2
|
14
|
+
matrix:
|
15
|
+
allow_failures:
|
16
|
+
- rvm: 1.8.7
|
17
|
+
- rvm: jruby-9.1.5.0
|
18
|
+
- rvm: rbx
|
19
|
+
- rvm: rbx-2
|
data/CONTRIBUTORS
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -149,9 +149,9 @@ all default options such as full diff output are supported. The output format
|
|
149
149
|
may be changed by passing the format with the options hash (see below), and all
|
150
150
|
default formats are supported.
|
151
151
|
|
152
|
-
|
152
|
+
Unlike `Diffy::Diff`, `Diffy::SplitDiff` does not use `#to_s` to output
|
153
153
|
the resulting diff. Instead, two self-explanatory methods are used to output
|
154
|
-
the diff
|
154
|
+
the diff: `#left` and `#right`. Using the earlier example, this is what they
|
155
155
|
look like in action:
|
156
156
|
|
157
157
|
```
|
@@ -315,16 +315,6 @@ deletions, and unchanged in a diff.
|
|
315
315
|
Use `#map`, `#inject`, or any of Enumerable's methods. Go crazy.
|
316
316
|
|
317
317
|
|
318
|
-
Ruby Version Compatibility
|
319
|
-
-------------------------
|
320
|
-
|
321
|
-
Support for Ruby 1.8.6 was dropped beginning at version 2.0 in order to support
|
322
|
-
the chainable enumerators available in 1.8.7 and 1.9.
|
323
|
-
|
324
|
-
If you want to use Diffy and Ruby 1.8.6 then:
|
325
|
-
|
326
|
-
$ gem install diffy -v1.1.0
|
327
|
-
|
328
318
|
Testing
|
329
319
|
------------
|
330
320
|
|
data/Rakefile
CHANGED
data/diffy.gemspec
CHANGED
data/lib/diffy/diff.rb
CHANGED
@@ -12,7 +12,7 @@ module Diffy
|
|
12
12
|
class << self
|
13
13
|
attr_writer :default_format
|
14
14
|
def default_format
|
15
|
-
@default_format
|
15
|
+
@default_format ||= :text
|
16
16
|
end
|
17
17
|
|
18
18
|
# default options passed to new Diff objects
|
@@ -23,7 +23,7 @@ module Diffy
|
|
23
23
|
|
24
24
|
end
|
25
25
|
include Enumerable
|
26
|
-
attr_reader :string1, :string2, :options
|
26
|
+
attr_reader :string1, :string2, :options
|
27
27
|
|
28
28
|
# supported options
|
29
29
|
# +:diff+:: A cli options string passed to diff
|
@@ -67,15 +67,17 @@ module Diffy
|
|
67
67
|
end
|
68
68
|
ensure
|
69
69
|
# unlink the tempfiles explicitly now that the diff is generated
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
70
|
+
if defined? @tempfiles # to avoid Ruby warnings about undefined ins var.
|
71
|
+
Array(@tempfiles).each do |t|
|
72
|
+
begin
|
73
|
+
# check that the path is not nil and file still exists.
|
74
|
+
# REE seems to be very agressive with when it magically removes
|
75
|
+
# tempfiles
|
76
|
+
t.unlink if t.path && File.exist?(t.path)
|
77
|
+
rescue => e
|
78
|
+
warn "#{e.class}: #{e}"
|
79
|
+
warn e.backtrace.join("\n")
|
80
|
+
end
|
79
81
|
end
|
80
82
|
end
|
81
83
|
end
|
data/lib/diffy/version.rb
CHANGED
data/spec/diffy_spec.rb
CHANGED
@@ -115,7 +115,7 @@ describe Diffy::Diff do
|
|
115
115
|
describe "handling temp files" do
|
116
116
|
it "should unlink tempfiles after generating the diff" do
|
117
117
|
before_tmpfiles = Dir.entries(Dir.tmpdir)
|
118
|
-
|
118
|
+
::Diffy::Diff.new("a", "b").to_s
|
119
119
|
after_tmpfiles = Dir.entries(Dir.tmpdir)
|
120
120
|
expect(before_tmpfiles).to match_array(after_tmpfiles)
|
121
121
|
end
|
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.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Goldstein
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
description: Convenient diffing in ruby
|
42
42
|
email:
|
43
43
|
- sgrock@gmail.org
|
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
84
|
version: '0'
|
85
85
|
requirements: []
|
86
86
|
rubyforge_project:
|
87
|
-
rubygems_version: 2.
|
87
|
+
rubygems_version: 2.5.1
|
88
88
|
signing_key:
|
89
89
|
specification_version: 4
|
90
90
|
summary: A convenient way to diff string in ruby
|