panda_pal 5.12.2 → 5.12.4

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: 5aaa770332536d17f0a40ca1501b4b1e7887d1ce06a77ceb36f379d6177fa841
4
- data.tar.gz: 33645394c6afdc6e56a3cba902c615dc8bea904d327768193f533eff40e1ec4f
3
+ metadata.gz: 8157be2e37c1de2f7deb7f53b16b36cdbe4df73a5b5a1f2f7adb7355574b6235
4
+ data.tar.gz: 5f337073007f5d9976c4bef8809fb7dbecabdbb462cc5bb12654e73d58ed30f8
5
5
  SHA512:
6
- metadata.gz: dd6acc35f33b92bb9bcb05390867c34680cd81fe02c985399ee97fa82988efe79694392024d40e8cecd4e873f606d810ed1ad9e30dad3654395355f8ec1f2a9e
7
- data.tar.gz: 79fb4db2b78e89025737ff607a062351cec69f747c61169a93c1e5759aad19672f4c14148d49229b80eef07b1d11615c75127082946576b17f49d29a6479ef56
6
+ metadata.gz: baf430d94c85a7cf78afb5fb1a23bb9518f4170e848b2e02027e276bb07d34a7621e7609d9fc903113e123a6c80e1f40ef5222331326eeb4cc59ed02e51efc01
7
+ data.tar.gz: 800ee80531331226a487ec86b2b2aa01a77a44f69ee3b34999bae0e21b58f94a56f7727ed29c24e5994b959125ac2e1fd31c554d5fe50a89d77f309d746cb59d
@@ -71,6 +71,11 @@ module PandaPal
71
71
  end
72
72
  end
73
73
 
74
+ def self.for_apt_tenant(schema)
75
+ shard, schema = Apartment::Tenant.split_tenant(schema)
76
+ find_by(name: schema)
77
+ end
78
+
74
79
  def encryption_key
75
80
  # production environment might not have loaded secret_key_base yet.
76
81
  # In that case, just read it from env.
@@ -193,7 +193,9 @@ module PandaPal
193
193
  elsif exists == :replace || exists == :update
194
194
  # Update Existing
195
195
  ekey = bearcat_client.put("api/lti/developer_keys/#{ekey[:id]}/tool_configuration", {
196
- developer_key: ekey[:developer_key],
196
+ developer_key: {
197
+ redirect_uris: valid_redirect_uris.join("\n"),
198
+ },
197
199
  # tool_configuration: lti_json,
198
200
  tool_configuration: {
199
201
  settings: lti_json,
@@ -68,15 +68,14 @@ module PandaPal
68
68
 
69
69
  unless defined?(switch_org)
70
70
  def switch_org(org, &block)
71
- org = PandaPal::Organization.find_by(name: org) if org.is_a?(String)
71
+ org = PandaPal::Organization.for_apt_tenant(org) if org.is_a?(String)
72
72
  org.switch_tenant(&block)
73
73
  end
74
74
  end
75
75
 
76
76
  unless defined?(current_organization)
77
77
  def current_organization
78
- org_name = Apartment::Tenant.split_tenant(Apartment::Tenant.current)[1]
79
- PandaPal::Organization.find_by_name(org_name)
78
+ PandaPal::Organization.for_apt_tenant(Apartment::Tenant.current)
80
79
  end
81
80
  end
82
81
  end
@@ -1,3 +1,3 @@
1
1
  module PandaPal
2
- VERSION = "5.12.2"
2
+ VERSION = "5.12.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panda_pal
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.12.2
4
+ version: 5.12.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure CustomDev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-27 00:00:00.000000000 Z
11
+ date: 2024-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails