unified 1.0.0 → 1.0.1

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.
@@ -64,10 +64,12 @@ module Unified
64
64
  elsif line.deletion?
65
65
  yield line, original_line_number, nil
66
66
  original_line_number += 1
67
- else
67
+ elsif line.unchanged?
68
68
  yield line, original_line_number, modified_line_number
69
69
  original_line_number += 1
70
70
  modified_line_number += 1
71
+ else
72
+ yield line
71
73
  end
72
74
  end
73
75
  end
@@ -1,3 +1,3 @@
1
1
  module Unified
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -96,6 +96,18 @@ describe "Unified::Chunk" do
96
96
  index += 1
97
97
  end
98
98
  end
99
+
100
+ it "does not pass line numbers for the no newline warning", focus: true do
101
+ no_newline_chunk = Unified::Chunk.new original: 1, modified: 1, lines: [" Line 1", "\"]
102
+ index = 0
103
+ no_newline_chunk.each_line do |line, original_line_number, modified_line_number|
104
+ if index == 1
105
+ original_line_number.should be_nil
106
+ modified_line_number.should be_nil
107
+ end
108
+ index += 1
109
+ end
110
+ end
99
111
  end
100
112
 
101
113
  describe "#==" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unified
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-23 00:00:00.000000000 Z
12
+ date: 2013-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler