maremma 4.1 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +16 -16
- data/lib/maremma/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/Maremma/host/crossref.yml +36 -0
- data/spec/maremma_spec.rb +8 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6466ed8dfa89489f44db7e034e23206e20b077e971eb02fce233b1f48fc563b1
|
4
|
+
data.tar.gz: 14a9a967785b8e21ad1376cb657044e48e448be439c6bca294f4bdadf5cead13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84091794aaee7ecef3cbcf1f4a1f52f1ca01f9d4a55ad434b7596a8cc9fe6197d56eda120f297dce0fbd91abb837ca00e77b77604e1f4f8603b67e7f7d33629d
|
7
|
+
data.tar.gz: e20adeded2e72cbc41c2d3602b0c75ae3eeb08404ce3830c64e63c7901d398c20ad4c7ef19fb17076d7f98fe58839b69bfa2b2731407da2cf8bc7a32016fd021
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
maremma (4.1)
|
4
|
+
maremma (4.1.1)
|
5
5
|
activesupport (>= 4.2.5, < 6)
|
6
6
|
addressable (>= 2.3.6)
|
7
7
|
builder (~> 3.2, >= 3.2.2)
|
@@ -16,7 +16,7 @@ PATH
|
|
16
16
|
GEM
|
17
17
|
remote: https://rubygems.org/
|
18
18
|
specs:
|
19
|
-
activesupport (5.2.
|
19
|
+
activesupport (5.2.1)
|
20
20
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
21
21
|
i18n (>= 0.7, < 2)
|
22
22
|
minitest (~> 5.1)
|
@@ -39,7 +39,7 @@ GEM
|
|
39
39
|
faraday_middleware (0.12.2)
|
40
40
|
faraday (>= 0.7.4, < 1.0)
|
41
41
|
hashdiff (0.3.7)
|
42
|
-
i18n (1.0
|
42
|
+
i18n (1.1.0)
|
43
43
|
concurrent-ruby (~> 1.0)
|
44
44
|
json (2.1.0)
|
45
45
|
mini_portile2 (2.3.0)
|
@@ -48,25 +48,25 @@ GEM
|
|
48
48
|
multipart-post (2.0.0)
|
49
49
|
nokogiri (1.8.4)
|
50
50
|
mini_portile2 (~> 2.3.0)
|
51
|
-
oj (3.6.
|
52
|
-
public_suffix (3.0.
|
51
|
+
oj (3.6.6)
|
52
|
+
public_suffix (3.0.3)
|
53
53
|
rack (2.0.5)
|
54
54
|
rack-test (0.8.3)
|
55
55
|
rack (>= 1.0, < 3)
|
56
56
|
rake (12.3.1)
|
57
|
-
rspec (3.
|
58
|
-
rspec-core (~> 3.
|
59
|
-
rspec-expectations (~> 3.
|
60
|
-
rspec-mocks (~> 3.
|
61
|
-
rspec-core (3.
|
62
|
-
rspec-support (~> 3.
|
63
|
-
rspec-expectations (3.
|
57
|
+
rspec (3.8.0)
|
58
|
+
rspec-core (~> 3.8.0)
|
59
|
+
rspec-expectations (~> 3.8.0)
|
60
|
+
rspec-mocks (~> 3.8.0)
|
61
|
+
rspec-core (3.8.0)
|
62
|
+
rspec-support (~> 3.8.0)
|
63
|
+
rspec-expectations (3.8.1)
|
64
64
|
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
-
rspec-support (~> 3.
|
66
|
-
rspec-mocks (3.
|
65
|
+
rspec-support (~> 3.8.0)
|
66
|
+
rspec-mocks (3.8.0)
|
67
67
|
diff-lcs (>= 1.2.0, < 2.0)
|
68
|
-
rspec-support (~> 3.
|
69
|
-
rspec-support (3.
|
68
|
+
rspec-support (~> 3.8.0)
|
69
|
+
rspec-support (3.8.0)
|
70
70
|
safe_yaml (1.0.4)
|
71
71
|
simplecov (0.13.0)
|
72
72
|
docile (~> 1.1.0)
|
data/lib/maremma/version.rb
CHANGED
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.eventdata.crossref.org/v1/events?mailto=info@datacite.org&rows=0&source=crossref
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Mozilla/5.0 (compatible; Maremma/4.1; +https://github.com/datacite/maremma)
|
12
|
+
Accept:
|
13
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
Content-Type:
|
20
|
+
- application/json;charset=UTF-8
|
21
|
+
Vary:
|
22
|
+
- Accept
|
23
|
+
Access-Control-Allow-Origin:
|
24
|
+
- "*"
|
25
|
+
Content-Length:
|
26
|
+
- '127'
|
27
|
+
Server:
|
28
|
+
- http-kit
|
29
|
+
Date:
|
30
|
+
- Fri, 17 Aug 2018 11:41:43 GMT
|
31
|
+
body:
|
32
|
+
encoding: ASCII-8BIT
|
33
|
+
string: '{"status":"ok","message-type":"event-list","message":{"next-cursor":null,"total-results":24308,"items-per-page":0,"events":[]}}'
|
34
|
+
http_version:
|
35
|
+
recorded_at: Fri, 17 Aug 2018 11:41:43 GMT
|
36
|
+
recorded_with: VCR 3.0.3
|
data/spec/maremma_spec.rb
CHANGED
@@ -659,6 +659,14 @@ describe Maremma do
|
|
659
659
|
options = { host: true}
|
660
660
|
expect(subject.set_request_headers(url, options)["Host"]).to eq("example.org")
|
661
661
|
end
|
662
|
+
|
663
|
+
it 'crossref', vcr: true do
|
664
|
+
url = "https://api.eventdata.crossref.org/v1/events?mailto=info@datacite.org&rows=0&source=crossref"
|
665
|
+
options = { host: true }
|
666
|
+
response = subject.get(url, options)
|
667
|
+
expect(response.status).to eq(200)
|
668
|
+
expect(response.body.dig("data", "message", "total-results")).to eq(24308)
|
669
|
+
end
|
662
670
|
end
|
663
671
|
|
664
672
|
context 'ssl verify', vcr: true do
|
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
|
+
version: 4.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -318,6 +318,7 @@ files:
|
|
318
318
|
- spec/fixtures/vcr_cassettes/Maremma/content_negotiation/returns_content_as_APA-formatted_citation.yml
|
319
319
|
- spec/fixtures/vcr_cassettes/Maremma/content_negotiation/returns_content_as_bibtex.yml
|
320
320
|
- spec/fixtures/vcr_cassettes/Maremma/get/get_json_with_params.yml
|
321
|
+
- spec/fixtures/vcr_cassettes/Maremma/host/crossref.yml
|
321
322
|
- spec/fixtures/vcr_cassettes/Maremma/link_headers/parses_link_headers.yml
|
322
323
|
- spec/fixtures/vcr_cassettes/Maremma/ssl_verify/default.yml
|
323
324
|
- spec/fixtures/vcr_cassettes/Maremma/ssl_verify/self-signed.yml
|