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
61
62
63
|
# File 'lib/refinery/images/configuration.rb', line 61
def custom_backend?
config.custom_backend_class.nil? ? Core.dragonfly_custom_backend? : config.custom_backend_class.present?
end
|
.custom_backend_class ⇒ Object
65
66
67
|
# File 'lib/refinery/images/configuration.rb', line 65
def custom_backend_class
config.custom_backend_class.nil? ? Core.dragonfly_custom_backend_class : config.custom_backend_class.constantize
end
|
.custom_backend_opts ⇒ Object
69
70
71
|
# File 'lib/refinery/images/configuration.rb', line 69
def custom_backend_opts
config.custom_backend_opts.presence || Core.dragonfly_custom_backend_opts
end
|
.datastore_root_path ⇒ Object
37
38
39
|
# File 'lib/refinery/images/configuration.rb', line 37
def datastore_root_path
config.datastore_root_path || (Rails.root.join('public', 'system', 'refinery', 'images').to_s if Rails.root)
end
|
.factory_paths ⇒ Object
19
20
21
|
# File 'lib/refinery/images.rb', line 19
def factory_paths
@factory_paths ||= [ root.join("spec/factories").to_s ]
end
|
.root ⇒ Object
15
16
17
|
# File 'lib/refinery/images.rb', line 15
def root
@root ||= Pathname.new(File.expand_path('../../../', __FILE__))
end
|
.s3_access_key_id ⇒ Object
49
50
51
|
# File 'lib/refinery/images/configuration.rb', line 49
def s3_access_key_id
config.s3_access_key_id.presence || Core.s3_access_key_id
end
|
.s3_backend ⇒ Object
41
42
43
|
# File 'lib/refinery/images/configuration.rb', line 41
def s3_backend
config.s3_backend.presence || Core.s3_backend
end
|
.s3_bucket_name ⇒ Object
45
46
47
|
# File 'lib/refinery/images/configuration.rb', line 45
def s3_bucket_name
config.s3_bucket_name.presence || Core.s3_bucket_name
end
|
.s3_region ⇒ Object
57
58
59
|
# File 'lib/refinery/images/configuration.rb', line 57
def s3_region
config.s3_region.presence || Core.s3_region
end
|
.s3_secret_access_key ⇒ Object
53
54
55
|
# File 'lib/refinery/images/configuration.rb', line 53
def s3_secret_access_key
config.s3_secret_access_key.presence || Core.s3_secret_access_key
end
|