maltese 0.8.6 → 0.8.8

Sign up to get free protection for your applications and to get access to all the features.
data/spec/sitemap_spec.rb CHANGED
@@ -3,43 +3,39 @@ require 'spec_helper'
3
3
  describe Maltese::Sitemap, vcr: true do
4
4
  subject { Maltese::Sitemap.new }
5
5
 
6
- let(:doi) { "10.1594/ieda/100004" }
6
+ let(:doi) { "10.1097/npt.0b013e3181c1fc0b" }
7
7
 
8
8
  context "get_query_url" do
9
9
  it "default" do
10
- expect(subject.get_query_url).to eq("https://api.test.datacite.org/dois?fields%5Bdois%5D=doi%2Cupdated&page%5Bcursor%5D=1&page%5Bsize%5D=1000")
10
+ expect(subject.get_query_url).to eq("https://api.test.datacite.org/dois?fields%5Bdois%5D=doi%2Cupdated&page%5Bscroll%5D=3m&page%5Bsize%5D=1000")
11
11
  end
12
12
 
13
- it "with page[size] zero" do
14
- expect(subject.get_query_url(size: 0)).to eq("https://api.test.datacite.org/dois?fields%5Bdois%5D=doi%2Cupdated&page%5Bcursor%5D=1&page%5Bsize%5D=0")
15
- end
16
-
17
- it "with cursor" do
18
- expect(subject.get_query_url(cursor: 250)).to eq("https://api.test.datacite.org/dois?fields%5Bdois%5D=doi%2Cupdated&page%5Bcursor%5D=250&page%5Bsize%5D=1000")
13
+ it "with page[size] one" do
14
+ expect(subject.get_query_url(size: 1)).to eq("https://api.test.datacite.org/dois?fields%5Bdois%5D=doi%2Cupdated&page%5Bscroll%5D=3m&page%5Bsize%5D=1")
19
15
  end
20
16
 
21
17
  it "with size" do
22
- expect(subject.get_query_url(size: 250)).to eq("https://api.test.datacite.org/dois?fields%5Bdois%5D=doi%2Cupdated&page%5Bcursor%5D=1&page%5Bsize%5D=250")
18
+ expect(subject.get_query_url(size: 250)).to eq("https://api.test.datacite.org/dois?fields%5Bdois%5D=doi%2Cupdated&page%5Bscroll%5D=3m&page%5Bsize%5D=250")
23
19
  end
24
20
  end
25
21
 
26
22
  context "get_total" do
27
23
  it "with works" do
28
- expect(subject.get_total).to eq(329866)
24
+ expect(subject.get_total).to eq(807468)
29
25
  end
30
26
  end
31
27
 
32
28
  context "queue_jobs" do
33
29
  it "should report if there are works returned by the Datacite REST API" do
34
30
  response = subject.queue_jobs
35
- expect(response).to eq(329866)
31
+ expect(response).to eq(807880)
36
32
  end
37
33
  end
38
34
 
39
35
  context "get_data" do
40
36
  it "should report if there are works returned by the Datacite REST API" do
41
37
  response = subject.get_data(subject.get_query_url)
42
- expect(response.body.dig("meta", "total")).to eq(329866)
38
+ expect(response.body.dig("meta", "total")).to eq(806854)
43
39
  expect(response.body.fetch("data", []).size).to eq(1000)
44
40
  doc = response.body.fetch("data", []).first
45
41
  expect(doc.dig("attributes", "doi")).to eq(doi)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maltese
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.6
4
+ version: 0.8.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-12 00:00:00.000000000 Z
11
+ date: 2019-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: maremma