heroku_hatchet 4.0.3 → 4.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/hatchet/app.rb +5 -2
- data/lib/hatchet/version.rb +1 -1
- data/test/hatchet/heroku_api_test.rb +10 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb41fe06a29ef094a9cbd527258349fe72ac728545923517d04285ca666806f5
|
4
|
+
data.tar.gz: 152fe99410d8e11a7003bd6a98de8867061cbcd6f472f76548bbf3ac4fa45546
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec9a91e25070cea2636ff8f32748f5cb0dfc201b285ae8ab91d8b0cec88748699de4a5171cf8d68f7a505aba939f8cd4fb067e5b123437f48745bc1307183118
|
7
|
+
data.tar.gz: 5f3e09e9f4cea9581dee1de13057703ba6ac9c18403b6a60fa16b1465b2693048a2f14bc80405744901383a7262c92d5af82cf3606de6744cf3e4968ee6014b4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
## HEAD
|
2
2
|
|
3
|
+
## 4.0.4 - release not found
|
4
|
+
|
5
|
+
- Allow setting config when object is initialized (https://github.com/heroku/hatchet/pull/52)
|
6
|
+
|
3
7
|
## 4.0.3
|
4
8
|
|
5
9
|
- Introduce explicit `before_deploy` block that is called, well...before deploy happens. If any changes are made to disk at this time then contents are committed to disk (https://github.com/heroku/hatchet/pull/51)
|
data/lib/hatchet/app.rb
CHANGED
@@ -31,10 +31,11 @@ module Hatchet
|
|
31
31
|
buildpack: nil,
|
32
32
|
buildpacks: nil,
|
33
33
|
buildpack_url: nil,
|
34
|
-
before_deploy: nil
|
34
|
+
before_deploy: nil,
|
35
|
+
config: {}
|
35
36
|
)
|
36
37
|
@repo_name = repo_name
|
37
|
-
@directory = config.path_for_name(@repo_name)
|
38
|
+
@directory = self.config.path_for_name(@repo_name)
|
38
39
|
@name = name
|
39
40
|
@stack = stack
|
40
41
|
@debug = debug || debugging
|
@@ -43,6 +44,7 @@ module Hatchet
|
|
43
44
|
@buildpacks = buildpack || buildpacks || buildpack_url || self.class.default_buildpack
|
44
45
|
@buildpacks = Array(@buildpacks)
|
45
46
|
@before_deploy = before_deploy
|
47
|
+
@app_config = config
|
46
48
|
@reaper = Reaper.new(api_rate_limit: api_rate_limit)
|
47
49
|
end
|
48
50
|
|
@@ -162,6 +164,7 @@ module Hatchet
|
|
162
164
|
set_labs!
|
163
165
|
buildpack_list = @buildpacks.map { |pack| { buildpack: pack } }
|
164
166
|
api_rate_limit.call.buildpack_installation.update(name, updates: buildpack_list)
|
167
|
+
set_config @app_config
|
165
168
|
|
166
169
|
call_before_deploy
|
167
170
|
@app_is_setup = true
|
data/lib/hatchet/version.rb
CHANGED
@@ -17,4 +17,14 @@ class HerokuApiTest < Minitest::Test
|
|
17
17
|
ensure
|
18
18
|
runner.teardown! if runner
|
19
19
|
end
|
20
|
+
|
21
|
+
|
22
|
+
def test_config_vars_in_init
|
23
|
+
runner = Hatchet::Runner.new("no_lockfile", config: { foo: "bar"}).setup!
|
24
|
+
actual = runner.get_config
|
25
|
+
expected = {"foo" => "bar"}
|
26
|
+
assert_equal expected, actual
|
27
|
+
ensure
|
28
|
+
runner.teardown! if runner
|
29
|
+
end
|
20
30
|
end
|