bento_search 1.3.0 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +42 -2
- data/app/controllers/bento_search/search_controller.rb +1 -1
- data/app/models/bento_search/author.rb +6 -4
- data/app/models/bento_search/link.rb +8 -5
- data/app/models/bento_search/multi_searcher.rb +1 -1
- data/app/models/bento_search/registrar.rb +2 -1
- data/app/models/bento_search/result_item.rb +37 -21
- data/app/models/bento_search/results/serialization.rb +136 -0
- data/app/models/bento_search/results.rb +46 -1
- data/app/models/bento_search/search_engine.rb +22 -17
- data/app/search_engines/bento_search/eds_engine.rb +1 -1
- data/app/search_engines/bento_search/journal_tocs_for_journal.rb +21 -3
- data/lib/bento_search/version.rb +1 -1
- data/lib/bento_search.rb +5 -2
- data/test/search_engines/journal_tocs_for_journal_test.rb +117 -93
- data/test/search_engines/search_engine_test.rb +1 -1
- data/test/unit/serialization_test.rb +249 -0
- data/test/vcr_cassettes/journal_tocs/empty_results_on_bad_ISSN.yml +19 -25
- data/test/vcr_cassettes/journal_tocs/error_on_bad_registered_email.yml +19 -26
- data/test/vcr_cassettes/journal_tocs/error_on_error_response.yml +33 -37
- data/test/vcr_cassettes/journal_tocs/fetch_xml_with_hits.yml +308 -305
- data/test/vcr_cassettes/journal_tocs/fills_out_metadata.yml +515 -377
- data/test/vcr_cassettes/journal_tocs/smoke_test.yml +308 -305
- data/test/vcr_cassettes/journal_tocs/sorts_by_date.yml +922 -0
- metadata +7 -6
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +0 -164426
@@ -4,48 +4,44 @@ http_interactions:
|
|
4
4
|
method: get
|
5
5
|
uri: http://www.journaltocs.ac.uk/bad_url/journals/1533290X?output=articles&user=nobody@example.com
|
6
6
|
body:
|
7
|
-
encoding:
|
7
|
+
encoding: UTF-8
|
8
8
|
string: ''
|
9
9
|
headers: {}
|
10
10
|
response:
|
11
11
|
status:
|
12
12
|
code: 404
|
13
|
-
message:
|
14
|
-
Tm90IEZvdW5k
|
13
|
+
message: Not Found
|
15
14
|
headers:
|
16
|
-
|
17
|
-
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
-
|
24
|
-
|
25
|
-
|
26
|
-
-
|
27
|
-
|
15
|
+
Date:
|
16
|
+
- Tue, 01 Sep 2015 21:20:10 GMT
|
17
|
+
Server:
|
18
|
+
- Apache
|
19
|
+
Vary:
|
20
|
+
- accept-language,accept-charset
|
21
|
+
Accept-Ranges:
|
22
|
+
- bytes
|
23
|
+
Transfer-Encoding:
|
24
|
+
- chunked
|
25
|
+
Content-Type:
|
26
|
+
- text/html; charset=iso-8859-1
|
27
|
+
Content-Language:
|
28
|
+
- en
|
28
29
|
body:
|
29
|
-
encoding:
|
30
|
-
string:
|
31
|
-
|
32
|
-
<
|
33
|
-
|
34
|
-
<
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
<
|
39
|
-
|
40
|
-
<p
|
41
|
-
|
42
|
-
<
|
43
|
-
|
44
|
-
<address>Apache/2.2.15 (CentOS) Server at www.journaltocs.hw.ac.uk Port 80</address>
|
45
|
-
|
46
|
-
</body></html>
|
47
|
-
|
48
|
-
'
|
30
|
+
encoding: UTF-8
|
31
|
+
string: "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<!DOCTYPE html PUBLIC
|
32
|
+
\"-//W3C//DTD XHTML 1.0 Strict//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html
|
33
|
+
xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">\n<head>\n<title>Object
|
34
|
+
not found!</title>\n<link rev=\"made\" href=\"mailto:help@macs.hw.ac.uk\"
|
35
|
+
/>\n<style type=\"text/css\"><!--/*--><![CDATA[/*><!--*/ \n body { color:
|
36
|
+
#000000; background-color: #FFFFFF; }\n a:link { color: #0000CC; }\n p,
|
37
|
+
address {margin-left: 3em;}\n span {font-size: smaller;}\n/*]]>*/--></style>\n<img
|
38
|
+
alt=\"Heriot-Watt University\" id=\"HW Logo\" style=\"float:right\" src=http://images.hw.ac.uk/hwu_logo.gif>\n</head>\n\n<body>\n<h1>Object
|
39
|
+
not found!</h1>\n<p>\n\n\n The requested URL was not found on this server.\n\n
|
40
|
+
\ \n\n If you entered the URL manually please check your\n spelling
|
41
|
+
and try again.\n\n \n\n</p>\n<p>\nIf you think this is a server error, please
|
42
|
+
contact\nthe <a href=\"mailto:help@macs.hw.ac.uk\">Site owner - MACS help</a>.\n\n</p>\n\n<h2>Error
|
43
|
+
404</h2>\n<address>\n <a href=\"/\">www.journaltocs.hw.ac.uk</a><br />\n
|
44
|
+
\ \n <span>Tue Sep 1 22:20:10 2015<br />\n Apache</span>\n</address>\n</body>\n</html>\n\n"
|
49
45
|
http_version:
|
50
|
-
recorded_at:
|
51
|
-
recorded_with: VCR 2.3
|
46
|
+
recorded_at: Tue, 01 Sep 2015 21:20:10 GMT
|
47
|
+
recorded_with: VCR 2.9.3
|