diff_highlight 0.1.3 → 0.1.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a34d0d92d9fd3d91f2b2703d48e2d3c993a2d27
4
- data.tar.gz: 00d8333a03718d2de28f457ed8ef12f1219dcc18
3
+ metadata.gz: db6df0fff558816706af0e3a49d6763447c848ed
4
+ data.tar.gz: 6052f9eb75c476d36366331753aaae5176a071a3
5
5
  SHA512:
6
- metadata.gz: 9e47445244e80547a0cb48dc5749ad3b3c86cf482d36bfd33e89ff787e58b80533abb38d9820b8df4ca407c7c4beb7c80aa3025bdd1a5161e6ab213178f8d29b
7
- data.tar.gz: fdfaf0203943180a0258b824dd1973c29349b0c5340edaddb03d8daa94995cf681f81497d286e5b86bbe067a7de09d6ed1ebc0d67b271cf086382fca7c2282b4
6
+ metadata.gz: 45565de6a86e5815aff29c717de19ed7388f39250f75fd6c61659563792816a9f3bc44466e8b9df45caa374cad7417f93b4750181d04493f3c9fabe213834068
7
+ data.tar.gz: 8246ac5c8b492bd6f73457a35faada30aa023a4a86e26841f845cee8264657d2a73ff7a511082d7f5e0e6095b0a22325dee2cb595b714429a095fde737d5053c
data/README.md CHANGED
@@ -38,7 +38,7 @@ In `~/.gitconfig`:
38
38
  And use like so:
39
39
 
40
40
  ```
41
- git diffc HEAD^2
41
+ git diffc HEAD~2
42
42
  ```
43
43
 
44
44
  ## License
@@ -79,8 +79,10 @@ class DiffHighlight
79
79
  def write_other_line(line)
80
80
  if line =~ /^-[^-]/
81
81
  write(red(line))
82
+ elsif line =~ /^(commit|Author|Date)/
83
+ write(bold(line))
82
84
  else
83
- write(line)
85
+ write(normal(line))
84
86
  end
85
87
  end
86
88
 
@@ -95,4 +97,12 @@ class DiffHighlight
95
97
  def green(str)
96
98
  "\e[32m#{str}\e[0m"
97
99
  end
100
+
101
+ def bold(str)
102
+ "\e[1m#{str}\e[22m"
103
+ end
104
+
105
+ def normal(str)
106
+ "\e[0m#{str}"
107
+ end
98
108
  end
@@ -1,3 +1,3 @@
1
1
  class DiffHighlight
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diff_highlight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mair