gh-diff 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gh-diff/cli.rb +4 -3
- data/lib/gh-diff/version.rb +1 -1
- data/spec/cli_spec.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f0ca5acb8cb4b38f633229ea7a43fa0b803ab7a
|
4
|
+
data.tar.gz: 6975c4a9e86f67f8b147998b7b8c2b2fb1a16b17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bac507888d8dcbd305173ac5593328813d22725cf622bf5494f79f4fa86c6e690a56b66bea056a2077d19150e0905d5ed38615453325294db2f808f53037be9
|
7
|
+
data.tar.gz: ec3fc3cfb2d0d7bd1aafdb83a2afc8f5fc1e392f41279bc98254fbe58610aa7ec9b1b37d857075815f16b3745877ad247805d79464bfd1b44e7abe51f2af3b13
|
data/lib/gh-diff/cli.rb
CHANGED
@@ -30,9 +30,10 @@ module GhDiff
|
|
30
30
|
github_auth(opts[:username], opts[:password], opts[:token])
|
31
31
|
|
32
32
|
gh = Diff.new(opts[:repo], revision:opts[:revision], dir:opts[:dir])
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
if opts[:ref]
|
34
|
+
ref = gh.ref(opts[:revision], repo:opts[:repo])
|
35
|
+
print "Base revision: #{ref[:object][:sha]}[#{ref[:ref]}]\n"
|
36
|
+
end
|
36
37
|
print gh.get(file)
|
37
38
|
rescue ::Octokit::NotFound
|
38
39
|
path = (dir=opts[:dir]) ? "#{dir}/#{file}" : file
|
data/lib/gh-diff/version.rb
CHANGED
data/spec/cli_spec.rb
CHANGED