Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (18 sloc) 0.549 kb
require 'iron_cache'
require 'uber_config'
require 'yaml'
require 'open-uri'
class ConfigPusher
def push
@config = UberConfig.load
raise "Config needs an app_name field." unless @config['app_name']
c = IronCache::Client.new(@config['iron'])
cache = c.cache("configs")
item = cache.put(@config['app_name'], @config.to_yaml)
p item
url = cache.url(@config['app_name'])
url_with_token = url + "?oauth=#{c.token}"
#puts url_with_token
puts `heroku config:add CONFIG_CACHE_KEY=#{url_with_token}`
end
end
Jump to Line
Something went wrong with that request. Please try again.