heroku_san 4.3.1 → 4.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/features/shell_execution.feature +1 -1
- data/features/step_definitions/remote_steps.rb +0 -1
- data/lib/heroku_san/api.rb +8 -3
- data/lib/heroku_san/version.rb +1 -1
- metadata +3 -3
data/.travis.yml
CHANGED
@@ -9,6 +9,7 @@ env:
|
|
9
9
|
global:
|
10
10
|
- secure: dAxfEdg/7Cb/G9vkrn/ifdvycbXWtK2ey60JMepOxx9v3QyaqoSY3w5G0QB+4+uyOYmHwtif8tnK3Sa8jbBgqhAlXaxqxOT8WmQKYlhSgwWX4lQe4lUM5jkOkfNHRMRaQvCAn27gNAjdIRU7sb2cU/pm64eAFbU01TejJOM7Aow=
|
11
11
|
before_install:
|
12
|
+
- sudo apt-get install openssl
|
12
13
|
- wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
|
13
14
|
before_script:
|
14
15
|
- git config --global user.name "Travis CI"
|
data/lib/heroku_san/api.rb
CHANGED
@@ -4,8 +4,6 @@ module HerokuSan
|
|
4
4
|
class API
|
5
5
|
def initialize(options = {})
|
6
6
|
@options = options
|
7
|
-
@options[:api_key] ||= auth_token
|
8
|
-
@heroku_api = Heroku::API.new(@options)
|
9
7
|
end
|
10
8
|
|
11
9
|
def sh(app, *command)
|
@@ -23,7 +21,7 @@ module HerokuSan
|
|
23
21
|
end
|
24
22
|
|
25
23
|
def method_missing(name, *args)
|
26
|
-
|
24
|
+
heroku_api.send(name, *args)
|
27
25
|
rescue Heroku::API::Errors::ErrorWithResponse => error
|
28
26
|
status = error.response.headers["Status"]
|
29
27
|
msg = JSON.parse(error.response.body)['error'] rescue '???'
|
@@ -34,6 +32,13 @@ module HerokuSan
|
|
34
32
|
|
35
33
|
private
|
36
34
|
|
35
|
+
def heroku_api
|
36
|
+
@heroku_api ||= begin
|
37
|
+
@options[:api_key] ||= auth_token
|
38
|
+
Heroku::API.new(@options)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
37
42
|
def auth_token
|
38
43
|
ENV['HEROKU_API_KEY'] || Bundler.with_clean_env { `heroku auth:token`.chomp }
|
39
44
|
rescue Errno::ENOENT
|
data/lib/heroku_san/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heroku_san
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.3.
|
4
|
+
version: 4.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-10-
|
15
|
+
date: 2013-10-28 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: heroku-api
|
@@ -142,7 +142,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
142
142
|
version: '0'
|
143
143
|
segments:
|
144
144
|
- 0
|
145
|
-
hash:
|
145
|
+
hash: -1867339558335233432
|
146
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
147
|
none: false
|
148
148
|
requirements:
|