atomic_lti 1.10.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51f6a8b44052a79ca2848b1b32f9789ce2033c79cc168b6b43467429f463efe7
4
- data.tar.gz: 9fc1c514d21fcec53c9b74d7b7a673d774052539f5313480ca12d0b3ce886643
3
+ metadata.gz: aac6096f2a93856e8186ad6dfa5cd43856a0ac2ffd16d2e9a1353d404742c69a
4
+ data.tar.gz: 64b8ffeeb7d74e020ae63fa8c42d2401e4632a4fb4a311fdf06cb177069e801a
5
5
  SHA512:
6
- metadata.gz: 2d87e7f1666d050da989f2d10b017fbc90bc4f8e213f6082e1b45c96b907636ebfd4be09085bcc73bc251610e1b0e727b0204250906f1ef7a351cab50db502d8
7
- data.tar.gz: d0cba43fba4d45d186dd45a804531409cf4d0b9a2453bb68e8ea9207048727c1e943147845034aa952991ce360a6380f44b90e479fd1317466fe9ac1d6eb7a44
6
+ metadata.gz: d1ad65c60634d64306683166dffbf5cb2fb72a79b5db177c76c720cfa98859e3b5db6e30951f92a198be6c232f0a2ffc84be8449e38bb55279cd90d62de54ee3
7
+ data.tar.gz: 8b1df93f772d15b9e20482928bdcd8f766fe00769818c1217bf98e3a3ff111a80793ad2ee2d005992175bc147ccad024fc2fe3f453f49ceb0b85589c3009d336
@@ -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 = "2.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: 2.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-10-03 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.