heroku_san 4.3.1 → 4.3.2

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.
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"
@@ -25,7 +25,7 @@ Feature: heroku_san can shell out to heroku without errors
25
25
 
26
26
  api = HerokuSan::API.new
27
27
 
28
- api.sh('cool_app', 'version')
28
+ api.sh('any_app_name', 'auth:whoami')
29
29
  """
30
30
  And I write to "run_in_ruby_2.sh" with:
31
31
  """
@@ -202,7 +202,6 @@ When /^I install an addon$/ do
202
202
  app: #{@app}
203
203
  addons:
204
204
  - heroku-postgresql:dev
205
- - pgbackups:plus
206
205
 
207
206
  END_CONFIG
208
207
 
@@ -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
- @heroku_api.send(name, *args)
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
@@ -1,3 +1,3 @@
1
1
  module HerokuSan
2
- VERSION = "4.3.1"
2
+ VERSION = "4.3.2"
3
3
  end
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.1
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-23 00:00:00.000000000 Z
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: 364838446742760909
145
+ hash: -1867339558335233432
146
146
  required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  none: false
148
148
  requirements: