]> git.openstreetmap.org Git - rails.git/commitdiff
Drop paperclip
authorTom Hughes <tom@compton.nu>
Tue, 16 Jul 2019 17:55:15 +0000 (18:55 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 17 Jul 2019 18:12:30 +0000 (19:12 +0100)
Gemfile
Gemfile.lock
config/initializers/paperclip.rb [deleted file]

diff --git a/Gemfile b/Gemfile
index 0a00a6496e13b60c9eb31ede941a1f0bdb11c834..c2bb066b7c9c291bd8854f27dc73844a5cd9cf4a 100644 (file)
--- a/Gemfile
+++ b/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"
index 467166f0f455b0fcf242529510b7d965d6b9d871..c82719f28a957d16e3651cf851ab3ee6a819693f 100644 (file)
@@ -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
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb
deleted file mode 100644 (file)
index 3aa1d00..0000000
+++ /dev/null
@@ -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