kensa 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/heroku/kensa.rb +1 -1
- data/lib/heroku/kensa/client.rb +7 -3
- metadata +5 -6
- data/.gitignore +0 -2
data/lib/heroku/kensa.rb
CHANGED
data/lib/heroku/kensa/client.rb
CHANGED
@@ -69,12 +69,12 @@ module Heroku
|
|
69
69
|
|
70
70
|
def push
|
71
71
|
user, password = ask_for_credentials
|
72
|
-
host =
|
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
|
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 =
|
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
|
-
-
|
9
|
-
version: 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-
|
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
|
-
|
185
|
+
rdoc_options: []
|
186
|
+
|
188
187
|
require_paths:
|
189
188
|
- lib
|
190
189
|
required_ruby_version: !ruby/object:Gem::Requirement
|
data/.gitignore
DELETED