ims-lti 2.0.0.beta.23 → 2.0.0.beta.24

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
  SHA1:
3
- metadata.gz: 46cfe426f57a5755921c2495ea068c65df5bd0aa
4
- data.tar.gz: 371d56f289c38af52ff1ec733b891cf3bf553fe5
3
+ metadata.gz: a141b93c1db01859d53a90b291a16a30d3e4246b
4
+ data.tar.gz: c4ee32017b85bb0515bb3e6c959f3a6ce71f83bc
5
5
  SHA512:
6
- metadata.gz: d776a2e25856be8a7b32844a69430b5854bffeedc2ca2db1f76d322c6675f476958ae183a306b580b195df102570645c533646a0b8f3ecc5e4cf99121e77ae85
7
- data.tar.gz: 8f3a02b6c135870c68d737a22253fafae9b73df0b57d0204d193129efa8190c0bbc4892e97632269d670109196e2b6cd2831962f212b78cae07574377e230973
6
+ metadata.gz: fdf42e04d1d73ea680d707836616074947a0029fcced366f9615aa5344eb9c4b4719ba67cca7810295cb68f6ec6b313b8b0188ded3d1a65317fc998c87b7d8b7
7
+ data.tar.gz: 80305bf0f10e63501dbbf75c992951b533f3049230ada4db87193135e1b61270b80d9c65a615b08efe37a5b7282aa4183ab4b815560883ce4ecd89f3fc0fe7c4
@@ -11,8 +11,10 @@ module IMS::LTI::Models
11
11
  window: 'http://purl.imsglobal.org/vocab/lti/v2/lti#window'
12
12
  }
13
13
 
14
- add_attributes :display_height, :display_width, :window_target
15
- add_attribute :presentation_document_target
14
+ add_attribute :display_height, json_key: 'displayHeight'
15
+ add_attribute :display_width, json_key: 'displayWidth'
16
+ add_attribute :window_target, json_key: 'windowTarget'
17
+ add_attribute :presentation_document_target, json_key: 'presentationDocumentTarget'
16
18
 
17
19
  end
18
20
  end
@@ -1,11 +1,12 @@
1
1
  module IMS::LTI::Models::ContentItems
2
2
  class ContentItem < IMS::LTI::Models::LTIModel
3
3
 
4
- add_attributes :media_type, :text, :title, :url
4
+ add_attributes :text, :title, :url
5
+ add_attribute :media_type, json_key: 'mediaType'
5
6
  add_attribute :type, json_key: '@type'
6
7
  add_attribute :id, json_key: '@id'
7
8
  add_attribute :icon, relation: 'IMS::LTI::Models::Image'
8
- add_attribute :placement_advice, relation: 'IMS::LTI::Models::ContentItemPlacement'
9
+ add_attribute :placement_advice, json_key:'placementAdvice', relation: 'IMS::LTI::Models::ContentItemPlacement'
9
10
  add_attribute :thumbnail, relation: 'IMS::LTI::Models::Image'
10
11
 
11
12
  TYPE = "ContentItem"
@@ -1,7 +1,8 @@
1
1
  module IMS::LTI::Models::ContentItems
2
2
  class FileItem < ContentItem
3
3
 
4
- add_attributes :copyAdvice, :expires_at
4
+ add_attribute :copy_advice, json_key: 'copyAdvice'
5
+ add_attribute :expires_at, json_key: 'expiresAt'
5
6
 
6
7
  TYPE = "FileItem"
7
8
 
@@ -63,7 +63,7 @@ module IMS::LTI::Models
63
63
  serialization_attrs_for(:relation).each do |attr|
64
64
  val = attributes[attr.to_s]
65
65
  if val && val.is_a?(Array)
66
- json_hash[json_key(attr)] = val.map {|v| v.as_json }
66
+ json_hash[json_key(attr)] = val.map { |v| v.as_json }
67
67
  elsif val
68
68
  json_hash[json_key(attr)] = val.as_json
69
69
  end
@@ -177,10 +177,13 @@ module IMS::LTI::Models
177
177
  end
178
178
 
179
179
  def self.serialization_options()
180
+ @serialization_options ||= {}
180
181
  if name == "IMS::LTI::Models::LTIModel"
181
- @serialization_options || {}
182
+ @serialization_options
182
183
  else
183
- superclass.send(:serialization_options).merge(@serialization_options || {})
184
+ opts = superclass.send(:serialization_options) || {}
185
+ keys = opts.keys | @serialization_options.keys
186
+ keys.each_with_object({}) {|k, h| h[k] = (opts[k] || {}).merge(@serialization_options[k] || {})}
184
187
  end
185
188
  end
186
189
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ims-lti
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta.23
4
+ version: 2.0.0.beta.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure