harvestdor-indexer 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.rdoc +1 -0
- data/harvestdor-indexer.gemspec +1 -1
- data/lib/harvestdor-indexer.rb +12 -2
- data/lib/harvestdor-indexer/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/before_all_call.yml +48 -0
- data/spec/fixtures/vcr_cassettes/cant_find_whitelist_call.yml +48 -0
- data/spec/fixtures/vcr_cassettes/empty_array_no_blacklist_config_call.yml +48 -0
- data/spec/fixtures/vcr_cassettes/empty_array_no_whitelist_config_call.yml +48 -0
- data/spec/fixtures/vcr_cassettes/get_collection_druids_call.yml +18 -20
- data/spec/fixtures/vcr_cassettes/ignore_druids_in_blacklist_and_whitelist_call.yml +48 -0
- data/spec/fixtures/vcr_cassettes/ignore_druids_in_blacklist_call.yml +61 -20
- data/spec/fixtures/vcr_cassettes/know_what_is_in_blacklist_call.yml +46 -0
- data/spec/fixtures/vcr_cassettes/know_what_is_in_whitelist_call.yml +46 -0
- data/spec/fixtures/vcr_cassettes/load_blacklist_once_call.yml +48 -0
- data/spec/fixtures/vcr_cassettes/load_whitelist_once_call.yml +48 -0
- data/spec/fixtures/vcr_cassettes/no_blacklist_config_call.yml +61 -20
- data/spec/fixtures/vcr_cassettes/no_blacklist_found_call.yml +48 -0
- data/spec/fixtures/vcr_cassettes/no_whitelist_config_call.yml +61 -20
- data/spec/fixtures/vcr_cassettes/process_druids_whitelist_call.yml +48 -0
- data/spec/fixtures/vcr_cassettes/rsolr_client_config_call.yml +48 -0
- data/spec/fixtures/vcr_cassettes/single_rsolr_connection_call.yml +61 -20
- data/spec/unit/harvestdor-indexer_spec.rb +114 -72
- metadata +30 -6
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://127.0.0.1:3000/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- '*/*'
|
12
|
+
User-Agent:
|
13
|
+
- Ruby
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
X-Frame-Options:
|
20
|
+
- SAMEORIGIN
|
21
|
+
X-Xss-Protection:
|
22
|
+
- 1; mode=block
|
23
|
+
X-Content-Type-Options:
|
24
|
+
- nosniff
|
25
|
+
Content-Type:
|
26
|
+
- text/html; charset=utf-8
|
27
|
+
Etag:
|
28
|
+
- '"444bcb3a3fcf8389296c49467f27e1d6"'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
X-Meta-Request-Version:
|
32
|
+
- 0.3.4
|
33
|
+
X-Request-Id:
|
34
|
+
- ab689891-c796-4fb2-be29-3af139f06890
|
35
|
+
X-Runtime:
|
36
|
+
- '0.005424'
|
37
|
+
Connection:
|
38
|
+
- close
|
39
|
+
Server:
|
40
|
+
- thin 1.6.2 codename Doc Brown
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: ok
|
44
|
+
http_version:
|
45
|
+
recorded_at: Wed, 12 Nov 2014 22:13:47 GMT
|
46
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://127.0.0.1:3000/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- '*/*'
|
12
|
+
User-Agent:
|
13
|
+
- Ruby
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
X-Frame-Options:
|
20
|
+
- SAMEORIGIN
|
21
|
+
X-Xss-Protection:
|
22
|
+
- 1; mode=block
|
23
|
+
X-Content-Type-Options:
|
24
|
+
- nosniff
|
25
|
+
Content-Type:
|
26
|
+
- text/html; charset=utf-8
|
27
|
+
Etag:
|
28
|
+
- '"444bcb3a3fcf8389296c49467f27e1d6"'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
X-Meta-Request-Version:
|
32
|
+
- 0.3.4
|
33
|
+
X-Request-Id:
|
34
|
+
- 1fee9973-1ea8-44f8-9f3e-faa368ca9b97
|
35
|
+
X-Runtime:
|
36
|
+
- '0.006385'
|
37
|
+
Connection:
|
38
|
+
- close
|
39
|
+
Server:
|
40
|
+
- thin 1.6.2 codename Doc Brown
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: ok
|
44
|
+
http_version:
|
45
|
+
recorded_at: Wed, 12 Nov 2014 22:16:32 GMT
|
46
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://127.0.0.1:3000/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- '*/*; q=0.5, application/xml'
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
X-Frame-Options:
|
22
|
+
- SAMEORIGIN
|
23
|
+
X-Xss-Protection:
|
24
|
+
- 1; mode=block
|
25
|
+
X-Content-Type-Options:
|
26
|
+
- nosniff
|
27
|
+
Content-Type:
|
28
|
+
- application/xml; charset=utf-8
|
29
|
+
Etag:
|
30
|
+
- '"444bcb3a3fcf8389296c49467f27e1d6"'
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
X-Meta-Request-Version:
|
34
|
+
- 0.3.4
|
35
|
+
X-Request-Id:
|
36
|
+
- 767d653b-8349-481a-ae98-d5a50fbd862f
|
37
|
+
X-Runtime:
|
38
|
+
- '0.003921'
|
39
|
+
Connection:
|
40
|
+
- close
|
41
|
+
Server:
|
42
|
+
- thin 1.6.2 codename Doc Brown
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ok
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 12 Nov 2014 18:53:12 GMT
|
48
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://127.0.0.1:3000/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- '*/*; q=0.5, application/xml'
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
X-Frame-Options:
|
22
|
+
- SAMEORIGIN
|
23
|
+
X-Xss-Protection:
|
24
|
+
- 1; mode=block
|
25
|
+
X-Content-Type-Options:
|
26
|
+
- nosniff
|
27
|
+
Content-Type:
|
28
|
+
- application/xml; charset=utf-8
|
29
|
+
Etag:
|
30
|
+
- '"444bcb3a3fcf8389296c49467f27e1d6"'
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
X-Meta-Request-Version:
|
34
|
+
- 0.3.4
|
35
|
+
X-Request-Id:
|
36
|
+
- 1bea3a35-b113-4865-9390-f202b2a8d513
|
37
|
+
X-Runtime:
|
38
|
+
- '0.003658'
|
39
|
+
Connection:
|
40
|
+
- close
|
41
|
+
Server:
|
42
|
+
- thin 1.6.2 codename Doc Brown
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ok
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 12 Nov 2014 18:50:02 GMT
|
48
|
+
recorded_with: VCR 2.9.3
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://127.0.0.1:3000/
|
5
|
+
uri: http://127.0.0.1:3000/
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -14,7 +14,7 @@ http_interactions:
|
|
14
14
|
response:
|
15
15
|
status:
|
16
16
|
code: 200
|
17
|
-
message:
|
17
|
+
message: OK
|
18
18
|
headers:
|
19
19
|
X-Frame-Options:
|
20
20
|
- SAMEORIGIN
|
@@ -23,36 +23,77 @@ http_interactions:
|
|
23
23
|
X-Content-Type-Options:
|
24
24
|
- nosniff
|
25
25
|
Content-Type:
|
26
|
-
-
|
26
|
+
- text/html; charset=utf-8
|
27
27
|
Etag:
|
28
|
-
- '"
|
28
|
+
- '"444bcb3a3fcf8389296c49467f27e1d6"'
|
29
29
|
Cache-Control:
|
30
30
|
- max-age=0, private, must-revalidate
|
31
|
+
X-Meta-Request-Version:
|
32
|
+
- 0.3.4
|
31
33
|
X-Request-Id:
|
32
|
-
-
|
34
|
+
- db91305e-e0d6-4592-8c5e-53fcb059e835
|
33
35
|
X-Runtime:
|
34
|
-
- '0.
|
36
|
+
- '0.004390'
|
37
|
+
Connection:
|
38
|
+
- close
|
35
39
|
Server:
|
36
|
-
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
40
|
+
- thin 1.6.2 codename Doc Brown
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: ok
|
44
|
+
http_version:
|
45
|
+
recorded_at: Wed, 12 Nov 2014 19:34:03 GMT
|
46
|
+
- request:
|
47
|
+
method: get
|
48
|
+
uri: http://127.0.0.1:3000/collections/yg867hg1375
|
49
|
+
body:
|
50
|
+
encoding: US-ASCII
|
51
|
+
string: ''
|
52
|
+
headers:
|
53
|
+
Accept:
|
54
|
+
- '*/*'
|
55
|
+
User-Agent:
|
56
|
+
- Ruby
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
X-Frame-Options:
|
63
|
+
- SAMEORIGIN
|
64
|
+
X-Xss-Protection:
|
65
|
+
- 1; mode=block
|
66
|
+
X-Content-Type-Options:
|
67
|
+
- nosniff
|
68
|
+
Content-Type:
|
69
|
+
- application/json; charset=utf-8
|
70
|
+
Etag:
|
71
|
+
- '"c3a375a17d64792857f21d1af227ed7b"'
|
72
|
+
Cache-Control:
|
73
|
+
- max-age=0, private, must-revalidate
|
74
|
+
X-Meta-Request-Version:
|
75
|
+
- 0.3.4
|
76
|
+
X-Request-Id:
|
77
|
+
- 0f35c477-8bf5-4c7d-859b-f87a9007e873
|
78
|
+
X-Runtime:
|
79
|
+
- '0.010236'
|
41
80
|
Connection:
|
42
|
-
-
|
81
|
+
- close
|
82
|
+
Server:
|
83
|
+
- thin 1.6.2 codename Doc Brown
|
43
84
|
body:
|
44
85
|
encoding: US-ASCII
|
45
|
-
string: '{"
|
46
|
-
E. Stafford photographs, 1909-1933"
|
86
|
+
string: '{"collections":[{"druid":"druid:yg867hg1375","latest_change":"2013-11-11T23:34:29Z","title":"Francis
|
87
|
+
E. Stafford photographs, 1909-1933"}],"items":[{"druid":"druid:jf275fd6276","latest_change":"2013-11-11T23:34:29Z","title":"Album
|
47
88
|
A: Photographs of China''s natural landscapes, urban scenes, cultural landmarks,
|
48
|
-
social customs, and people."
|
49
|
-
E: Photographs of the Seventh Day Adventist Church missionaries in China"
|
89
|
+
social customs, and people."},{"druid":"druid:nz353cp1092","latest_change":"2013-11-11T23:34:29Z","title":"Album
|
90
|
+
E: Photographs of the Seventh Day Adventist Church missionaries in China"},{"druid":"druid:tc552kq0798","latest_change":"2013-11-11T23:34:29Z","title":"Album
|
50
91
|
D: Photographs of China''s natural landscapes, urban scenes, cultural landmarks,
|
51
|
-
social customs, and people."
|
92
|
+
social customs, and people."},{"druid":"druid:th998nk0722","latest_change":"2013-11-11T23:34:29Z","title":"Album
|
52
93
|
C: Photographs of the Chinese Revolution of 1911 and the Shanghai Commercial
|
53
|
-
Press"
|
94
|
+
Press"},{"druid":"druid:ww689vs6534","latest_change":"2013-11-11T23:34:29Z","title":"Album
|
54
95
|
B: Photographs of China''s natural landscapes, urban scenes, cultural landmarks,
|
55
|
-
social customs, and people."
|
96
|
+
social customs, and people."}],"counts":{"collections":1,"items":5,"total_count":6}}'
|
56
97
|
http_version:
|
57
|
-
recorded_at: Wed,
|
98
|
+
recorded_at: Wed, 12 Nov 2014 19:34:03 GMT
|
58
99
|
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://127.0.0.1:3000/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- '*/*; q=0.5, application/xml'
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
X-Frame-Options:
|
22
|
+
- SAMEORIGIN
|
23
|
+
X-Xss-Protection:
|
24
|
+
- 1; mode=block
|
25
|
+
X-Content-Type-Options:
|
26
|
+
- nosniff
|
27
|
+
Content-Type:
|
28
|
+
- application/xml; charset=utf-8
|
29
|
+
Etag:
|
30
|
+
- '"444bcb3a3fcf8389296c49467f27e1d6"'
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
X-Meta-Request-Version:
|
34
|
+
- 0.3.4
|
35
|
+
X-Request-Id:
|
36
|
+
- 40548308-42bf-4674-9e5b-e764d1c18a94
|
37
|
+
X-Runtime:
|
38
|
+
- '0.004729'
|
39
|
+
Connection:
|
40
|
+
- close
|
41
|
+
Server:
|
42
|
+
- thin 1.6.2 codename Doc Brown
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ok
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 12 Nov 2014 18:53:12 GMT
|
48
|
+
recorded_with: VCR 2.9.3
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://127.0.0.1:3000/
|
5
|
+
uri: http://127.0.0.1:3000/
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -14,7 +14,7 @@ http_interactions:
|
|
14
14
|
response:
|
15
15
|
status:
|
16
16
|
code: 200
|
17
|
-
message:
|
17
|
+
message: OK
|
18
18
|
headers:
|
19
19
|
X-Frame-Options:
|
20
20
|
- SAMEORIGIN
|
@@ -23,36 +23,77 @@ http_interactions:
|
|
23
23
|
X-Content-Type-Options:
|
24
24
|
- nosniff
|
25
25
|
Content-Type:
|
26
|
-
-
|
26
|
+
- text/html; charset=utf-8
|
27
27
|
Etag:
|
28
|
-
- '"
|
28
|
+
- '"444bcb3a3fcf8389296c49467f27e1d6"'
|
29
29
|
Cache-Control:
|
30
30
|
- max-age=0, private, must-revalidate
|
31
|
+
X-Meta-Request-Version:
|
32
|
+
- 0.3.4
|
31
33
|
X-Request-Id:
|
32
|
-
-
|
34
|
+
- aa722faa-dd46-462b-b62a-cefe258ff298
|
33
35
|
X-Runtime:
|
34
|
-
- '0.
|
36
|
+
- '0.004261'
|
37
|
+
Connection:
|
38
|
+
- close
|
35
39
|
Server:
|
36
|
-
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
40
|
+
- thin 1.6.2 codename Doc Brown
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: ok
|
44
|
+
http_version:
|
45
|
+
recorded_at: Wed, 12 Nov 2014 19:34:03 GMT
|
46
|
+
- request:
|
47
|
+
method: get
|
48
|
+
uri: http://127.0.0.1:3000/collections/yg867hg1375
|
49
|
+
body:
|
50
|
+
encoding: US-ASCII
|
51
|
+
string: ''
|
52
|
+
headers:
|
53
|
+
Accept:
|
54
|
+
- '*/*'
|
55
|
+
User-Agent:
|
56
|
+
- Ruby
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
X-Frame-Options:
|
63
|
+
- SAMEORIGIN
|
64
|
+
X-Xss-Protection:
|
65
|
+
- 1; mode=block
|
66
|
+
X-Content-Type-Options:
|
67
|
+
- nosniff
|
68
|
+
Content-Type:
|
69
|
+
- application/json; charset=utf-8
|
70
|
+
Etag:
|
71
|
+
- '"c3a375a17d64792857f21d1af227ed7b"'
|
72
|
+
Cache-Control:
|
73
|
+
- max-age=0, private, must-revalidate
|
74
|
+
X-Meta-Request-Version:
|
75
|
+
- 0.3.4
|
76
|
+
X-Request-Id:
|
77
|
+
- 5cf8aabf-47f3-4f4a-b2ea-a09bcd737707
|
78
|
+
X-Runtime:
|
79
|
+
- '0.011617'
|
41
80
|
Connection:
|
42
|
-
-
|
81
|
+
- close
|
82
|
+
Server:
|
83
|
+
- thin 1.6.2 codename Doc Brown
|
43
84
|
body:
|
44
85
|
encoding: US-ASCII
|
45
|
-
string: '{"
|
46
|
-
E. Stafford photographs, 1909-1933"
|
86
|
+
string: '{"collections":[{"druid":"druid:yg867hg1375","latest_change":"2013-11-11T23:34:29Z","title":"Francis
|
87
|
+
E. Stafford photographs, 1909-1933"}],"items":[{"druid":"druid:jf275fd6276","latest_change":"2013-11-11T23:34:29Z","title":"Album
|
47
88
|
A: Photographs of China''s natural landscapes, urban scenes, cultural landmarks,
|
48
|
-
social customs, and people."
|
49
|
-
E: Photographs of the Seventh Day Adventist Church missionaries in China"
|
89
|
+
social customs, and people."},{"druid":"druid:nz353cp1092","latest_change":"2013-11-11T23:34:29Z","title":"Album
|
90
|
+
E: Photographs of the Seventh Day Adventist Church missionaries in China"},{"druid":"druid:tc552kq0798","latest_change":"2013-11-11T23:34:29Z","title":"Album
|
50
91
|
D: Photographs of China''s natural landscapes, urban scenes, cultural landmarks,
|
51
|
-
social customs, and people."
|
92
|
+
social customs, and people."},{"druid":"druid:th998nk0722","latest_change":"2013-11-11T23:34:29Z","title":"Album
|
52
93
|
C: Photographs of the Chinese Revolution of 1911 and the Shanghai Commercial
|
53
|
-
Press"
|
94
|
+
Press"},{"druid":"druid:ww689vs6534","latest_change":"2013-11-11T23:34:29Z","title":"Album
|
54
95
|
B: Photographs of China''s natural landscapes, urban scenes, cultural landmarks,
|
55
|
-
social customs, and people."
|
96
|
+
social customs, and people."}],"counts":{"collections":1,"items":5,"total_count":6}}'
|
56
97
|
http_version:
|
57
|
-
recorded_at: Wed,
|
98
|
+
recorded_at: Wed, 12 Nov 2014 19:34:03 GMT
|
58
99
|
recorded_with: VCR 2.9.3
|