atomic_lti 1.10.0 → 3.0.0

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: 51f6a8b44052a79ca2848b1b32f9789ce2033c79cc168b6b43467429f463efe7
4
- data.tar.gz: 9fc1c514d21fcec53c9b74d7b7a673d774052539f5313480ca12d0b3ce886643
3
+ metadata.gz: 22d9da2c6e276eb25de54cc27a58e8cf1f96c1576846b428b5c889623d932948
4
+ data.tar.gz: 9da9287f6c0fb06c820fa535092412741eda150d3560a32a4fa5942d492c1917
5
5
  SHA512:
6
- metadata.gz: 2d87e7f1666d050da989f2d10b017fbc90bc4f8e213f6082e1b45c96b907636ebfd4be09085bcc73bc251610e1b0e727b0204250906f1ef7a351cab50db502d8
7
- data.tar.gz: d0cba43fba4d45d186dd45a804531409cf4d0b9a2453bb68e8ea9207048727c1e943147845034aa952991ce360a6380f44b90e479fd1317466fe9ac1d6eb7a44
6
+ metadata.gz: f8ff8338b6de8808f83682650ec1dbe6c51f5361bade45a1e97007cb02913728c3afd64ae5765a4c11c4c555af4949b8e5bcff37f0ccca8b03368c84311b8190
7
+ data.tar.gz: 07daca85c3880312aa13421ad89b0af16785cf0c4b5bf51fcb8d8b7e8770cfacfaea0882a9956a92d5be0b4a48eeb6cdca34c6046310efab9aceb0c2388bcdf4
@@ -174,6 +174,7 @@ module AtomicLti
174
174
 
175
175
  OBSERVER_ROLES = [
176
176
  MENTOR_INSTITUTION_ROLE,
177
+ MENTOR_CONTEXT_ROLE,
177
178
  # NON_CREDIT_LEARNER,
178
179
  ].freeze
179
180
 
@@ -1,7 +1,8 @@
1
1
  module AtomicLti
2
2
  class Context < ApplicationRecord
3
+ query_constraints :context_id, :deployment_id, :iss
3
4
  belongs_to :platform, primary_key: :iss, foreign_key: :iss
4
- # belongs_to :deployment, primary_key: [:iss, :deployment_id], foreign_key: [:iss, :deployment_id] # TODO: this breaks rspec
5
+ belongs_to :deployment, query_constraints: [:iss, :deployment_id], optional: true
5
6
 
6
7
  validates :context_id, presence: true
7
8
  validates :deployment_id, presence: true
@@ -1,7 +1,9 @@
1
1
  module AtomicLti
2
2
  class Deployment < ApplicationRecord
3
+ query_constraints :deployment_id, :iss
3
4
  belongs_to :platform, primary_key: :iss, foreign_key: :iss
4
- belongs_to :install, primary_key: [:iss, :client_id], foreign_key: [:iss, :client_id], optional: true
5
+ belongs_to :install, query_constraints: [:client_id, :iss], optional: true
6
+ has_many :contexts, query_constraints: [:deployment_id, :iss]
5
7
 
6
8
  # we won't have platform_guid during dynamic registration
7
9
  # belongs_to :platform_instance, primary_key: :guid, foreign_key: :platform_guid, optional: true
@@ -1,11 +1,10 @@
1
1
  module AtomicLti
2
2
  class Install < ApplicationRecord
3
+ query_constraints :client_id, :iss
3
4
  belongs_to :platform, primary_key: :iss, foreign_key: :iss
5
+ has_many :deployments, query_constraints: [:client_id, :iss]
4
6
 
5
7
  validates :client_id, presence: true
6
8
  validates :iss, presence: true
7
- def deployments
8
- AtomicLti::Deployment.where("iss = ? AND client_id = ?", iss, client_id)
9
- end
10
9
  end
11
10
  end
@@ -1,5 +1,9 @@
1
1
  module AtomicLti
2
2
  class Platform < ApplicationRecord
3
+ query_constraints :iss
3
4
  validates :iss, presence: true
5
+ has_many :platform_instances, foreign_key: :iss, primary_key: :iss
6
+ has_many :deployments, foreign_key: :iss, primary_key: :iss
7
+ has_many :contexts, foreign_key: :iss, primary_key: :iss
4
8
  end
5
9
  end
@@ -1,3 +1,3 @@
1
1
  module AtomicLti
2
- VERSION = "1.10.0".freeze
2
+ VERSION = "3.0.0".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.10.0
4
+ version: 3.0.0
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-07-05 00:00:00.000000000 Z
13
+ date: 2024-11-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: pg
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: '7.0'
35
+ version: '7.1'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: '7.0'
42
+ version: '7.1'
43
43
  description: AtomicLti implements the LTI Advantage specification. This gem does contain
44
44
  source code specific to other Atomic Jolt products
45
45
  email:
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  requirements: []
138
- rubygems_version: 3.4.10
138
+ rubygems_version: 3.4.19
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: AtomicLti implements the LTI Advantage specification.