module Refinery::Dragonfly::ExtensionConfiguration

Public Instance Methods

dragonfly_allow_legacy_urls() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 33
def dragonfly_allow_legacy_urls
  config.dragonfly_allow_legacy_urls.presence || Refinery::Dragonfly.allow_legacy_urls
end
dragonfly_analysers() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 37
def dragonfly_analysers
  config.dragonfly_analysers.presence || Refinery::Dragonfly.analysers
end
dragonfly_before_serve() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 41
def dragonfly_before_serve
  config.dragonfly_before_serve.presence || Refinery::Dragonfly.before_serve
end
dragonfly_cache_log_level() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 49
def dragonfly_cache_log_level
  config.dragonfly_cache_log_level || Refinery::Dragonfly.cache_log_level
end
dragonfly_cache_store_root() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 45
def dragonfly_cache_store_root
  config.dragonfly_cache_store.presence || Rails.root.join('tmp', 'dragonfly')
end
dragonfly_custom_datastore?() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 53
def dragonfly_custom_datastore?
  config.dragonfly_custom_datastore_class.nil? ? Refinery::Dragonfly.custom_datastore? : config.custom_datastore_class.present?
end
dragonfly_custom_datastore_class() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 57
def dragonfly_custom_datastore_class
  config.dragonfly_custom_datastore_class.nil? ? Refinery::Dragonfly.custom_datastore_class : config.dragonfly_custom_datastore_class.constantize
end
dragonfly_custom_datastore_opts() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 61
def dragonfly_custom_datastore_opts
  config.dragonfly_custom_datastore_opts.presence || Refinery::Dragonfly.custom_datastore_opts
end
dragonfly_datastore_root_path() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 65
def dragonfly_datastore_root_path
  config.dragonfly_datastore_root_path.presence || Rails.root.join('public', 'system', 'refinery', short_name).to_s if Rails.root
end
dragonfly_define_url() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 69
def dragonfly_define_url
  config.dragonfly_define_url || Refinery::Dragonfly.define_url
end
dragonfly_dragonfly_url() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 73
def dragonfly_dragonfly_url
  config.dragonfly_dragonfly_url || Refinery::Dragonfly.dragonfly_url
end
dragonfly_fetch_file_whitelist() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 77
def dragonfly_fetch_file_whitelist
  config.dragonfly_fetch_file_whitelist || Refinery::Dragonfly.fetch_file_whitelist
end
dragonfly_fetch_url_whitelist() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 81
def dragonfly_fetch_url_whitelist
  config.dragonfly_fetch_url_whitelist || Refinery::Dragonfly.fetch_url_whitelist
end
dragonfly_generators() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 85
def dragonfly_generators
  config.dragonfly_generators || Refinery::Dragonfly.generators
end
dragonfly_mime_types() click to toggle source

define one or more new mimetypes dragonfly_mimetypes = [

{ext: 'egg', mimetype: 'fried/egg'},
{ext: 'avo', mimetype: 'smashed/avo'}

]

# File lib/refinery/dragonfly/extension_configuration.rb, line 97
def dragonfly_mime_types
  config.dragonfly_mime_types || Refinery::Dragonfly.mime_types
end
dragonfly_name() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 101
def dragonfly_name
  config.dragonfly_name || Refinery::Dragonfly.name
end
dragonfly_path_prefix() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 105
def dragonfly_path_prefix
  config.dragonfly_path_prefix || Refinery::Dragonfly.path_prefix
end
dragonfly_response_header() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 109
def dragonfly_response_header
  config.dragonfly_response_header || Refinery::Dragonfly.response_header
end
dragonfly_secret() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 113
def dragonfly_secret
  config.dragonfly_secret || Refinery::Dragonfly.secret
end
dragonfly_url() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 117
def dragonfly_url
  config.dragonfly_url || Refinery::Dragonfly.url
end
dragonfly_url_format() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 121
def dragonfly_url_format
  config.dragonfly_url_format || Refinery::Dragonfly.url_format(short_name)
end
dragonfly_url_host() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 125
def dragonfly_url_host
  config.dragonfly_url_host || Refinery::Dragonfly.url_host
end
dragonfly_url_path_prefix() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 129
def dragonfly_url_path_prefix
  config.dragonfly_url_path_prefix || Refinery::Dragonfly.url_path_prefix
end
dragonfly_url_segment() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 133
def dragonfly_url_segment
  config.dragonfly_url_segment || short_name
end
dragonfly_verify_urls() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 137
def dragonfly_verify_urls
  config.dragonfly_verify_urls.nil? ? Refinery::Dragonfly.verify_urls : config.dragonfly_verify_urls
end
s3_access_key_id() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 148
def s3_access_key_id
  config.s3_access_key_id.presence || Refinery::Dragonfly.s3_access_key_id
end
s3_bucket_name() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 152
def s3_bucket_name
  config.s3_bucket_name.presence || Refinery::Dragonfly.s3_bucket_name
end
s3_datastore?() click to toggle source

Options for s3_datastore

# File lib/refinery/dragonfly/extension_configuration.rb, line 144
def s3_datastore?
  config.s3_datastore.presence || Refinery::Dragonfly.s3_datastore
end
s3_fog_storage_options() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 156
def s3_fog_storage_options
  config.s3_fog_storage_options.presence || Refinery::Dragonfly.s3_fog_storage_options
end
s3_host() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 160
def s3_host
  config.s3_host.presence || Refinery::Dragonfly.s3_host
end
s3_region() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 164
def s3_region
  config.s3_region.presence || Refinery::Dragonfly.s3_region
end
s3_root_path() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 168
def s3_root_path
  config.s3_root_path.presence || Refinery::Dragonfly.s3_root_path
end
s3_scheme() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 172
def s3_scheme
  config.s3_scheme.presence || Refinery::Dragonfly.s3_scheme
end
s3_secret_access_key() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 176
def s3_secret_access_key
  config.s3_secret_access_key.presence || Refinery::Dragonfly.s3_secret_access_key
end
s3_storage_headers() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 180
def s3_storage_headers
  config.s3_storage_headers.presence || Refinery::Dragonfly.s3_storage_headers
end
s3_use_iam_profile() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 184
def s3_use_iam_profile
  config.s3_use_iam_profile.presence || Refinery::Dragonfly.s3_use_iam_profile
end
short_name() click to toggle source
# File lib/refinery/dragonfly/extension_configuration.rb, line 29
def short_name
  config.dragonfly_name.to_s.remove('refinery_')
end