Remove OutfitImageUploader and Carrierwave

Ok right, missed this in the outfit image stuff deletion, get rid of the code and library we were using to push those images up to S3!
This commit is contained in:
Matchu 2023-08-02 13:07:08 -07:00
parent 264ea37e1a
commit e11cfbf016
9 changed files with 0 additions and 78 deletions

View file

@ -37,9 +37,6 @@ gem 'neopets', '~> 0.2.0', :git => 'https://github.com/matchu/neopets.git'
gem "mini_magick", "~> 3.4" gem "mini_magick", "~> 3.4"
gem "fog", "~> 1.8.0"
gem 'carrierwave', '~> 1.3', '>= 1.3.3'
gem "parallel", "~> 1.13.0" gem "parallel", "~> 1.13.0"
gem "http_accept_language", :git => "https://github.com/iain/http_accept_language.git" gem "http_accept_language", :git => "https://github.com/iain/http_accept_language.git"

View file

@ -63,11 +63,6 @@ GEM
net-sftp (>= 2.0.0) net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14) net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0) net-ssh-gateway (>= 1.1.0)
carrierwave (1.3.3)
activemodel (>= 4.0.0)
activesupport (>= 4.0.0)
mime-types (>= 1.16)
ssrf_filter (~> 1.0, < 1.1.0)
character-encodings (0.4.1) character-encodings (0.4.1)
chronic (0.6.7) chronic (0.6.7)
chunky_png (1.4.0) chunky_png (1.4.0)
@ -102,7 +97,6 @@ GEM
dotenv-rails (2.0.1) dotenv-rails (2.0.1)
dotenv (= 2.0.1) dotenv (= 2.0.1)
erubis (2.7.0) erubis (2.7.0)
excon (0.45.4)
execjs (2.5.2) execjs (2.5.2)
factory_girl (2.6.4) factory_girl (2.6.4)
activesupport (>= 2.3.9) activesupport (>= 2.3.9)
@ -110,17 +104,6 @@ GEM
factory_girl (~> 2.6.0) factory_girl (~> 2.6.0)
railties (>= 3.0.0) railties (>= 3.0.0)
ffi (1.12.2) ffi (1.12.2)
fog (1.8.0)
builder
excon (~> 0.14)
formatador (~> 0.2.0)
mime-types
multi_json (~> 1.0)
net-scp (~> 1.0.4)
net-ssh (>= 2.1.3)
nokogiri (~> 1.5.0)
ruby-hmac
formatador (0.2.5)
globalize (4.0.3) globalize (4.0.3)
activemodel (>= 4.0.0, < 5) activemodel (>= 4.0.0, < 5)
activerecord (>= 4.0.0, < 5) activerecord (>= 4.0.0, < 5)
@ -232,7 +215,6 @@ GEM
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0) sprockets (>= 2.8, < 4.0)
ssrf_filter (1.0.8)
subexec (0.2.3) subexec (0.2.3)
temple (0.8.2) temple (0.8.2)
thor (1.2.2) thor (1.2.2)
@ -257,14 +239,12 @@ DEPENDENCIES
addressable addressable
airbrake (~> 3.1.8) airbrake (~> 3.1.8)
capistrano (~> 2.15.5) capistrano (~> 2.15.5)
carrierwave (~> 1.3, >= 1.3.3)
character-encodings (~> 0.4.1) character-encodings (~> 0.4.1)
compass-rails (~> 3.1) compass-rails (~> 3.1)
devise (~> 3.5.10) devise (~> 3.5.10)
dotenv-deployment dotenv-deployment
dotenv-rails dotenv-rails
factory_girl_rails (~> 1.0) factory_girl_rails (~> 1.0)
fog (~> 1.8.0)
globalize (~> 4.0.3) globalize (~> 4.0.3)
haml (~> 6.1, >= 6.1.1) haml (~> 6.1, >= 6.1.1)
http_accept_language! http_accept_language!

View file

@ -1,39 +0,0 @@
require 'carrierwave/processing/mime_types'
class OutfitImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MimeTypes
include CarrierWave::MiniMagick
# Settings for S3 storage. Will only be used on production.
fog_directory 'openneo-uploads'
fog_attributes 'Cache-Control' => "max-age=#{15.minutes}",
'Content-Type' => 'image/png'
process :set_content_type
version :medium do
process :resize_to_fill => [300, 300]
end
version :small, :from_version => :medium do
process :resize_to_fill => [150, 150]
end
def filename
"preview.png"
end
def store_dir
"outfits/#{partition_dir}"
end
# 123006789 => "123/006/789"
def partition_dir
partitions.map { |partition| "%03d" % partition }.join('/')
end
# 123006789 => [123, 6, 789]
def partitions
[6, 3, 0].map { |n| model.id / 10**n % 1000 }
end
end

View file

@ -1,16 +0,0 @@
# By default, we'll have CarrierWave use S3 only on production. (Since each
# asset image has only One True Image no matter the environment, we'll override
# this to use S3 on all environments for those images only.)
CarrierWave.configure do |config|
if Rails.env.production?
config.storage = :fog
config.fog_credentials = {
:provider => 'AWS',
:aws_access_key_id => ENV.fetch('AWS_ACCESS_KEY_ID'),
:aws_secret_access_key => ENV.fetch('AWS_SECRET_ACCESS_KEY')
}
else
config.storage = :file
end
end

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.