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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0bc601e0ae8e788119ff4b30e7ce12a45d7ab3ae0b0987ecdd4b45c885f9ada4
4
- data.tar.gz: c53094f4224088d6a046fdaad716840bd0f821ec4dd29a1c3512c176302f00ac
3
+ metadata.gz: 311a36bbbef8a863eae884262dd63a7b79c68180d6a821c48cb4e3b8bed99dc4
4
+ data.tar.gz: 87e7183bac5438aa5abbfd1bbbde7dc746ee9db768b51e267d4a4bc0b5d0c033
5
5
  SHA512:
6
- metadata.gz: fa0bbfb55fd33146016a1b096d5b40c9eb103d0d04a78c5254b4884d9a8fdfd0ced8b9202eee1dde1a64faa3f598465b3c6bfcdbd3989ce49e6988c639938754
7
- data.tar.gz: '0790ba7c73c13834b421803a3243c32c0cd51b711821c30457ef64c3cc1c2758d81455a98f89f71ea0d65c8aa6783849e00fa67cf529abb98366ada85c9c5ffc'
6
+ metadata.gz: d3f54b86369790c15741868f482a93d64cc93ba72ee580a9ed0c7d665f15e4ba3d6eb4431595830674f398385429ed591c1204227dacddc751e8c36b8bd1ed2e
7
+ data.tar.gz: 2090cecc2116f9446653b0f7af73b496cb64427c5f956d1a4a8697f06c3bc3d5fdfce2a99d660040b39776186b9f0bcbfbcfca657e7e44537a6c81909e862583
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hashipack (0.1.2)
4
+ hashipack (0.1.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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 = File.read('myimage.pkr.hcl')
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
@@ -2,11 +2,8 @@ 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)
6
- template = Tempfile.new(["template", ".pkr.hcl"])
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hashipack
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
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.2
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-17 00:00:00.000000000 Z
11
+ date: 2023-10-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: None.
14
14
  email: