di 0.1.7 → 0.1.8

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.
Files changed (4) hide show
  1. data/HISTORY +8 -0
  2. data/bin/di +3 -3
  3. data/di.gemspec +1 -1
  4. metadata +2 -2
data/HISTORY CHANGED
@@ -1,3 +1,11 @@
1
+ == 0.1.8 2010-03-11
2
+
3
+ * Fix unified diff parser.
4
+
5
+ == 0.1.7 2010-03-11
6
+
7
+ * Determine *_OPTIONS environment variable name by the executable file name.
8
+
1
9
  == 0.1.6 2010-03-11
2
10
 
3
11
  * Fix colorization of the last hunk.
data/bin/di CHANGED
@@ -28,7 +28,7 @@
28
28
  # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29
29
  # SUCH DAMAGE.
30
30
 
31
- MYVERSION = "0.1.7"
31
+ MYVERSION = "0.1.8"
32
32
  MYNAME = File.basename($0)
33
33
  MYCOPYRIGHT = "Copyright (c) 2008, 2009, 2010 Akinori MUSHA"
34
34
 
@@ -693,9 +693,9 @@ def colorize_unified_diff(io)
693
693
  color = colors[:file1]
694
694
  when /^-{3} /
695
695
  color = colors[:file2]
696
- when /^@@ -[0-9]+,([0-9]+) \+[0-9]+,([0-9]+)/
696
+ when /^@@ -[0-9]+(,([0-9]+))? \+[0-9]+(,([0-9]+))?/
697
697
  state = :hunk
698
- hunk_left = $1.to_i + $2.to_i
698
+ hunk_left = ($1 ? $2.to_i : 1) + ($3 ? $4.to_i : 1)
699
699
  line.sub!(/^(@@ .*? @@)( )?/) {
700
700
  $1 + ($2 ? colors[:off] + $2 + colors[:function] : '')
701
701
  }
data/di.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{di}
8
- s.version = "0.1.7"
8
+ s.version = "0.1.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Akinori MUSHA"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 7
9
- version: 0.1.7
8
+ - 8
9
+ version: 0.1.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Akinori MUSHA