formatted-gem-updates 0.0.3 → 0.0.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 +4 -4
- data/exe/formatted-gem-updates +17 -2
- data/lib/formatted_gem_updates/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ceeb8c807e02a37ee5006fe9dc8ab66c7263ccc3
|
4
|
+
data.tar.gz: 8ec7bbc1e88d99ee4a8c5159823978119a73d62c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3270114a5091289368fa92ea0421214dd305f1b7def970b13ccb962cc89a6244628ed5db45f4fa2500c92063fbb31d7d06eecac4b9d0b12121e330bbd35c649
|
7
|
+
data.tar.gz: 12bce4ac299ddb92c76c9b2eeb4289819f69467228d6c3438cbe715b43725903cc5119ecf087d92660115053438c77c8ebd38302328eb6a9aaf33bf9b185f3cb
|
data/exe/formatted-gem-updates
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'optparse'
|
4
|
+
require 'formatted_gem_updates'
|
4
5
|
|
5
6
|
command_line_options = {}
|
6
7
|
OptionParser.new do |opts|
|
@@ -9,6 +10,11 @@ OptionParser.new do |opts|
|
|
9
10
|
opts.on("--amend", "Amend output to the last commit message") do |a|
|
10
11
|
command_line_options[:amend] = a
|
11
12
|
end
|
13
|
+
|
14
|
+
opts.on("--version", "Print version number") do |q|
|
15
|
+
puts FormattedGemUpdates::VERSION
|
16
|
+
exit
|
17
|
+
end
|
12
18
|
end.parse!
|
13
19
|
|
14
20
|
GIT_ROOT = `git rev-parse --show-toplevel`.strip
|
@@ -20,11 +26,20 @@ current_ref = `git rev-parse --abbrev-ref HEAD`.strip
|
|
20
26
|
|
21
27
|
system("git checkout head^")
|
22
28
|
|
23
|
-
|
29
|
+
def capture_or_fail(cmd)
|
30
|
+
`#{cmd}`.tap do |result|
|
31
|
+
unless $?.success?
|
32
|
+
puts "Tried to run the command '#{cmd}' but failed with this output:\n#{result}"
|
33
|
+
exit 1
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
old_list = capture_or_fail('bundle list')
|
24
39
|
|
25
40
|
system("git checkout #{current_ref}")
|
26
41
|
|
27
|
-
new_list =
|
42
|
+
new_list = capture_or_fail('bundle list')
|
28
43
|
|
29
44
|
def gem_versions(list_output)
|
30
45
|
list_output.split("\n").each_with_object({}) do |line, hsh|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formatted-gem-updates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Travis Grathwell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.
|
97
|
+
rubygems_version: 2.6.8
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: Prints the Gemfile.lock differences between the current git commit and previous
|