ims-lti 2.1.6 → 2.3.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
- SHA1:
3
- metadata.gz: 70d4623f26581c5ac574fa59ffabb318554a3f6f
4
- data.tar.gz: 4516e7ffbaff759080d8c15a4e0db54513376092
2
+ SHA256:
3
+ metadata.gz: 517f20cf164297427cfa6cb070ab79f57514fa7b88e98f0ebd2adec5430e1897
4
+ data.tar.gz: 7740db235eee2784d84dd9d66a8aebd132eb337d4ecea837bfc36f49b6117f2a
5
5
  SHA512:
6
- metadata.gz: 41bfce5b2463afcd01dee8edf5a618efc1c71a3092369acbaaed2cdc1cee49ce592a9f4bad4834dc4c8fbc42cec9160228813af98180c8f3d4c38e61181c0f8d
7
- data.tar.gz: fa6001859f5e9a9fc5a084083938affae5f49bc84f61bed867893635bc7387603932ace9d120370bb96f78d75ce7bb4a29fa39146451a29b7e1db2b451962a39
6
+ metadata.gz: a9e0205e846821c9415894bbab343e0ab1b53ff8627b2fdc6994ac968f3ce962c99753b5c98ee38e75bbfddafd840ffc9d053f332c573b6d43cde8cddb421d5b
7
+ data.tar.gz: 328b07aa4123c8bf8a296cc00231f35b3d03887e7b28562fff59bb19720c34b9e9ec653e263eed440522c1f460d3c64e81946c9c832fb5bfb5cf64bd7a59758a
@@ -92,8 +92,13 @@ module IMS::LTI::Models
92
92
  end
93
93
 
94
94
  def from_json(json)
95
- # JSON.parse(json.to_json) is a quick and dirty way to clone the json object passed in
96
- data = json.is_a?(String) ? JSON.parse(URI.unescape(json)) : JSON.parse(URI.unescape(json.to_json))
95
+ json = json.to_json unless json.is_a?(String)
96
+ begin
97
+ data = JSON.parse(json)
98
+ rescue
99
+ data = JSON.parse(URI.unescape(json))
100
+ end
101
+
97
102
  if data.is_a? Array
98
103
  data.map { |hash| self.class.from_json(hash.to_json) }
99
104
  else
@@ -1,6 +1,6 @@
1
1
  module IMS::LTI::Models::MembershipService
2
2
  class LISPerson < Person
3
- attr_reader :email, :result_sourced_id, :sourced_id, :user_id
3
+ attr_reader :email, :result_sourced_id, :sourced_id, :user_id, :sis_id
4
4
 
5
5
  def initialize(opts={})
6
6
  super(opts)
@@ -8,6 +8,7 @@ module IMS::LTI::Models::MembershipService
8
8
  @result_sourced_id = opts[:result_sourced_id]
9
9
  @sourced_id = opts[:sourced_id]
10
10
  @user_id = opts[:user_id]
11
+ @sis_id = opts[:sis_id]
11
12
  end
12
13
  end
13
14
  end
@@ -6,6 +6,6 @@ module IMS::LTI::Models
6
6
  require_relative 'messages/basic_lti_launch_request'
7
7
  require_relative 'messages/content_item_selection_request'
8
8
  require_relative 'messages/content_item_selection'
9
- require_relative 'messages/tool_proxy_reregistration_request'
9
+ require_relative 'messages/tool_proxy_update_request'
10
10
  end
11
11
  end
@@ -3,7 +3,8 @@ module IMS::LTI::Models::Messages
3
3
 
4
4
  add_required_params :resource_link_id
5
5
  add_recommended_params :context_id, :launch_presentation_return_url, :tool_consumer_instance_guid
6
- add_optional_params :context_type, :role_scope_mentor, :user_image
6
+ add_optional_params :context_type, :role_scope_mentor, :user_image,
7
+ :lis_outcome_service_url, :lis_person_sourced_id, :lis_result_sourcedid
7
8
  add_deprecated_params :context_title, :context_label, :resource_link_title, :resource_link_description,
8
9
  :lis_person_name_given, :lis_person_name_family, :lis_person_name_full,
9
10
  :lis_person_contact_email_primary, :user_image, :lis_person_sourcedid,
@@ -1,10 +1,10 @@
1
1
  module IMS::LTI::Models::Messages
2
- class ToolProxyReregistrationRequest < RequestMessage
2
+ class ToolProxyUpdateRequest < RequestMessage
3
3
 
4
4
  add_required_params :tc_profile_url, :launch_presentation_return_url
5
5
 
6
6
 
7
- MESSAGE_TYPE = 'ToolProxyReregistrationRequest'
7
+ MESSAGE_TYPE = 'ToolProxyUpdateRequest'
8
8
 
9
9
  def initialize(attrs = {})
10
10
  super(attrs)
@@ -34,7 +34,7 @@ module IMS::LTI::Models
34
34
  end
35
35
 
36
36
  def reregistration_capable?
37
- @capability_offered.include?(Messages::ToolProxyReregistrationRequest::MESSAGE_TYPE)
37
+ @capability_offered.include?(Messages::ToolProxyUpdateRequest::MESSAGE_TYPE)
38
38
  end
