europeana-api 1.1.0 → 1.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f14b39bae1cf885de3216f4cf7ebf404c10c71edca2835e8368dcd97d7bbad4f
4
- data.tar.gz: bd8edd6d721b6a7821f433d1c03f12e6e072b9621b2cb5591c03f9788311890d
3
+ metadata.gz: 0e20fc23abea7fd328523eb7fece57f0b8e8c3dce467d03276ee29ff3c233c64
4
+ data.tar.gz: c9e7ea4f89561167e7fcc9e63cd74c025b7f0fbc87a903d8e692bf821160e640
5
5
  SHA512:
6
- metadata.gz: 8392c7700d06bae929246578515fe13d9809be5c4062dfe5a757a11a414abf38b33ee7d24f84da4ad4b6e3a7e25fbcb6e69a8a3996920939fc73dad03db4a604
7
- data.tar.gz: b1d638bff24d90092427b8cd475556286ac2dcc2f8c19e22a1dc2baacb507fdc5dbadc29d4cfec42ebcd01f27346537f330b52d0e3dac312090716eb41f19057
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 = JSON.parse(body)
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.to_json
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
@@ -4,6 +4,6 @@ module Europeana
4
4
  ##
5
5
  # Sets the *gem* version (not the *API* version)
6
6
  module API
7
- VERSION = '1.1.0'
7
+ VERSION = '1.2.0'
8
8
  end
9
9
  end
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.1.0
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: 2018-07-11 00:00:00.000000000 Z
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.3
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