coalescing_panda 4.8.0.beta.1 → 5.0.0.beta.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04cba708232c8e0c9b6a463672856af29a163ea5c99f3f1f3cc9a25574384e4a
|
4
|
+
data.tar.gz: 4bf9e5644ef1d4224de236ae57cd966eda287ca1942b8bc6f5350362dc6e2a64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d58f85ac65e2bc2374dfa77ded152c6afd0193c46a0c28f0ef19b14270112888d553efdb22d063a44c31257cd70e0ac5aa9173c2f830da5e1722765bfee85aa
|
7
|
+
data.tar.gz: b59db693a31dc3fe091aa4bfa7838008a43b69f5a4c486dd55a74bcf684a88be3719eff5bc0bdf63ba043111a36324c45584bd0dc39084069daad62a09ecdb37
|
@@ -10,7 +10,7 @@ module CoalescingPanda
|
|
10
10
|
|
11
11
|
def self.create_from_launch(launch_params, account_id)
|
12
12
|
session = PersistentSession.new(coalescing_panda_lti_account_id: account_id)
|
13
|
-
session.data[:launch_params] = launch_params.to_unsafe_h
|
13
|
+
session.data[:launch_params] = launch_params.to_unsafe_h.with_indifferent_access
|
14
14
|
session.data[:roles] = launch_params['roles'].split(',').map { |role|
|
15
15
|
case role.downcase.strip
|
16
16
|
when 'admin'
|
@@ -187,11 +187,11 @@ module CoalescingPanda
|
|
187
187
|
end
|
188
188
|
|
189
189
|
def organization_key
|
190
|
-
params[:oauth_consumer_key] || current_session_data[:
|
190
|
+
params[:oauth_consumer_key] || (current_session_data[:launch_params][:oauth_consumer_key] if @current_session)
|
191
191
|
end
|
192
192
|
|
193
193
|
def organization_id
|
194
|
-
params[:organization_id]
|
194
|
+
params[:organization_id] || (current_session_data[:launch_params][:organization_id] if @current_session)
|
195
195
|
end
|
196
196
|
|
197
197
|
def session_key
|
@@ -218,23 +218,23 @@ module CoalescingPanda
|
|
218
218
|
# nicely with webpack-dev-server live reloading (otherwise
|
219
219
|
# you get an access error every time it tries to live reload).
|
220
220
|
|
221
|
-
def redirect_with_session_to(path,
|
221
|
+
def redirect_with_session_to(path, id_or_resource = nil, params = {})
|
222
222
|
if Rails.env.development?
|
223
|
-
redirect_development_mode(path,
|
223
|
+
redirect_development_mode(path, id_or_resource, params)
|
224
224
|
else
|
225
|
-
redirect_production_mode(path,
|
225
|
+
redirect_production_mode(path, id_or_resource, params)
|
226
226
|
end
|
227
227
|
end
|
228
228
|
|
229
|
-
def redirect_development_mode(path,
|
230
|
-
redirect_to send(path,
|
229
|
+
def redirect_development_mode(path, id_or_resource = nil, params)
|
230
|
+
redirect_to send(path, id_or_resource, {
|
231
231
|
session_key: current_session.session_key,
|
232
232
|
organization_id: current_lti_account.id
|
233
233
|
}.merge(params))
|
234
234
|
end
|
235
235
|
|
236
|
-
def redirect_production_mode(path,
|
237
|
-
redirect_to send(path,
|
236
|
+
def redirect_production_mode(path, id_or_resource = nil, params)
|
237
|
+
redirect_to send(path, id_or_resource, {
|
238
238
|
encrypted_session_key: encrypted_session_key,
|
239
239
|
organization_id: current_lti_account.id
|
240
240
|
}.merge(params))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coalescing_panda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0.beta.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Mills
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-06-
|
13
|
+
date: 2020-06-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|