blackstack-deployer 1.2.20 → 1.2.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/blackstack-deployer.rb +13 -6
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d18d657b11702c6216df79fea79448ddc9551be15b494f43fbbce5afe734a997
4
- data.tar.gz: f532b2676c8f21bd4ffcc23f37f732bc7630dba88e2ba986baba7c585e2fbc63
3
+ metadata.gz: de67dfc14c0f6a54763eaf58235a118bb677936b7757c4d7d3c6abdd481de7f0
4
+ data.tar.gz: 3768bb91173a1cf690a6a2a3aac8508bb3d844c3bfb3b51dc4278a8a39405735
5
5
  SHA512:
6
- metadata.gz: 39f74640d3ff4ae8de2e1a5c827524d74fe0a87cd82b775bde836fe02f45dce59423e6372f422010bc5dd8326815a7b255c8f9cf69deb53ceada0f48b5cfe9fb
7
- data.tar.gz: f3e77987d1dd68ff263bca563e9931e812e01fc823ab707632eccedd791705288c81f6cbe84259de79bd08e8aef5db1f15b55e6e470e29f334f1af421c0869bb
6
+ metadata.gz: c2efc09b50f45732fe5ac766ad5a29cf723e3b18fe29ce2fd0a8f5d4eaf870674f7c178b4f4dde63cdd6aaf86bf026842f9eb126264fb602139d632d2f82fdf0
7
+ data.tar.gz: 99358a253b98db03dabb13b317788ed15807208a223171a1b14f40bd5b167a9a842d0ab04ca15b2b4668895b379475e1b337536ce0b9f41ea571afabe6a2a8b2
@@ -211,7 +211,7 @@ module BlackStack
211
211
  # :reboot is a reserved word, so it is fine to call :reboot
212
212
  else
213
213
  # validate: existis a routine with a the value c[:command].to_s on its :name key
214
- errors << "The routine with the name #{c[:command].to_s} does not exist" unless BlackStack::Deployer::deployment_routines.select { |r| r.name == c[:command].to_s }.size > 0
214
+ errors << "The routine with the name #{c[:command].to_s} does not exist" unless BlackStack::Deployer::routines.select { |r| r.name == c[:command].to_s }.size > 0
215
215
  end
216
216
  else
217
217
  # validate: each line of the :command value must finish with ;
@@ -284,11 +284,16 @@ module BlackStack
284
284
  end
285
285
  end
286
286
  end
287
+ #puts
288
+ #puts
289
+ #puts "command: #{self.command}"
290
+ #puts "h[:background] = #{h[:background]}"
287
291
  if h.has_key?(:background)
288
292
  self.background = h[:background]
289
293
  else
290
294
  self.background = false
291
- end
295
+ end
296
+ #puts "self.background = #{self.background}"
292
297
  end # def initialize(h)
293
298
 
294
299
  def to_hash
@@ -336,8 +341,11 @@ module BlackStack
336
341
  #puts "ret: #{ret}"
337
342
  end
338
343
  end
339
- # if the command is configured to run in background, and the flag show_ouput is off, then modify the ret to run in background
340
- if self.background && !BlackStack::Deployer.show_output
344
+ # if the command is configured to run in background, then modify the ret to run in background.
345
+ # note: even if you the flag show_ouput is on, you won't see any error message.
346
+ #puts
347
+ #puts "self.background: #{self.background.to_s}"
348
+ if self.background #&& !BlackStack::Deployer.show_output
341
349
  lines = ret.strip.lines
342
350
  total = lines.size
343
351
  i = 0
@@ -375,7 +383,6 @@ module BlackStack
375
383
  l = BlackStack::Deployer.logger
376
384
  errors = []
377
385
  output = nil
378
- s = self.code(node)
379
386
 
380
387
  # if self.command is a symbol
381
388
  if self.command.is_a?(Symbol)
@@ -396,7 +403,7 @@ module BlackStack
396
403
 
397
404
  # if self.command is a string
398
405
  elsif self.command.is_a?(String)
399
-
406
+ s = self.code(node)
400
407
  # running the command
401
408
  l.logs "Show command output... " if BlackStack::Deployer.show_output
402
409
  l.log "\n\nCommand:\n--------\n\n#{s} " if BlackStack::Deployer.show_output
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blackstack-deployer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.20
4
+ version: 1.2.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-07 00:00:00.000000000 Z
11
+ date: 2022-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blackstack-nodes