formatted-gem-updates 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b453894dea22f4bea8480faea54bc21f886a27c7
4
- data.tar.gz: 881a8aa5ca4a8ddeaefa4df68d3d4b444d7f13ea
3
+ metadata.gz: ceeb8c807e02a37ee5006fe9dc8ab66c7263ccc3
4
+ data.tar.gz: 8ec7bbc1e88d99ee4a8c5159823978119a73d62c
5
5
  SHA512:
6
- metadata.gz: 042ca49b87dce23eb6cce99e057269fc4a806918a54a620185ba8e15c0b826c7d0474bd9e26ec8d7a0a95b16b1c9e281617790349ce3de1b442c4f06aa04f6b3
7
- data.tar.gz: 190fa53b2ea2546c0a2da69d82fbacb6c97636fb3f9bf2f60f7bae923ea21d3e6ea537c181464559e2a6da503e5365b33fdb67904627a0231632f1855c62be57
6
+ metadata.gz: d3270114a5091289368fa92ea0421214dd305f1b7def970b13ccb962cc89a6244628ed5db45f4fa2500c92063fbb31d7d06eecac4b9d0b12121e330bbd35c649
7
+ data.tar.gz: 12bce4ac299ddb92c76c9b2eeb4289819f69467228d6c3438cbe715b43725903cc5119ecf087d92660115053438c77c8ebd38302328eb6a9aaf33bf9b185f3cb
@@ -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
- old_list = `bundle list`
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 = `bundle 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|
@@ -1,3 +1,3 @@
1
1
  module FormattedGemUpdates
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
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.3
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: 2016-08-25 00:00:00.000000000 Z
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.4.5
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