riffdiff 0.9.0 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -3
  3. data/Rakefile +4 -0
  4. data/bin/riff +3 -5
  5. data/riffdiff.gemspec +14 -0
  6. metadata +15 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d5898446e7539cc53b995c89422d06926fe837ed
4
- data.tar.gz: 9d0f0b66dccb850b5eb801daa9cf10275081673a
3
+ metadata.gz: b9ddae70c3af0970d9c5b3c565bb8d8ea8438962
4
+ data.tar.gz: 15ed526f4573b63794ceceec6d94fbce79f4c971
5
5
  SHA512:
6
- metadata.gz: 638ec5d15529d20ba6e65962a892fcb386b3c6cfd3c8e7c141678bc3743e7da317d071d1fff77422238990251d264922e3641e52597c400b23a024f389564c53
7
- data.tar.gz: 2a078dbacd85fd198ac49ca8e122e626db3e8aac662b6a5bc6da6070dbbcdc36a2e0870737e82b517ed182fe781e943c6c9b12990ca8e09e9beef1b0a0d7ccec
6
+ metadata.gz: 2ad9b90e9824e7ed832074daa8be8da18f4f1650e5926700dab79d6cebd72c5a7c1ba47b1d56296c5b7955c22c114959ff8d9301d0618c6342955c06adda52d1
7
+ data.tar.gz: a5cc88d323d5c8b4b324b39e0d95ee53f930e3a16d5bc248827a4295ceb8b777245d2fa1c2b27565b09f6fb883788beba78828034111c66648c17ec273e835a5
data/README.md CHANGED
@@ -12,10 +12,17 @@ Or if you do...
12
12
 
13
13
  ... then all future 'git diff's and 'git show's will be refined.
14
14
 
15
- # TODO before first release
16
- * Release version 0.0.0
15
+ # Installation
16
+ gem install riffdiff
17
17
 
18
- # TODO post first release
18
+ Optionally followed by...
19
+
20
+ git config --global pager.diff riff
21
+ git config --global pager.show riff
22
+
23
+ ... to make git show refined diffs by default.
24
+
25
+ # TODO
19
26
  * Think about how to visualize one line changing to itself with a
20
27
  comma at the end plus a bunch of entirely new lines. Think of a
21
28
  constant array getting one or more extra members.
@@ -98,3 +105,6 @@ properly
98
105
  * Test that we work as expected when "gem install"ed system-wide
99
106
  * Create a Rakefile that can install dependencies, build, run tests, package and
100
107
  optionally deploy as well.
108
+ * Make a first public release
109
+ * Running from a git clone should work even if Riff is installed
110
+ globally on the system.
data/Rakefile CHANGED
@@ -9,6 +9,10 @@ end
9
9
 
10
10
  desc 'Create a .gem package'
11
11
  task package: [:spec] do
12
+ git_description = `git describe --dirty`.chomp
13
+ fail 'Cannot package when there are uncommitted sources' if
14
+ git_description.end_with? 'dirty'
15
+
12
16
  system('rm -f *.gem ; gem build riffdiff.gemspec') || fail
13
17
  end
14
18
 
data/bin/riff CHANGED
@@ -1,13 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  begin
4
- # Inspired by http://timelessrepo.com/making-ruby-gems
5
- begin
6
- require 'riff'
7
- rescue LoadError
4
+ dev_mode = File.directory? File.join(__dir__, '..', '.git')
5
+ if dev_mode
8
6
  $LOAD_PATH.unshift File.join(__dir__, '..', 'lib')
9
- require 'riff'
10
7
  end
8
+ require 'riff'
11
9
 
12
10
  require 'options'
13
11
  include Options
data/riffdiff.gemspec CHANGED
@@ -7,6 +7,20 @@ Gem::Specification.new do |s|
7
7
  s.name = 'riffdiff'
8
8
  s.version = semantify_git_version(git_version)
9
9
  s.summary = 'A diff highlighter showing what parts of lines have changed'
10
+ s.description = %{==
11
+ Riff is a wrapper around diff that highlights not only which lines have changed,
12
+ but also which parts of the lines that have changed.
13
+
14
+ = Usage
15
+
16
+ git diff | riff
17
+
18
+ Or if you do...
19
+ git config --global pager.diff riff
20
+ git config --global pager.show riff
21
+ ... then all future <code>git diff</code>s and <code>git show</code>s will be
22
+ refined.
23
+ }
10
24
  s.authors = ['Johan Walles']
11
25
  s.email = 'johan.walles@gmail.com'
12
26
  s.homepage = 'http://github.com/walles/riff'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riffdiff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johan Walles
@@ -10,7 +10,20 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2015-05-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description:
13
+ description: |
14
+ ==
15
+ Riff is a wrapper around diff that highlights not only which lines have changed,
16
+ but also which parts of the lines that have changed.
17
+
18
+ = Usage
19
+
20
+ git diff | riff
21
+
22
+ Or if you do...
23
+ git config --global pager.diff riff
24
+ git config --global pager.show riff
25
+ ... then all future <code>git diff</code>s and <code>git show</code>s will be
26
+ refined.
14
27
  email: johan.walles@gmail.com
15
28
  executables:
16
29
  - riff