travis_heroku 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/bin/travis-heroku CHANGED
@@ -1,14 +1,15 @@
1
- #!/bin/sh
1
+ #!/usr/bin/env ruby
2
2
 
3
- wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sudo sh
3
+ require 'heroku-api'
4
4
 
5
- KEY_PATH=$HOME/.ssh/id_rsa
6
- KEY_ID=travis$TRAVIS_JOB_NUMBER
7
- ssh-keygen -f $KEY_PATH -C $KEY_ID -P ''
8
- heroku keys:add
5
+ heroku = Heroku::API.new
9
6
 
10
- git remote add heroku git@heroku.com:${HEROKU_APP}.git
11
- GIT_SSH=ssh-nostrict
12
- git push heroku master
7
+ key_path = File.expand_path('~/.ssh/id_rsa')
8
+ key_id = "travis#{ENV['TRAVIS_JOB_NUMBER']}"
9
+ puts `ssh-keygen -f #{key_path} -C #{key_id} -P ''`
10
+ heroku.post_key(File.read("#{key_path}.pub"))
13
11
 
14
- heroku keys:remove $KEY_ID
12
+ puts `git remote add heroku git@heroku.com:${HEROKU_APP}.git`
13
+ puts `GIT_SSH=ssh-nostrict git push heroku master`
14
+
15
+ heroku.delete_key key_id
@@ -1,12 +1,14 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'travis_heroku'
3
- s.version = '0.0.1'
3
+ s.version = '0.0.2'
4
4
  s.summary = 'Easily trigger Heroku deploys from Travis builds.'
5
5
  s.description = s.summary
6
6
  s.homepage = 'https://github.com/mmb/travis-heroku'
7
7
  s.authors = ['Matthew M. Boedicker']
8
8
  s.email = %w{matthewm@boedicker.org}
9
9
 
10
+ s.add_dependency 'heroku-api'
11
+
10
12
  s.files = `git ls-files`.split("\n")
11
13
  s.executables = %w{travis-heroku ssh-nostrict}
12
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: travis_heroku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,23 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
  date: 2013-02-02 00:00:00.000000000 Z
13
- dependencies: []
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: heroku-api
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
14
30
  description: Easily trigger Heroku deploys from Travis builds.
15
31
  email:
16
32
  - matthewm@boedicker.org
@@ -23,7 +39,7 @@ files:
23
39
  - README.md
24
40
  - bin/ssh-nostrict
25
41
  - bin/travis-heroku
26
- - travis-heroku.gemspec
42
+ - travis_heroku.gemspec
27
43
  homepage: https://github.com/mmb/travis-heroku
28
44
  licenses: []
29
45
  post_install_message: