heroku_hatchet 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9f803b82d8440304dca2283cdcb3f1f9d689094
4
- data.tar.gz: bfd8d1b84f7fdd80f53535905f474bfdc82d5e59
3
+ metadata.gz: 8596154413de5982e37e4436abde9157a16a617a
4
+ data.tar.gz: ad14d6ed42cdff6b0c836a2f5f9542f8f59496a9
5
5
  SHA512:
6
- metadata.gz: 7f7cfcda96ee5f0222afc0cb70b2119007a8efadd6f72dd389b25df6754a46c7bb4336e88591e6678066f681ae4381af3f124221fb3b3ebdff24ec1435d2176a
7
- data.tar.gz: cf49871c076c769bf1bcd5f3cc24f4c1607de040ef684b3dd493fb5073dde7af70e3baff264406801aade89c423ce0378de8f7e43877af969798be29856abfa1
6
+ metadata.gz: 3d0c3568d2d1a2412414037238ec6f9d99d09a09e01aef4e6141a74b37748482d6b40d931a260a2ba3d876d878135f7c7204de74d80595c6a6c28fad5d26c447
7
+ data.tar.gz: df24e71f8545d30e4c1bb8ec90d4aa1178b49c1ac298a4215a9330a24d6e027d2eb5eeed058c170f0e2af2da5373cf1b9140c81e6f0e918a491704ea8105d0e4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## HEAD
2
2
 
3
+ ## 2.0.1
4
+
5
+ - Use actual email address instead of example
6
+
3
7
  ## 2.0.0
4
8
 
5
9
  - Support for Heroku CI added
data/README.md CHANGED
@@ -12,21 +12,34 @@ First run:
12
12
 
13
13
  $ bundle install
14
14
 
15
- This library uses the heroku-api gem, you will need to make your API key
16
- available to the system.
15
+ This library uses the heroku CLI and API, you will need to make your API key
16
+ available to the system. If you're running on a CI platform you'll need to generate an OAuth token and make it available on the system you're running on.
17
17
 
18
- You can get your token by running:
18
+ To get a token, first install the https://github.com/heroku/heroku-cli-oauth#creating plugin, then you can get your token by running:
19
19
 
20
- $ heroku auth:token
21
- alskdfju108f09uvngu172019
20
+ ```sh
21
+ $ heroku authorizations:create --description "For Travis"
22
+ Creating OAuth Authorization... done
23
+ Client: <none>
24
+ ID: <id value>
25
+ Description: For Travis
26
+ Scope: global
27
+ Token: <token>
28
+ ```
22
29
 
30
+ You'll set the `<token>` value to the `HEROKU_API_KEY` env var. For example on Travis you could add it like this:
23
31
 
24
- We need to export this token into our environment open up your `.bashrc`
32
+ ```sh
33
+ $ travis encrypt HEROKU_API_KEY=<token> --add
34
+ ```
25
35
 
26
- export HEROKU_API_KEY="alskdfju108f09uvngu172019"
36
+ You'll also need an email address that goes with your token:
37
+
38
+ ```sh
39
+ $ travis encrypt HEROKU_API_USER=<example@example.com> --add
40
+ ```
27
41
 
28
- Then source the file. If you don't want to set your api key system wide,
29
- it will be pulled automatically via shelling out, but this is slower.
42
+ If you're running locally, your system credentials will be pulled from `heroku auth:token`
30
43
 
31
44
  ## Run the Tests
32
45
 
data/lib/hatchet/tasks.rb CHANGED
@@ -16,14 +16,14 @@ namespace :hatchet do
16
16
  File.open(netrc, 'w') do |file|
17
17
  file.write <<EOF
18
18
  machine git.heroku.com
19
- login buildpack@example.com
19
+ login #{ENV['HEROKU_API_USER']}
20
20
  password #{ENV['HEROKU_API_KEY']}
21
21
  EOF
22
22
  end
23
23
  end
24
24
  [
25
25
  "bundle exec hatchet install",
26
- "if [ `git config --get user.email` ]; then echo 'already set'; else `git config --global user.email 'buildpack@example.com'`; fi",
26
+ "if [ `git config --get user.email` ]; then echo 'already set'; else `git config --global user.email '#{ENV['HEROKU_API_USER']}'`; fi",
27
27
  "if [ `git config --get user.name` ]; then echo 'already set'; else `git config --global user.name 'BuildpackTester'` ; fi",
28
28
  "echo '#{config_ssh}' >> ~/.ssh/config",
29
29
  "curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://toolbelt.heroku.com/install-ubuntu.sh | sh",
@@ -1,7 +1,7 @@
1
1
  module Hatchet
2
2
  class FailedTestError < StandardError
3
3
  def initialize(app, output)
4
- msg = "Could run tests on pipeline id: '#{app.pipeline_id}' (#{app.repo_name}) at path: '#{app.directory}'\n" <<
4
+ msg = "Could not run tests on pipeline id: '#{app.pipeline_id}' (#{app.repo_name}) at path: '#{app.directory}'\n" <<
5
5
  " if this was expected add `allow_failure: true` to your hatchet initialization hash.\n" <<
6
6
  "output:\n" <<
7
7
  "#{output}"
@@ -1,3 +1,3 @@
1
1
  module Hatchet
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
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: 2.0.0
4
+ version: 2.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-03-30 00:00:00.000000000 Z
11
+ date: 2017-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: platform-api