hashipack 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +11 -2
- data/lib/hashipack/client.rb +2 -5
- data/lib/hashipack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 311a36bbbef8a863eae884262dd63a7b79c68180d6a821c48cb4e3b8bed99dc4
|
4
|
+
data.tar.gz: 87e7183bac5438aa5abbfd1bbbde7dc746ee9db768b51e267d4a4bc0b5d0c033
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3f54b86369790c15741868f482a93d64cc93ba72ee580a9ed0c7d665f15e4ba3d6eb4431595830674f398385429ed591c1204227dacddc751e8c36b8bd1ed2e
|
7
|
+
data.tar.gz: 2090cecc2116f9446653b0f7af73b496cb64427c5f956d1a4a8697f06c3bc3d5fdfce2a99d660040b39776186b9f0bcbfbcfca657e7e44537a6c81909e862583
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -35,13 +35,22 @@ Create a client:
|
|
35
35
|
client = Hashipack::Client.new
|
36
36
|
```
|
37
37
|
|
38
|
-
Build an image by providing the template:
|
38
|
+
Build an image by providing the filename of the template:
|
39
39
|
|
40
40
|
```ruby
|
41
|
-
template =
|
41
|
+
template = 'myimage.pkr.hcl'
|
42
42
|
result = client.build(template)
|
43
43
|
```
|
44
44
|
|
45
|
+
If the template and the assets are in a different folder:
|
46
|
+
|
47
|
+
```ruby
|
48
|
+
Dir.chdir('./app/templates') do
|
49
|
+
template = 'myimage.pkr.hcl'
|
50
|
+
result = client.build(template)
|
51
|
+
end
|
52
|
+
```
|
53
|
+
|
45
54
|
Subscribe to log messages and print them as they arrive:
|
46
55
|
|
47
56
|
```ruby
|
data/lib/hashipack/client.rb
CHANGED
@@ -2,11 +2,8 @@ require 'tempfile'
|
|
2
2
|
|
3
3
|
module Hashipack
|
4
4
|
class Client
|
5
|
-
def build(
|
6
|
-
|
7
|
-
template.write(content)
|
8
|
-
template.close
|
9
|
-
command = "packer -machine-readable build #{template.path}"
|
5
|
+
def build(filename, on_output: lambda {}, on_progress: lambda {}, estimated_duration: 300)
|
6
|
+
command = "packer -machine-readable build #{filename}"
|
10
7
|
|
11
8
|
initial_timestamp = 99999999999
|
12
9
|
last_timestamp = 0
|
data/lib/hashipack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas_Skywalker
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: None.
|
14
14
|
email:
|