hu 2.0.20 → 2.0.21

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
  SHA256:
3
- metadata.gz: e9ba9f17f217081fade5c28d7219d819f84397c18de89ba97ff0f2d194c68ef4
4
- data.tar.gz: 40109e91d1934e4186bf6ccac3a688320dcc105d68966d7643769111c0bce6da
3
+ metadata.gz: f5615d17dd7d2742273c26879605c5c49494ceb5a2d7a341fc0e2b8104444fa8
4
+ data.tar.gz: dfc75cedf2ebb7afb7c98a045c9c55d01529814f347c5d5b51e8188e257b93cf
5
5
  SHA512:
6
- metadata.gz: 0b464fc2d47bad7657e0aaf288764dac5744956a42ae73365ce07476962e2226ec1fb93b58d09147afc60eec516d74ca5d460538993ad76a5d332875159bfd72
7
- data.tar.gz: bc818a20b0d4409fa9bbc27f5d6f7401f9383a37b3566f5046412a886ea90c2f03047ddca46afc89c0b7925f4f3ec35f5cbbf71fae98465f19af3a6d499d7bee
6
+ metadata.gz: 6879b04ece042a42c5fb513187205abdf702e5863c086993fff9be350abdb9ea314a9ab3826199e906bdd2651b31c7c588f7dfd908ccbc6d8b1422ca44f80259
7
+ data.tar.gz: 8a9155ee677fb018fbd66fe17ca0bed0f775745ff20c2a4fcba3e7560bbcacef791e9678b251f7a0b9d21229e920807e1d9072c0bd416b6b77027653cf509596
data/hu.gemspec CHANGED
@@ -37,6 +37,7 @@ Gem::Specification.new do |spec|
37
37
  spec.add_dependency 'tty-table', '~> 0.10.0'
38
38
  spec.add_dependency 'fidget', '~> 0.0.6'
39
39
  spec.add_dependency 'octokit'
40
+ spec.add_dependency 'faraday', '= 0.17.0'
40
41
  spec.add_dependency 'tty-cursor'
41
42
  spec.add_dependency 'rainbow'
42
43
  spec.add_dependency 'netrc', '= 0.11.0'
@@ -49,8 +49,8 @@ module Hu
49
49
  end
50
50
  require 'tty-cursor'
51
51
  print TTY::Cursor.hide + "\e[30;1ms"
52
- require 'rainbow'
53
52
  print 'y'
53
+ require 'tty-prompt'
54
54
  require 'rainbow/ext/string'
55
55
  print 'n'
56
56
  require 'platform-api'
@@ -60,7 +60,7 @@ module Hu
60
60
  print 'h'
61
61
  require 'versionomy'
62
62
  print 'r'
63
- require 'tty-prompt'
63
+ require 'rainbow'
64
64
  print 'o'
65
65
  require 'tty-table'
66
66
  require 'octokit'
@@ -435,10 +435,35 @@ EOM
435
435
  case choice
436
436
  when :DEPLOY
437
437
  # Fidget.prevent_sleep(:display, :sleep, :user) do
438
- promote_to_production
438
+ promote_to_production
439
439
  # end
440
440
  anykey
441
441
  when :finish_release
442
+ if ENV['IGNORE_WEEKDAY'] != "1" && Date.today.wday == 5
443
+ puts
444
+ print TTY::Cursor.hide
445
+ (0..10).each do |i|
446
+ print "\e[10D "
447
+ sleep 0.12 - i * 0.01
448
+ print "\e[10D"
449
+ print ' WARNING '.background(:red).color(:yellow).bright
450
+ sleep 0.12 - i * 0.01
451
+ end
452
+ puts TTY::Cursor.show
453
+ puts
454
+ puts "http://perrymitchell.net/article/why-friday-deployments-are-a-bad-idea/"
455
+ puts
456
+ begin
457
+ if TTY::Prompt.new.no?("Are you sure you want to deploy to production?")
458
+ puts
459
+ exit 0
460
+ end
461
+ rescue TTY::Reader::InputInterrupt
462
+ puts
463
+ exit 0
464
+ end
465
+ end
466
+
442
467
  # Fidget.prevent_sleep(:display, :sleep, :user) do
443
468
  if ci_clear?
444
469
  old_editor = ENV['EDITOR']
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Hu
3
- VERSION = '2.0.20'
3
+ VERSION = '2.0.21'
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: 2.0.20
4
+ version: 2.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - moe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-07 00:00:00.000000000 Z
11
+ date: 2020-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -234,6 +234,20 @@ dependencies:
234
234
  - - ">="
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0'
237
+ - !ruby/object:Gem::Dependency
238
+ name: faraday
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - '='
242
+ - !ruby/object:Gem::Version
243
+ version: 0.17.0
244
+ type: :runtime
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - '='
249
+ - !ruby/object:Gem::Version
250
+ version: 0.17.0
237
251
  - !ruby/object:Gem::Dependency
238
252
  name: tty-cursor
239
253
  requirement: !ruby/object:Gem::Requirement