2017-08-12 08:32:15 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-07-24 15:18:00 -04:00
|
|
|
#--
|
2017-12-31 08:35:01 -05:00
|
|
|
# Copyright (c) 2017-2018 David Heinemeier Hansson, Basecamp
|
2017-07-24 15:18:00 -04:00
|
|
|
#
|
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining
|
|
|
|
# a copy of this software and associated documentation files (the
|
|
|
|
# "Software"), to deal in the Software without restriction, including
|
|
|
|
# without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
|
|
|
# permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
# the following conditions:
|
|
|
|
#
|
|
|
|
# The above copyright notice and this permission notice shall be
|
|
|
|
# included in all copies or substantial portions of the Software.
|
|
|
|
#
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
|
|
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
|
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
|
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
#++
|
|
|
|
|
2017-06-30 13:12:58 -04:00
|
|
|
require "active_record"
|
2017-08-01 17:50:53 -04:00
|
|
|
require "active_support"
|
|
|
|
require "active_support/rails"
|
2018-01-10 12:12:04 -05:00
|
|
|
|
2017-10-21 09:27:49 -04:00
|
|
|
require "active_storage/version"
|
2018-01-10 12:12:04 -05:00
|
|
|
require "active_storage/errors"
|
2017-06-30 13:12:58 -04:00
|
|
|
|
2018-01-15 13:06:17 -05:00
|
|
|
require "marcel"
|
|
|
|
|
2017-07-06 05:33:29 -04:00
|
|
|
module ActiveStorage
|
2017-06-30 13:12:58 -04:00
|
|
|
extend ActiveSupport::Autoload
|
|
|
|
|
2017-07-24 15:22:59 -04:00
|
|
|
autoload :Attached
|
2017-07-06 06:22:44 -04:00
|
|
|
autoload :Service
|
2017-09-28 16:43:37 -04:00
|
|
|
autoload :Previewer
|
2017-10-22 13:16:59 -04:00
|
|
|
autoload :Analyzer
|
2017-07-23 12:03:25 -04:00
|
|
|
|
2017-10-22 13:16:59 -04:00
|
|
|
mattr_accessor :logger
|
2017-07-23 12:03:25 -04:00
|
|
|
mattr_accessor :verifier
|
2017-11-03 11:29:21 -04:00
|
|
|
mattr_accessor :queue
|
2017-09-28 16:43:37 -04:00
|
|
|
mattr_accessor :previewers, default: []
|
2017-10-22 13:16:59 -04:00
|
|
|
mattr_accessor :analyzers, default: []
|
2018-04-22 17:40:42 -04:00
|
|
|
mattr_accessor :variant_processor, default: :mini_magick
|
2018-01-03 22:01:31 -05:00
|
|
|
mattr_accessor :paths, default: {}
|
2017-12-15 10:45:00 -05:00
|
|
|
mattr_accessor :variable_content_types, default: []
|
2018-01-04 13:35:54 -05:00
|
|
|
mattr_accessor :content_types_to_serve_as_binary, default: []
|
2018-06-21 11:06:32 -04:00
|
|
|
mattr_accessor :service_urls_expire_in, default: 5.minutes
|
2018-08-10 12:10:13 -04:00
|
|
|
|
|
|
|
module Transformers
|
|
|
|
extend ActiveSupport::Autoload
|
|
|
|
|
|
|
|
autoload :Transformer
|
|
|
|
autoload :ImageProcessingTransformer
|
|
|
|
autoload :MiniMagickTransformer
|
|
|
|
end
|
2017-07-03 11:07:07 -04:00
|
|
|
end
|