gitgud 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/gitgud +9 -4
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 109ebe21ee938f51c85b52d74a0fc44417a76ba7ad6bc557af5ad8e1395a3300
4
- data.tar.gz: bcd248280d58900dc2d8c9eaecdc4c52c9d7ffe7315e549a38eac685012762ed
3
+ metadata.gz: b99cc40014a600ab6df0e35f145d400926b1f7fb2f4e5273e019c070809e17e4
4
+ data.tar.gz: 06a46407434555fef7d32bf1596e3fd023c1d5f0a63e9672075af171745526a8
5
5
  SHA512:
6
- metadata.gz: 84dfbd403a1b6dd9877f688afd8681e8c4ef48e30e3374b94b221ec8bd20a6bb06d7567877673c4988da0051ab125d3f336b733bfac9f4f27acf7b1ff78abd8e
7
- data.tar.gz: 715907ac22ababcc6ee1053e8b8bb599b19a53098b7fefdb12376cbaeaf0aa81e7b1bc272e99ad67fbe5491b6e13f67c45dbb9847332c00100b3dde9dd7117b1
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 !output.match?(/remote: Internal Server Error\sEverything up-to-date/)
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 attemps")
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.2
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: 2020-02-27 00:00:00.000000000 Z
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.2
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