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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +7 -3
- data/lib/hatchet/app.rb +3 -1
- data/lib/hatchet/version.rb +1 -1
- data/test/hatchet/app_test.rb +6 -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: 2b30075b5028dc2c364c35d338ad0d48e7a9318c088c9f433936664d60262318
|
4
|
+
data.tar.gz: 4cc696dadc3e206ff256d252b756c950d4ca0a36e541f554d1c8d416005418f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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: [
|
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)
|
data/lib/hatchet/version.rb
CHANGED
data/test/hatchet/app_test.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2020-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: platform-api
|