Module: Kr
- Defined in:
- lib/kr.rb,
lib/kr/version.rb
Constant Summary collapse
- VERSION =
'0.0.3'
Class Method Summary collapse
-
.configure_netrc ⇒ Object
TODO: Yeah we should probably be more helpful.
- .connect ⇒ Object
Class Method Details
.configure_netrc ⇒ Object
TODO: Yeah we should probably be more helpful
18 19 20 |
# File 'lib/kr.rb', line 18 def self.configure_netrc puts "Please configure your netrc for Heroku!" end |
.connect ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/kr.rb', line 8 def self.connect username, token = Netrc.read["api.heroku.com"] configure_netrc if [username, token].any?(&:nil?) username = CGI.escape(username) url = "https://#{username}:#{token}@api.heroku.com/schema" = {default_headers: {'Accept' => 'application/vnd.heroku+json; version=3'}} Heroics.client_from_schema_url(url, ) end |