minimum-omniauth-scaffold 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e2c533cddfc74d74ce886eb6fe21010707c41d98
4
- data.tar.gz: 95e625bf744fe4e9b0ecb6c67ebd0a8a951295e1
3
+ metadata.gz: 93494dd6a5fbe5bed77856e07521f6eba39b47a6
4
+ data.tar.gz: 6339989277645095402247409223944415da895e
5
5
  SHA512:
6
- metadata.gz: 53a5e2e693c753989635914d59ac077f8a6e280ae31f324d36a2f214e1390838f09e6b666b0bb7344c61b28dd7b84f06779e7238d26b69a0bfd0aa84a51bd44c
7
- data.tar.gz: 8ee15d0a82df877587ffd9b18abb156f74a4c814d230252ca8072b71a48215c35518ad04cd87333b63e39688b994cc4d50f033d44962ad2685efa222b1c0f0c6
6
+ metadata.gz: 292cbafe53397c30cda0f192670234398f0ebd345eaf30b68cd221544edd983880279be1a85f7f9e9a86b5874d748491459feb728cfda18836c0cd2f99c5e9f3
7
+ data.tar.gz: 1ae8e3181523e8d162bc9c1418227616cbc3e799001e4fc8b72876e476ca5ae44fe69de24c334a35d6336313fdfbe5e39ab2de95611c5c6a6de8e5c752288e53
@@ -11,10 +11,6 @@
11
11
  end
12
12
  end
13
13
 
14
- def reset_session_expires
15
- request.session_options[:expire_after] = 2.weeks
16
- end
17
-
18
14
  def current_user
19
15
  @current_user ||= User.find_by(id: session[:user_id])
20
16
  end
@@ -1,4 +1,4 @@
1
- class Authentication < ActiveRecord::Base
1
+ class Authentication < ApplicationRecord
2
2
  belongs_to :user, optional: true
3
3
 
4
4
  validates :provider, presence: true
@@ -1,6 +1,10 @@
1
- class User < ActiveRecord::Base
1
+ class User < ApplicationRecord
2
2
  has_many :authentications
3
3
 
4
+ def https_image
5
+ self.image.gsub('http://', 'https://')
6
+ end
7
+
4
8
  class << self
5
9
  def create_with_auth(authentication, request)
6
10
  user = User.new
@@ -1,2 +1,2 @@
1
1
  - if user.present?
2
- = link_to_unless(user.name.blank?, image_tag(user.image, size: size, class: klass), "#{Settings[user.last_login_provider + '_page']}#{user.name}", target: "_blank", title: user.name, rel: "tooltip", "data-original-title" => user.name)
2
+ = link_to_if user.name.present?, image_tag(user.https_image, size: size, class: klass), "#{Settings[user.last_login_provider + '_page']}#{user.name}", target: '_blank', title: user.name, rel: 'tooltip', 'data-original-title' => user.name
@@ -1,7 +1,7 @@
1
1
  module Minimum
2
2
  module Omniauth
3
3
  module Scaffold
4
- VERSION = '0.4.5'
4
+ VERSION = '0.4.6'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimum-omniauth-scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - shu0115
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-23 00:00:00.000000000 Z
11
+ date: 2017-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler