Sha256: 03aa4e4b33db5d60da84c273f11ccb5a7c35bf07254b1d3296cbd708d36b825e
Contents?: true
Size: 506 Bytes
Versions: 1
Compression:
Stored size: 506 Bytes
Contents
require 'time' module HerokuSan class API def initialize(options = {}) @heroku_api = Heroku::API.new(options) end def method_missing(name, *args) @heroku_api.send(name, *args) rescue Heroku::API::Errors::ErrorWithResponse => error status = error.response.headers["Status"] msg = JSON.parse(error.response.body)['error'] rescue '???' error.set_backtrace([]) $stderr.puts "\nHeroku API ERROR: #{status} (#{msg})\n\n" raise error end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
heroku_san-4.3.0 | lib/heroku_san/api.rb |