hu 1.3.22 → 1.3.23
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/.rubocop.yml +6 -0
- data/.rubocop_todo.yml +17 -12
- data/lib/hu/cli.rb +1 -6
- data/lib/hu/collab.rb +4 -1
- data/lib/hu/deploy.rb +14 -36
- data/lib/hu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32585e3867e76c97598713a8177c01bf4a213949
|
4
|
+
data.tar.gz: 3ab2ba38631a63a91532a17ab34d770a5fdbce8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6eaf746681ae17552108281ba3a9a6f54e1ed112b0f2b8dd97d18a240bcb6fd9f962fbeaa2e6b76d1b541a2cc309fdb976d0681f079e8829cf88d7501f1c557
|
7
|
+
data.tar.gz: b5254ee661dba218a165c461d9cc664e8f6847e4d3ae60981005017558eedaf5eb1067e4871706d4d016c8feb9efc56a7fd8e4e76fcef9ffefc010f737076426
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -4,20 +4,11 @@ Lint/HandleExceptions:
|
|
4
4
|
- 'lib/hu/common.rb'
|
5
5
|
- 'lib/hu/telemetry.rb'
|
6
6
|
|
7
|
-
# Offense count: 14
|
8
|
-
Metrics/AbcSize:
|
9
|
-
Max: 298
|
10
|
-
|
11
|
-
# Offense count: 2
|
12
|
-
# Configuration parameters: CountComments.
|
13
|
-
Metrics/ClassLength:
|
14
|
-
Max: 698
|
15
|
-
|
16
7
|
# Offense count: 6
|
17
8
|
Metrics/CyclomaticComplexity:
|
18
9
|
Max: 45
|
19
10
|
|
20
|
-
# Offense count:
|
11
|
+
# Offense count: 15
|
21
12
|
# Configuration parameters: CountComments.
|
22
13
|
Metrics/MethodLength:
|
23
14
|
Max: 254
|
@@ -42,13 +33,27 @@ Style/Documentation:
|
|
42
33
|
- 'lib/hu/deploy.rb'
|
43
34
|
- 'lib/hu/telemetry.rb'
|
44
35
|
|
36
|
+
# Offense count: 1
|
37
|
+
# Cop supports --auto-correct.
|
38
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
39
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
40
|
+
Style/EmptyLinesAroundClassBody:
|
41
|
+
Exclude:
|
42
|
+
- 'lib/hu/deploy.rb'
|
43
|
+
|
45
44
|
# Offense count: 3
|
46
45
|
# Configuration parameters: AllowedVariables.
|
47
46
|
Style/GlobalVars:
|
48
47
|
Exclude:
|
49
|
-
- 'lib/hu/cli.rb'
|
50
48
|
- 'lib/hu/collab.rb'
|
51
49
|
|
50
|
+
# Offense count: 1
|
51
|
+
# Cop supports --auto-correct.
|
52
|
+
# Configuration parameters: MaxLineLength.
|
53
|
+
Style/IfUnlessModifier:
|
54
|
+
Exclude:
|
55
|
+
- 'lib/hu/deploy.rb'
|
56
|
+
|
52
57
|
# Offense count: 1
|
53
58
|
# Cop supports --auto-correct.
|
54
59
|
# Configuration parameters: AllowAsExpressionSeparator.
|
@@ -56,7 +61,7 @@ Style/Semicolon:
|
|
56
61
|
Exclude:
|
57
62
|
- 'lib/hu/deploy.rb'
|
58
63
|
|
59
|
-
# Offense count:
|
64
|
+
# Offense count: 3
|
60
65
|
# Cop supports --auto-correct.
|
61
66
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
62
67
|
# SupportedStyles: use_perl_names, use_english_names
|
data/lib/hu/cli.rb
CHANGED
@@ -13,16 +13,11 @@ require 'hu/deploy'
|
|
13
13
|
module Hu
|
14
14
|
class Cli < Optix::Cli
|
15
15
|
Optix.command do
|
16
|
-
text "Hu v#{Hu::VERSION} - Heroku Utility"
|
17
|
-
opt :quiet, 'Quiet mode (no progress output)', default: false
|
16
|
+
text "Hu v#{Hu::VERSION} - Heroku Utility - https://github.com/busyloop/hu"
|
18
17
|
opt :version, 'Print version and exit', short: :none
|
19
18
|
trigger :version do
|
20
19
|
puts "Hu v#{Hu::VERSION}"
|
21
20
|
end
|
22
|
-
filter do |_cmd, opts, _argv|
|
23
|
-
$quiet = opts[:quiet]
|
24
|
-
$quiet = true unless STDOUT.isatty
|
25
|
-
end
|
26
21
|
end
|
27
22
|
end
|
28
23
|
end
|
data/lib/hu/collab.rb
CHANGED
@@ -34,11 +34,14 @@ module Hu
|
|
34
34
|
text ''
|
35
35
|
text "\e[1mWARNING: Environment variable 'HEROKU_API_KEY' must be set.\e[0m"
|
36
36
|
end
|
37
|
-
|
37
|
+
opt :quiet, 'Quiet mode (no progress bar)', default: false
|
38
|
+
filter do |_cmd, opts, _argv|
|
38
39
|
if Hu::API_TOKEN.nil?
|
39
40
|
STDERR.puts "\e[0;31;1mERROR: Environment variable 'HEROKU_API_KEY' must be set.\e[0m"
|
40
41
|
exit 1
|
41
42
|
end
|
43
|
+
$quiet = opts[:quiet]
|
44
|
+
$quiet = true unless STDOUT.isatty
|
42
45
|
end
|
43
46
|
def collab; end
|
44
47
|
|
data/lib/hu/deploy.rb
CHANGED
@@ -45,13 +45,14 @@ module Hu
|
|
45
45
|
|
46
46
|
def deploy(_cmd, _opts, _argv)
|
47
47
|
Hu::Tm.t(:invoke, cmd: 'deploy')
|
48
|
-
trap('INT') { shutdown;
|
48
|
+
trap('INT') { shutdown; puts "\e[0m\e[35;1m^C\e[0m"; exit 1 }
|
49
49
|
at_exit do
|
50
|
-
|
51
|
-
|
52
|
-
puts
|
53
|
-
safe_abort
|
50
|
+
if $!.class == SystemExit && 130 == $!.status
|
51
|
+
puts "\n\n"
|
54
52
|
end
|
53
|
+
Hu::Tm.flush!
|
54
|
+
shutdown
|
55
|
+
print "\e[0m\e[?25h"
|
55
56
|
end
|
56
57
|
|
57
58
|
begin
|
@@ -61,7 +62,6 @@ module Hu
|
|
61
62
|
puts "Git error: #{e}".color(:red)
|
62
63
|
puts 'You need to be inside the working copy of the app that you wish to deploy.'.color(:red)
|
63
64
|
puts
|
64
|
-
safe_abort
|
65
65
|
print TTY::Cursor.prev_line
|
66
66
|
Hu::Tm.t(:error_not_in_working_copy, cmd: 'deploy')
|
67
67
|
exit 1
|
@@ -215,7 +215,7 @@ module Hu
|
|
215
215
|
end
|
216
216
|
|
217
217
|
if release_branch_exists && git_revisions[:release] == git_revisions[stag_app_name]
|
218
|
-
puts 'Phase 2/3: Your local ' + "release/#{release_tag}".bright + ' (formerly ' + 'develop'.bright +
|
218
|
+
puts 'Phase 2/3: Your local ' + "release/#{release_tag}".bright + ' (formerly ' + 'develop'.bright + ') is live at ' + stag_app_name.to_s.bright + '.'
|
219
219
|
puts ' Please test here: ' + (app['web_url']).to_s.bright
|
220
220
|
puts ' If everything looks good, you may proceed and finish the release.'
|
221
221
|
puts ' If there are problems: Quit, delete the release branch and start fixing.'
|
@@ -394,9 +394,7 @@ module Hu
|
|
394
394
|
end
|
395
395
|
end
|
396
396
|
|
397
|
-
workers.each
|
398
|
-
t.join
|
399
|
-
end
|
397
|
+
workers.each(&:join)
|
400
398
|
|
401
399
|
rows = []
|
402
400
|
ts.each do |t|
|
@@ -440,7 +438,7 @@ module Hu
|
|
440
438
|
unless missing_env.empty?
|
441
439
|
puts
|
442
440
|
missing_env.each do |var|
|
443
|
-
puts
|
441
|
+
puts ' WARNING '.color(:red).bright.inverse + ' Missing config in ' + prod_app_name.bright + ": #{var}"
|
444
442
|
sleep 0.42
|
445
443
|
end
|
446
444
|
end
|
@@ -533,7 +531,7 @@ module Hu
|
|
533
531
|
end
|
534
532
|
end
|
535
533
|
|
536
|
-
PTY.spawn("stty rows #{rows} cols #{cols}; "+line) do |r, _w, pid|
|
534
|
+
PTY.spawn("stty rows #{rows} cols #{cols}; " + line) do |r, _w, pid|
|
537
535
|
begin
|
538
536
|
until r.eof?
|
539
537
|
c = r.getc
|
@@ -543,7 +541,7 @@ module Hu
|
|
543
541
|
c = c.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: "\e") # barf.
|
544
542
|
# hold on when we are (likely) inside an escape sequence
|
545
543
|
@minispin_disable = true if c.ord == 27 || c.ord < 9
|
546
|
-
@minispin_disable = false if c =~ /[A-Za-z]/ || [13,10].include?(c.ord)
|
544
|
+
@minispin_disable = false if c =~ /[A-Za-z]/ || [13, 10].include?(c.ord)
|
547
545
|
end
|
548
546
|
end
|
549
547
|
rescue Errno::EIO
|
@@ -818,7 +816,6 @@ module Hu
|
|
818
816
|
end
|
819
817
|
|
820
818
|
def shutdown
|
821
|
-
Hu::Tm.flush!
|
822
819
|
@@shutting_down = true
|
823
820
|
unbusy
|
824
821
|
end
|
@@ -856,25 +853,6 @@ module Hu
|
|
856
853
|
puts "--- ^#{label}^ ---"
|
857
854
|
end
|
858
855
|
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
printf '(ヘ・_・)ヘ┳━┳'
|
863
|
-
sleep 0.5
|
864
|
-
printf "\e[12D(ヘ・_・)-┳━┳"
|
865
|
-
sleep 0.1
|
866
|
-
printf "\e[12D\e[31;1m(╯°□°)╯ ┻━┻"
|
867
|
-
sleep 0.1
|
868
|
-
printf "\e[1;31m\e[14D(╯°□°)╯ ┻━┻"
|
869
|
-
sleep 0.05
|
870
|
-
printf "\e[0;31m\e[15D(╯°□°)╯ ┻━┻"
|
871
|
-
sleep 0.05
|
872
|
-
printf "\e[30;1m\e[16D(╯°□°)╯ ┻━┻"
|
873
|
-
sleep 0.05
|
874
|
-
printf "\e[17D "
|
875
|
-
printf "\e[?25h"
|
876
|
-
puts
|
877
|
-
end
|
878
|
-
end
|
879
|
-
end
|
880
|
-
end
|
856
|
+
end # /Class Deploy
|
857
|
+
end # /Class Cli
|
858
|
+
end # /Module Hu
|
data/lib/hu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- moe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|