Module: Refinery::Images
- Includes:
- ActiveSupport::Configurable
- Defined in:
- lib/refinery/images.rb,
lib/refinery/images/engine.rb,
lib/refinery/images/dragonfly.rb,
lib/refinery/images/validators.rb,
lib/refinery/images/configuration.rb,
lib/refinery/images/validators/image_size_validator.rb,
lib/refinery/images/validators/image_update_validator.rb
Defined Under Namespace
Modules: Dragonfly, Validators
Classes: Engine
Class Method Summary
collapse
Class Method Details
.custom_backend? ⇒ Boolean
63
64
65
|
# File 'lib/refinery/images/configuration.rb', line 63
def custom_backend?
config.custom_backend_class.nil? ? Core.dragonfly_custom_backend? : config.custom_backend_class.present?
end
|
.custom_backend_class ⇒ Object
67
68
69
|
# File 'lib/refinery/images/configuration.rb', line 67
def custom_backend_class
config.custom_backend_class.nil? ? Core.dragonfly_custom_backend_class : config.custom_backend_class.constantize
end
|
.custom_backend_opts ⇒ Object
71
72
73
|
# File 'lib/refinery/images/configuration.rb', line 71
def custom_backend_opts
config.custom_backend_opts.presence || Core.dragonfly_custom_backend_opts
end
|
.datastore_root_path ⇒ Object
39
40
41
|
# File 'lib/refinery/images/configuration.rb', line 39
def datastore_root_path
config.datastore_root_path || (Rails.root.join('public', 'system', 'refinery', 'images').to_s if Rails.root)
end
|
.factory_paths ⇒ Object
20
21
22
|
# File 'lib/refinery/images.rb', line 20
def factory_paths
@factory_paths ||= [ root.join("spec/factories").to_s ]
end
|
.root ⇒ Object
16
17
18
|
# File 'lib/refinery/images.rb', line 16
def root
@root ||= Pathname.new(File.expand_path('../../../', __FILE__))
end
|
.s3_access_key_id ⇒ Object
51
52
53
|
# File 'lib/refinery/images/configuration.rb', line 51
def s3_access_key_id
config.s3_access_key_id.presence || Core.s3_access_key_id
end
|
.s3_backend ⇒ Object
43
44
45
|
# File 'lib/refinery/images/configuration.rb', line 43
def s3_backend
config.s3_backend.presence || Core.s3_backend
end
|
.s3_bucket_name ⇒ Object
47
48
49
|
# File 'lib/refinery/images/configuration.rb', line 47
def s3_bucket_name
config.s3_bucket_name.presence || Core.s3_bucket_name
end
|
.s3_region ⇒ Object
59
60
61
|
# File 'lib/refinery/images/configuration.rb', line 59
def s3_region
config.s3_region.presence || Core.s3_region
end
|
.s3_secret_access_key ⇒ Object
55
56
57
|
# File 'lib/refinery/images/configuration.rb', line 55
def s3_secret_access_key
config.s3_secret_access_key.presence || Core.s3_secret_access_key
end
|