packer-binary 0.1.0 → 0.1.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: 183b48dbb3e3b1a4f896f3395ee13b6aa6c458d7
4
- data.tar.gz: 33a071f59ebaaafb854644e433da7d1819d84ddc
3
+ metadata.gz: d610905638a3f77ae5f74ac0de28dde44057af1d
4
+ data.tar.gz: aaa280ab1dc68c53d90c4ce9424ffc70cd3d536e
5
5
  SHA512:
6
- metadata.gz: e598d51851b740d7021adcc64159dce8c6d61930c8f952399a67a15342d5d7184c3fd14688d9f739ae5e89a7c8ab6521701e49da099f26d83cc748895311c93e
7
- data.tar.gz: 814879243ce9747ff531073bc0cc5156816b0404f84475cfdc45a68e4706a91d185a8a78be55b55173b242e3c337070f7773641470b179346b800e8148934cfe
6
+ metadata.gz: d06c34d31c2be35258a9f410f9f12e209b4450ea7eba669a2d9b7d02003dd8ae5ab966279d6a526bc93ce3aa5d46c339d81e56c34851a37c478d7ae441c0f811
7
+ data.tar.gz: 7d04816457e70b0aa7e5013e4106fba1664d7700cffa557dba2f1807dea0d1b51e8da5392ea74609556a6b3d078bfb122d164db7c02149e709f2511478b70a14
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
+ [![Gem Version](https://badge.fury.io/rb/packer-binary.svg)](https://badge.fury.io/rb/packer-binary)
1
2
  [![Build Status](https://travis-ci.org/NathanTCz/packer-binary.svg?branch=master)](https://travis-ci.org/NathanTCz/packer-binary)
2
3
  [![Coverage Status](https://coveralls.io/repos/github/NathanTCz/packer-binary/badge.svg?branch=master)](https://coveralls.io/github/NathanTCz/packer-binary?branch=master)
3
- [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/github/NathanTCz/packer-binary/master)
4
+ [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/gems/packer-binary/0.1.0)
4
5
 
5
6
  # Packer::Binary
6
7
 
@@ -19,7 +19,7 @@ module Packer
19
19
  # Zip the input directory.
20
20
  def write(input_dir, output_file)
21
21
  entries = Dir.entries(input_dir); entries.delete("."); entries.delete("..")
22
- io = Zip::ZipFile.open(output_file, Zip::ZipFile::CREATE);
22
+ io = Zip::File.open(output_file, Zip::File::CREATE);
23
23
 
24
24
  write_entries(entries, "", io, input_dir, output_file)
25
25
  io.close();
@@ -49,7 +49,7 @@ module Packer
49
49
  if File.directory?(disk_file_path)
50
50
  io.mkdir(zip_file_path)
51
51
  subdir =Dir.entries(disk_file_path); subdir.delete("."); subdir.delete("..")
52
- write_entries(subdir, zip_file_path, io)
52
+ write_entries(subdir, zip_file_path, io, input_dir, output_file)
53
53
  else
54
54
  io.get_output_stream(zip_file_path) { |f| f.puts(File.open(disk_file_path, "rb").read())}
55
55
  end
@@ -5,8 +5,9 @@ module Packer
5
5
 
6
6
  def initialize
7
7
  @packer_version = Packer::Binary.config.version
8
- @download_path = "#{Packer::Binary.config.download_path}/packer-binary/#{@packer_version}/bin"
8
+ @download_path = "#{Packer::Binary.config.download_path.chomp('/')}/packer-binary/#{@packer_version}/bin"
9
9
  @download_filename = "#{@packer_version}-packer.zip"
10
+
10
11
  FileUtils.mkdir_p @download_path
11
12
 
12
13
  raise 'Your OS is not supported' unless supported?
@@ -1,5 +1,5 @@
1
1
  module Packer
2
2
  module Binary
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["nathan.cazell@imageapi.com"]
11
11
 
12
12
  spec.summary = %q{A gem to install and interface with HashiCorp's Packer utility}
13
- spec.homepage = "https://github.com/nathantcz/packer-ruby"
13
+ spec.homepage = "https://github.com/nathantcz/packer-binary"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: packer-binary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Cazell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-30 00:00:00.000000000 Z
11
+ date: 2017-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -145,7 +145,7 @@ files:
145
145
  - lib/packer/binary/helpers.rb
146
146
  - lib/packer/binary/version.rb
147
147
  - packer-binary.gemspec
148
- homepage: https://github.com/nathantcz/packer-ruby
148
+ homepage: https://github.com/nathantcz/packer-binary
149
149
  licenses:
150
150
  - MIT
151
151
  metadata: {}