hu 2.0.6 → 2.0.7

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: f68145bbe0ffe1e9de6949fc0572d10232e15e095f9b212ac458660f0bf82982
4
- data.tar.gz: 4a08b9f6d1c9448d681f42b192c2248e00ec0fad9d4d1c8b39e9db4210739361
3
+ metadata.gz: df47162c9e09d8494b46695d6544b9e967814c02ecb1b9514418bc190cf6365b
4
+ data.tar.gz: c6b3e3a2c30a48f321d12fadb6f20a831fe1e83c9db8ea81e65544354fd96cdb
5
5
  SHA512:
6
- metadata.gz: c406d0e29c6c151eb982e07b38de58dae5e954c7f2a549557c97b8fdc48b6ce55a5cdb39a4b27fa113c4cdace99842c520c3d5639f6677b06e0d2f3587dee48a
7
- data.tar.gz: 062febcf56f2da774ccdf685dad0e0762ef1b623a9e065da907365f72b1651759723b451264ec89e44beb2b6e2af7a11477ae788915b4855d5b3899d904cfa43
6
+ metadata.gz: 919db7781e8416820a9f990b14f14618eec9239eacb163515ff98cb6db7131ac7b58d7ff04e07d90713dc226b13105a1c8249bc169d29ea1a981d1b1575331f8
7
+ data.tar.gz: '0180aad0e6f8fbf9eda8f4c17147a363fc6b9d1c73b6f2094bb35959fd23f3b0bacd00679f4d8745984fa2a6e01fc287d983a7e766c2ed1a2ffaa8732f1743a2'
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Heroku Utility [![Dependency Status](https://gemnasium.com/badges/github.com/busyloop/hu.svg)](https://gemnasium.com/github.com/busyloop/hu) [![Gem Version](https://badge.fury.io/rb/hu.svg)](https://badge.fury.io/rb/hu)
1
+ # Heroku Utility [![Gem Version](https://badge.fury.io/rb/hu.svg)](https://badge.fury.io/rb/hu)
2
2
 
3
3
  A small utility to augment the toolbelt.
4
4
 
Binary file
data/hu.gemspec CHANGED
@@ -47,4 +47,6 @@ Gem::Specification.new do |spec|
47
47
  spec.add_dependency 'config'
48
48
  spec.add_dependency 'awesome_print'
49
49
  spec.add_dependency 'necromancer', '~> 0.4.0'
50
+ spec.add_dependency 'notifier'
51
+ spec.add_dependency 'terminal-notifier'
50
52
  end
@@ -56,6 +56,7 @@ module Hu
56
56
  require 'platform-api'
57
57
  print 'c'
58
58
  require 'version_sorter'
59
+ require 'notifier'
59
60
  print 'h'
60
61
  require 'versionomy'
61
62
  print 'r'
@@ -317,8 +318,9 @@ EOM
317
318
  puts
318
319
  end
319
320
 
321
+ staging_url = File.exist?('.hu/staging_url') ? File.read('.hu/staging_url').split("\n")[0] : app['web_url']
320
322
  if release_branch_exists && git_revisions[:release] == git_revisions[stag_app_name]
321
- hyperlink = "\e[1m#{app['web_url']}\e[0m"
323
+ hyperlink = "\e[1m#{staging_url}\e[0m"
322
324
 
323
325
  puts ' Phase 2/2 '.inverse + ' Your local ' + "release/#{release_tag}".bright + ' (formerly ' + 'develop'.bright + ') is live on ' + stag_app_name.to_s.bright + '.'
324
326
  puts
@@ -503,6 +505,9 @@ EOF
503
505
  # run_each(script, parser: parser, sigint_handler: sigint_handler)
504
506
 
505
507
  print"\a"; sleep 0.4
508
+ Notifier.notify(image: "#{__dir__}/../../assets/images/deploy.png",
509
+ title: 'Deploy successful',
510
+ message: "Release #{release_tag} has been deployed to #{prod_app_name}")
506
511
  puts "\e[42m \e[0m \e[0;32mRelease \e[1m#{release_tag}\e[0;32m has been deployed to \e[1m#{prod_app_name}\e[0;32m\e[0m \e[42m \e[0m"
507
512
  print"\a"; sleep 0.4
508
513
  puts
@@ -1094,7 +1099,7 @@ EOF
1094
1099
  return false unless branch_exists? branch_name
1095
1100
  begin
1096
1101
  return false if TTY::Prompt.new.no?("Delete branch #{branch_name}?")
1097
- rescue TTY::Reader::InputInterrupt
1102
+ rescue TTY::Reader::InputInterrupt, TTY::Prompt::ConversionError
1098
1103
  return false
1099
1104
  end
1100
1105
  run_each <<-EOS.strip_heredoc
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Hu
3
- VERSION = '2.0.6'
3
+ VERSION = '2.0.7'
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.6
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - moe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-17 00:00:00.000000000 Z
11
+ date: 2019-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -374,6 +374,34 @@ dependencies:
374
374
  - - "~>"
375
375
  - !ruby/object:Gem::Version
376
376
  version: 0.4.0
377
+ - !ruby/object:Gem::Dependency
378
+ name: notifier
379
+ requirement: !ruby/object:Gem::Requirement
380
+ requirements:
381
+ - - ">="
382
+ - !ruby/object:Gem::Version
383
+ version: '0'
384
+ type: :runtime
385
+ prerelease: false
386
+ version_requirements: !ruby/object:Gem::Requirement
387
+ requirements:
388
+ - - ">="
389
+ - !ruby/object:Gem::Version
390
+ version: '0'
391
+ - !ruby/object:Gem::Dependency
392
+ name: terminal-notifier
393
+ requirement: !ruby/object:Gem::Requirement
394
+ requirements:
395
+ - - ">="
396
+ - !ruby/object:Gem::Version
397
+ version: '0'
398
+ type: :runtime
399
+ prerelease: false
400
+ version_requirements: !ruby/object:Gem::Requirement
401
+ requirements:
402
+ - - ">="
403
+ - !ruby/object:Gem::Version
404
+ version: '0'
377
405
  description: Heroku Utility.
378
406
  email:
379
407
  - moe@busyloop.net
@@ -389,6 +417,7 @@ files:
389
417
  - LICENSE.txt
390
418
  - README.md
391
419
  - Rakefile
420
+ - assets/images/deploy.png
392
421
  - bin/hu
393
422
  - hu.gemspec
394
423
  - lib/hu/cli.rb