ims-lti 2.2.1 → 2.2.2

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: dd15a73fb07c7595df2ee56343e4826b7bf37931
4
- data.tar.gz: d398a556198f918d403aaa4c7967c16cab4d6235
3
+ metadata.gz: 4f95cb19f50119fd3499f3e1670899b93085a454
4
+ data.tar.gz: dafde19a481df22cebc54d2ab1e1efabef2215f1
5
5
  SHA512:
6
- metadata.gz: ddc9e6a05929a85b04ef9096f5e4da84816f1c500ba986ebe1038c4013f7ad773e9cbe5afbe42b3369273f586eaa9fcea3b1be34685bfd477f3c5f8d1c9f6f5e
7
- data.tar.gz: 8f1af2ea83d805d19cfa1087306f8055858dddee1e739b38940e76c848aa60a5cd6a468759ae797e40bf3c57b7b1640606fc9e60559b050e28feba84c75d17c5
6
+ metadata.gz: a29b4683bc1097f6cd2c2d203c6e20810276c933d1946f45f6319685d086d3d1c2abb99663d4e25ecb46f8e23ebba2372d39c7cebd89f9c9eb6e0597df92e470
7
+ data.tar.gz: 5a1c46321eaef7e7ee48e19aee147fe2e7a7d6d4f9a2d809e10b2b9493a8f62bf37e369c58117c99dcd10f0d4f448a48a70f521314200b769cd71f7a5e59ce9c
@@ -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
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.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-10 00:00:00.000000000 Z
11
+ date: 2017-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -336,8 +336,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
336
336
  version: '0'
337
337
  requirements: []
338
338
  rubyforge_project:
339
- rubygems_version: 2.6.11
339
+ rubygems_version: 2.5.1
340
340
  signing_key:
341
341
  specification_version: 4
342
342
  summary: Ruby library for creating IMS LTI tool providers and consumers
343
343
  test_files: []
344
+ has_rdoc: