gitgud 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/gitgud +9 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b99cc40014a600ab6df0e35f145d400926b1f7fb2f4e5273e019c070809e17e4
|
4
|
+
data.tar.gz: 06a46407434555fef7d32bf1596e3fd023c1d5f0a63e9672075af171745526a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6efa79aa1cccf52a9c29c212e3f9292d8648cad1a584742439fe946416ea3bcabba5327d1350ebc6f1ec4d2e1e58c5585ce70a03b160e79a7d964d52b86c978
|
7
|
+
data.tar.gz: d73d2aed32f3f133303baee0e7ae11cefcaa8feb2d7e8bb6889f5dac8fb77a1c4f8ea70c5ffc0a0eac8811e0ab610e50758f9ea498733d5535ecc8f834f53f38
|
data/bin/gitgud
CHANGED
@@ -3,23 +3,25 @@
|
|
3
3
|
require 'cli/ui'
|
4
4
|
require 'open3'
|
5
5
|
|
6
|
+
$output = nil
|
7
|
+
|
6
8
|
def try_to_push_this_thing(spinner)
|
7
9
|
counter = 1
|
8
10
|
while counter <= 20
|
9
11
|
spinner.update_title(spinner_title(counter))
|
10
12
|
counter += 1
|
11
13
|
|
12
|
-
output, status = Open3.capture2e('git', 'push', *ARGV)
|
14
|
+
$output, status = Open3.capture2e('git', 'push', *ARGV)
|
13
15
|
|
14
16
|
if status.success?
|
15
17
|
return spinner.update_title("Successfully git pushed")
|
16
|
-
elsif
|
17
|
-
spinner.update_title("Encountered error while git pushing\n#{output}")
|
18
|
+
elsif !$output.match?(/remote: Internal Server Error\sEverything up-to-date/)
|
19
|
+
spinner.update_title("Encountered error while git pushing\n#{$output}")
|
18
20
|
return :task_failed
|
19
21
|
end
|
20
22
|
end
|
21
23
|
|
22
|
-
spinner.update_title("Unsuccessful after 20
|
24
|
+
spinner.update_title("Unsuccessful after 20 attempts")
|
23
25
|
:task_failed
|
24
26
|
end
|
25
27
|
|
@@ -45,7 +47,10 @@ end
|
|
45
47
|
def run_da_whole_show
|
46
48
|
if ARGV[0] == 'push'
|
47
49
|
ARGV.shift
|
50
|
+
CLI::UI::Frame.open('Gittin gud')
|
48
51
|
plz_push_my_thing_on_git_thx_k_bye
|
52
|
+
CLI::UI::Printer.puts($output) unless $output.nil?
|
53
|
+
CLI::UI::Frame.close('')
|
49
54
|
else
|
50
55
|
default_to_using_the_plain_git
|
51
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitgud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Leger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cli-ui
|
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '0'
|
58
58
|
requirements: []
|
59
|
-
rubygems_version: 3.1
|
59
|
+
rubygems_version: 3.0.3.1
|
60
60
|
signing_key:
|
61
61
|
specification_version: 4
|
62
62
|
summary: When things go wrong, you need to gitgud
|