39 lines
890 B
Ruby
39 lines
890 B
Ruby
class WebConfig
|
|
attr_accessor :config
|
|
|
|
def initialize()
|
|
@config = {}
|
|
end
|
|
|
|
def method_missing(*args)
|
|
name = args[0]
|
|
value = args[1]
|
|
|
|
if name[-1] == "="
|
|
# strip off '=' and store pure setter name as symbol in hash
|
|
@config[name[0..name.length - 2].to_sym] = value
|
|
else
|
|
@config[name]
|
|
end
|
|
end
|
|
end
|
|
|
|
APP_CONFIG = config = WebConfig.new
|
|
|
|
|
|
config.storage_type = :fog
|
|
# config.storage_type = :file # or :fog, if using AWS
|
|
|
|
# these only used if storage_type = :fog
|
|
config.aws_access_key_id = ENV['AWS_KEY']
|
|
config.aws_secret_access_key = ENV['AWS_SECRET']
|
|
config.aws_region = 'us-east-1'
|
|
config.aws_bucket = 'jamkazam-dev'
|
|
config.aws_bucket_public = 'jamkazam-dev-public'
|
|
config.aws_cache = '315576000'
|
|
config.aws_fullhost = "#{config.aws_bucket_public}.s3.amazonaws.com"
|
|
|
|
# cloudfront host
|
|
config.cloudfront_host = "d34f55ppvvtgi3.cloudfront.net"
|
|
|