harvestdor-indexer 2.3.3 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +7 -1
- data/.travis.yml +1 -2
- data/lib/harvestdor/indexer/resource.rb +6 -0
- data/lib/harvestdor/indexer/version.rb +1 -1
- data/spec/unit/harvestdor-indexer-resource_spec.rb +17 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2615efed3ea7e94441d7457e39cd5bc3503a5cd9
|
4
|
+
data.tar.gz: 508ff570b19083f8f78ea29d3f820c09f698f392
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8960f3c459bd794532ddc94e0d80d31f5f85692f9e08eca0a540054290054dfeee9082c2bc68f9d3ee5e5e516be03b43fdebe8a2fba9834c47a8e21dfc2ea65a
|
7
|
+
data.tar.gz: 10cf83435837099f544094927182de39a2ae624e66cdff7f0477158de923d22cd27c174d5f1d8127ead92df9f4162a3f3fc50a03bc98e7ce68eb59e94393b804
|
data/.rubocop_todo.yml
CHANGED
@@ -16,7 +16,13 @@ Lint/UselessAssignment:
|
|
16
16
|
Metrics/AbcSize:
|
17
17
|
Max: 20
|
18
18
|
|
19
|
-
# Offense count:
|
19
|
+
# Offense count: 1
|
20
|
+
# Configuration parameters: CountComments.
|
21
|
+
Metrics/ClassLength:
|
22
|
+
Exclude:
|
23
|
+
- 'lib/harvestdor/indexer/resource.rb'
|
24
|
+
|
25
|
+
# Offense count: 92
|
20
26
|
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
|
21
27
|
# URISchemes: http, https
|
22
28
|
Metrics/LineLength:
|
data/.travis.yml
CHANGED
@@ -35,6 +35,12 @@ module Harvestdor
|
|
35
35
|
options[:logger] || (indexer.logger if indexer.respond_to? :logger) || Logger.new(STDERR)
|
36
36
|
end
|
37
37
|
|
38
|
+
def exists?
|
39
|
+
public_xml
|
40
|
+
rescue Harvestdor::Errors::MissingPublicXml, Harvestdor::Errors::MissingPurlPage
|
41
|
+
false
|
42
|
+
end
|
43
|
+
|
38
44
|
##
|
39
45
|
# Is this resource a collection?
|
40
46
|
def collection?
|
@@ -23,6 +23,23 @@ describe Harvestdor::Indexer::Resource do
|
|
23
23
|
|
24
24
|
subject { resource }
|
25
25
|
|
26
|
+
describe '#exists?' do
|
27
|
+
it 'exists if the public xml is present and available' do
|
28
|
+
allow(subject).to receive(:public_xml).and_return(blank_public_xml)
|
29
|
+
expect(subject).to exist
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'does not exist if the public xml is empty' do
|
33
|
+
allow(subject).to receive(:public_xml).and_raise Harvestdor::Errors::MissingPurlPage
|
34
|
+
expect(subject).not_to exist
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'does not exist if the purl is missing' do
|
38
|
+
allow(subject).to receive(:public_xml).and_raise Harvestdor::Errors::MissingPurlPage
|
39
|
+
expect(subject).not_to exist
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
26
43
|
describe '#items' do
|
27
44
|
context 'for a regular item' do
|
28
45
|
before do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: harvestdor-indexer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naomi Dushay
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-07-
|
13
|
+
date: 2016-07-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rsolr
|