kamiliff 0.16.0 → 0.17.0

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: 923af087cbb7e01f33610fa15c0f57c28d7d341f57e21ab0e896e6daa66f2301
4
- data.tar.gz: c215fab6cc29f24acdd7cf94b308e7a3561edd3818335a8f0da208ead09fe238
3
+ metadata.gz: 7c48e141ba6e3c63b5ebc7bb1da37a3e29639f7b1555f3bffca94ead099ead99
4
+ data.tar.gz: a4b0d2d060f71eb1edb30ca8056e9ecb47abe74eb4143380397aecb6bfe6ae2b
5
5
  SHA512:
6
- metadata.gz: 5d2aa3a7ac569d545d8aa6b83b1479ed3f260951bef938aaa8661f36aa48dfadfe0ad50cd62696d36ee5358bb0cbb5ba8e1c5e757b00e7c6eb36ddac23b0e4dc
7
- data.tar.gz: 87cf2a57d14ac68b80c914a302a483d714972ff5bba961788841bbadf50d31ca55ee066645286713afa57db3cf2d018890e83021c91132bec249f242e7d42887
6
+ metadata.gz: 17f93fcdbc120012f20a924486a5e741dd9c0e7d68a268a6e20f2c5d71bf567f17abcf698c0b32a133ee00b004113b65a12b814bf1d7175cec9728bc5301a599
7
+ data.tar.gz: 8a1e89b4824473baa562836a550ef147a4a9cb5a0d835f348cafbfa27791885b71deb123080e4fee3fdb00e44c424a01149a3e6e9a5d6af2053f2552649fb205
@@ -1,5 +1,5 @@
1
1
 
2
- class LiffController < ApplicationController
2
+ class LiffController < ActionController::Base
3
3
  layout false, only: :route
4
4
 
5
5
  def entry
@@ -45,11 +45,14 @@ class LiffController < ApplicationController
45
45
  source_group_id = context["roomId"] || context["groupId"] || context["userId"]
46
46
  source_user_id = context["userId"]
47
47
 
48
+ profile = params["profile"]
49
+
48
50
  {
49
51
  platform_type: 'line',
50
52
  source_type: source_type,
51
53
  source_group_id: source_group_id,
52
54
  source_user_id: source_user_id,
55
+ profile: profile
53
56
  }
54
57
  end
55
58
  end
@@ -1,6 +1,10 @@
1
1
  module LiffHelper
2
2
  def liff_path(params)
3
3
  liff = LiffService.new(params)
4
- "#{liff.url}/liff_entry?#{params.to_query}"
4
+ if ENV["LIFF_MODE"]&.downcase == "replace"
5
+ return "#{liff.url}/liff_entry?#{params.to_query}"
6
+ end
7
+ # liff mode is Concatenate
8
+ "#{liff.url}?#{params.to_query}"
5
9
  end
6
10
  end
@@ -9,8 +9,6 @@
9
9
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
10
10
 
11
11
  <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
12
- <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
13
-
14
12
  <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
15
13
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
16
14
  <script>
@@ -50,12 +50,15 @@
50
50
  if (!liff.isLoggedIn()) {
51
51
  liff.login();
52
52
  }else{
53
- const data = {};
54
- data.context = liff.getContext();
55
- data.path = "<%= @liff.path %>";
56
- <% if !@need_reload %>
57
- route(data);
58
- <% end %>
53
+ liff.getProfile().then(profile => {
54
+ const data = {};
55
+ data.context = liff.getContext();
56
+ data.profile = profile;
57
+ data.path = "<%= @liff.path %>";
58
+ <% if !@need_reload %>
59
+ route(data);
60
+ <% end %>
61
+ })
59
62
  }
60
63
  })
61
64
  .catch((err) => {
@@ -1,3 +1,3 @@
1
1
  module Kamiliff
2
- VERSION = '0.16.0'
2
+ VERSION = '0.17.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kamiliff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - etrex kuo
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-03 00:00:00.000000000 Z
11
+ date: 2020-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -54,7 +54,7 @@ licenses:
54
54
  - MIT
55
55
  metadata:
56
56
  allowed_push_host: https://rubygems.org
57
- post_install_message:
57
+ post_install_message:
58
58
  rdoc_options: []
59
59
  require_paths:
60
60
  - lib
@@ -69,8 +69,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.0.6
73
- signing_key:
72
+ rubygems_version: 3.1.4
73
+ signing_key:
74
74
  specification_version: 4
75
75
  summary: An easy way to use LINE Front-end Framework(LIFF) on rails.
76
76
  test_files: []