heroku_hatchet 4.1.1 → 4.1.2

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: 879f4df69cef6001a414901541ac22e24ab72d4011c2c51f8e3af60bf32e6a1c
4
- data.tar.gz: a70a7755b68c22722e77467dfbffcbae34fe37e7252ee8e252f096f1ef8f00e5
3
+ metadata.gz: 2b30075b5028dc2c364c35d338ad0d48e7a9318c088c9f433936664d60262318
4
+ data.tar.gz: 4cc696dadc3e206ff256d252b756c950d4ca0a36e541f554d1c8d416005418f3
5
5
  SHA512:
6
- metadata.gz: eccbe2d8e66399f5a8cb0e619299ee27200fd74ff1c2de6a71dfdb8059891a4d7a21e0c95edae43218184fa816af23ec326da70f67da9828755d17e4a8274f56
7
- data.tar.gz: aece0edf868b9737db650eb2815b7cb2929c4b7b5fc5847d3016289e3d0db55a63f8985cfb0bccefd90c7e1b7a1b0db56d4dd795a155223d72f7ec6d5d7ba24c
6
+ metadata.gz: b19500cd4df7b71b00d9930f47aa732db1535108895cd23c04eddc34aaad9f35550a19ff6a596c5b3b52fa01afe2cc48e7243cb4223c1c9fe5419197095db6d6
7
+ data.tar.gz: 283b420ef99004247dc2ef190771a43fe401052aec131dc55531c5ebebd1f4f0ca0d3d3976d9fe4f49e8a026193975bfce7e9d7485efdfa6fbbea0167dee9bf7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## HEAD
2
2
 
3
+ ## 4.1.2
4
+
5
+ - Hatchet::App.default_buildpack is aliased to `:default` symbol while passing in buildpacks as an array to Hatchet::App (https://github.com/heroku/hatchet/pull/73)
6
+
3
7
  ## 4.1.1
4
8
 
5
9
  - Fix branch resolution on Travis when a pull-request is tested (https://github.com/heroku/hatchet/pull/70)
data/README.md CHANGED
@@ -187,12 +187,16 @@ def test_deploy
187
187
  # ...
188
188
  ```
189
189
 
190
- You can specify multiple buildpacks by passing in an array.
190
+ You can specify multiple buildpacks by passing in an array. When you do that you also need to tell hatchet where to place your buildpack. Since hatchet needs to build your buildpack from a branch you should not hardcode a path like `heroku/ruby` instead Hatchet has a replacement mechanism. Use the `:default` symbol where you want your buildpack to execute. For example:
191
191
 
192
- You can use `Hatchet::App.default_buildpack` to get the buildpack URL and branch specified by environment variables:
192
+ ```
193
+ Hatchet::Runner.new("default_ruby", buildpacks: [:default, "https://github.com/pgbouncer/pgbouncer"])
194
+ ```
195
+
196
+ That will expand your buildpack and branch. For example if you're on the `update_readme` branch of the `heroku-buildpack-ruby` buildpack it would expand to:
193
197
 
194
198
  ```
195
- Hatchet::Runner.new("default_ruby", buildpacks: [Hatchet::App.default_buildpack, "https://github.com/pgbouncer/pgbouncer"])
199
+ Hatchet::Runner.new("default_ruby", buildpacks: ["https://github.com/heroku/heroku-buildpack-ruby#update_readme", "https://github.com/pgbouncer/pgbouncer"])
196
200
  ```
197
201
 
198
202
  You can also specify a stack:
data/lib/hatchet/app.rb CHANGED
@@ -9,7 +9,7 @@ module Hatchet
9
9
  HATCHET_BUILDPACK_BRANCH = -> { ENV['HATCHET_BUILDPACK_BRANCH'] || ENV['HEROKU_TEST_RUN_BRANCH'] || Hatchet.git_branch }
10
10
  BUILDPACK_URL = "https://github.com/heroku/heroku-buildpack-ruby.git"
11
11
 
12
- attr_reader :name, :stack, :directory, :repo_name, :app_config
12
+ attr_reader :name, :stack, :directory, :repo_name, :app_config, :buildpacks
13
13
 
14
14
  class FailedDeploy < StandardError
15
15
  def initialize(app, output)
@@ -45,6 +45,8 @@ module Hatchet
45
45
  @labs = ([] << labs).flatten.compact
46
46
  @buildpacks = buildpack || buildpacks || buildpack_url || self.class.default_buildpack
47
47
  @buildpacks = Array(@buildpacks)
48
+ @buildpacks.map! {|b| b == :default ? self.class.default_buildpack : b}
49
+
48
50
  @before_deploy = before_deploy
49
51
  @app_config = config
50
52
  @reaper = Reaper.new(api_rate_limit: api_rate_limit)
@@ -1,3 +1,3 @@
1
1
  module Hatchet
2
- VERSION = "4.1.1"
2
+ VERSION = "4.1.2"
3
3
  end
@@ -1,6 +1,11 @@
1
1
  require 'test_helper'
2
2
 
3
3
  class AppTest < Minitest::Test
4
+ def test_app_with_default
5
+ app = Hatchet::App.new("default_ruby", buildpacks: [:default])
6
+ assert_match "https://github.com/heroku/heroku-buildpack-ruby", app.buildpacks.first
7
+ end
8
+
4
9
  def test_create_app_with_stack
5
10
  stack = "heroku-16"
6
11
  app = Hatchet::App.new("default_ruby", stack: stack)
@@ -62,7 +67,7 @@ class AppTest < Minitest::Test
62
67
  end
63
68
  end
64
69
  end
65
-
70
+
66
71
  def test_run
67
72
  app = Hatchet::GitApp.new("default_ruby")
68
73
  app.deploy do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku_hatchet
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.1
4
+ version: 4.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Schneeman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-06 00:00:00.000000000 Z
11
+ date: 2020-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: platform-api