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 +4 -4
- data/lib/bard.rb +8 -3
- data/lib/bard/capistrano.rb +11 -4
- data/lib/bard/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: c0a6a6cc81568fbb4870d936e87549abe18f13a2
|
4
|
+
data.tar.gz: 6e495ea09873378c8ba633fab818ea8a9f78e9cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 218e13c35ee0ec6256ec263e18873bf5c9de160bbf73f848f9f3a4cbad381f188eba45b84713cb30d8e53a312f74e556f965662136e22fbd5c67396097afb30d
|
7
|
+
data.tar.gz: 44199bc94747a7ab40ac249318fe2a8a3597c6f3c901365fff24b672a91fff841ad8b4dd8457c626519f7142fa96f8c6206292660ffa094d72d52f56fe4da78f
|
data/lib/bard.rb
CHANGED
@@ -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
|
data/lib/bard/capistrano.rb
CHANGED
@@ -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
|
-
|
84
|
-
|
85
|
-
|
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 "#{
|
94
|
+
puts "#{role_name.to_s.capitalize} is down!"
|
88
95
|
exit 1
|
89
96
|
end
|
90
97
|
end
|
data/lib/bard/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|