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: 2890e7eb4eb1f91be53b1a0063850b01a19b6433cd4d58415a0077603ee90ca2
4
- data.tar.gz: c687e98abbe7ac80c96a28a07c9b5aa896a4d606e22f32912c78c55df0594bca
3
+ metadata.gz: 04cba708232c8e0c9b6a463672856af29a163ea5c99f3f1f3cc9a25574384e4a
4
+ data.tar.gz: 4bf9e5644ef1d4224de236ae57cd966eda287ca1942b8bc6f5350362dc6e2a64
5
5
  SHA512:
6
- metadata.gz: b1370a25a326aa117263653f4c5ad3e2c033923db39503f18b9d5e4a2676f379e34f6ee9b998c3234cf381ff0fe14a3ff9906c861f335e168f236f5f2b78b6c5
7
- data.tar.gz: 85014215aa9943baba3f7946a1459093ffff62e42b0a7f99e11ff2fa2c2c311c117e4be60c4ef22c5e7ab9c69bb3cd84f21e597a7c4125b0834e8a97f83e2125
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[:organization_key]
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, id_or_model = nil, params = {})
221
+ def redirect_with_session_to(path, id_or_resource = nil, params = {})
222
222
  if Rails.env.development?
223
- redirect_development_mode(path, id_or_model, params)
223
+ redirect_development_mode(path, id_or_resource, params)
224
224
  else
225
- redirect_production_mode(path, id_or_model, params)
225
+ redirect_production_mode(path, id_or_resource, params)
226
226
  end
227
227
  end
228
228
 
229
- def redirect_development_mode(path, id_or_model = nil, params)
230
- redirect_to send(path, id_or_model, {
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, id_or_model = nil, params)
237
- redirect_to send(path, id_or_model, {
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))
@@ -1,3 +1,3 @@
1
1
  module CoalescingPanda
2
- VERSION = '4.8.0.beta.1'
2
+ VERSION = '5.0.0.beta.1'
3
3
  end
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.8.0.beta.1
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-02 00:00:00.000000000 Z
13
+ date: 2020-06-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails