packer-binary 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/packer/binary/compressor.rb +2 -2
- data/lib/packer/binary/executable.rb +2 -1
- data/lib/packer/binary/version.rb +1 -1
- data/packer-binary.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d610905638a3f77ae5f74ac0de28dde44057af1d
|
4
|
+
data.tar.gz: aaa280ab1dc68c53d90c4ce9424ffc70cd3d536e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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/
|
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::
|
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?
|
data/packer-binary.gemspec
CHANGED
@@ -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-
|
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.
|
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-
|
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-
|
148
|
+
homepage: https://github.com/nathantcz/packer-binary
|
149
149
|
licenses:
|
150
150
|
- MIT
|
151
151
|
metadata: {}
|