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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b2b0d23d20a3af12360883f4e6aca7f9f45b972
4
- data.tar.gz: c233e6521a4425a36275a42b024b988012b8f7cb
3
+ metadata.gz: 8eb409c8e66ea1aa23ecc1da840c22f7579a34fa
4
+ data.tar.gz: 12394ab5028fc849673d877ce5f1da2db1f17cfd
5
5
  SHA512:
6
- metadata.gz: 80b26f10854cae4c64f5975cdb6bb62127f8898ccd86096441ceb1344caed4f16cfbbc3fc7a241ab4fcd5940c61c576fb0c2c040d886234b5da8baa11ff81b0c
7
- data.tar.gz: 1bc67bb8eacb9868c0612e983e7712b135377c55d73f4fb32e7b9b3a5e1962177e29468d91b0aacd8cfa6ff373d686139e8c0e21100f65d889e3233608ebdd5d
6
+ metadata.gz: c4c78e8e07e3429e20d242e908499ad319402dd821411c8a28cea1b03bc373eed346c9bcf6062042aacfba82c431cf136de149f6e3dae9db660d188b714de5bd
7
+ data.tar.gz: e45d7cbda44fd47d27916a709e5d4b71ce0dd7d891ca1ecef5bf1f9b876ac05ec6b07423c8d7a2316d7644e3efc5947481475ad6aab6692405b944e25e320839
data/.gitignore CHANGED
@@ -8,3 +8,5 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  /bundle/
11
+
12
+ *.sw*
@@ -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
@@ -1,3 +1,3 @@
1
1
  module DiffColorize
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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: 2015-10-27 00:00:00.000000000 Z
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