class Herokenv::Client
Attributes
app[RW]
oauth_token[RW]
Public Class Methods
new(oauth_token:, app:)
click to toggle source
# File lib/herokenv/client.rb, line 7 def initialize(oauth_token:, app:) @oauth_token = oauth_token @app = app end
Public Instance Methods
heroku()
click to toggle source
# File lib/herokenv/client.rb, line 25 def heroku @heroku ||= PlatformAPI.connect_oauth(oauth_token) end
populate_env_from_app(only: nil, except: nil)
click to toggle source
# File lib/herokenv/client.rb, line 12 def populate_env_from_app(only: nil, except: nil) configs = heroku.config_var.info_for_app(app) configs.each_pair do |var, value| if except && except.include?(var) next end if only && !only.include?(var) next end ENV[var] = value end end