kitchen-terraform 0.5.0 → 0.5.1

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: 3fd1993b6118036d38a1aba5bf2349255c8e17a9
4
- data.tar.gz: 7b97000f9beb0a7e4c442563c6a690687df45d5d
3
+ metadata.gz: 19a43500f0b93a18ec62875671a8a902a1ffd2ac
4
+ data.tar.gz: 2f00ae9168495da55d2ef5ba87787faeb98b1202
5
5
  SHA512:
6
- metadata.gz: ceb7328b7d7a707201cb4e31f746cca4698cb12db777f9c9d39f99dadceece44cdb2e9952270fdb4a97f9a6f6b8bc870f6370a5e8aa428494845ff10de7c9b59
7
- data.tar.gz: 6df14cc048cc89024700456dc1be97b5f8d04318315b2e9d7ada6bef84f3a152fc38a6059ef179c91655348e52dd2e0567b367adfb10101146ca57aba2148890
6
+ metadata.gz: fa18168d24b9d081b23d181946b59452d606af078ff1e559a9bfbb501cf6e776329606b2cd6f5ec0eee751acf8e9a4fb08044d9e2275f1412c53faa733e92de2
7
+ data.tar.gz: 604c970071fe3224ece676255d9d807fa3f29c93a5435d4e0f5f9a2dea963ad1da7ff3b782f808dcf4cd58dfe587a2c2cc5e907337e175e7568b1120c1c1b2d0
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- iT(h�Jߨ,��x(w�N��3�s�>�0jUJ�9�(��@x��C$C���(���i�A��� �ۮ�σ���,��[�� �}��K��n�C-|�*��;
2
- 
3
- �Tօ����w�H�����LΌ��6�,��?c��|����v���%-V����$����[�J�&f9t���'g[�fX٬�5��:L���J�q����XJ}2�JZ�‹|F�6�����Y�U���h��8f>�,�Q��W��_b
1
+ �:����ce
2
+ e�Q诣|0��6!���A2T��Hy�c�w���m��a?��&� z�Ԋ���5O�#��KsO��\{��W�Uh�9>���F�3'J0mhK�?U;1�Ţ�KS�g畝� y_��)g�}tK����*���(�ʍbLY|T}PÇ�w�鸡������F����`AEx������S�ՔJς,-{�&���?�[�$뚵d�P���MV���e��jsf���U�k�%�(
@@ -36,6 +36,8 @@ module Terraform
36
36
  shell_out.timeout = timeout
37
37
  shell_out.run_command
38
38
  shell_out.error!
39
+ rescue => exception
40
+ handle_error exception: exception
39
41
  end
40
42
 
41
43
  def to_s
@@ -46,6 +48,10 @@ module Terraform
46
48
 
47
49
  attr_accessor :shell_out
48
50
 
51
+ def handle_error(exception:)
52
+ raise exception
53
+ end
54
+
49
55
  def initialize(target: '', **keyword_arguments)
50
56
  initialize_attributes(**keyword_arguments)
51
57
  self.shell_out = Mixlib::ShellOut
@@ -14,6 +14,7 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
 
17
+ require 'mixlib/shellout'
17
18
  require_relative 'command'
18
19
  require_relative 'command_extender'
19
20
  require_relative 'zero_six_output'
@@ -32,6 +33,18 @@ module Terraform
32
33
 
33
34
  attr_accessor :list, :state, :return_raw
34
35
 
36
+ def handle_error(exception:)
37
+ raise exception if !exception.is_a?(
38
+ Mixlib::ShellOut::ShellCommandFailed
39
+ ) | !exception.message.match(/no outputs/)
40
+
41
+ define_singleton_method :output do
42
+ return '{}' if return_raw
43
+
44
+ list ? [] : ''
45
+ end
46
+ end
47
+
35
48
  def initialize_attributes(list:, version:, state:, return_raw: false)
36
49
  extend_behaviour version: version
37
50
  self.list = list
@@ -15,5 +15,5 @@
15
15
  # limitations under the License.
16
16
 
17
17
  module Terraform
18
- VERSION = '0.5.0'
18
+ VERSION = '0.5.1'
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-terraform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Lane
@@ -40,7 +40,7 @@ cert_chain:
40
40
  KucGZX3OeACVUSpmCOCQyma6sDHYWQZM/IgWi7tbLtG5b2GslkauPm4S3wadHi6W
41
41
  LOU=
42
42
  -----END CERTIFICATE-----
43
- date: 2017-01-09 00:00:00.000000000 Z
43
+ date: 2017-02-18 00:00:00.000000000 Z
44
44
  dependencies:
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: bundler-audit
metadata.gz.sig CHANGED
Binary file