39
39
 
40
40
  def security_profile_by_name(security_profile_name:)
@@ -7,5 +7,6 @@ module IMS::LTI::Serializers::MembershipService
7
7
  set_attribute :result_sourced_id, key: :resultSourcedId
8
8
  set_attribute :sourced_id, key: :sourcedId
9
9
  set_attribute :user_id, key: :userId
10
+ set_attribute :sis_id, key: :sisId, optional: true
10
11
  end
11
12
  end
@@ -46,7 +46,7 @@ module IMS::LTI::Services
46
46
  end
47
47
 
48
48
  def signed_params
49
- simple_oauth_header.signed_attributes.merge(params)
49
+ simple_oauth_header.signed_attributes.merge(@parsed_params)
50
50
  end
51
51
 
52
52
 
@@ -76,7 +76,7 @@ module IMS::LTI::Services
76
76
  end
77
77
 
78
78
  def reregistration?
79
- @registration_request.is_a?(IMS::LTI::Models::Messages::ToolProxyReregistrationRequest)
79
+ @registration_request.is_a?(IMS::LTI::Models::Messages::ToolProxyUpdateRequest)
80
80
  end
81
81
 
82
82
 
@@ -1,5 +1,5 @@
1
1
  module IMS
2
2
  module LTI
3
- VERSION = "2.0.0.beta.27"
3
+ VERSION = "2.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ims-lti
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.6
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-07 00:00:00.000000000 Z
11
+ date: 2021-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -48,30 +48,30 @@ dependencies:
48
48
  name: faraday
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
51
+ - - "<"
52
52
  - !ruby/object:Gem::Version
53
- version: '0.8'
53
+ version: '2.0'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - "~>"
58
+ - - "<"
59
59
  - !ruby/object:Gem::Version
60
- version: '0.8'
60
+ version: '2.0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: faraday_middleware
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - "~>"
65
+ - - "<"
66
66
  - !ruby/object:Gem::Version
67
- version: '0.8'
67
+ version: '2.0'
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - "~>"
72
+ - - "<"
73
73
  - !ruby/object:Gem::Version
74
- version: '0.8'
74
+ version: '2.0'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: json-jwt
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -90,30 +90,30 @@ dependencies:
90
90
  name: simple_oauth
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - '='
93
+ - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '0.2'
95
+ version: 0.3.1
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - '='
100
+ - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '0.2'
102
+ version: 0.3.1
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: byebug
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '8.2'
109
+ version: '9.0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: '8.2'
116
+ version: '9.0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: guard
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -148,14 +148,14 @@ dependencies:
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: '2.10'
151
+ version: '3.0'
152
152
  type: :development
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: '2.10'
158
+ version: '3.0'
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: pry
161
161
  requirement: !ruby/object:Gem::Requirement
@@ -176,14 +176,14 @@ dependencies:
176
176
  requirements:
177
177
  - - "~>"
178
178
  - !ruby/object:Gem::Version
179
- version: '10.4'
179
+ version: '12.0'
180
180
  type: :development
181
181
  prerelease: false
182
182
  version_requirements: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - "~>"
185
185
  - !ruby/object:Gem::Version
186
- version: '10.4'
186
+ version: '12.0'
187
187
  - !ruby/object:Gem::Dependency
188
188
  name: rspec
189
189
  requirement: !ruby/object:Gem::Requirement
@@ -212,7 +212,7 @@ dependencies:
212
212
  - - "~>"
213
213
  - !ruby/object:Gem::Version
214
214
  version: '0.8'
215
- description:
215
+ description:
216
216
  email: opensource@instructure.com
217
217
  executables: []
218
218
  extensions: []
@@ -275,7 +275,7 @@ files:
275
275
  - lib/ims/lti/models/messages/message.rb
276
276
  - lib/ims/lti/models/messages/registration_request.rb
277
277
  - lib/ims/lti/models/messages/request_message.rb
278
- - lib/ims/lti/models/messages/tool_proxy_reregistration_request.rb
278
+ - lib/ims/lti/models/messages/tool_proxy_update_request.rb
279
279
  - lib/ims/lti/models/parameter.rb
280
280
  - lib/ims/lti/models/product_family.rb
281
281
  - lib/ims/lti/models/product_info.rb
@@ -320,7 +320,7 @@ homepage: http://github.com/instructure/ims-lti
320
320
  licenses:
321
321
  - MIT
322
322
  metadata: {}
323
- post_install_message:
323
+ post_install_message:
324
324
  rdoc_options: []
325
325
  require_paths:
326
326
  - lib
@@ -335,9 +335,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
335
335
  - !ruby/object:Gem::Version
336
336
  version: '0'
337
337
  requirements: []
338
- rubyforge_project:
339
- rubygems_version: 2.6.11
340
- signing_key:
338
+ rubygems_version: 3.1.4
339
+ signing_key:
341
340
  specification_version: 4
342
341
  summary: Ruby library for creating IMS LTI tool providers and consumers
343
342
  test_files: []