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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 926beeabce14fc2e5d5faa98b5ce2254d41fc9c4
4
- data.tar.gz: 3d6f3d718606ab9d2a264b6e2d32285f164fd047
3
+ metadata.gz: eb3152afec5714e6d4d53141e64f7b38ff4d5d56
4
+ data.tar.gz: b62571f6f39522143e47dcd050a6d14ab58b8a24
5
5
  SHA512:
6
- metadata.gz: e2b63ca155a9eaa8360a2f17cb259aaf208ac1c7e84c36b1c7451a9bd0ebdbca4b110e12d286f7584018e011a6eed36eee520a2f5a44419300d0ba336acd8cb0
7
- data.tar.gz: 6692ef85960a14e3e21e336760eb085991aa1bd480544146ec18241b3e2919807160f0e0e74cb60bda6c7f8bbab3de4b571379de79b80b8cff0759a5d8d84400
6
+ metadata.gz: 263e73f0eca76d22efa7e31642a04a5c1ace9141d19b5a0a82e5f8f99ca0e5ae9765c277533d45562fd0d60115133440d2df16c218e732e3d858a9b10fe8fbf4
7
+ data.tar.gz: 56b3365be58e311517718a44bbf56561b61c1e82fb5538c55e667810e035c8a2004250dc98be655e4b13d6479d44c266cdc65cabee6af53979db89fddcd712c3
@@ -1,8 +1,19 @@
1
1
  language: ruby
2
+ sudo: false
2
3
  rvm:
3
4
  - 1.8.7
4
- - 1.9.2
5
- - 1.9.3
6
- - 2.0.0
7
- - 2.1.0
8
- - 2.1.1
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
@@ -10,3 +10,4 @@
10
10
  * Bryan Ricker
11
11
  * JasonBarnabe
12
12
  * Skye Shaw
13
+ * Abinoam P. Marques Jr.
data/Gemfile CHANGED
@@ -4,7 +4,4 @@ platforms :rbx do
4
4
  gem 'rubysl', '~> 2.0'
5
5
  end
6
6
 
7
-
8
- group :test, :development do
9
- gemspec
10
- end
7
+ gemspec
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
- Unlinke `Diffy::Diff`, `Diffy::SplitDiff` does not use `#to_s` to output
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; `#left` and `#right`. Using the earlier example, this is what they
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
@@ -3,6 +3,8 @@ require 'rspec/core/rake_task'
3
3
  task :default => :spec
4
4
 
5
5
  desc "Run all specs in spec directory"
6
+
6
7
  RSpec::Core::RakeTask.new(:spec) do |t|
7
8
  t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
9
+ t.ruby_opts = "-w"
8
10
  end
@@ -19,5 +19,5 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_development_dependency "rake"
22
- spec.add_development_dependency "rspec", '~> 2.14'
23
- end
22
+ spec.add_development_dependency "rspec"
23
+ end
@@ -12,7 +12,7 @@ module Diffy
12
12
  class << self
13
13
  attr_writer :default_format
14
14
  def default_format
15
- @default_format || :text
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, :diff
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
- Array(@tempfiles).each do |t|
71
- begin
72
- # check that the path is not nil and file still exists.
73
- # REE seems to be very agressive with when it magically removes
74
- # tempfiles
75
- t.unlink if t.path && File.exist?(t.path)
76
- rescue => e
77
- warn "#{e.class}: #{e}"
78
- warn e.backtrace.join("\n")
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
@@ -1,3 +1,3 @@
1
1
  module Diffy
2
- VERSION = '3.1.0'
2
+ VERSION = '3.2.0'
3
3
  end
@@ -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
- d = ::Diffy::Diff.new("a", "b").to_s
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.1.0
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: 2015-12-17 00:00:00.000000000 Z
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: '2.14'
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: '2.14'
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.4.5.1
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