class Escobar::Client
Top-level client for heroku
Attributes
github_token[R]
heroku[R]
Public Class Methods
from_environment()
click to toggle source
# File lib/escobar/client.rb, line 57 def self.from_environment new(Escobar.github_api_token, Escobar.heroku_api_token) end
new(github_token, heroku_token)
click to toggle source
# File lib/escobar/client.rb, line 62 def initialize(github_token, heroku_token) @github_token = github_token @heroku = Escobar::Heroku::Client.new(heroku_token) end
Public Instance Methods
[](key)
click to toggle source
# File lib/escobar/client.rb, line 74 def [](key) pipelines.find { |pipeline| pipeline.name == key } end
app_names()
click to toggle source
# File lib/escobar/client.rb, line 78 def app_names pipelines.map(&:name) end
inspect()
click to toggle source
mask password
Calls superclass method
# File lib/escobar/client.rb, line 68 def inspect inspected = super inspected = inspected.gsub! @github_token, "*******" if @github_token inspected end
pipelines()
click to toggle source
# File lib/escobar/client.rb, line 82 def pipelines @pipelines ||= heroku.get("/pipelines").map do |pipe| Escobar::Heroku::Pipeline.new(self, pipe["id"], pipe["name"]) end end