bard 0.36.0 → 0.37.0

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: 68ede9423f7eee1d55c8a6861a76f31df85b5d05
4
- data.tar.gz: e33da2dbdcd378aa371760ccae3067a7d3294df3
3
+ metadata.gz: c0a6a6cc81568fbb4870d936e87549abe18f13a2
4
+ data.tar.gz: 6e495ea09873378c8ba633fab818ea8a9f78e9cf
5
5
  SHA512:
6
- metadata.gz: ae576a0f5a6569049a5aaae56896be053f40849946c8f7d15c97e5fa15321bcc55913d8af8dab6dc3ae2455225f9c496f87d5837cf23c80129760bea58c02a53
7
- data.tar.gz: fc2eeddbcace176829383f421f166bd5d0b721b5f3f5454f0c68e5e516a3d765d94de674344749f6deae6ed0d326ea9fbf47180e6f934bca38c472d5f9df8850
6
+ metadata.gz: 218e13c35ee0ec6256ec263e18873bf5c9de160bbf73f848f9f3a4cbad381f188eba45b84713cb30d8e53a312f74e556f965662136e22fbd5c67396097afb30d
7
+ data.tar.gz: 44199bc94747a7ab40ac249318fe2a8a3597c6f3c901365fff24b672a91fff841ad8b4dd8457c626519f7142fa96f8c6206292660ffa094d72d52f56fe4da78f
@@ -24,9 +24,11 @@ class Bard::CLI < Thor
24
24
 
25
25
  run_crucial "git push -u origin #{branch}", true
26
26
  run_crucial "cap _2.5.10_ stage BRANCH=#{branch}", options.verbose?
27
- run_crucial "cap _2.5.10_ ping ROLES=staging"
28
-
29
27
  puts green("Stage Succeeded")
28
+
29
+ unless system("cap _2.5.10_ ping ROLES=staging >/dev/null 2>&1")
30
+ puts red("Staging is now down!")
31
+ end
30
32
  end
31
33
 
32
34
  method_options %w( verbose -v ) => :boolean, %w( skip-ci ) => :boolean
@@ -52,7 +54,6 @@ class Bard::CLI < Thor
52
54
  end
53
55
 
54
56
  run_crucial "cap _2.5.10_ deploy", options.verbose?
55
- run_crucial "cap _2.5.10_ ping ROLES=production"
56
57
 
57
58
  puts green("Deploy Succeeded")
58
59
 
@@ -70,6 +71,10 @@ class Bard::CLI < Thor
70
71
  run_crucial "git branch -D #{branch}"
71
72
  end
72
73
  end
74
+
75
+ unless system("cap _2.5.10_ ping ROLES=production >/dev/null 2>&1")
76
+ puts red("Production is now down!")
77
+ end
73
78
  end
74
79
 
75
80
  method_options %w( verbose -v ) => :boolean
@@ -80,11 +80,18 @@ Capistrano::Configuration.instance(:must_exist).load do
80
80
 
81
81
  desc "test app for downtime"
82
82
  task :ping do
83
- role = ENV.fetch("ROLES", "production").to_sym
84
- uri = URI.parse("ssh://#{roles[role].first.to_s}")
85
- command = "curl -sfLI #{uri.hostname} 2>&1 1>/dev/null"
83
+ role_name = ENV.fetch("ROLES", "production").to_sym
84
+ server_definition = roles[role_name].first
85
+
86
+ url = server_definition.host
87
+ if role_name == :staging && server_definition.host == "staging.botandrose.com"
88
+ url = "#{application}.botandrose.com"
89
+ end
90
+ url += server_definition.options.fetch(:ping, "")
91
+
92
+ command = "curl -sfLI #{url} 2>&1 1>/dev/null"
86
93
  unless system command
87
- puts "#{uri.hostname} is down!"
94
+ puts "#{role_name.to_s.capitalize} is down!"
88
95
  exit 1
89
96
  end
90
97
  end
@@ -1,4 +1,4 @@
1
1
  module Bard
2
- VERSION = "0.36.0"
2
+ VERSION = "0.37.0"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.36.0
4
+ version: 0.37.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-04 00:00:00.000000000 Z
11
+ date: 2019-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor