module CropDuster
Public Class Methods
aws_billing_bucket()
click to toggle source
# File lib/crop_duster.rb, line 42 def aws_billing_bucket @aws_billing_bucket end
aws_billing_bucket=(string)
click to toggle source
# File lib/crop_duster.rb, line 38 def aws_billing_bucket=(string) @aws_billing_bucket = string end
aws_key=(string)
click to toggle source
# File lib/crop_duster.rb, line 30 def aws_key=(string) @aws_key = string end
aws_keys()
click to toggle source
# File lib/crop_duster.rb, line 34 def aws_keys {:provider => 'AWS', :aws_access_key_id => @aws_key, :aws_secret_access_key => @aws_secret} end
aws_secret=(string)
click to toggle source
# File lib/crop_duster.rb, line 26 def aws_secret=(string) @aws_secret = string end
configure(&block)
click to toggle source
# File lib/crop_duster.rb, line 54 def configure(&block) block.call(self) end
db=(url)
click to toggle source
# File lib/crop_duster.rb, line 8 def db=(url) db_url = URI.parse(url) options = (db_url.query || "").split(/\&/).inject({}) { |hash, s| hash[s.split(/=/)[0].to_sym] = s.split(/=/)[1]; hash } config_hash = { adapter: db_url.scheme, host: db_url.host, port: db_url.port, database: db_url.path.gsub(/^\//, ''), username: db_url.user, password: db_url.password } config_hash.delete_if { |k, v| v.nil? } ActiveRecord::Base.establish_connection config_hash.merge(options) end
tmp_dir()
click to toggle source
# File lib/crop_duster.rb, line 50 def tmp_dir @tmp_dir end
tmp_dir=(string)
click to toggle source
# File lib/crop_duster.rb, line 46 def tmp_dir=(string) @tmp_dir = string end