terraform-wrapper 1.3.4 → 1.3.5

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
  SHA256:
3
- metadata.gz: cf3f26c1cbb85c66c5a2f45a62eebab2d86027eea5ffeb7cf964e47256fb41b3
4
- data.tar.gz: 7fc8c289ae13f7c17805847ab4a18096a7e62c230c05794ecddd73e598a919f3
3
+ metadata.gz: 396b440e7aa8c426cd54846db62df689f760cb48b6a7fabeb8c0e8d28a49c950
4
+ data.tar.gz: 845ed83f74fd667731939aacb62e461af6f90e33adadb55f0ef06ac2d826e1c0
5
5
  SHA512:
6
- metadata.gz: 8684bee8c9bf387ca2ff0452cffbda473ad5f7c87bfc7c97ba0b0ebf0522236a22cb60b15c2ddd6f8a510953fd2f3284a97f6d101ff9cf9a2265a11b361a8bcc
7
- data.tar.gz: 8bd00ecc43f5527b6955411f75d59edf01e1ec8f1a7c047e0de550b45ceff2e252ac32d6cfb3d9c596d2a77e6375a34b2a34eae2c81065f03d8db873c0e6eb65
6
+ metadata.gz: 450d625fe1b8c81158295caffaa2098ecf11b20592fec7a5c46fa606e40b3af873f3a7b0976ea224eb4a461032c662511a4a057cda983dff84f2d70f494866e8
7
+ data.tar.gz: 6e3eec9c6b46eb9d624626abb502d17f6a29d46d3863ebec6090cdaa58a4920290729ce7291de46be8ed95767595655e489a929952de0834136e5c700361e4e9
@@ -60,7 +60,7 @@ module TerraformWrapper
60
60
  download(path: archive_path, uri: archive_uri) unless File.file?(archive_path)
61
61
  download(path: sums_path, uri: sums_uri) unless File.file?(sums_path)
62
62
  verify(file: archive_file, path: archive_path, sums: sums_path)
63
- extract(archive: archive_path, binary: archive_binary, destination: @binary.path)
63
+ extract(archive: archive_path, binary: archive_binary, destination: @binary.directory)
64
64
  ensure
65
65
  clean(archive: archive_path, sums: sums_path)
66
66
  end
@@ -133,14 +133,12 @@ module TerraformWrapper
133
133
  logger.info("Extracting: #{archive}")
134
134
 
135
135
  Zip::File.open(archive) do |zip|
136
- zip.each do |file|
137
- zip.extract(file, destination_directory: destination) if file.name == binary
136
+ begin
137
+ zip.extract(binary, destination_directory: destination)
138
+ rescue StandardError
139
+ logger.fatal("Extraction of Terraform binary: #{binary}, from archive: #{archive} has failed!")
138
140
  end
139
141
  end
140
-
141
- return if File.file?(destination)
142
-
143
- logger.fatal("Extraction of Terraform binary: #{binary}, from archive: #{archive} has failed!")
144
142
  end
145
143
 
146
144
  #########################################################################
@@ -3,7 +3,7 @@
3
3
  module TerraformWrapper
4
4
  #############################################################################
5
5
 
6
- VERSION = '1.3.4'
6
+ VERSION = '1.3.5'
7
7
 
8
8
  #############################################################################
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terraform-wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Lees