TagoLine 0.1.4.18 → 0.1.4.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2822dff43c253a00bf8e8ebfbf62210a2c6dbbde7c7d352a822a259818f081a
4
- data.tar.gz: 9263c410f67afdea2a3163fb295d96eec987e0ab465c1051604eedbaca4897bd
3
+ metadata.gz: 277ca5f10f90d6717f0600f6d6e87dcff55e1e3bd476036ebb02901f0eb7f7c2
4
+ data.tar.gz: cd512721127ba751b819009443cb4a5509d89487bc40a5b0160cbb95c7aad88f
5
5
  SHA512:
6
- metadata.gz: d99e9cfbc7baf972a2366e534ad87463cd82eec1edb56c4d5bff43017f160d77bbffe0929c4418406ceb5702ecfcc38ac821e81d9fd8aa0a466ef7d268047063
7
- data.tar.gz: 7275933c9aba124b4456c448696f930459ac9b660ab97e569178ddec766e15542e0ab17f0638fd85eaa66d559fdc61ae9772d06b0d13f0b7e525b43cc30f93da
6
+ metadata.gz: 42e24e42a236c6e1ddcb1ce5a9d2291fa7f5fc902b7f47b81cc06e2f620197917f6b81a2ca075544b6eb9942b77506268a856276feb3ae9e960fba09f15bf0a6
7
+ data.tar.gz: 7685831c0641975c8a0e08da9cda7ff816ce56641dc395c94e61f67b7a0eab3c181b433702a7f39f4ca0c6aa864c658425928ae303be0dfe898ff9b6a7d5333f
@@ -22,7 +22,7 @@ module TagoLine
22
22
 
23
23
  if stateIsRight(controller)
24
24
  res = getAccessToken(controller)
25
- getUserInfo(controller, res["id_token"], user_class=nil)
25
+ getUserInfo(controller, res["id_token"], user_class)
26
26
  return true
27
27
  else
28
28
  return false
@@ -42,10 +42,10 @@ module TagoLine
42
42
  controller.session[:line_picture]= JSON.parse(res.body)["picture"]
43
43
 
44
44
  if user_class != nil
45
- user = user_class.find_or_initialize_by(line_sub: controller.session[:line_sub])
46
- user.line_name = controller.session[:line_name]
47
- user.line_picture = controller.session[:line_picture]
48
- user.save!
45
+ user = user_class.find_or_initialize_by(line_sub: JSON.parse(res.body)["sub"])
46
+ user.line_name = JSON.parse(res.body)["name"]
47
+ user.line_picture = JSON.parse(res.body)["picture"]
48
+ user.save
49
49
  controller.session[:user_id] = user.id
50
50
  end
51
51
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TagoLine
4
- VERSION = "0.1.4.18"
4
+ VERSION = "0.1.4.20"
5
5
  CALLBACK_URL = ENV["LINE_CALLBACK_URL"]
6
6
  CHANNEL_ID = ENV["LINE_CHANNEL_ID"]
7
7
  CHANNEL_SECRET = ENV["LINE_CHANNEL_SECRET"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: TagoLine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4.18
4
+ version: 0.1.4.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - manatago