Skip to content

Commit

Permalink
Merge pull request #134 from ZeusWPI/fix/paperclip
Browse files Browse the repository at this point in the history
Update paperclip
  • Loading branch information
redfast00 committed Aug 19, 2019
2 parents 2b7c7de + f870fef commit a26ce32
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ gem 'will_paginate', '3.0.7'
gem 'bootstrap-will_paginate', '0.0.10'

# Paperclip for easy file attachment
gem 'paperclip', '4.3.4'
gem 'paperclip', '>= 5.2.0'

# Use devise for users and admins
gem 'devise', '3.5.6'
Expand Down
18 changes: 9 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ GEM
sshkit (~> 1.2)
chunky_png (1.3.11)
climate_control (0.2.0)
cocaine (0.5.8)
climate_control (>= 0.0.3, < 1.0)
codeclimate-test-reporter (1.0.9)
simplecov (<= 0.13)
coffee-rails (4.2.2)
Expand Down Expand Up @@ -167,7 +165,7 @@ GEM
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.0331)
mimemagic (0.3.0)
mimemagic (0.3.3)
mini_mime (1.0.1)
mini_portile2 (2.4.0)
minitest (5.11.3)
Expand All @@ -193,12 +191,12 @@ GEM
oauth2 (~> 1.0)
omniauth (~> 1.2)
orm_adapter (0.5.0)
paperclip (4.3.4)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
cocaine (~> 0.5.5)
paperclip (6.1.0)
activemodel (>= 4.2.0)
activesupport (>= 4.2.0)
mime-types
mimemagic (= 0.3.0)
mimemagic (~> 0.3.0)
terrapin (~> 0.6.0)
public_suffix (3.0.3)
rack (1.6.11)
rack-test (0.6.3)
Expand Down Expand Up @@ -286,6 +284,8 @@ GEM
net-ssh (>= 2.8.0)
term-ansicolor (1.7.1)
tins (~> 1.0)
terrapin (0.6.0)
climate_control (>= 0.0.3, < 1.0)
thor (0.19.4)
thread_safe (0.3.6)
tilt (1.4.1)
Expand Down Expand Up @@ -335,7 +335,7 @@ DEPENDENCIES
jquery-rails (= 4.1.0)
mysql2 (~> 0.4.10)
omniauth-oauth2 (= 1.3.1)
paperclip (= 4.3.4)
paperclip (>= 5.2.0)
rails (= 4.2.10)
rspec-rails
sass-rails (~> 4.0.3)
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class User < ActiveRecord::Base
def self.from_omniauth(auth)
where(name: auth.uid).first_or_create do |user|
user.name = auth.uid
user.avatar = Identicon.data_url_for auth.uid
user.avatar = Paperclip.io_adapters.for(Identicon.data_url_for auth.uid)
user.generate_key!
end
end
Expand Down
1 change: 1 addition & 0 deletions config/initializers/paperclip.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Paperclip::DataUriAdapter.register

0 comments on commit a26ce32

Please sign in to comment.