Sha256: 0ddee56c97fd1c04fe87646b4cdd86ca79ec4d933203cd1b9c8158014e0cade0
Contents?: true
Size: 796 Bytes
Versions: 11
Compression:
Stored size: 796 Bytes
Contents
class AppCreator def self.get_config url response = RestClient.post url, :plan => 'test', :heroku_id => 123, :ssl_version => 'SSLv3' json = JSON.parse response trackman_url = json['config']['TRACKMAN_URL'].gsub('https', 'http') [[:@@server_url, trackman_url], [:@@site, "#{trackman_url}/assets"]] end def self.create user = ENV['HEROKU_USERNAME'] pass = ENV['HEROKU_PASSWORD'] server = ENV['TRACKMAN_SERVER_URL'] @@config = get_config "http://#{user}:#{pass}@#{server}/heroku/resources" @@config.each do |s, v| RemoteAsset.send(:class_variable_set, s, v) end @@config end def self.reset RemoteAsset.all.each { |a| a.delete } @@config.each do |k,v| RemoteAsset.send(:class_variable_set, k, v) end end end
Version data entries
11 entries across 11 versions & 1 rubygems