kensa 1.1.1 → 1.1.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.
@@ -5,6 +5,6 @@ require 'heroku/kensa/sso'
5
5
 
6
6
  module Heroku
7
7
  module Kensa
8
- VERSION = "1.1.1"
8
+ VERSION = "1.1.2"
9
9
  end
10
10
  end
@@ -69,12 +69,12 @@ module Heroku
69
69
 
70
70
  def push
71
71
  user, password = ask_for_credentials
72
- host = ENV['ADDONS_HOST'] || 'https://addons.heroku.com'
72
+ host = heroku_host
73
73
  data = Yajl::Parser.parse(resolve_manifest)
74
74
  resource = RestClient::Resource.new(host, user, password)
75
75
  resource['provider/addons'].post(resolve_manifest, headers)
76
76
  puts "-----> Manifest for \"#{data['id']}\" was pushed successfully"
77
- puts " Continue at https://provider.heroku.com/addons/#{data['id']}"
77
+ puts " Continue at #{(heroku_host)}/addons/#{data['id']}"
78
78
  rescue RestClient::UnprocessableEntity => e
79
79
  abort("FAILED: #{e.http_body}")
80
80
  rescue RestClient::Unauthorized
@@ -93,7 +93,7 @@ module Heroku
93
93
  end
94
94
 
95
95
  user, password = ask_for_credentials
96
- host = ENV['ADDONS_HOST'] || 'https://addons.heroku.com'
96
+ host = heroku_host
97
97
  resource = RestClient::Resource.new(host, user, password)
98
98
  manifest = resource["provider/addons/#{addon}"].get(headers)
99
99
  File.open(filename, 'w') { |f| f.puts manifest }
@@ -109,6 +109,10 @@ module Heroku
109
109
  { :accept => :json, "X-Kensa-Version" => "1", "User-Agent" => "kensa/#{VERSION}" }
110
110
  end
111
111
 
112
+ def heroku_host
113
+ ENV['ADDONS_URL'] || 'https://addons.heroku.com'
114
+ end
115
+
112
116
  def resolve_manifest
113
117
  if manifest_exists?
114
118
  File.read(filename)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 1
8
- - 1
9
- version: 1.1.1
8
+ - 2
9
+ version: 1.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Blake Mizerany
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-01-26 00:00:00 -08:00
19
+ date: 2011-02-17 00:00:00 -08:00
20
20
  default_executable: kensa
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -154,7 +154,6 @@ extensions: []
154
154
  extra_rdoc_files:
155
155
  - README.md
156
156
  files:
157
- - .gitignore
158
157
  - README.md
159
158
  - Rakefile
160
159
  - bin/kensa
@@ -183,8 +182,8 @@ homepage: http://provider.heroku.com/resources
183
182
  licenses: []
184
183
 
185
184
  post_install_message:
186
- rdoc_options:
187
- - --charset=UTF-8
185
+ rdoc_options: []
186
+
188
187
  require_paths:
189
188
  - lib
190
189
  required_ruby_version: !ruby/object:Gem::Requirement
data/.gitignore DELETED
@@ -1,2 +0,0 @@
1
- addon-manifest.json
2
- pkg/