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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1369acdf78065d7a2a8679e428f3fff5505a9ab4b0ee42165269e775eaceb1b9
4
- data.tar.gz: e6c777f04fae2dcf40c54431680372ae7e8ccc105d3144f19b09b81eb29d5dd4
3
+ metadata.gz: bb41fe06a29ef094a9cbd527258349fe72ac728545923517d04285ca666806f5
4
+ data.tar.gz: 152fe99410d8e11a7003bd6a98de8867061cbcd6f472f76548bbf3ac4fa45546
5
5
  SHA512:
6
- metadata.gz: 704504fbb115cb2b06fb02ca46edd790fb58c94e6e3e6008cd5b414c3b29424835a19b56a4d1e5c8d050f5a81c6b6013a1f2c66ca054ab30ef6bc258874d1354
7
- data.tar.gz: 11e646721d3e75cda5c9af6636ee27240944c84b681db85aad963a5b93b3d02dd41cf45253b8e54768ab6ae550854a93cc70f72e20a2d5bbe3053810fd5e980d
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
@@ -1,3 +1,3 @@
1
1
  module Hatchet
2
- VERSION = "4.0.3"
2
+ VERSION = "4.0.4"
3
3
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku_hatchet
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.3
4
+ version: 4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Schneeman