canvas_lti_third_party_cookies 0.2.1 → 0.3.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: e1333ca5982732fe82a7282906c08a49efdc753d3b3ea2d87e927189917a71de
4
- data.tar.gz: 013f64730fdca2e2490b22d7b145ccc642037ad8c30c6893156958bc1686dd2c
3
+ metadata.gz: 4aee3fcacd57feaf3915e824211dce8afde5350cc286b5fb728cb37c9b92836f
4
+ data.tar.gz: 21383e419b634141097ca3c593e3cd885c50b1271d124ea16fe075b1479486c9
5
5
  SHA512:
6
- metadata.gz: 845e6dde86192f515409d5769c2018867384e032e866694e999b8b0d37f02cfd17e5e5e8a04720a66c58aa610a9fd29d2cd9e89b9441c1b5a8a1ff7b8674318a
7
- data.tar.gz: ce10870144e786fbc0c8100e1428aeaa449da381378ddd282fe8087fc40f225c5bef22a35e66ba46a780c2daeb86bf84161c14ff87727f69f17dc9eaf62b7901
6
+ metadata.gz: 2dcf8ce2b2ae43d7e94e5f1a105bc93a9aa2a11bd374f2eb82516f4c029a6a3329cc6950eef9a59f1bcdc3e7be7b6f8b5571b26c83798e20121d9c67f38c9aa2
7
+ data.tar.gz: e87c29658574fe2f3a3cfa4e0006ce0bd05860d28b4c7731306a0b2f8c4fceffbd4d319859c4795b3e433721fcf943331374b8816481b9ed8f2045b6ce9a5bdc
data/README.md CHANGED
@@ -25,7 +25,7 @@ below to run on that action, and pass the data needed.
25
25
  Usually, only query parameters *or* form data is needed, not both.
26
26
 
27
27
  ```ruby
28
- include LtiThirdPartyCookies::SafariLaunch
28
+ include CanvasLtiThirdPartyCookies::SafariLaunch
29
29
  #...
30
30
  before_action -> {
31
31
  handle_safari_launch(launch_url: action_url, launch_params: { foo: bar }, launch_data: { foo: baz })
@@ -37,7 +37,7 @@ Add this line to your application's Gemfile:
37
37
 
38
38
  ```ruby
39
39
  # Set 3rd party cookies in Safari
40
- gem 'canvas_lti_third_party_cookies', '~> 0.2.0'
40
+ gem 'canvas_lti_third_party_cookies'
41
41
  ```
42
42
 
43
43
  And then execute:
@@ -1,6 +1,6 @@
1
1
  require 'browser'
2
2
 
3
- module LtiThirdPartyCookies::SafariLaunch
3
+ module CanvasLtiThirdPartyCookies::SafariLaunch
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  # this needs to be called as a before_action on the route that launches the tool
@@ -12,7 +12,7 @@ module LtiThirdPartyCookies::SafariLaunch
12
12
  # the `launch_data` parameter is optional, and should contain
13
13
  # all needed form data that the tool requires to launch.
14
14
  # example:
15
- # include LtiThirdPartyCookies::SafariLaunch
15
+ # include CanvasLtiThirdPartyCookies::SafariLaunch
16
16
  # ...
17
17
  # before_action -> {
18
18
  # handle_safari_launch(launch_url: action_url, launch_params: { foo: bar }, launch_data: { foo: baz })
@@ -36,7 +36,7 @@ module LtiThirdPartyCookies::SafariLaunch
36
36
  # will launch the tool again within an iframe in Canvas. (#3)
37
37
  if params[:platform_redirect_url].present?
38
38
  return render(
39
- 'lti_third_party_cookies/full_window_launch',
39
+ 'canvas_lti_third_party_cookies/full_window_launch',
40
40
  locals: { platform_redirect_url: params[:platform_redirect_url] }
41
41
  )
42
42
  end
@@ -48,7 +48,7 @@ module LtiThirdPartyCookies::SafariLaunch
48
48
  # Pass along any parameters provided by the tool that are needed to launch correctly,
49
49
  # and tell the tool that it has Storage Access.
50
50
  render(
51
- 'lti_third_party_cookies/request_storage_access',
51
+ 'canvas_lti_third_party_cookies/request_storage_access',
52
52
  locals: {
53
53
  launch_url: launch_url,
54
54
  relaunch_url: relaunch_url(launch_url, launch_params),
@@ -70,6 +70,7 @@
70
70
  <div class="flex-item">
71
71
  <p>Occasionally, Safari requires you to launch this app outside of Canvas before logging in.</p>
72
72
  <p>This setup is now complete, and Canvas can now relaunch this app.</p>
73
+ <p>In some cases, you may need to relaunch this app yourself.</p>
73
74
  </div>
74
75
 
75
76
  <div class="flex-item">
@@ -99,6 +99,8 @@
99
99
  <p>Safari requires your interaction with this app before logging you in.</p>
100
100
  <p>A dialog may appear asking you to allow this app to use cookies while browsing Canvas.</p>
101
101
  <p>For the best experience, click Allow.</p>
102
+ <p>A dialog may also appear asking you to navigate somewhere else.</p>
103
+ <p>If it does, save your work first and then click Leave Page.</p>
102
104
  </div>
103
105
 
104
106
  <div class="flex-item">
@@ -0,0 +1,4 @@
1
+ require "canvas_lti_third_party_cookies/engine"
2
+
3
+ module CanvasLtiThirdPartyCookies
4
+ end
@@ -0,0 +1,5 @@
1
+ module CanvasLtiThirdPartyCookies
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace CanvasLtiThirdPartyCookies
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module CanvasLtiThirdPartyCookies
2
+ VERSION = '0.3.0'
3
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_lti_third_party_cookies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xander Moffatt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-11 00:00:00.000000000 Z
11
+ date: 2021-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -75,13 +75,13 @@ files:
75
75
  - LICENSE
76
76
  - README.md
77
77
  - Rakefile
78
- - app/controllers/concerns/lti_third_party_cookies/safari_launch.rb
78
+ - app/controllers/concerns/canvas_lti_third_party_cookies/safari_launch.rb
79
+ - app/views/canvas_lti_third_party_cookies/full_window_launch.erb
80
+ - app/views/canvas_lti_third_party_cookies/request_storage_access.erb
79
81
  - app/views/layouts/application.html.erb
80
- - app/views/lti_third_party_cookies/full_window_launch.erb
81
- - app/views/lti_third_party_cookies/request_storage_access.erb
82
- - lib/lti_third_party_cookies.rb
83
- - lib/lti_third_party_cookies/engine.rb
84
- - lib/lti_third_party_cookies/version.rb
82
+ - lib/canvas_lti_third_party_cookies.rb
83
+ - lib/canvas_lti_third_party_cookies/engine.rb
84
+ - lib/canvas_lti_third_party_cookies/version.rb
85
85
  homepage: https://gerrit.instructure.com/#/admin/projects/lti_third_party_cookies
86
86
  licenses:
87
87
  - MIT
@@ -1,5 +0,0 @@
1
- require "lti_third_party_cookies/engine"
2
- require_relative "../app/controllers/concerns/lti_third_party_cookies/safari_launch"
3
-
4
- module LtiThirdPartyCookies
5
- end
@@ -1,5 +0,0 @@
1
- module LtiThirdPartyCookies
2
- class Engine < ::Rails::Engine
3
- isolate_namespace LtiThirdPartyCookies
4
- end
5
- end
@@ -1,3 +0,0 @@
1
- module LtiThirdPartyCookies
2
- VERSION = '0.2.1'
3
- end