atomic_lti 1.8.3 → 1.8.5

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: 89a9c7396e05d12765f64f866f1708eb07d66e5088798e20e5357cf9c92bce4d
4
- data.tar.gz: fb98ae12559896877d54bdb0e13526005198efc04d72004181236d99010289dd
3
+ metadata.gz: ba4c43d0a67a951d858b5610d4b7a26a4b0898c863113c515d554f961d172131
4
+ data.tar.gz: cdf108a92d6e62a73b0294a38badb1ebd519de71520bf4f2ef5bb027de4fab21
5
5
  SHA512:
6
- metadata.gz: 47096d099f5370ff31d83d0e4365e78b7f6663528591bebb8d25540c10ff06fbf99be694178cca009ff825e72d8b58c37bb283b5b081c81c5728377978ea92bb
7
- data.tar.gz: 07112ad65fa251c9191e639fe4ad8d56c2fcccf4160b8e4c3b5c94ebb85f11b4e4c23c4b7f8a9cb1fff2ea492919eb5db3caee948bf03bf78d3d88bf80dabf72
6
+ metadata.gz: 33fe99f4b5131ed6df49d4d36ee87058416c100f7bfc3a0fc06b163a6de8c3d30336a8260347d4d4c9db4b028e4e83b000582f94797254b932ff6433ea998ea4
7
+ data.tar.gz: 9b0812047d37e222c6b49e7abffe288afe7c0836c2eb15c970d97ae50d3446c348f5b64cdbbc6eb70848d378a40893be518f084b9d97e85cb8d455080b04a63f
@@ -206,8 +206,6 @@ module AtomicLti
206
206
  build_lti_storage_params(request, platform)
207
207
  end
208
208
 
209
- @app.call(env)
210
-
211
209
  # Delete the state cookie
212
210
  status, headers, body = @app.call(env)
213
211
  # Rack::Utils.delete_cookie_header(headers, "#{OPEN_ID_COOKIE_PREFIX}#{state}")
@@ -295,19 +293,25 @@ module AtomicLti
295
293
  title = id_token[AtomicLti::Definitions::CONTEXT_CLAIM]["title"]
296
294
  types = id_token[AtomicLti::Definitions::CONTEXT_CLAIM]["type"]
297
295
 
298
- AtomicLti::Context.create_with(
299
- label: label,
300
- title: title,
301
- types: types,
302
- ).find_or_create_by!(
303
- iss: iss,
304
- deployment_id: deployment_id,
305
- context_id: context_id,
306
- ).update!(
307
- label: label,
308
- title: title,
309
- types: types,
310
- )
296
+ begin
297
+ AtomicLti::Context.create_with(
298
+ label: label,
299
+ title: title,
300
+ types: types,
301
+ ).find_or_create_by!(
302
+ iss: iss,
303
+ deployment_id: deployment_id,
304
+ context_id: context_id,
305
+ ).update!(
306
+ label: label,
307
+ title: title,
308
+ types: types,
309
+ )
310
+ rescue ActiveRecord::RecordNotUnique
311
+ # Throw away not unique exceptions, this only happens with concurrent launches
312
+ # and this is just maintaining the Context record, nothing uses the return
313
+ # value
314
+ end
311
315
  else
312
316
  Rails.logger.info("No context claim recieved: #{id_token}")
313
317
  end
@@ -1,3 +1,3 @@
1
1
  module AtomicLti
2
- VERSION = "1.8.3".freeze
2
+ VERSION = "1.8.5".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atomic_lti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.3
4
+ version: 1.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Petro
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-06-12 00:00:00.000000000 Z
13
+ date: 2024-06-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: pg