git_commands 3.0.4 → 3.0.5

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: 8c5ee655beae7fa80652b9f87b2eadb5f9071490
4
- data.tar.gz: aa39a9867606d3bc95ae6a85c2ade4dd0e33c5b9
3
+ metadata.gz: c525d19105de0f72959b99b1e287d27315d38c53
4
+ data.tar.gz: 9d43e49473f0431e72d74be76c780e829fd42da0
5
5
  SHA512:
6
- metadata.gz: 078b02de2b4afed47f954be07badb0ddf1a337ad063ad3e6c58f8545208b61683225341ee7a9bbaddedd2e76f7e13992dbe0cea23de20bd51fe7018eeef17e63
7
- data.tar.gz: c9ad03c652bad9e7bfeea2c0abfc9b5ba5a74cbdde424a6fb686a5709a5df1ddec1f7624fc0db96f62f81f5107dc80db3879ab898074b8046851a5b25fca4457
6
+ metadata.gz: 531c7c39db27dab500b11196560f826345635fdb98b3d4fde0900daa8742b96b6ff844203a7e374e7b2cce03837d34603f86c24c233fba5ad5f84300630af1eb
7
+ data.tar.gz: e689eff2f19be16612c97b7e2ed6306848942cb698e66dba30c34b944ff94060da0f32b550675b91836cbbec086dfcec2c0433064044bdd8c52bd85c4ce7ad61
@@ -5,8 +5,6 @@ module GitCommands
5
5
  module Prompt
6
6
  VALID_ANSWERS = %w[Y y N n]
7
7
 
8
- class AbortError < StandardError; end
9
-
10
8
  def out
11
9
  @out ||= STDOUT
12
10
  end
@@ -34,7 +32,7 @@ module GitCommands
34
32
  when /y/i
35
33
  yield
36
34
  else
37
- error("Aborted operation!", AbortError)
35
+ abort!("Aborted operation!")
38
36
  end
39
37
  end
40
38
 
@@ -45,6 +43,11 @@ module GitCommands
45
43
  input
46
44
  end
47
45
 
46
+ def abort!(message)
47
+ out.puts message.to_s.red
48
+ exit
49
+ end
50
+
48
51
  def input
49
52
  STDIN.gets.chomp
50
53
  end
@@ -1,3 +1,3 @@
1
1
  module GitCommands
2
- VERSION = "3.0.4"
2
+ VERSION = "3.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_commands
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - costajob