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.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +1 -0
  3. data/harvestdor-indexer.gemspec +1 -1
  4. data/lib/harvestdor-indexer.rb +12 -2
  5. data/lib/harvestdor-indexer/version.rb +1 -1
  6. data/spec/fixtures/vcr_cassettes/before_all_call.yml +48 -0
  7. data/spec/fixtures/vcr_cassettes/cant_find_whitelist_call.yml +48 -0
  8. data/spec/fixtures/vcr_cassettes/empty_array_no_blacklist_config_call.yml +48 -0
  9. data/spec/fixtures/vcr_cassettes/empty_array_no_whitelist_config_call.yml +48 -0
  10. data/spec/fixtures/vcr_cassettes/get_collection_druids_call.yml +18 -20
  11. data/spec/fixtures/vcr_cassettes/ignore_druids_in_blacklist_and_whitelist_call.yml +48 -0
  12. data/spec/fixtures/vcr_cassettes/ignore_druids_in_blacklist_call.yml +61 -20
  13. data/spec/fixtures/vcr_cassettes/know_what_is_in_blacklist_call.yml +46 -0
  14. data/spec/fixtures/vcr_cassettes/know_what_is_in_whitelist_call.yml +46 -0
  15. data/spec/fixtures/vcr_cassettes/load_blacklist_once_call.yml +48 -0
  16. data/spec/fixtures/vcr_cassettes/load_whitelist_once_call.yml +48 -0
  17. data/spec/fixtures/vcr_cassettes/no_blacklist_config_call.yml +61 -20
  18. data/spec/fixtures/vcr_cassettes/no_blacklist_found_call.yml +48 -0
  19. data/spec/fixtures/vcr_cassettes/no_whitelist_config_call.yml +61 -20
  20. data/spec/fixtures/vcr_cassettes/process_druids_whitelist_call.yml +48 -0
  21. data/spec/fixtures/vcr_cassettes/rsolr_client_config_call.yml +48 -0
  22. data/spec/fixtures/vcr_cassettes/single_rsolr_connection_call.yml +61 -20
  23. data/spec/unit/harvestdor-indexer_spec.rb +114 -72
  24. 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/collection/yg867hg1375
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: 'OK '
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
- - application/json; charset=utf-8
26
+ - text/html; charset=utf-8
27
27
  Etag:
28
- - '"682afec57f678e4d153a5841b21395dd"'
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
- - d35b0793-e841-496b-bce1-720bfbf2ad04
34
+ - db91305e-e0d6-4592-8c5e-53fcb059e835
33
35
  X-Runtime:
34
- - '0.006751'
36
+ - '0.004390'
37
+ Connection:
38
+ - close
35
39
  Server:
36
- - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
37
- Date:
38
- - Wed, 22 Oct 2014 20:32:36 GMT
39
- Content-Length:
40
- - '1121'
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
- - Keep-Alive
81
+ - close
82
+ Server:
83
+ - thin 1.6.2 codename Doc Brown
43
84
  body:
44
85
  encoding: US-ASCII
45
- string: '{"collection":[{"druid":"druid:yg867hg1375","latest_change":"2013-11-11T23:34:29Z","title":["Francis
46
- E. Stafford photographs, 1909-1933"]}],"item":[{"druid":"druid:jf275fd6276","latest_change":"2013-11-11T23:34:29Z","title":["Album
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."]},{"druid":"druid:nz353cp1092","latest_change":"2013-11-11T23:34:29Z","title":["Album
49
- E: Photographs of the Seventh Day Adventist Church missionaries in China"]},{"druid":"druid:tc552kq0798","latest_change":"2013-11-11T23:34:29Z","title":["Album
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."]},{"druid":"druid:th998nk0722","latest_change":"2013-11-11T23:34:29Z","title":["Album
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"]},{"druid":"druid:ww689vs6534","latest_change":"2013-11-11T23:34:29Z","title":["Album
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."]}],"counts":[{"collection":1},{"item":5},{"total_count":6}]}'
96
+ social customs, and people."}],"counts":{"collections":1,"items":5,"total_count":6}}'
56
97
  http_version:
57
- recorded_at: Wed, 22 Oct 2014 20:32:36 GMT
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/collection/yg867hg1375
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: 'OK '
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
- - application/json; charset=utf-8
26
+ - text/html; charset=utf-8
27
27
  Etag:
28
- - '"682afec57f678e4d153a5841b21395dd"'
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
- - a631e18e-8396-4699-b7a9-fd05fd115e02
34
+ - aa722faa-dd46-462b-b62a-cefe258ff298
33
35
  X-Runtime:
34
- - '0.006491'
36
+ - '0.004261'
37
+ Connection:
38
+ - close
35
39
  Server:
36
- - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
37
- Date:
38
- - Wed, 22 Oct 2014 20:34:01 GMT
39
- Content-Length:
40
- - '1121'
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
- - Keep-Alive
81
+ - close
82
+ Server:
83
+ - thin 1.6.2 codename Doc Brown
43
84
  body:
44
85
  encoding: US-ASCII
45
- string: '{"collection":[{"druid":"druid:yg867hg1375","latest_change":"2013-11-11T23:34:29Z","title":["Francis
46
- E. Stafford photographs, 1909-1933"]}],"item":[{"druid":"druid:jf275fd6276","latest_change":"2013-11-11T23:34:29Z","title":["Album
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."]},{"druid":"druid:nz353cp1092","latest_change":"2013-11-11T23:34:29Z","title":["Album
49
- E: Photographs of the Seventh Day Adventist Church missionaries in China"]},{"druid":"druid:tc552kq0798","latest_change":"2013-11-11T23:34:29Z","title":["Album
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."]},{"druid":"druid:th998nk0722","latest_change":"2013-11-11T23:34:29Z","title":["Album
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"]},{"druid":"druid:ww689vs6534","latest_change":"2013-11-11T23:34:29Z","title":["Album
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."]}],"counts":[{"collection":1},{"item":5},{"total_count":6}]}'
96
+ social customs, and people."}],"counts":{"collections":1,"items":5,"total_count":6}}'
56
97
  http_version:
57
- recorded_at: Wed, 22 Oct 2014 20:34:01 GMT
98
+ recorded_at: Wed, 12 Nov 2014 19:34:03 GMT
58
99
  recorded_with: VCR 2.9.3