deployhq 1.3.3 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/deployhq +2 -0
- data/lib/deploy/cli.rb +30 -7
- data/lib/deploy/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 723ab3de0e1e230b74f7d7693ab21a364e10f740
|
4
|
+
data.tar.gz: 7e1278b6f5a88dba69ee5bbb5bd77d07a76ae22a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44315effe285ba11ec9a8cf03676c58b1fc7a7ff380237933d155aee509e37bc602dada22df25fc3ff00d388ba13a15bbe546b8d763a1e2db3ca93de0fd676d1
|
7
|
+
data.tar.gz: 75271d3366c67bbf22a1699caf048d7b5e32f84a0698507344213867d3ecbd28cada60dbdf1656f6e7a8d7d454ef921e38175599e66b2a3ed82083c76f52912d
|
data/bin/deployhq
CHANGED
data/lib/deploy/cli.rb
CHANGED
@@ -102,10 +102,11 @@ module Deploy
|
|
102
102
|
@longest_server_name = @server_names.values.map(&:length).max
|
103
103
|
|
104
104
|
last_tap = nil
|
105
|
+
last_tap_lines = 0
|
105
106
|
current_status = 'pending'
|
106
107
|
previous_status = ''
|
107
|
-
print "Waiting for deployment capacity..."
|
108
|
-
while ['running', 'pending'].include?(current_status)
|
108
|
+
STDOUT.print "Waiting for deployment capacity..."
|
109
|
+
while ['running', 'pending'].include?(current_status)
|
109
110
|
sleep 1
|
110
111
|
|
111
112
|
poll = @deployment.status_poll(:since => last_tap, :status => current_status)
|
@@ -114,15 +115,29 @@ module Deploy
|
|
114
115
|
current_status = poll.status if poll.status
|
115
116
|
|
116
117
|
if current_status == 'pending'
|
117
|
-
print "."
|
118
|
+
STDOUT.print "."
|
118
119
|
elsif current_status == 'running' && previous_status == 'pending'
|
119
|
-
puts "\n"
|
120
|
+
STDOUT.puts "\n"
|
120
121
|
end
|
121
122
|
|
122
123
|
if current_status != 'pending'
|
123
124
|
poll.taps.each do |tap|
|
124
|
-
|
125
|
+
# Delete most recent tap and redraw it if it's been updated
|
126
|
+
if tap.id.to_i == last_tap
|
127
|
+
if tap.updated
|
128
|
+
# Restore the cursor to the start of the last entry so we can overwrite
|
129
|
+
STDOUT.print "\e[#{last_tap_lines}A\r"
|
130
|
+
else
|
131
|
+
next
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
tap_output = format_tap(tap)
|
136
|
+
last_tap_lines = tap_output.count("\n")
|
125
137
|
last_tap = tap.id.to_i
|
138
|
+
|
139
|
+
STDOUT.print tap_output
|
140
|
+
STDOUT.flush
|
126
141
|
end
|
127
142
|
end
|
128
143
|
|
@@ -138,11 +153,10 @@ module Deploy
|
|
138
153
|
@longest_server_name = @server_names.values.map(&:length).max
|
139
154
|
|
140
155
|
@deployment.taps.reverse.each do |tap|
|
141
|
-
puts format_tap(tap)
|
156
|
+
STDOUT.puts format_tap(tap)
|
142
157
|
end
|
143
158
|
end
|
144
159
|
|
145
|
-
|
146
160
|
## Data formatters
|
147
161
|
|
148
162
|
def format_tap(tap)
|
@@ -160,6 +174,15 @@ module Deploy
|
|
160
174
|
String.new.tap do |s|
|
161
175
|
s << "#{server_name} ".color(text_colour, :bold)
|
162
176
|
s << tap.message.color(text_colour).gsub(/\<[^\>]*\>/, '')
|
177
|
+
if tap.backend_message && tap.tap_type == 'command'
|
178
|
+
tap.backend_message.each_line('<br />') do |backend_line|
|
179
|
+
s << "\n"
|
180
|
+
s << " " * server_name.length
|
181
|
+
s << " "
|
182
|
+
s << backend_line.color(text_colour).gsub(/\<[^\>]*\>/, '')
|
183
|
+
end
|
184
|
+
end
|
185
|
+
s << "\n"
|
163
186
|
end
|
164
187
|
end
|
165
188
|
|
data/lib/deploy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deployhq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Wentworth
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.
|
83
|
+
rubygems_version: 2.5.1
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: API and CLI client for the DeployHQ
|