Drop paperclip
This commit is contained in:
parent
8a39c6b4a2
commit
5a54cb52f8
3 changed files with 0 additions and 39 deletions
1
Gemfile
1
Gemfile
|
@ -56,7 +56,6 @@ gem "http_accept_language", "~> 2.0.0"
|
|||
gem "i18n-js", ">= 3.0.0"
|
||||
gem "oauth-plugin", ">= 0.5.1"
|
||||
gem "openstreetmap-deadlock_retry", ">= 1.3.0", :require => "deadlock_retry"
|
||||
gem "paperclip", "~> 5.2"
|
||||
gem "rack-cors"
|
||||
gem "rails-i18n", "~> 4.0.0"
|
||||
gem "record_tag_helper"
|
||||
|
|
13
Gemfile.lock
13
Gemfile.lock
|
@ -107,7 +107,6 @@ GEM
|
|||
rack (>= 1.0.0)
|
||||
rack-test (>= 0.5.4)
|
||||
xpath (>= 2.0, < 4.0)
|
||||
climate_control (0.2.0)
|
||||
cliver (0.3.2)
|
||||
coderay (1.1.2)
|
||||
coffee-rails (4.2.2)
|
||||
|
@ -254,9 +253,6 @@ GEM
|
|||
marcel (0.3.3)
|
||||
mimemagic (~> 0.3.2)
|
||||
method_source (0.9.2)
|
||||
mime-types (3.2.2)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2019.0331)
|
||||
mimemagic (0.3.3)
|
||||
mini_magick (4.9.3)
|
||||
mini_mime (1.0.1)
|
||||
|
@ -311,12 +307,6 @@ GEM
|
|||
multi_json (~> 1.12)
|
||||
omniauth-oauth2 (~> 1.4)
|
||||
openstreetmap-deadlock_retry (1.3.0)
|
||||
paperclip (5.3.0)
|
||||
activemodel (>= 4.2.0)
|
||||
activesupport (>= 4.2.0)
|
||||
mime-types
|
||||
mimemagic (~> 0.3.0)
|
||||
terrapin (~> 0.6.0)
|
||||
parallel (1.17.0)
|
||||
parser (2.6.3.0)
|
||||
ast (~> 2.4.0)
|
||||
|
@ -429,8 +419,6 @@ GEM
|
|||
activerecord (>= 5)
|
||||
term-ansicolor (1.7.1)
|
||||
tins (~> 1.0)
|
||||
terrapin (0.6.0)
|
||||
climate_control (>= 0.0.3, < 1.0)
|
||||
thor (0.20.3)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.0.9)
|
||||
|
@ -512,7 +500,6 @@ DEPENDENCIES
|
|||
omniauth-openid
|
||||
omniauth-windowslive
|
||||
openstreetmap-deadlock_retry (>= 1.3.0)
|
||||
paperclip (~> 5.2)
|
||||
pg
|
||||
poltergeist
|
||||
psych
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
module Paperclip
|
||||
class AssetUrlGenerator < UrlGenerator
|
||||
include Sprockets::Rails::Helper
|
||||
|
||||
def for(style_name, options)
|
||||
url = super(style_name, options)
|
||||
|
||||
if url =~ %r{^/assets/(.*)$}
|
||||
asset_path(Regexp.last_match(1))
|
||||
else
|
||||
url
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Rails.application.config.after_initialize do |_app|
|
||||
Paperclip::AssetUrlGenerator::VIEW_ACCESSORS.each do |attr|
|
||||
Paperclip::AssetUrlGenerator.send("#{attr}=", ActionView::Base.send(attr))
|
||||
end
|
||||
end
|
||||
|
||||
Paperclip::Attachment.default_options[:url] = "/attachments/:class/:attachment/:id_partition/:style/:fingerprint.:extension"
|
||||
Paperclip::Attachment.default_options[:path] = "#{Settings.attachments_dir}/:class/:attachment/:id_partition/:style/:fingerprint.:extension"
|
||||
Paperclip::Attachment.default_options[:url_generator] = Paperclip::AssetUrlGenerator
|
Loading…
Add table
Add a link
Reference in a new issue