dust-deploy 0.13.2 → 0.13.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/bin/dust +24 -11
  2. data/changelog.md +6 -0
  3. data/lib/dust/version.rb +1 -1
  4. metadata +1 -1
data/bin/dust CHANGED
@@ -41,8 +41,7 @@ module Dust
41
41
  @nodes.each_with_index do |node, i|
42
42
  if $parallel
43
43
  threads[i] = Thread.new do
44
- run_recipes node, 'deploy'
45
- Thread.current['hostname'] = node['hostname']
44
+ Thread.current['hostname'] = node['hostname'] if run_recipes node, 'deploy'
46
45
  end
47
46
  else
48
47
  run_recipes node, 'deploy'
@@ -51,7 +50,10 @@ module Dust
51
50
 
52
51
  if $parallel
53
52
  print 'waiting for servers: '
54
- threads.each { |t| t.join; print t['hostname'].blue + ' ' }
53
+ threads.each do |t|
54
+ t.join # wait for thread
55
+ print t['hostname'].blue + ' ' if t['hostname']
56
+ end
55
57
  puts
56
58
  end
57
59
 
@@ -82,8 +84,7 @@ module Dust
82
84
  @nodes.each_with_index do |node, i|
83
85
  if $parallel
84
86
  threads[i] = Thread.new do
85
- run_recipes node, 'status'
86
- Thread.current['hostname'] = node['hostname']
87
+ Thread.current['hostname'] = node['hostname'] if run_recipes node, 'deploy'
87
88
  end
88
89
  else
89
90
  run_recipes node, 'status'
@@ -92,7 +93,10 @@ module Dust
92
93
 
93
94
  if $parallel
94
95
  print 'waiting for servers: '
95
- threads.each { |t| t.join; print t['hostname'].blue + ' ' }
96
+ threads.each do |t|
97
+ t.join # wait for thread
98
+ print t['hostname'].blue + ' ' if t['hostname']
99
+ end
96
100
  puts
97
101
  end
98
102
 
@@ -132,7 +136,10 @@ module Dust
132
136
 
133
137
  if $parallel
134
138
  print 'waiting for servers: '
135
- threads.each { |t| t.join; print t['hostname'].blue + ' ' }
139
+ threads.each do |t|
140
+ t.join # wait for thread
141
+ print t['hostname'].blue + ' ' if t['hostname']
142
+ end
136
143
  puts
137
144
  end
138
145
 
@@ -172,7 +179,10 @@ module Dust
172
179
 
173
180
  if $parallel
174
181
  print 'waiting for servers: '
175
- threads.each { |t| t.join; print t['hostname'].blue + ' ' }
182
+ threads.each do |t|
183
+ t.join # wait for thread
184
+ print t['hostname'].blue + ' ' if t['hostname']
185
+ end
176
186
  puts
177
187
  end
178
188
 
@@ -212,18 +222,20 @@ module Dust
212
222
  end
213
223
 
214
224
  # run specified recipes in the given context
225
+ # returns false if no recipes where found
226
+ # true if recipes were run (doesn't indicate, whether the run was sucessful or not)
215
227
  def run_recipes(node, context)
216
228
  # skip this node if there are no recipes found
217
- return unless node['recipes']
229
+ return false unless node['recipes']
218
230
 
219
231
  recipes = generate_recipes node, context
220
232
 
221
233
  # skip this node unless we're actually having recipes to cook
222
- return if recipes.empty?
234
+ return false if recipes.empty?
223
235
 
224
236
  # connect to server
225
237
  node['server'] = Server.new(node)
226
- return unless node['server'].connect
238
+ return true unless node['server'].connect
227
239
 
228
240
  # runs the method with the recipe name, defined and included in recipe/*.rb
229
241
  # call recipes for each recipe that is defined for this node
@@ -232,6 +244,7 @@ module Dust
232
244
  end
233
245
 
234
246
  node['server'].disconnect
247
+ true
235
248
  end
236
249
 
237
250
  def run_system_update(node)
data/changelog.md CHANGED
@@ -1,6 +1,12 @@
1
1
  Changelog
2
2
  =============
3
3
 
4
+ 0.13.3
5
+ ------------
6
+
7
+ - only display hostname in "waiting for servers" message, when there is actually something to deploy
8
+
9
+
4
10
  0.13.2
5
11
  ------------
6
12
 
data/lib/dust/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dust
2
- VERSION = "0.13.2"
2
+ VERSION = "0.13.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dust-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.2
4
+ version: 0.13.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: