Skip to content

Commit 134f4ec

Browse files
committed
tech: Upgrade gem paperclip
See next commit for CHANGELOGs. Will not work without updating aws-sdk as well, see thoughtbot/paperclip#2484
1 parent 4b4637c commit 134f4ec

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

Gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ gem 'uglifier'
1717

1818
gem 'acts_as_commentable_with_threading'
1919
gem 'acts_as_list'
20-
gem 'aws-sdk', '< 2.0'
20+
gem 'aws-sdk'#, '< 2.0'
2121
# Version locked because of bug when fetching s3 hosted PDF:
2222
# `uninitialized constant Paperclip::Storage::S3::AWS`
2323
# Test with: http://antcat.org/documents/6308/ward_2014_annu_rev_ecol_evol_syst_phylogeny_and_evolution_of_ants.pdf
@@ -38,7 +38,7 @@ gem 'jquery-rails', '> 4.0'
3838
gem 'jquery-ui-rails', '> 5.0'
3939
gem 'newrelic_rpm'
4040
gem 'paper_trail', '< 10.0'
41-
gem 'paperclip', '4.3.1'
41+
gem 'paperclip', '5.3.0'
4242
gem 'rails-observers'
4343
gem 'redcarpet'
4444
gem 'ruby-progressbar'

Gemfile.lock

+11-11
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ GEM
102102
nokogiri (~> 1.8)
103103
citrus (3.0.2)
104104
climate_control (0.2.0)
105-
cocaine (0.5.8)
106-
climate_control (>= 0.0.3, < 1.0)
107105
coderay (1.1.2)
108106
coffee-rails (4.2.2)
109107
coffee-script (>= 2.2.0)
@@ -113,7 +111,7 @@ GEM
113111
execjs
114112
coffee-script-source (1.12.2)
115113
colorize (0.8.1)
116-
concurrent-ruby (1.0.5)
114+
concurrent-ruby (1.1.5)
117115
crack (0.4.3)
118116
safe_yaml (~> 1.0.0)
119117
crass (1.0.4)
@@ -217,7 +215,7 @@ GEM
217215
haml (>= 4.0, < 6)
218216
nokogiri (>= 1.6.0)
219217
ruby_parser (~> 3.5)
220-
i18n (1.1.1)
218+
i18n (1.6.0)
221219
concurrent-ruby (~> 1.0)
222220
invisible_captcha (0.11.0)
223221
rails (>= 3.2.0)
@@ -247,7 +245,7 @@ GEM
247245
mime-types (3.2.2)
248246
mime-types-data (~> 3.2015)
249247
mime-types-data (3.2018.0812)
250-
mimemagic (0.3.0)
248+
mimemagic (0.3.3)
251249
mini_mime (1.0.1)
252250
mini_portile2 (2.3.0)
253251
minitest (5.11.3)
@@ -269,12 +267,12 @@ GEM
269267
paper_trail-association_tracking (< 2)
270268
request_store (~> 1.1)
271269
paper_trail-association_tracking (1.0.0)
272-
paperclip (4.3.1)
273-
activemodel (>= 3.2.0)
274-
activesupport (>= 3.2.0)
275-
cocaine (~> 0.5.5)
270+
paperclip (5.3.0)
271+
activemodel (>= 4.2.0)
272+
activesupport (>= 4.2.0)
276273
mime-types
277-
mimemagic (= 0.3.0)
274+
mimemagic (~> 0.3.0)
275+
terrapin (~> 0.6.0)
278276
parallel (1.12.1)
279277
parser (2.5.1.2)
280278
ast (~> 2.4.0)
@@ -418,6 +416,8 @@ GEM
418416
rails (>= 4.2)
419417
sass-rails
420418
temple (0.8.0)
419+
terrapin (0.6.0)
420+
climate_control (>= 0.0.3, < 1.0)
421421
thor (0.20.0)
422422
thread_safe (0.3.6)
423423
tilt (2.0.8)
@@ -489,7 +489,7 @@ DEPENDENCIES
489489
mysql2
490490
newrelic_rpm
491491
paper_trail (< 10.0)
492-
paperclip (= 4.3.1)
492+
paperclip (= 5.3.0)
493493
pry
494494
puma
495495
rack

app/models/reference_document.rb

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class ReferenceDocument < ApplicationRecord
1212
storage: :s3,
1313
s3_credentials: (Rails.env.production? ? '/data/antcat/shared/config/' : Rails.root + 'config/') + 's3.yml', # TODO move to `secrets.yml`
1414
s3_permissions: 'authenticated-read',
15+
s3_region: 'us-east-1',
1516
s3_protocol: 'http'
1617
before_post_process :transliterate_file_name
1718
do_not_validate_attachment_file_type :pdf

0 commit comments

Comments
 (0)