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 +4 -4
- data/lib/git_commands/prompt.rb +6 -3
- data/lib/git_commands/version.rb +1 -1
- 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: c525d19105de0f72959b99b1e287d27315d38c53
|
|
4
|
+
data.tar.gz: 9d43e49473f0431e72d74be76c780e829fd42da0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 531c7c39db27dab500b11196560f826345635fdb98b3d4fde0900daa8742b96b6ff844203a7e374e7b2cce03837d34603f86c24c233fba5ad5f84300630af1eb
|
|
7
|
+
data.tar.gz: e689eff2f19be16612c97b7e2ed6306848942cb698e66dba30c34b944ff94060da0f32b550675b91836cbbec086dfcec2c0433064044bdd8c52bd85c4ce7ad61
|
data/lib/git_commands/prompt.rb
CHANGED
|
@@ -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
|
-
|
|
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
|
data/lib/git_commands/version.rb
CHANGED