europeana-api 1.1.0 → 1.2.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e20fc23abea7fd328523eb7fece57f0b8e8c3dce467d03276ee29ff3c233c64
|
4
|
+
data.tar.gz: c9e7ea4f89561167e7fcc9e63cd74c025b7f0fbc87a903d8e692bf821160e640
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ca4387e019d840a93deb73b5520919b9833ae3f83568ffb39eda85bfe43b1d37ecf5b0bf3d5026e997c74d0bec0e26fbfcd34c5ecda3ece685d5ff70edd8224
|
7
|
+
data.tar.gz: b8458529a5e88309a8141d401d45beadbfa80671c474d15ba1f7304e3bdc526fa3faa1f6c896bea5b40a147aa63259cb0358487f61606d659b66261b5912795e
|
@@ -22,14 +22,15 @@ module Europeana
|
|
22
22
|
class ParseJsonToVarious < ::FaradayMiddleware::ResponseMiddleware
|
23
23
|
dependency do
|
24
24
|
require 'json' unless defined?(JSON)
|
25
|
+
require 'multi_json' unless defined?(MultiJson)
|
25
26
|
end
|
26
27
|
|
27
28
|
define_parser do |body|
|
28
29
|
unless body.strip.empty?
|
29
|
-
hash =
|
30
|
+
hash = MultiJson.load(body)
|
30
31
|
if Europeana::API.configuration.parse_json_to == OpenStruct
|
31
32
|
underscored_hash = underscore_hash_keys(hash)
|
32
|
-
underscored_body = underscored_hash
|
33
|
+
underscored_body = MultiJson.dump(underscored_hash)
|
33
34
|
JSON.parse(underscored_body, object_class: OpenStruct)
|
34
35
|
else
|
35
36
|
hash.with_indifferent_access
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: europeana-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Doe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -275,7 +275,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
275
275
|
version: '0'
|
276
276
|
requirements: []
|
277
277
|
rubyforge_project:
|
278
|
-
rubygems_version: 2.7.
|
278
|
+
rubygems_version: 2.7.6
|
279
279
|
signing_key:
|
280
280
|
specification_version: 4
|
281
281
|
summary: Ruby client library for the Europeana API
|