ims-lti 2.0.0.beta.25 → 2.0.0.beta.26
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 +4 -4
- data/lib/ims/lti/models/lti_model.rb +13 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bca1778908d5389e08878677bd4dd22e3f8abfa1
|
4
|
+
data.tar.gz: 643e69ddf5b40883445cb8178bf8e4307aacc33b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c48385ceb305eaa7aec1b7fe5883726abfb76fdf5a79735777c3e637c4cea472cd0fe08f7680221b497bdf8ca9271faecfe0a33ac9763fe1934ed3140bcfd0f9
|
7
|
+
data.tar.gz: d4e971786b7f498f2d50a9d2f5537b0478bbd3ff46a66ee22fba610822cbc4ed04bc9793e1b15729755a22c8dd27b00cc1896ea711b7df00c52f3fec4d4a6010
|
@@ -9,18 +9,24 @@ module IMS::LTI::Models
|
|
9
9
|
|
10
10
|
def self.add_attributes(attribute, *attrs)
|
11
11
|
attrs.unshift(attribute)
|
12
|
-
self.attributes
|
13
|
-
|
12
|
+
attrs -= self.attributes
|
13
|
+
if attrs.size > 0
|
14
|
+
self.attributes += attrs
|
15
|
+
attr_accessor(attrs.shift, *attrs)
|
16
|
+
end
|
14
17
|
end
|
15
18
|
|
16
19
|
def self.add_attribute(attribute, options = {})
|
17
20
|
@serialization_options ||= {}
|
18
|
-
|
21
|
+
keys = @serialization_options.keys + options.keys
|
22
|
+
keys.each do |k|
|
19
23
|
@serialization_options[k] ||= {}
|
20
|
-
@serialization_options[k][attribute] =
|
24
|
+
options.has_key?(k) ? @serialization_options[k][attribute] = options[k] : @serialization_options[k].delete(attribute)
|
25
|
+
end
|
26
|
+
unless self.attributes.include? attribute
|
27
|
+
self.attributes += [attribute]
|
28
|
+
attr_accessor(attribute)
|
21
29
|
end
|
22
|
-
self.attributes += [attribute]
|
23
|
-
attr_accessor(attribute)
|
24
30
|
end
|
25
31
|
|
26
32
|
def self.inherit_attributes(attrs)
|
@@ -188,7 +194,7 @@ module IMS::LTI::Models
|
|
188
194
|
else
|
189
195
|
opts = superclass.send(:serialization_options) || {}
|
190
196
|
keys = opts.keys | @serialization_options.keys
|
191
|
-
keys.each_with_object({}) {|k, h| h[k] = (opts[k] || {}).merge(@serialization_options[k] || {})}
|
197
|
+
keys.each_with_object({}) { |k, h| h[k] = (opts[k] || {}).merge(@serialization_options[k] || {}) }
|
192
198
|
end
|
193
199
|
end
|
194
200
|
|
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.0.0.beta.
|
4
|
+
version: 2.0.0.beta.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instructure
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simple_oauth
|