heroku_hatchet 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +14 -0
- data/lib/hatchet/app.rb +14 -3
- data/lib/hatchet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18f65a81f31b1549009b85bd89b76cb6867ab8d8
|
4
|
+
data.tar.gz: d1120b62d712376dd9046c3b3aa23b237a634f0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a9d89b74535cccc0248c6d28d7436ab79e605702f33a0ed6e4dfe34fc0259489374cd490baaf085be3c042789e903b81c9b8e4df577fde93ba369173f2e3000
|
7
|
+
data.tar.gz: 49f9161c829dba59d55775843ec24a805e043d788795e5e6d1feea72f908c031eb2d9119b3a0b6d26217321105fc33ab8b86e84e78ee7caf27a5d414424a9141
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
## HEAD
|
2
2
|
|
3
|
+
## 3.0.1
|
4
|
+
|
5
|
+
- Can pass in multiple buildpacks to constructor
|
6
|
+
- app#update_stack() added
|
7
|
+
- Can pass stack into constructor
|
8
|
+
- Added `Hatchet::App.default_buildpack`
|
9
|
+
|
3
10
|
## 3.0.0
|
4
11
|
|
5
12
|
- Use v3 of the Heroku API because Heroku is deprecating v2
|
data/README.md
CHANGED
@@ -170,6 +170,20 @@ def test_deploy
|
|
170
170
|
# ...
|
171
171
|
```
|
172
172
|
|
173
|
+
You can specify multiple buildpacks by passing in an Array.
|
174
|
+
|
175
|
+
You can use `Hatchet::App.default_buildpack` to get the buildpack URL and branch specified by environment variables:
|
176
|
+
|
177
|
+
```
|
178
|
+
Hatchet::Runner.new("default_ruby", buildpacks: [Hatchet::App.default_buildpack, "https://github.com/pgbouncer/pgbouncer"])
|
179
|
+
```
|
180
|
+
|
181
|
+
You can also specify a stack:
|
182
|
+
|
183
|
+
```
|
184
|
+
Hatchet::Runner.new("rails3_mri_193", stack: "cedar-14").deploy do |app|
|
185
|
+
```
|
186
|
+
|
173
187
|
## Getting Deploy Output
|
174
188
|
|
175
189
|
After Hatchet deploys your app you can get the output by using `app.output`
|
data/lib/hatchet/app.rb
CHANGED
@@ -27,10 +27,15 @@ module Hatchet
|
|
27
27
|
@debug = options[:debug] || options[:debugging]
|
28
28
|
@allow_failure = options[:allow_failure] || false
|
29
29
|
@labs = ([] << options[:labs]).flatten.compact
|
30
|
-
@
|
30
|
+
@buildpacks = options[:buildpack] || options[:buildpacks] || options[:buildpack_url] || self.class.default_buildpack
|
31
|
+
@buildpacks = Array(@buildpacks)
|
31
32
|
@reaper = Reaper.new(platform_api: platform_api)
|
32
33
|
end
|
33
34
|
|
35
|
+
def self.default_buildpack
|
36
|
+
[HATCHET_BUILDPACK_BASE, HATCHET_BUILDPACK_BRANCH.call].join("#")
|
37
|
+
end
|
38
|
+
|
34
39
|
def allow_failure?
|
35
40
|
@allow_failure
|
36
41
|
end
|
@@ -130,6 +135,11 @@ module Hatchet
|
|
130
135
|
end
|
131
136
|
end
|
132
137
|
|
138
|
+
def update_stack(stack_name)
|
139
|
+
@stack = stack_name
|
140
|
+
platform_api.app.update(name, build_stack: @stack)
|
141
|
+
end
|
142
|
+
|
133
143
|
# creates a new heroku app via the API
|
134
144
|
def setup!
|
135
145
|
return self if @app_is_setup
|
@@ -137,7 +147,8 @@ module Hatchet
|
|
137
147
|
create_app
|
138
148
|
set_labs!
|
139
149
|
# heroku.put_config_vars(name, 'BUILDPACK_URL' => @buildpack)
|
140
|
-
|
150
|
+
buildpack_list = @buildpacks.map {|pack| { buildpack: pack }}
|
151
|
+
platform_api.buildpack_installation.update(name, updates: buildpack_list)
|
141
152
|
@app_is_setup = true
|
142
153
|
self
|
143
154
|
end
|
@@ -225,7 +236,7 @@ module Hatchet
|
|
225
236
|
# create_app
|
226
237
|
# platform_api.pipeline_coupling.create(app: name, pipeline: @pipeline_id, stage: "development")
|
227
238
|
test_run = TestRun.new(token: api_key,
|
228
|
-
buildpacks: @
|
239
|
+
buildpacks: @buildpacks,
|
229
240
|
timeout: timeout,
|
230
241
|
app: self,
|
231
242
|
pipeline: @pipeline_id)
|
data/lib/hatchet/version.rb
CHANGED
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: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Schneeman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: platform-api
|