diff_colorize 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/lib/diff_colorize/result.rb +2 -1
- data/lib/diff_colorize/version.rb +1 -1
- metadata +2 -3
- data/lib/diff_colorize/.result.rb.swp +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8eb409c8e66ea1aa23ecc1da840c22f7579a34fa
|
4
|
+
data.tar.gz: 12394ab5028fc849673d877ce5f1da2db1f17cfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4c78e8e07e3429e20d242e908499ad319402dd821411c8a28cea1b03bc373eed346c9bcf6062042aacfba82c431cf136de149f6e3dae9db660d188b714de5bd
|
7
|
+
data.tar.gz: e45d7cbda44fd47d27916a709e5d4b71ce0dd7d891ca1ecef5bf1f9b876ac05ec6b07423c8d7a2316d7644e3efc5947481475ad6aab6692405b944e25e320839
|
data/lib/diff_colorize/result.rb
CHANGED
@@ -32,7 +32,7 @@ module DiffColorize
|
|
32
32
|
|
33
33
|
def superimpose
|
34
34
|
cursor = { t1: 0, t2: 0 }
|
35
|
-
diff.inject('') do |c_text, d|
|
35
|
+
text = diff.inject('') do |c_text, d|
|
36
36
|
case d.action
|
37
37
|
when '-'
|
38
38
|
s = t1[cursor[:t1]..d.position-1]
|
@@ -47,6 +47,7 @@ module DiffColorize
|
|
47
47
|
cursor[:t2] += s.length
|
48
48
|
c_text << s + c_s
|
49
49
|
end
|
50
|
+
text << t1[cursor[:t1]..-1]
|
50
51
|
end
|
51
52
|
|
52
53
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diff_colorize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keisuke Ishizawa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -85,7 +85,6 @@ files:
|
|
85
85
|
- bin/setup
|
86
86
|
- diff_colorize.gemspec
|
87
87
|
- lib/diff_colorize.rb
|
88
|
-
- lib/diff_colorize/.result.rb.swp
|
89
88
|
- lib/diff_colorize/result.rb
|
90
89
|
- lib/diff_colorize/version.rb
|
91
90
|
homepage: https://github.com/kei-p/diff_colorize
|
Binary file
|