escualo 0.9.0 → 0.9.1

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: 59841e0d8f38aefbe2fd5639987a7a9ebc98e83b
4
- data.tar.gz: 4bfefa0fa63748a7af08e6daf8efc2f30522f174
3
+ metadata.gz: 3bf366a2ccdefdd9c7d0763c4c3dcee51957e733
4
+ data.tar.gz: f0359ce5d57083e5322fdd6c5176a3ba85c54f36
5
5
  SHA512:
6
- metadata.gz: c3439fcb6720ff05c6fbc9aa5772c6de4794406ce3fcaccbac8bbf925b3d2bc31fc73094dc3c0057f72f527a796309478a4376c47cd8613d0257be9d27b43b1e
7
- data.tar.gz: d4f1073f77f625d182caa5ce9f811f726c658e6030f8683db3a0a77d569f102efbc3dbe8bb832292fefee23f4937a9b61498848de0affc830ae8904f64c40e51
6
+ metadata.gz: cf1e12413710310f5645da34bdd221755c70895c5f1b41d5309f2f2d6c42c6b3f848fbe044000f48a8c9e817c2af66cab5ff710e74f62284312e279ea187a162
7
+ data.tar.gz: 367a8ef0bc7a27840a904693da66aa56ab5273e3a5d8f3faf9cfd6da730eb3633566a2cc4a7e9caa0d3c0c054cc4737a34d96fb00fa2a440b27e7c992c0d31c1
@@ -19,9 +19,13 @@ command 'artifact destroy' do |c|
19
19
  end
20
20
  end
21
21
 
22
- def say_created(kind, name)
23
- say "#{kind.titleize} #{name} created successfully"
24
- say "Now you can deploy this #{kind}"
22
+ def check_created(kind, name)
23
+ if Escualo::Artifact.present?(ssh, name)
24
+ say "#{kind.titleize} #{name} created successfully"
25
+ say "Now you can deploy this #{kind}"
26
+ else
27
+ abort "Failed to create artifact #{name}"
28
+ end
25
29
  end
26
30
 
27
31
  command 'artifact create service' do |c|
@@ -60,7 +64,7 @@ command 'artifact create service' do |c|
60
64
  Escualo::Artifact.create_push_infra ssh, name: name, service: true
61
65
  end
62
66
 
63
- say_created 'service', name
67
+ check_created 'service', name
64
68
  end
65
69
  end
66
70
  end
@@ -84,7 +88,7 @@ command 'artifact create site' do |c|
84
88
  step 'Creating push infrastructure' do
85
89
  Escualo::Artifact.create_push_infra ssh, name: name, static: true
86
90
  end
87
- say_created 'site', name
91
+ check_created 'site', name
88
92
  end
89
93
  end
90
94
  end
@@ -108,7 +112,7 @@ command 'artifact create executable' do |c|
108
112
  step 'Creating push infrastructure' do
109
113
  Escualo::Artifact.create_push_infra ssh, name: name, executable: true
110
114
  end
111
- say_created 'executable', name
115
+ check_created 'executable', name
112
116
  end
113
117
  end
114
118
  end
@@ -48,6 +48,12 @@ command 'bootstrap' do |c|
48
48
  step 'Setup artifact directories...' do
49
49
  Escualo::Artifact.setup ssh
50
50
  end
51
+
52
+ if Escualo::Env.present?(ssh, :ESCUALO_BASE_VERSION)
53
+ say 'Host bootstrapped successfully '
54
+ else
55
+ abort 'bootstrapping failed'
56
+ end
51
57
  end
52
58
  end
53
59
  end
@@ -22,7 +22,7 @@ command 'plugin install' do |c|
22
22
  if Escualo::Plugin.run_and_check installer, ssh, options
23
23
  say 'Installed successfully!'
24
24
  else
25
- say "Something went wrong"
25
+ abort 'Installation of plugin failed'
26
26
  end
27
27
  end
28
28
  end
@@ -1,4 +1,4 @@
1
1
  module Escualo
2
- VERSION = '0.9.0'
2
+ VERSION = '0.9.1'
3
3
  BASE_VERSION = '3.2'
4
4
  end
@@ -20,7 +20,9 @@ class Net::SSH::Connection::LocalSession
20
20
  include Net::SSH::Connection::Upload
21
21
 
22
22
  def exec!(command)
23
- Open3.capture2e(command).first rescue 'command not found'
23
+ out, status = Open3.capture2e(command)
24
+ raise out unless status.success?
25
+ out
24
26
  end
25
27
 
26
28
  def upload_file!(file, destination)
@@ -28,10 +30,11 @@ class Net::SSH::Connection::LocalSession
28
30
  end
29
31
 
30
32
  def tell!(command)
31
- Open3.popen2e command do |_input, output|
33
+ Open3.popen2e command do |_input, output, wait|
32
34
  output.each do |line|
33
35
  $stdout.print line
34
36
  end
37
+ raise "command #{command} failed" unless wait.value.success?
35
38
  end
36
39
  end
37
40
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: escualo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli