maremma 4.9.3 → 4.9.7

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: b434f52f03f14c1210e58fe2b47d9abd29fb7195a9691617109552368f42c70d
4
- data.tar.gz: 21d34076acf4a146965fa8a0b3b70f151f8d74cbf18e925e8ed79aaa518ecc19
3
+ metadata.gz: 97f609c2f21061be1d94d1008d66789aea372dcac92f68cc0943ec2a07f85dde
4
+ data.tar.gz: 7ca7760b1a151b189165bff33d9be4a4e3f5db27ed950744919ad70ae1c4654a
5
5
  SHA512:
6
- metadata.gz: 4008b8df539b95e01ab7bc2ae52e81dfd1675acaae2156932a4101443d238f743cf018bd0c5f2b328c442d214002a827b5f6898ddb71ab0b3a271c9ef80281d6
7
- data.tar.gz: 70736b2bcdbac3ebbe4f305a17f510b7ec97c928a32cb2c5925ffbe029f5b1887e34b36bdc0d1dddb35cda34a5b5827bc8a912db1ef8e5a5c3a084289864326e
6
+ metadata.gz: 2c54549e05fc09105f1b381bcb6558b9e94d6c0d0e40641bd5c779560917e5def941ed56c57362a07968ffbac764cc8761921855e912379483667ea9e3c7e5c1
7
+ data.tar.gz: 04ffa3d6d3b32b2c9dbf7ca1c9d59f315b485f3bc2e6694f1d1462f64187a29722f64d60fc26b3963c556119181c86e74878303487ccad544e53b8faa58425b2
@@ -1,9 +1,10 @@
1
- name: Build Ruby Gem
1
+ name: Ruby CI
2
2
 
3
3
  on:
4
4
  push:
5
- branches:
6
- - "master"
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
7
8
  jobs:
8
9
  build:
9
10
  runs-on: ubuntu-latest
@@ -22,16 +23,11 @@ jobs:
22
23
  bundle install
23
24
  bundle exec rspec
24
25
 
25
- # - name: Publish code coverage
26
- # uses: paambaati/codeclimate-action@v2.7.4
27
- # env:
28
- # CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
29
-
30
26
  - name: Notify Slack
31
27
  uses: adamkdean/simple-slack-notify@1.0.4
32
28
  with:
33
29
  channel: '#ops'
34
30
  username: 'GitHub Actions'
35
31
  color: 'good'
36
- text: 'A new version of the maremma gem has been built.'
32
+ text: 'A new version of the maremma passes all tests.'
37
33
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.9.7](https://github.com/datacite/maremma/tree/4.9.7) (2022-01-04)
4
+
5
+ [Full Changelog](https://github.com/datacite/maremma/compare/4.9.6...4.9.7)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Update nokogiri requirement from ~\> 1.11.2 to \>= 1.11.2, \< 1.13.0 [\#15](https://github.com/datacite/maremma/pull/15) ([dependabot[bot]](https://github.com/apps/dependabot))
10
+
11
+ ## [4.9.6](https://github.com/datacite/maremma/tree/4.9.6) (2021-10-28)
12
+
13
+ [Full Changelog](https://github.com/datacite/maremma/compare/4.9.5...4.9.6)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - Add option to skip the encoding of the response body. [\#16](https://github.com/datacite/maremma/pull/16) ([jrhoads](https://github.com/jrhoads))
18
+
19
+ ## [4.9.5](https://github.com/datacite/maremma/tree/4.9.5) (2021-07-20)
20
+
21
+ [Full Changelog](https://github.com/datacite/maremma/compare/4.9.4...4.9.5)
22
+
23
+ ## [4.9.4](https://github.com/datacite/maremma/tree/4.9.4) (2021-06-07)
24
+
25
+ [Full Changelog](https://github.com/datacite/maremma/compare/4.9.3...4.9.4)
26
+
27
+ ## [4.9.3](https://github.com/datacite/maremma/tree/4.9.3) (2021-06-07)
28
+
29
+ [Full Changelog](https://github.com/datacite/maremma/compare/4.9.2...4.9.3)
30
+
3
31
  ## [4.9.2](https://github.com/datacite/maremma/tree/4.9.2) (2021-06-07)
4
32
 
5
33
  [Full Changelog](https://github.com/datacite/maremma/compare/4.9.1...4.9.2)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- maremma (4.9.3)
4
+ maremma (4.9.7)
5
5
  activesupport (>= 4.2.5)
6
6
  addressable (>= 2.3.6)
7
7
  builder (~> 3.2, >= 3.2.2)
@@ -9,20 +9,20 @@ PATH
9
9
  faraday (~> 0.17.3)
10
10
  faraday-encoding (~> 0.0.4)
11
11
  faraday_middleware (~> 0.14.0)
12
- nokogiri (~> 1.11.2)
12
+ nokogiri (>= 1.11.2, < 1.13.0)
13
13
  oj (>= 2.8.3)
14
14
  oj_mimic_json (~> 1.0, >= 1.0.1)
15
15
 
16
16
  GEM
17
17
  remote: https://rubygems.org/
18
18
  specs:
19
- activesupport (6.1.3.2)
19
+ activesupport (6.1.4.4)
20
20
  concurrent-ruby (~> 1.0, >= 1.0.2)
21
21
  i18n (>= 1.6, < 2)
22
22
  minitest (>= 5.1)
23
23
  tzinfo (~> 2.0)
24
24
  zeitwerk (~> 2.3)
25
- addressable (2.7.0)
25
+ addressable (2.8.0)
26
26
  public_suffix (>= 2.0.2, < 5.0)
27
27
  ast (2.4.2)
28
28
  builder (3.2.4)
@@ -39,27 +39,27 @@ GEM
39
39
  faraday_middleware (0.14.0)
40
40
  faraday (>= 0.7.4, < 1.0)
41
41
  hashdiff (1.0.1)
42
- i18n (1.8.10)
42
+ i18n (1.8.11)
43
43
  concurrent-ruby (~> 1.0)
44
44
  jaro_winkler (1.5.4)
45
- mini_portile2 (2.5.3)
46
- minitest (5.14.4)
45
+ mini_portile2 (2.6.1)
46
+ minitest (5.15.0)
47
47
  multipart-post (2.1.1)
48
- nokogiri (1.11.7)
49
- mini_portile2 (~> 2.5.0)
48
+ nokogiri (1.12.5)
49
+ mini_portile2 (~> 2.6.1)
50
50
  racc (~> 1.4)
51
- oj (3.11.5)
51
+ oj (3.13.10)
52
52
  oj_mimic_json (1.0.1)
53
53
  parallel (1.20.1)
54
- parser (3.0.1.1)
54
+ parser (3.0.2.0)
55
55
  ast (~> 2.4.1)
56
56
  public_suffix (4.0.6)
57
- racc (1.5.2)
57
+ racc (1.6.0)
58
58
  rack (2.2.3)
59
59
  rack-test (0.8.3)
60
60
  rack (>= 1.0, < 3)
61
61
  rainbow (3.0.0)
62
- rake (13.0.3)
62
+ rake (13.0.6)
63
63
  rexml (3.2.5)
64
64
  rspec (3.10.0)
65
65
  rspec-core (~> 3.10.0)
@@ -98,7 +98,7 @@ GEM
98
98
  addressable (>= 2.3.6)
99
99
  crack (>= 0.3.2)
100
100
  hashdiff (>= 0.4.0, < 2.0.0)
101
- zeitwerk (2.4.2)
101
+ zeitwerk (2.5.3)
102
102
 
103
103
  PLATFORMS
104
104
  ruby
@@ -116,4 +116,4 @@ DEPENDENCIES
116
116
  webmock (~> 3.0, >= 3.0.1)
117
117
 
118
118
  BUNDLED WITH
119
- 2.2.19
119
+ 2.3.4
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  [![Identifier](https://img.shields.io/badge/doi-10.5438%2Fqeg0--3gm3-fca709.svg)](https://doi.org/10.5438/qeg0-3gm3)
2
2
  [![Gem Version](https://badge.fury.io/rb/maremma.svg)](https://badge.fury.io/rb/maremma)
3
- [![Build Status](https://travis-ci.org/datacite/maremma.svg?branch=master)](https://travis-ci.org/datacite/maremma)
3
+ [![Build Status](https://github.com/datacite/maremma/actions/workflows/ci.yml/badge.svg)](https://github.com/datacite/maremma/actions/workflows/ci.yml)
4
4
  [![Code Climate](https://codeclimate.com/github/datacite/maremma/badges/gpa.svg)](https://codeclimate.com/github/datacite/maremma)
5
5
  [![Test Coverage](https://codeclimate.com/github/datacite/maremma/badges/coverage.svg)](https://codeclimate.com/github/datacite/maremma/coverage)
6
6
 
@@ -1,3 +1,3 @@
1
1
  module Maremma
2
- VERSION = "4.9.3".freeze
2
+ VERSION = "4.9.7".freeze
3
3
  end
data/lib/maremma.rb CHANGED
@@ -130,7 +130,7 @@ module Maremma
130
130
  c.headers["Accept"] = options[:headers]["Accept"]
131
131
  c.headers["User-Agent"] = options[:headers]["User-Agent"]
132
132
  c.use FaradayMiddleware::FollowRedirects, limit: limit, cookie: :all if limit > 0
133
- # c.use FaradayMiddleware::Gzip
133
+ c.use FaradayMiddleware::Gzip
134
134
  c.request :multipart
135
135
  c.request :json if options[:headers]["Accept"] == "application/json"
136
136
  c.response :encoding
@@ -229,9 +229,18 @@ module Maremma
229
229
  end
230
230
 
231
231
  def self.parse_response(string, options = {})
232
- string = string.dup.encode(Encoding.find("UTF-8"), invalid: :replace,
233
- undef: :replace,
234
- replace: "?")
232
+ string = string.dup
233
+ string =
234
+ if options[:skip_encoding]
235
+ string
236
+ else
237
+ string.encode(
238
+ Encoding.find("UTF-8"),
239
+ invalid: :replace,
240
+ undef: :replace,
241
+ replace: "?"
242
+ )
243
+ end
235
244
  return string if options[:raw]
236
245
 
237
246
  from_json(string) || from_xml(string) || from_string(string)
data/maremma.gemspec CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
25
25
  s.add_dependency "faraday", "~> 0.17.3"
26
26
  s.add_dependency "faraday-encoding", "~> 0.0.4"
27
27
  s.add_dependency "faraday_middleware", "~> 0.14.0"
28
- s.add_dependency "nokogiri", "~> 1.11.2"
28
+ s.add_dependency "nokogiri", ">= 1.11.2", "< 1.13.0"
29
29
  s.add_dependency "oj", ">= 2.8.3"
30
30
  s.add_dependency "oj_mimic_json", "~> 1.0", ">= 1.0.1"
31
31
  s.add_development_dependency "bundler", "~> 2.0"
@@ -0,0 +1,59 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://pub.sandbox.orcid.org/v3.0/0000-0002-5721-4355
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Mozilla/5.0 (compatible; Maremma/4.9.5; +https://github.com/datacite/maremma)
12
+ Accept:
13
+ - application/json;charset=UTF-8
14
+ Accept-Encoding:
15
+ - gzip,deflate
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: ''
20
+ headers:
21
+ Date:
22
+ - Wed, 27 Oct 2021 13:46:08 GMT
23
+ Content-Type:
24
+ - application/json;charset=UTF-8
25
+ Connection:
26
+ - keep-alive
27
+ Access-Control-Allow-Origin:
28
+ - "*"
29
+ Cache-Control:
30
+ - no-cache, no-store, max-age=0, must-revalidate
31
+ Pragma:
32
+ - no-cache
33
+ Expires:
34
+ - '0'
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ X-Frame-Options:
38
+ - DENY
39
+ X-Content-Type-Options:
40
+ - nosniff
41
+ Vary:
42
+ - accept-encoding
43
+ Content-Encoding:
44
+ - gzip
45
+ Cf-Cache-Status:
46
+ - DYNAMIC
47
+ Expect-Ct:
48
+ - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
49
+ Server:
50
+ - cloudflare
51
+ Cf-Ray:
52
+ - 6a4c5e658b6919e7-EWR
53
+ body:
54
+ encoding: ASCII-8BIT
55
+ string: !binary |-
56
+ H4sIAAAAAAAAALRVy27bMBD8FYOnFrDiWH77mqRFr0V6KnqgxbW1DUWqJKXECPJBOeTQb/CPdemnHKumW9gGLAjicGZ3uBo9M20SFBEKUA6nCIaNn1lhkI1Z6lxux62W5UpM9NPVEknXWeuafhH946g3iNtRt9PrsSbLuUtpW/1iqq2jxQMu9kIbDUzBgErAenWpEy6BwKD8aorWaTP3K4kB7lCrKAOXakGQ2y9f727uiT/RWS5huSi4o92qkLLJbDHJ0Nrd42dWclnQTbvf6Q66o+F13Bt0SEZy66JMC2+CqAOPOnGn0437AwInkmMGVIAzBZCKLkyy1RTAE4clPyimBLNih4yj3GzePs0NZtzMq6veHDBWq6UvNRWuiBXPYOtPffXLVjvX7f6/tBoTeIYlqMgr2AqK3XLHbxZvbvHqz2jKM5TzaFPHBvTt/tOwcb94paP3phkQ6Nag9fHsGVeixQlKdHTYLC8mEpPjY0Wk2qVgduX93aMdkI2//9jS1s1yq0pKGhPUM8PzdH6Cx0O6dE/xmHCj/iCOR94ZrRy9f1TOnU0M0rg3Gz/pJbSONxuoSrAOZ1xo0/jwmV6gxRs9vrM5X/ymm/Zo2P54xQL21fa5a4yKMGCBm8R3XhgZcHMfHHb0PTnpLcc8ILN+FULsKxhxciFIyYZmYQ0LE2+ARP0A80dtRIB5jQozb+m8E08OjOKyksIhXw53nOBSnczL8T3r9PHW+kxDh2AjW2Q+qI6XKGh6USU+BEOnMZ3S1K7icmZ0kYdb2SP3Dooi4ZeRqlAvhzaXep6RfxdQqnD7TC2UQDUL6JzIvSUjYgoU9AmWa4uX8exQgWQzyCY0TSnm5xesci+/mZQzBkqEx/PYt0dIAr8KLonsUjP3jr4SzlTE6pt5nr5qaEnMgikxKPEffW2JSYTS7+E8TayYAkG2i68Akr38AQAA//8DAEWCRUMUCwAA
57
+ http_version:
58
+ recorded_at: Wed, 27 Oct 2021 13:46:00 GMT
59
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,59 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://pub.sandbox.orcid.org/v3.0/0000-0002-5721-4355
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Mozilla/5.0 (compatible; Maremma/4.9.5; +https://github.com/datacite/maremma)
12
+ Accept:
13
+ - application/json;charset=UTF-8
14
+ Accept-Encoding:
15
+ - gzip,deflate
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: ''
20
+ headers:
21
+ Date:
22
+ - Wed, 27 Oct 2021 13:46:08 GMT
23
+ Content-Type:
24
+ - application/json;charset=UTF-8
25
+ Connection:
26
+ - keep-alive
27
+ Access-Control-Allow-Origin:
28
+ - "*"
29
+ Cache-Control:
30
+ - no-cache, no-store, max-age=0, must-revalidate
31
+ Pragma:
32
+ - no-cache
33
+ Expires:
34
+ - '0'
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ X-Frame-Options:
38
+ - DENY
39
+ X-Content-Type-Options:
40
+ - nosniff
41
+ Vary:
42
+ - accept-encoding
43
+ Content-Encoding:
44
+ - gzip
45
+ Cf-Cache-Status:
46
+ - DYNAMIC
47
+ Expect-Ct:
48
+ - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
49
+ Server:
50
+ - cloudflare
51
+ Cf-Ray:
52
+ - 6a4c5e69ad5f1a07-EWR
53
+ body:
54
+ encoding: ASCII-8BIT
55
+ string: !binary |-
56
+ H4sIAAAAAAAAALRVy27bMBD8FYOnFrDiWH77mqRFr0V6KnqgxbW1DUWqJKXECPJBOeTQb/CPdemnHKumW9gGLAjicGZ3uBo9M20SFBEKUA6nCIaNn1lhkI1Z6lxux62W5UpM9NPVEknXWeuafhH946g3iNtRt9PrsSbLuUtpW/1iqq2jxQMu9kIbDUzBgErAenWpEy6BwKD8aorWaTP3K4kB7lCrKAOXakGQ2y9f727uiT/RWS5huSi4o92qkLLJbDHJ0Nrd42dWclnQTbvf6Q66o+F13Bt0SEZy66JMC2+CqAOPOnGn0437AwInkmMGVIAzBZCKLkyy1RTAE4clPyimBLNih4yj3GzePs0NZtzMq6veHDBWq6UvNRWuiBXPYOtPffXLVjvX7f6/tBoTeIYlqMgr2AqK3XLHbxZvbvHqz2jKM5TzaFPHBvTt/tOwcb94paP3phkQ6Nag9fHsGVeixQlKdHTYLC8mEpPjY0Wk2qVgduX93aMdkI2//9jS1s1yq0pKGhPUM8PzdH6Cx0O6dE/xmHCj/iCOR94ZrRy9f1TOnU0M0rg3Gz/pJbSONxuoSrAOZ1xo0/jwmV6gxRs9vrM5X/ymm/Zo2P54xQL21fa5a4yKMGCBm8R3XhgZcHMfHHb0PTnpLcc8ILN+FULsKxhxciFIyYZmYQ0LE2+ARP0A80dtRIB5jQozb+m8E08OjOKyksIhXw53nOBSnczL8T3r9PHW+kxDh2AjW2Q+qI6XKGh6USU+BEOnMZ3S1K7icmZ0kYdb2SP3Dooi4ZeRqlAvhzaXep6RfxdQqnD7TC2UQDUL6JzIvSUjYgoU9AmWa4uX8exQgWQzyCY0TSnm5xesci+/mZQzBkqEx/PYt0dIAr8KLonsUjP3jr4SzlTE6pt5nr5qaEnMgikxKPEffW2JSYTS7+E8TayYAkG2i68Akr38AQAA//8DAEWCRUMUCwAA
57
+ http_version:
58
+ recorded_at: Wed, 27 Oct 2021 13:46:00 GMT
59
+ recorded_with: VCR 3.0.3
data/spec/maremma_spec.rb CHANGED
@@ -78,20 +78,34 @@ describe Maremma do
78
78
  expect(stub).to have_been_requested
79
79
  end
80
80
 
81
- # it "get json compressed", vcr: true do
82
- # response = subject.get("https://api.datacite.org/works", :headers => { "Content-Type" => "application/json", "Accept-Encoding" => "gzip"})
83
- # expect(response.body["data"].length).to eq(25)
84
- # end
81
+ it "get json compressed", vcr: true do
82
+ response = subject.get("https://api.datacite.org/works", headers: { "Content-Type" => "application/json", "Accept-Encoding" => "gzip" })
83
+ expect(response.body["data"].length).to eq(25)
84
+ end
85
85
 
86
- # it "get html compressed", vcr: true do
87
- # response = subject.get("https://datacite.org/", :headers => {"Accept-Encoding" => "gzip"})
88
- # expect(response.body["data"]).to include("html")
89
- # end
86
+ it "get html compressed", vcr: true do
87
+ response = subject.get("https://datacite.org/", headers: { "Accept-Encoding" => "gzip" })
88
+ expect(response.body["data"]).to include("html")
89
+ end
90
90
 
91
- # it "get xml compressed", vcr: true do
92
- # response = subject.get("https://data.crosscite.org/application/vnd.datacite.datacite+xml/10.5061/dryad.8515", :headers => { "Accept-Encoding" => "gzip"})
93
- # expect(response.body["data"]).to be_a(Hash)
94
- # end
91
+ it "get xml compressed", vcr: true do
92
+ response = subject.get("https://data.crosscite.org/application/vnd.datacite.datacite+xml/10.5061/dryad.8515", headers: { "Accept-Encoding" => "gzip" })
93
+ expect(response.body["data"]).to be_a(Hash)
94
+ end
95
+
96
+ it "get utf8 bad encoding", vcr: true do
97
+ response = subject.get("https://pub.sandbox.orcid.org/v3.0/0000-0002-5721-4355", accept: "json")
98
+ expect(response.body["data"]).to be_a(Hash)
99
+ expect(response.body["data"]["person"]["name"]["given-names"]["value"]).to eq("DataC??t??")
100
+ expect(response.body["data"]["person"]["name"]["family-name"]["value"]).to eq("UTF8 T??st")
101
+ end
102
+
103
+ it "get utf8 skip encoding", vcr: true do
104
+ response = subject.get("https://pub.sandbox.orcid.org/v3.0/0000-0002-5721-4355", accept: "json", skip_encoding: true)
105
+ expect(response.body["data"]).to be_a(Hash)
106
+ expect(response.body["data"]["person"]["name"]["given-names"]["value"]).to eq("DataCíté")
107
+ expect(response.body["data"]["person"]["name"]["family-name"]["value"]).to eq("UTF8 Tést")
108
+ end
95
109
  end
96
110
 
97
111
  context "head" do
@@ -99,7 +113,7 @@ describe Maremma do
99
113
  stub = stub_request(:head, url).to_return(status: 200, headers: { "Content-Type" => "text/html" })
100
114
  response = subject.head(url, accept: "html")
101
115
  expect(response.body).to be_nil
102
- expect(response.headers).to eq("Content-Type" => "text/html")
116
+ expect(response.headers).to eq("Content-Length" => 0, "Content-Type" => "text/html")
103
117
  expect(stub).to have_been_requested
104
118
  end
105
119
  end
@@ -151,7 +165,7 @@ describe Maremma do
151
165
  stub = stub_request(:get, url).to_return(body: nil, status: 200, headers: { "Content-Type" => "application/json" })
152
166
  response = subject.get(url)
153
167
  expect(response.body).to eq("data" => nil)
154
- expect(response.headers).to eq("Content-Type" => "application/json")
168
+ expect(response.headers).to eq("Content-Length" => 0, "Content-Type" => "application/json")
155
169
  expect(stub).to have_been_requested
156
170
  end
157
171
 
@@ -159,7 +173,7 @@ describe Maremma do
159
173
  stub = stub_request(:get, url).to_return(body: nil, status: 200, headers: { "Content-Type" => "application/xml" })
160
174
  response = subject.get(url, accept: "xml")
161
175
  expect(response.body).to eq("data" => nil)
162
- expect(response.headers).to eq("Content-Type" => "application/xml")
176
+ expect(response.headers).to eq("Content-Length" => 0, "Content-Type" => "application/xml")
163
177
  expect(stub).to have_been_requested
164
178
  end
165
179
 
@@ -167,7 +181,7 @@ describe Maremma do
167
181
  stub = stub_request(:get, url).to_return(body: nil, status: 200, headers: { "Content-Type" => "text/html" })
168
182
  response = subject.get(url, accept: "html")
169
183
  expect(response.body).to eq("data" => nil)
170
- expect(response.headers).to eq("Content-Type" => "text/html")
184
+ expect(response.headers).to eq("Content-Length" => 0, "Content-Type" => "text/html")
171
185
  expect(stub).to have_been_requested
172
186
  end
173
187
 
@@ -319,7 +333,7 @@ describe Maremma do
319
333
  stub = stub_request(:delete, url).to_return(status: 204, headers: { "Content-Type" => "text/html" })
320
334
  response = subject.delete(url)
321
335
  expect(response.body).to eq("data" => nil)
322
- expect(response.headers).to eq("Content-Type" => "text/html")
336
+ expect(response.headers).to eq("Content-Length" => 0, "Content-Type" => "text/html")
323
337
  expect(response.status).to eq(204)
324
338
  expect(stub).to have_been_requested
325
339
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maremma
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.9.3
4
+ version: 4.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-07 00:00:00.000000000 Z
11
+ date: 2022-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -118,16 +118,22 @@ dependencies:
118
118
  name: nokogiri
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
- - - "~>"
121
+ - - ">="
122
122
  - !ruby/object:Gem::Version
123
123
  version: 1.11.2
124
+ - - "<"
125
+ - !ruby/object:Gem::Version
126
+ version: 1.13.0
124
127
  type: :runtime
125
128
  prerelease: false
126
129
  version_requirements: !ruby/object:Gem::Requirement
127
130
  requirements:
128
- - - "~>"
131
+ - - ">="
129
132
  - !ruby/object:Gem::Version
130
133
  version: 1.11.2
134
+ - - "<"
135
+ - !ruby/object:Gem::Version
136
+ version: 1.13.0
131
137
  - !ruby/object:Gem::Dependency
132
138
  name: oj
133
139
  requirement: !ruby/object:Gem::Requirement
@@ -316,12 +322,11 @@ extensions: []
316
322
  extra_rdoc_files:
317
323
  - README.md
318
324
  files:
319
- - ".github/workflows/build.yml"
320
325
  - ".github/workflows/changelog.yml"
326
+ - ".github/workflows/ci.yml"
321
327
  - ".github/workflows/release.yml"
322
328
  - ".gitignore"
323
329
  - ".rubocop.yml"
324
- - ".travis.yml"
325
330
  - CHANGELOG.md
326
331
  - Gemfile
327
332
  - Gemfile.lock
@@ -344,6 +349,8 @@ files:
344
349
  - spec/fixtures/vcr_cassettes/Maremma/get/get_html_compressed.yml
345
350
  - spec/fixtures/vcr_cassettes/Maremma/get/get_json_compressed.yml
346
351
  - spec/fixtures/vcr_cassettes/Maremma/get/get_json_with_params.yml
352
+ - spec/fixtures/vcr_cassettes/Maremma/get/get_utf8_bad_encoding.yml
353
+ - spec/fixtures/vcr_cassettes/Maremma/get/get_utf8_skip_encoding.yml
347
354
  - spec/fixtures/vcr_cassettes/Maremma/get/get_xml_compressed.yml
348
355
  - spec/fixtures/vcr_cassettes/Maremma/link_headers/parses_link_headers.yml
349
356
  - spec/fixtures/vcr_cassettes/Maremma/set_host/crossref.yml
data/.travis.yml DELETED
@@ -1,33 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.6.5
4
-
5
- addons:
6
- code_climate:
7
- repo_token: $CODECLIMATE_REPO_TOKEN
8
-
9
- install:
10
- - travis_retry bundle install
11
-
12
- before_script:
13
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
14
- - chmod +x ./cc-test-reporter
15
- - ./cc-test-reporter before-build
16
-
17
- script:
18
- - bundle exec rspec spec
19
- after_script:
20
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
21
-
22
- deploy:
23
- provider: rubygems
24
- api_key:
25
- secure: YqeY08GVxIbvUPawYI6UrMPXtGUuCMC4u6R1Iup2AGJ7AUlYkMwqrwPfzmZPM2fjCBEpKpbY1OekkFUnUvxZvH4gsqMNB7558At6be/i3W1batAu3KZ6GLRk5HDIQcqb1T3noGU2xjwNprblOgrWO8RKxR/Ey3crqLv77FHtHHBTsI3nPPyYgurs1PvN4hjlxStlYMKlLgRBQeEzSKGajKQwj80HiCV+nHRdEEJ/y+a+ZwaxjMrB7Y7VDW+a+NETQw9yoL1KwVxaugGfpAlqP/oCmRVfL18nyMoVwWqYV44ewQh2NoOpzi1RD05DvFhI4qOHkt0/yRIzO/QhGrhpYmktKR1KgNSu8TJAYcb7J7A2OIx8sqyOraENcZK5fjaatIpSxAg0axo0LnLxKi3zBIr1pcdkzqhQyo1hs1PNvtWSrXDoVgAAb8uqRNfRXKPzrukATvL+gyFJnnxyF/uPzZItxZv/cAbHfNvWJDk3vEquX4P1SiAsG1a1JsWRKgrDPlvT45E74vE1MxIElo+25NktLqutG1dwz/TFFrDcTGSTwO/NijGdAPJVfbTDuVblKCh9UZmf38X9+3QT5U8OA4Z4GaG8Aud0PB+ml27uDGqBtS7PGC69/q3lbV9s7zpYe/9pnhRfHGzNCGcKpPIbW2gUiJINKbd5ZV4KMv1uZCM=
26
- gem: maremma
27
- on:
28
- tags: true
29
- repo: datacite/maremma
30
-
31
- notifications:
32
- email: false
33
- slack: datacite:Wt8En0ALoTA6Kjc5EOKNDWxN