hashipack 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.standard.yml +3 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -0
- data/lib/hashipack/client.rb +2 -3
- data/lib/hashipack/message.rb +3 -3
- data/lib/hashipack/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bc601e0ae8e788119ff4b30e7ce12a45d7ab3ae0b0987ecdd4b45c885f9ada4
|
4
|
+
data.tar.gz: c53094f4224088d6a046fdaad716840bd0f821ec4dd29a1c3512c176302f00ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa0bbfb55fd33146016a1b096d5b40c9eb103d0d04a78c5254b4884d9a8fdfd0ced8b9202eee1dde1a64faa3f598465b3c6bfcdbd3989ce49e6988c639938754
|
7
|
+
data.tar.gz: '0790ba7c73c13834b421803a3243c32c0cd51b711821c30457ef64c3cc1c2758d81455a98f89f71ea0d65c8aa6783849e00fa67cf529abb98366ada85c9c5ffc'
|
data/.standard.yml
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Hashipack
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/hashipack.svg)](https://badge.fury.io/rb/hashipack)
|
4
|
+
[![Ruby Code Style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/standardrb/standard)
|
5
|
+
|
3
6
|
Hashipack is a Ruby client for Hashicorp's Packer.
|
4
7
|
|
5
8
|
It allows building images and provides live status updates about the progress, as well as the resulting artifacts.
|
data/lib/hashipack/client.rb
CHANGED
@@ -2,7 +2,7 @@ require 'tempfile'
|
|
2
2
|
|
3
3
|
module Hashipack
|
4
4
|
class Client
|
5
|
-
def build(content, on_output: lambda{}, on_progress: lambda{}, estimated_duration: 300)
|
5
|
+
def build(content, on_output: lambda {}, on_progress: lambda {}, estimated_duration: 300)
|
6
6
|
template = Tempfile.new(["template", ".pkr.hcl"])
|
7
7
|
template.write(content)
|
8
8
|
template.close
|
@@ -14,7 +14,6 @@ module Hashipack
|
|
14
14
|
artifacts = []
|
15
15
|
|
16
16
|
IO.popen(command).each do |line|
|
17
|
-
|
18
17
|
message = Message.parse(line)
|
19
18
|
|
20
19
|
if message.type == :ui
|
@@ -37,7 +36,7 @@ module Hashipack
|
|
37
36
|
end
|
38
37
|
end
|
39
38
|
|
40
|
-
|
39
|
+
artifacts
|
41
40
|
end
|
42
41
|
end
|
43
42
|
end
|
data/lib/hashipack/message.rb
CHANGED
@@ -3,12 +3,12 @@ module Hashipack
|
|
3
3
|
def self.parse(line)
|
4
4
|
msg = Message.new(line)
|
5
5
|
if msg.ui?
|
6
|
-
|
6
|
+
UiMessage.new(line)
|
7
7
|
elsif msg.artifact?
|
8
|
-
|
8
|
+
ArtifactMessage.new(line)
|
9
9
|
else
|
10
10
|
puts "Ignoring unknown message type #{msg.type}"
|
11
|
-
|
11
|
+
Message.new(line)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
data/lib/hashipack/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hashipack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas_Skywalker
|
@@ -30,11 +30,11 @@ files:
|
|
30
30
|
- lib/hashipack/message.rb
|
31
31
|
- lib/hashipack/version.rb
|
32
32
|
- sig/hashipack.rbs
|
33
|
-
homepage: https://code-fabrik
|
33
|
+
homepage: https://github.com/code-fabrik/hashipack
|
34
34
|
licenses: []
|
35
35
|
metadata:
|
36
36
|
allowed_push_host: https://rubygems.org
|
37
|
-
homepage_uri: https://code-fabrik
|
37
|
+
homepage_uri: https://github.com/code-fabrik/hashipack
|
38
38
|
source_code_uri: https://github.com/code-fabrik/hashipack-ruby
|
39
39
|
changelog_uri: https://github.com/code-fabrik/hashipack-ruby/blob/master/CHANGELOG.md
|
40
40
|
post_install_message:
|