itamae 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1311099107afef7a408dea30eb069c44bfc93ecc
4
- data.tar.gz: 00bfdd9ac80ab5c36553c5ba23fc8b370d9cf356
3
+ metadata.gz: f8e23322519a95a6c039667e300492abd4656c6c
4
+ data.tar.gz: 3418652d414f5aa75d964d621610edfde90da9fc
5
5
  SHA512:
6
- metadata.gz: 6c4206cd9298d247d2a6bb75fd9295c7f89a0a663b7568fe3eb4facbe906c1d16f2de2d8171052570a09200b42cf10bb8dbf3ce78c93e8f1412120c21010ee42
7
- data.tar.gz: 91828f3ea04f9082b6d07fecd32e4bafd288c7f5d66244c93b49e10eabaad12ff01f3ba42fbaea72505467c848424670c7b2a1ac32bce89bbd93821f8365362a
6
+ metadata.gz: 1a8e7ae7b0fa4bbbfa17fe9cfaedb9661b08519754da163dfdddfba436eff050dd850fa47bee695fd1cbd61f5b3478f626ae9ba0f6440c519fe92d991b43affc
7
+ data.tar.gz: 83b243bf00cc40bcd269fc5fb41e1a52501976d3be681c17d5ceeec5159ab7c2dd8d41eca4da86049b5d050dc5a323fa585913ffeb3e2c7f5f3b820c8b261021
@@ -106,15 +106,8 @@ module Itamae
106
106
  result
107
107
  end
108
108
 
109
- def run_specinfra(type, *args)
110
- command = Specinfra.command.get(type, *args)
111
-
112
- if type.to_s.start_with?("check_")
113
- result = run_command(command, error: false)
114
- result.exit_status == 0
115
- else
116
- run_command(command)
117
- end
109
+ def get_command(*args)
110
+ Specinfra.command.get(*args)
118
111
  end
119
112
 
120
113
  def send_file(*args)
@@ -278,8 +278,14 @@ module Itamae
278
278
  run_command(*args).exit_status == 0
279
279
  end
280
280
 
281
- def run_specinfra(*args)
282
- backend.run_specinfra(*args)
281
+ def run_specinfra(type, *args)
282
+ command = backend.get_command(type, *args)
283
+
284
+ if type.to_s.start_with?("check_")
285
+ check_command(command)
286
+ else
287
+ run_command(command)
288
+ end
283
289
  end
284
290
 
285
291
  def shell_escape(str)
@@ -25,8 +25,7 @@ module Itamae
25
25
 
26
26
  def action_install(action_options)
27
27
  unless run_specinfra(:check_package_is_installed, attributes.name, attributes.version)
28
- command = Specinfra.command.get(:install_package, attributes.name, attributes.version, attributes.options)
29
- run_command(command, {user: attributes.user})
28
+ run_specinfra(:install_package, attributes.name, attributes.version, attributes.options)
30
29
  updated!
31
30
  end
32
31
  end
@@ -1 +1 @@
1
- 1.0.12
1
+ 1.0.13
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai