maltese 0.8.4 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
data/spec/sitemap_spec.rb CHANGED
@@ -3,11 +3,11 @@ require 'spec_helper'
3
3
  describe Maltese::Sitemap, vcr: true do
4
4
  subject { Maltese::Sitemap.new }
5
5
 
6
- let(:doi) { "10.4124/cc3d60p" }
6
+ let(:doi) { "10.1594/ieda/100004" }
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=10000")
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")
11
11
  end
12
12
 
13
13
  it "with page[size] zero" do
@@ -15,7 +15,7 @@ describe Maltese::Sitemap, vcr: true do
15
15
  end
16
16
 
17
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=10000")
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")
19
19
  end
20
20
 
21
21
  it "with size" do
@@ -25,22 +25,22 @@ describe Maltese::Sitemap, vcr: true do
25
25
 
26
26
  context "get_total" do
27
27
  it "with works" do
28
- expect(subject.get_total).to eq(74502)
28
+ expect(subject.get_total).to eq(329866)
29
29
  end
30
30
  end
31
31
 
32
32
  context "queue_jobs" do
33
33
  it "should report if there are works returned by the Datacite REST API" do
34
34
  response = subject.queue_jobs
35
- expect(response).to eq(74502)
35
+ expect(response).to eq(329866)
36
36
  end
37
37
  end
38
38
 
39
39
  context "get_data" do
40
40
  it "should report if there are works returned by the Datacite REST API" do
41
41
  response = subject.get_data(subject.get_query_url)
42
- expect(response.body.dig("meta", "total")).to eq(74502)
43
- expect(response.body.fetch("data", []).size).to eq(10000)
42
+ expect(response.body.dig("meta", "total")).to eq(329866)
43
+ expect(response.body.fetch("data", []).size).to eq(1000)
44
44
  doc = response.body.fetch("data", []).first
45
45
  expect(doc.dig("attributes", "doi")).to eq(doi)
46
46
  end
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.4
4
+ version: 0.8.6
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-06-02 00:00:00.000000000 Z
11
+ date: 2019-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: maremma