maltese 0.8.6 → 0.8.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +44 -44
- data/lib/maltese/sitemap.rb +2 -3
- data/lib/maltese/version.rb +1 -1
- data/spec/cli_spec.rb +1 -1
- data/spec/fixtures/vcr_cassettes/Maltese_CLI/sitemap/should_succeed.yml +34 -36
- data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/get_data/should_report_if_there_are_works_returned_by_the_Datacite_REST_API.yml +11 -12
- data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/get_total/with_works.yml +10 -11
- data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/push_data/should_report_if_there_are_no_works_returned_by_the_Datacite_REST_API.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/push_data/should_report_if_there_are_works_returned_by_the_Datacite_REST_API.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/queue_jobs/should_report_if_there_are_works_returned_by_the_Datacite_REST_API.yml +35 -37
- data/spec/sitemap_spec.rb +8 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa8007d40a489e220e332acfd211a6dfa41da24b9777e52590c2a3146a239219
|
4
|
+
data.tar.gz: e46164ae54cef1908938adfcb4dd2dadd9cb664a43341862935e2eaa78651589
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efd2783f7e9974f65c22e60d0b297c72424a351419422defe91202d3f1424c21d17f9f5cacce952baad54832763313dc14ffd2edc64f6e9a0b734051ec7a7919
|
7
|
+
data.tar.gz: 15a2fd9f2a7fd7d9f17ae4b5088d9e99c3c563a890d5ca719c0889c3c876e1ce6fa988f9060c575d590d7d2b6e925ebd21c07d6062663ef8b68f5f9c0658d083
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
maltese (0.8.
|
4
|
+
maltese (0.8.8)
|
5
5
|
activesupport (>= 4.2.5, < 6)
|
6
6
|
aws-sdk-s3 (~> 1.19)
|
7
7
|
dotenv (~> 2.1, >= 2.1.1)
|
@@ -13,25 +13,25 @@ PATH
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
activesupport (5.2.
|
16
|
+
activesupport (5.2.4)
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
18
|
i18n (>= 0.7, < 2)
|
19
19
|
minitest (~> 5.1)
|
20
20
|
tzinfo (~> 1.1)
|
21
|
-
addressable (2.
|
22
|
-
public_suffix (>= 2.0.2, <
|
21
|
+
addressable (2.7.0)
|
22
|
+
public_suffix (>= 2.0.2, < 5.0)
|
23
23
|
aws-eventstream (1.0.3)
|
24
|
-
aws-partitions (1.
|
25
|
-
aws-sdk-core (3.
|
24
|
+
aws-partitions (1.251.0)
|
25
|
+
aws-sdk-core (3.84.0)
|
26
26
|
aws-eventstream (~> 1.0, >= 1.0.2)
|
27
|
-
aws-partitions (~> 1.0)
|
27
|
+
aws-partitions (~> 1, >= 1.239.0)
|
28
28
|
aws-sigv4 (~> 1.1)
|
29
29
|
jmespath (~> 1.0)
|
30
|
-
aws-sdk-kms (1.
|
31
|
-
aws-sdk-core (~> 3, >= 3.
|
30
|
+
aws-sdk-kms (1.26.0)
|
31
|
+
aws-sdk-core (~> 3, >= 3.71.0)
|
32
32
|
aws-sigv4 (~> 1.1)
|
33
|
-
aws-sdk-s3 (1.
|
34
|
-
aws-sdk-core (~> 3, >= 3.
|
33
|
+
aws-sdk-s3 (1.59.0)
|
34
|
+
aws-sdk-core (~> 3, >= 3.83.0)
|
35
35
|
aws-sdk-kms (~> 1)
|
36
36
|
aws-sigv4 (~> 1.1)
|
37
37
|
aws-sigv4 (1.1.0)
|
@@ -44,58 +44,58 @@ GEM
|
|
44
44
|
safe_yaml (~> 1.0.0)
|
45
45
|
diff-lcs (1.3)
|
46
46
|
docile (1.1.5)
|
47
|
-
dotenv (2.7.
|
48
|
-
excon (0.
|
49
|
-
faraday (0.
|
47
|
+
dotenv (2.7.5)
|
48
|
+
excon (0.67.0)
|
49
|
+
faraday (0.17.1)
|
50
50
|
multipart-post (>= 1.2, < 3)
|
51
51
|
faraday-encoding (0.0.5)
|
52
52
|
faraday
|
53
|
-
faraday_middleware (0.
|
53
|
+
faraday_middleware (0.13.1)
|
54
54
|
faraday (>= 0.7.4, < 1.0)
|
55
|
-
hashdiff (0.
|
56
|
-
i18n (1.
|
55
|
+
hashdiff (1.0.0)
|
56
|
+
i18n (1.7.0)
|
57
57
|
concurrent-ruby (~> 1.0)
|
58
58
|
jmespath (1.4.0)
|
59
59
|
json (2.2.0)
|
60
|
-
maremma (4.
|
60
|
+
maremma (4.4)
|
61
61
|
activesupport (>= 4.2.5, < 6)
|
62
62
|
addressable (>= 2.3.6)
|
63
63
|
builder (~> 3.2, >= 3.2.2)
|
64
|
-
excon (~> 0.
|
65
|
-
faraday (~> 0.
|
64
|
+
excon (~> 0.67.0)
|
65
|
+
faraday (~> 0.17.0)
|
66
66
|
faraday-encoding (~> 0.0.4)
|
67
|
-
faraday_middleware (~> 0.
|
67
|
+
faraday_middleware (~> 0.13.1)
|
68
68
|
multi_json (~> 1.12)
|
69
|
-
nokogiri (~> 1.
|
69
|
+
nokogiri (~> 1.10.4)
|
70
70
|
oj (>= 2.8.3)
|
71
|
-
mime-types (3.
|
71
|
+
mime-types (3.3)
|
72
72
|
mime-types-data (~> 3.2015)
|
73
|
-
mime-types-data (3.2019.
|
74
|
-
mini_portile2 (2.
|
75
|
-
minitest (5.
|
76
|
-
multi_json (1.
|
73
|
+
mime-types-data (3.2019.1009)
|
74
|
+
mini_portile2 (2.4.0)
|
75
|
+
minitest (5.13.0)
|
76
|
+
multi_json (1.14.1)
|
77
77
|
multipart-post (2.1.1)
|
78
|
-
nokogiri (1.
|
79
|
-
mini_portile2 (~> 2.
|
80
|
-
oj (3.
|
81
|
-
public_suffix (
|
78
|
+
nokogiri (1.10.7)
|
79
|
+
mini_portile2 (~> 2.4.0)
|
80
|
+
oj (3.10.0)
|
81
|
+
public_suffix (4.0.1)
|
82
82
|
rack (2.0.7)
|
83
83
|
rack-test (0.8.3)
|
84
84
|
rack (>= 1.0, < 3)
|
85
|
-
rake (12.3.
|
86
|
-
rspec (3.
|
87
|
-
rspec-core (~> 3.
|
88
|
-
rspec-expectations (~> 3.
|
89
|
-
rspec-mocks (~> 3.
|
90
|
-
rspec-core (3.
|
91
|
-
rspec-support (~> 3.
|
92
|
-
rspec-expectations (3.
|
85
|
+
rake (12.3.3)
|
86
|
+
rspec (3.9.0)
|
87
|
+
rspec-core (~> 3.9.0)
|
88
|
+
rspec-expectations (~> 3.9.0)
|
89
|
+
rspec-mocks (~> 3.9.0)
|
90
|
+
rspec-core (3.9.0)
|
91
|
+
rspec-support (~> 3.9.0)
|
92
|
+
rspec-expectations (3.9.0)
|
93
93
|
diff-lcs (>= 1.2.0, < 2.0)
|
94
|
-
rspec-support (~> 3.
|
95
|
-
rspec-mocks (3.
|
94
|
+
rspec-support (~> 3.9.0)
|
95
|
+
rspec-mocks (3.9.0)
|
96
96
|
diff-lcs (>= 1.2.0, < 2.0)
|
97
|
-
rspec-support (~> 3.
|
98
|
-
rspec-support (3.
|
97
|
+
rspec-support (~> 3.9.0)
|
98
|
+
rspec-support (3.9.0)
|
99
99
|
safe_yaml (1.0.5)
|
100
100
|
simplecov (0.13.0)
|
101
101
|
docile (~> 1.1.0)
|
@@ -109,7 +109,7 @@ GEM
|
|
109
109
|
tzinfo (1.2.5)
|
110
110
|
thread_safe (~> 0.1)
|
111
111
|
vcr (3.0.3)
|
112
|
-
webmock (3.6
|
112
|
+
webmock (3.7.6)
|
113
113
|
addressable (>= 2.3.6)
|
114
114
|
crack (>= 0.3.2)
|
115
115
|
hashdiff (>= 0.4.0, < 2.0.0)
|
data/lib/maltese/sitemap.rb
CHANGED
@@ -71,19 +71,18 @@ module Maltese
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def get_total(options={})
|
74
|
-
query_url = get_query_url(options.merge(size:
|
74
|
+
query_url = get_query_url(options.merge(size: 1))
|
75
75
|
|
76
76
|
result = Maremma.get(query_url, options)
|
77
77
|
result.body.dig("meta", "total")
|
78
78
|
end
|
79
79
|
|
80
80
|
def get_query_url(options={})
|
81
|
-
options[:cursor] = options[:cursor] || 1
|
82
81
|
options[:size] = options[:size] || job_batch_size
|
83
82
|
|
84
83
|
params = {
|
85
84
|
"fields[dois]" => "doi,updated",
|
86
|
-
"page[
|
85
|
+
"page[scroll]" => "3m",
|
87
86
|
"page[size]" => options[:size]
|
88
87
|
}
|
89
88
|
search_path + URI.encode_www_form(params)
|
data/lib/maltese/version.rb
CHANGED
data/spec/cli_spec.rb
CHANGED
@@ -16,7 +16,7 @@ describe Maltese::CLI do
|
|
16
16
|
sitemap = Zlib::GzipReader.open("public/sitemaps/sitemap.xml.gz") { |gz| gz.read }
|
17
17
|
doc = Nokogiri::XML(sitemap)
|
18
18
|
expect(doc.xpath("//xmlns:url").size).to eq(1001)
|
19
|
-
expect(doc.xpath("//xmlns:loc").last.text).to eq("https://search.test.datacite.org/works/10.
|
19
|
+
expect(doc.xpath("//xmlns:loc").last.text).to eq("https://search.test.datacite.org/works/10.1002/jcb.29244")
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|