lib/heroku/api.rb in heroku-api-0.2.4 vs lib/heroku/api.rb in heroku-api-0.2.5

- old
+ new

@@ -56,13 +56,11 @@ end def request(params, &block) begin response = @connection.request(params, &block) - rescue Excon::Errors::SocketError => error - raise error - rescue Excon::Errors::Error => error + rescue Excon::Errors::HTTPStatusError => error klass = case error.response.status when 401 then Heroku::API::Errors::Unauthorized when 402 then Heroku::API::Errors::VerificationRequired when 403 then Heroku::API::Errors::Forbidden when 404 then Heroku::API::Errors::NotFound @@ -104,10 +102,13 @@ end app_params end def addon_params(params) - {:config => params} + params.inject({}) do |accum, (key, value)| + accum["config[#{key}]"] = value + accum + end end def ps_options(params) if ps_env = params.delete(:ps_env) || params.delete('ps_env') ps_env.each do |key, value|