lib/attachs.rb in attachs-0.3.5 vs lib/attachs.rb in attachs-0.4.0

- old
+ new

@@ -1,16 +1,43 @@ -require 'attachs/active_record/base' -require 'attachs/magick/image' +require 'open3' +require 'attachs/attachment' +require 'attachs/tools/magick' +require 'attachs/storages/base' require 'attachs/storages/local' require 'attachs/storages/s3' -require 'attachs/types/file' -require 'attachs/types/image' -require 'attachs/validators/base' -require 'attachs/validators/attachment_content_type_validator' -require 'attachs/validators/attachment_presence_validator' -require 'attachs/validators/attachment_size_validator' -require 'attachs/engine' +require 'attachs/types/base' +require 'attachs/types/default' +require 'attachs/types/regular' +require 'attachs/active_record/base' +require 'attachs/active_record/connection_adapters' +require 'attachs/active_record/migration' +require 'attachs/active_record/validators' +require 'attachs/active_record/validators/attachment_content_type_validator' +require 'attachs/active_record/validators/attachment_presence_validator' +require 'attachs/active_record/validators/attachment_size_validator' require 'attachs/railtie' -require 'attachs/version' module Attachs + class << self + + def configure + yield config + end + + def config + @config ||= begin + ActiveSupport::OrderedOptions.new.tap do |config| + config.styles = {} + config.interpolations = {} + config.global_styles = [] + config.global_convert_options= '' + config.convert_options = {} + config.default_storage = :local + config.default_path = '/:timestamp-:filename' + config.base_url = '' + config.s3 = { ssl: false } + end + end + end + + end end