hu 1.3.18 → 1.3.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9cd68a05dfb428006964a38bda2cf280f9a4749e
4
- data.tar.gz: 292cee0b53e67285e3bd87ad1d2ab000c93df000
3
+ metadata.gz: badecd460755df3ef0e716803d7444043fff806a
4
+ data.tar.gz: 3ae30df8de4108c85d04a603a9a2ac6a6f5e18f5
5
5
  SHA512:
6
- metadata.gz: a7ef2d27eef864eac815a21a7d28aaff3d70ea9f2cdc9254909999800ebdd48b0326a851d6f0d30b9bbb4d342b9ebbddb7c70e2fa54ff477c6bb61631ecca1a9
7
- data.tar.gz: 0a6c136013cd66ffbe343ab968a80bca14fb76265415aa81fa1bd4a16248208b666ed20fd75406bea643254757c54562e64a94b90eb7c73f5ca31a3d5f306a90
6
+ metadata.gz: 6482db2c427955516d158fcf987a75dd5d5706f56aa748c2b88485ed3fca99ba2fd0c68855467667e827eb9374ff2208c348e5e68cd8873977a9a9f66b83d819
7
+ data.tar.gz: c4f3d9830eda61de3dfd14dcc796709845929d0129414fc5f2dfb038c521a428bd146d5b28f3d8edf9140c71bf2f9435958f45ce7be06fea2d4dba1f20ed60e4
@@ -3,3 +3,6 @@ inherit_from: .rubocop_todo.yml
3
3
  AllCops:
4
4
  TargetRubyVersion: 2.3
5
5
 
6
+ Metrics/LineLength:
7
+ Max: 200
8
+
@@ -1,6 +1,7 @@
1
- # Offense count: 1
1
+ # Offense count: 2
2
2
  Lint/HandleExceptions:
3
3
  Exclude:
4
+ - 'lib/hu/common.rb'
4
5
  - 'lib/hu/telemetry.rb'
5
6
 
6
7
  # Offense count: 14
@@ -10,18 +11,12 @@ Metrics/AbcSize:
10
11
  # Offense count: 2
11
12
  # Configuration parameters: CountComments.
12
13
  Metrics/ClassLength:
13
- Max: 694
14
+ Max: 698
14
15
 
15
16
  # Offense count: 6
16
17
  Metrics/CyclomaticComplexity:
17
18
  Max: 45
18
19
 
19
- # Offense count: 86
20
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
21
- # URISchemes: http, https
22
- Metrics/LineLength:
23
- Max: 176
24
-
25
20
  # Offense count: 16
26
21
  # Configuration parameters: CountComments.
27
22
  Metrics/MethodLength:
@@ -329,7 +329,7 @@ module Hu
329
329
 
330
330
  def show_pipeline_status(pipeline_name, stag_app_name, prod_app_name, release_tag, clear = true)
331
331
  table = TTY::Table.new header: %w(location commit tag app_last_modified app_last_modified_by dynos# state)
332
- busy 'loading', :classic
332
+ busy '', :classic
333
333
  ts = []
334
334
  tpl_row = ['?', '', '', '', '', '', '']
335
335
  revs = ThreadSafe::Hash.new
@@ -484,10 +484,11 @@ module Hu
484
484
  PTY.spawn(line) do |r, _w, pid|
485
485
  @tspin ||= Thread.new do
486
486
  @minispin_last_char = Time.now
487
+ @minispin_disable = false
487
488
  i = 0
488
489
  loop do
489
490
  break if @minispin_last_char == :end
490
- if 0.23 > Time.now - @minispin_last_char
491
+ if 0.23 > Time.now - @minispin_last_char || @minispin_disable
491
492
  sleep 0.1
492
493
  next
493
494
  end
@@ -510,6 +511,10 @@ module Hu
510
511
  @spinlock.synchronize do
511
512
  print c
512
513
  @minispin_last_char = Time.now
514
+ c = c.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '') # barf.
515
+ # hold on when we are (likely) inside an escape sequence
516
+ @minispin_disable = true if c == 27
517
+ @minispin_disable = false if c =~ /[A-Za-z]/
513
518
  end
514
519
  end
515
520
  rescue Errno::EIO
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Hu
3
- VERSION = '1.3.18'
3
+ VERSION = '1.3.19'
4
4
  end
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.18
4
+ version: 1.3.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - moe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-28 00:00:00.000000000 Z
11
+ date: 2016-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler