Merge pull request #134 from ZeusWPI/fix/paperclip

Update paperclip
This commit is contained in:
redfast00 2019-08-19 14:27:52 +02:00 committed by GitHub
commit a26ce32e49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 11 deletions

View file

@ -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'

View file

@ -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)
@ -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)
@ -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)
@ -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)
@ -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)

View file

@ -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

View file

@ -0,0 +1 @@
Paperclip::DataUriAdapter.register