base_indexer 3.0.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +40 -0
  3. data/.travis.yml +17 -0
  4. data/Gemfile +49 -0
  5. data/LICENSE +13 -0
  6. data/README.md +151 -0
  7. data/app/controllers/base_indexer/about_controller.rb +1 -1
  8. data/base_indexer.gemspec +40 -0
  9. data/code_diagram.png +0 -0
  10. data/config/initializers/base_indexer.rb +0 -2
  11. data/config/initializers/config.rb +6 -0
  12. data/lib/base_indexer.rb +0 -3
  13. data/lib/base_indexer/engine.rb +0 -9
  14. data/lib/base_indexer/main_indexer_engine.rb +5 -6
  15. data/lib/base_indexer/solr/client.rb +3 -3
  16. data/lib/base_indexer/version.rb +1 -1
  17. data/lib/generators/base_indexer/install_generator.rb +1 -1
  18. data/lib/generators/base_indexer/templates/settings.yml +5 -0
  19. data/lib/tasks/index.rake +4 -4
  20. data/spec/base_indexer/main_indexer_engine_spec.rb +46 -0
  21. data/spec/base_indexer/solr/client_spec.rb +47 -0
  22. data/spec/base_indexer/solr/writer_spec.rb +72 -0
  23. data/spec/controllers/base_indexer/items_controller_spec.rb +36 -0
  24. data/spec/fixtures/vcr_cassettes/available_mods_xml.yml +105 -0
  25. data/spec/fixtures/vcr_cassettes/available_purl_xml.yml +110 -0
  26. data/spec/fixtures/vcr_cassettes/get_collection_name_for_item.yml +197 -0
  27. data/spec/fixtures/vcr_cassettes/read_mods_in_vaild.yml +154 -0
  28. data/spec/fixtures/vcr_cassettes/read_mods_vaild.yml +199 -0
  29. data/spec/fixtures/vcr_cassettes/read_purl_in_vaild.yml +154 -0
  30. data/spec/fixtures/vcr_cassettes/read_purl_vaild.yml +197 -0
  31. data/spec/fixtures/vcr_cassettes/rsolr_client_delete.yml +174 -0
  32. data/spec/fixtures/vcr_cassettes/rsolr_client_index.yml +115 -0
  33. data/spec/fixtures/vcr_cassettes/rsolr_update.yml +313 -0
  34. data/spec/spec_helper.rb +112 -0
  35. data/spec/test_app_templates/lib/generators/test_app_generator.rb +14 -0
  36. metadata +72 -14
  37. data/lib/base_indexer/config/solr_configuration.rb +0 -17
  38. data/lib/base_indexer/config/solr_configuration_from_file.rb +0 -25
  39. data/lib/generators/base_indexer/templates/solr.yml +0 -4
@@ -0,0 +1,154 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://purl.stanford.edu/aa111aa1111.xml
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 404
19
+ message: Not Found
20
+ headers:
21
+ Date:
22
+ - Tue, 30 Aug 2016 18:00:06 GMT
23
+ Server:
24
+ - Apache/2.2.15 (CentOS)
25
+ Cache-Control:
26
+ - no-cache
27
+ X-Runtime:
28
+ - '0.132217'
29
+ X-Frame-Options:
30
+ - SAMEORIGIN
31
+ X-Xss-Protection:
32
+ - 1; mode=block
33
+ X-Content-Type-Options:
34
+ - nosniff
35
+ X-Request-Id:
36
+ - feae597d-ee0c-4430-a082-3ea3462aee91
37
+ X-Powered-By:
38
+ - Phusion Passenger 5.0.22
39
+ Set-Cookie:
40
+ - _purl_session=RlFKYlZ0OFliejJ6QmMzTllYLzhIWTA0bTh3UUNUMWFIRFIvaU5IV084Z1NZa0JNZ2luVGVuSFJBQUNOZ3U2VWFnZ3R5c1dmbmM0bHV4azYybk9KU1FvM0wzWHZpNkh4alF5MzZqWXdFVVZvNmZyVW9ZN0Y5bnJxWGp4OG5GUDgyRzZ4SWpBYzlIcW1ibHNmSnV6UEtBPT0tLXB1TzVsdG11WDBqWDFOZGR2bVJWK2c9PQ%3D%3D--8bdbecba3ede21e447b3fdec47798c44a69faf12;
41
+ path=/; HttpOnly
42
+ Strict-Transport-Security:
43
+ - max-age=31536000; includeSubDomains
44
+ Status:
45
+ - 404 Not Found
46
+ Transfer-Encoding:
47
+ - chunked
48
+ Content-Type:
49
+ - text/html; charset=utf-8
50
+ body:
51
+ encoding: UTF-8
52
+ string: "<!DOCTYPE html>\n<html lang=\"en\" class=\"no-js\">\n <head>\n <meta
53
+ charset=\"utf-8\">\n <meta http-equiv=\"Content-Type\" content=\"text/html;
54
+ charset=utf-8\">\n <!-- Mobile viewport optimization h5bp.com/ad -->\n
55
+ \ <meta name=\"HandheldFriendly\" content=\"True\">\n <meta name=\"viewport\"
56
+ content=\"width=device-width,initial-scale=1.0\">\n <meta name=\"google-site-verification\"
57
+ content=\"\" />\n <!-- Mobile IE allows us to activate ClearType technology
58
+ for smoothing fonts for easy reading -->\n <!--[if IEMobile]>\n <meta
59
+ http-equiv=\"cleartype\" content=\"on\">\n <![endif]-->\n\n <title>Stanford
60
+ Digital Repository</title>\n\n <link rel=\"shortcut icon\" type=\"image/x-icon\"
61
+ href=\"/assets/favicon-8a4c41227945e5f20503f62517defcfb2ef88f578e222838318c704472d483b0.ico\"
62
+ />\n <link rel=\"stylesheet\" media=\"all\" href=\"/assets/application-2caec4980b98b7ece321dc4a14d192d0b5fb97747d1543502af8a1d87bf1e6cd.css\"
63
+ />\n <link rel=\"stylesheet\" media=\"print\" href=\"/assets/print-91740c5b1db64dfb0cb3dfef118eab183b64b7082b72efd0fe5eb0b60969db68.css\"
64
+ />\n <link href=\"https://www.stanford.edu/su-identity/css/su-identity.css\"
65
+ rel=\"stylesheet\">\n <link rel=\"stylesheet\" media=\"screen\" href=\"https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700\"
66
+ />\n <script src=\"/assets/application-9f86f0339ec78daf2cb52ad105c6edc312885c73369d9b778a065c216826720d.js\"></script>\n
67
+ \ <meta name=\"csrf-param\" content=\"authenticity_token\" />\n<meta name=\"csrf-token\"
68
+ content=\"xT/UN7y7qKIyo9PovyN8AGpho5+ly4Ckt5KU7kzbEmI8gRSIaxtvUcEiwtyYQtHpGVJPa2cR14CBoXF8GZ4bkg==\"
69
+ />\n\n \n \n \n <meta name=\"twitter:card\" />\n \n\n <!--[if
70
+ lt IE 9]>\n <script src=\"http://html5shim.googlecode.com/svn/trunk/html5.js\"></script>\n
71
+ \ <![endif]-->\n <!--[if IE 8]>\n <link rel=\"stylesheet\" type=\"text/css\"
72
+ href=\"https://www.stanford.edu/su-identity/css/ie/ie8.css\" />\n <![endif]-->\n
73
+ \ <!--[if IE 7]>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"https://www.stanford.edu/su-identity/css/ie/ie7.css\"
74
+ />\n <![endif]-->\n\n </head>\n <body>\n \n\n\n\n\n <div id=\"su-wrap\">
75
+ <!-- #su-wrap start -->\n <div id=\"su-content\"> <!-- #su-content start
76
+ -->\n <div id=\"outer-container\" class=\"container-fluid\">\n <div
77
+ id=\"topnav-container\">\n <header id=\"topnav\" class=\"header-logo\" role=\"banner\">\n
78
+ \ <a href=\"http://library.stanford.edu\">\n <span class=\"sr-only\">Stanford
79
+ University Libraries</span>\n <img data-hidpi-src=\"/assets/sul-logo@2x-adac22f3e7cbf3849320e16173ec68ebe0b89d73c80f07baabb5b5920d50a8df.png\"
80
+ class=\"hidden-xs\" alt=\"\" height=\"25\" src=\"/assets/sul-logo-8dfefc678313c186818297b03fab4a4ed59926e46a30022cd1b015cbb1bdb0ad.png\"
81
+ />\n <img data-hidpi-src=\"/assets/sul-logo-small@2x-ce1097d8e0a05fe55599e2761c0728a5de180dc1f6214450f23e70d22790d0f5.png\"
82
+ class=\"visible-xs\" alt=\"\" height=\"25\" src=\"/assets/sul-logo-small-dae80ac9d5187216139a309d4aa53cdd343a67e6a5cb5d56b7fc0711fa3888a4.png\"
83
+ />\n</a> <div class=\"header-links\">\n <a class=\"first\" data-toggle=\"collapse\"
84
+ data-target=\"#feedback-form\" href=\"/feedback\">\n Feedback\n</a>
85
+ \ </div>\n </header>\n</div>\n<div id=\"feedback-form\" class=\"feedback-form-container
86
+ collapse\">\n <div class=\"container\">\n <form class=\"form-horizontal
87
+ feedback-form\" role=\"form\" action=\"/feedback\" accept-charset=\"UTF-8\"
88
+ method=\"post\"><input name=\"utf8\" type=\"hidden\" value=\"&#x2713;\" /><input
89
+ type=\"hidden\" name=\"authenticity_token\" value=\"OULy36NLzSkv9YIsp0U3HZbq5r9aq2llohO0OCu4dkPA/DJgdOsK2tx0kxiAJJr05dkKS5hxPkGUIFGqfv1/sw==\"
90
+ />\n <div class=\"col-sm-6 col-sm-offset-2\">\n <div class=\"col-sm-offset-3\">\n
91
+ \ Reporting from: <span class=\"reporting-from-field\"></span>\n<input
92
+ type=\"hidden\" name=\"url\" id=\"url\" class=\"reporting-from-field\" />\n\n
93
+ \ </div>\n </div>\n <span style=\"display:none;visibility:hidden;\">\n
94
+ \ <label for=\"email_address\">Ignore this text box. It is used to detect
95
+ spammers. If you enter anything into this text box, your message will not
96
+ be sent.</label><br/>\n <input type=\"email\" name=\"email_address\"
97
+ id=\"email_address\" /><br/>\n <input type=\"text\" name=\"user_agent\"
98
+ id=\"user_agent\" />\n <input type=\"text\" name=\"viewport\" id=\"viewport\"
99
+ />\n </span>\n <div class=\"col-sm-6 col-sm-offset-2\">\n <div
100
+ class=\"form-group\">\n <label class=\"col-sm-3 control-label\" for=\"message\">Message</label>\n
101
+ \ <div class=\"col-sm-9\">\n <textarea name=\"message\" id=\"message\"
102
+ rows=\"5\" class=\"form-control\">\n</textarea>\n </div>\n </div>\n
103
+ \ <div class=\"form-group\">\n <label class=\"col-sm-3 control-label\"
104
+ for=\"name\">Your name</label>\n <div class=\"col-sm-9\">\n <input
105
+ type=\"text\" name=\"name\" id=\"name\" value=\"\" class=\"form-control\"
106
+ />\n </div>\n </div>\n <div class=\"form-group\">\n <label
107
+ class=\"col-sm-3 control-label\" for=\"to\">Your email</label>\n <div
108
+ class=\"col-sm-9\">\n <input type=\"email\" name=\"to\" id=\"to\"
109
+ value=\"\" class=\"form-control\" />\n </div>\n </div>\n <div
110
+ class=\"form-group\">\n <div class=\"col-sm-offset-3 col-sm-9\">\n
111
+ \ <button type=\"submit\" class=\"btn btn-primary\">Send</button>\n
112
+ \ <a class=\"cancel-link\" data-toggle=\"collapse\" data-target=\"#feedback-form\"
113
+ href=\"javascript:history.back()\">Cancel</a>\n </div>\n </div>\n
114
+ \ </div>\n</form></div>\n\n</div>\n\n <div id=\"search-navbar-container\">\n
115
+ \ <div id=\"search-navbar\">\n <div class=\"sdr-brand\">Stanford Digital
116
+ Repository</div>\n </div>\n</div>\n\n <div class='visible-print
117
+ print-header pull-right'>\n <h1>Stanford Digital Repository</h1>\n <h2>Stanford
118
+ University Libraries</h2>\n</div>\n\n <section id=\"main-container\"
119
+ role=\"main\" data-analytics-id=\"UA-7219229-11\">\n <h2>The item
120
+ you requested is not available.</h2>\n<p>The item you requested is not yet
121
+ available. It will be available at this URL when Library processing is completed.</p>\n
122
+ \ </section>\n </div>\n </div> <!-- #su-content end -->\n
123
+ \ </div> <!-- #su-wrap end -->\n <footer role=\"contentinfo\">\n <div
124
+ id=\"sul-footer-container\">\n <div id=\"sul-footer\">\n <div id=\"sul-footer-img\"
125
+ class=\"span2\">\n <img data-hidpi-src=\"/assets/SUL-logo-stacked@2x-5c5b140ede955a3354b2f84ec6711806e54f6db538f844cffa255c72dedf7dc1.png\"
126
+ alt=\"\" height=\"45\" src=\"/assets/SUL-logo-stacked-e88700b061a7f08a657172efc12ee6769cf2b90b14ad25a7b558aac9dc3232cc.png\"
127
+ />\n </div>\n <div id=\"sul-footer-links\" class=\"span2\">\n <ul>\n
128
+ \ <li><a href=\"http://library.stanford.edu\">Stanford University
129
+ Libraries</a></li>\n <li><a href=\"http://library.stanford.edu/hours\">Hours
130
+ &amp; locations</a></li>\n <li> <a href=\"http://library.stanford.edu/myawrap.html\">My
131
+ Account</a></li>\n <li> <a href=\"http://library.stanford.edu/ask\">Ask
132
+ us</a></li>\n <li> <a href=\"http://library.stanford.edu/opt-out\">Opt
133
+ out of analytics</a></li>\n </ul>\n </div>\n </div>\n </div>\n</footer>\n<!--
134
+ Global footer snippet start -->\n<div id=\"global-footer\">\n <div class=\"container\">\n
135
+ \ <div class=\"row\">\n <div id=\"bottom-logo\" class=\"span2\">\n
136
+ \ <a href=\"http://www.stanford.edu\">\n <img src=\"https://www.stanford.edu/su-identity/images/footer-stanford-logo@2x.png\"
137
+ alt=\"Stanford University\" width=\"105\" height=\"49\"/>\n </a>\n
138
+ \ </div>\n <!-- #bottom-logo end -->\n <div id=\"bottom-text\"
139
+ class=\"span10\">\n <ul>\n <li class=\"home\"><a href=\"http://www.stanford.edu\">SU
140
+ Home</a></li>\n <li class=\"maps alt\"><a href=\"http://visit.stanford.edu/plan/maps.html\">Maps
141
+ &amp; Directions</a></li>\n <li class=\"search-stanford\"><a href=\"http://www.stanford.edu/search/\">Search
142
+ Stanford</a></li>\n <li class=\"terms alt\"><a href=\"http://www.stanford.edu/site/terms.html\">Terms
143
+ of Use</a></li>\n <li class=\"emergency-info\"><a href=\"http://emergency.stanford.edu\">Emergency
144
+ Info</a></li>\n </ul>\n </div> <!-- .bottom-text end -->\n <div
145
+ class=\"clear\"></div>\n <p class=\"copyright vcard\">&copy; <span class=\"fn
146
+ org\">Stanford University</span>, <span class=\"adr\"> <span class=\"locality\">Stanford</span>,
147
+ <span class=\"region\">California</span> <span class=\"postal-code\">94305</span></span>.&nbsp;&nbsp;\n
148
+ \ <span id=\"copyright-complaint\"><a href=\"http://www.stanford.edu/group/security/dmca.html\"
149
+ class=\"copyright-complaint\" >Copyright Complaints</a></span>\n </p>\n
150
+ \ </div> <!-- .row end -->\n </div> <!-- .container end -->\n</div> <!--
151
+ global-footer end -->\n<!-- Global footer snippet end -->\n\n </body>\n</html>\n"
152
+ http_version:
153
+ recorded_at: Tue, 30 Aug 2016 18:00:06 GMT
154
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,197 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://purl.stanford.edu/dk605tp1619.xml
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Tue, 30 Aug 2016 18:00:06 GMT
23
+ Server:
24
+ - Apache/2.2.15 (CentOS)
25
+ Cache-Control:
26
+ - max-age=0, private, must-revalidate
27
+ Etag:
28
+ - '"26287b53aedf2f41649a966ab7d13a28"'
29
+ X-Frame-Options:
30
+ - SAMEORIGIN
31
+ X-Xss-Protection:
32
+ - 1; mode=block
33
+ X-Content-Type-Options:
34
+ - nosniff
35
+ X-Runtime:
36
+ - '0.010266'
37
+ X-Request-Id:
38
+ - 815e5938-a6de-413f-b854-2a9eaa9fd156
39
+ X-Powered-By:
40
+ - Phusion Passenger 5.0.22
41
+ Strict-Transport-Security:
42
+ - max-age=31536000; includeSubDomains
43
+ Last-Modified:
44
+ - Mon, 26 Oct 2015 00:52:37 GMT
45
+ Status:
46
+ - 200 OK
47
+ Transfer-Encoding:
48
+ - chunked
49
+ Content-Type:
50
+ - application/xml; charset=utf-8
51
+ body:
52
+ encoding: ASCII-8BIT
53
+ string: !binary |-
54
+ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHB1Ymxp
55
+ Y09iamVjdCBpZD0iZHJ1aWQ6ZGs2MDV0cDE2MTkiIHB1Ymxpc2hlZD0iMjAx
56
+ NS0xMC0yNVQxNzo1MjozNC0wNzowMCIgcHVibGlzaFZlcnNpb249ImRvci1z
57
+ ZXJ2aWNlcy80LjIyLjMiPgogIDxpZGVudGl0eU1ldGFkYXRhPgogICAgPHNv
58
+ dXJjZUlkIHNvdXJjZT0iV0FMVEVSUyI+Vy42OTA8L3NvdXJjZUlkPgogICAg
59
+ PG9iamVjdElkPmRydWlkOmRrNjA1dHAxNjE5PC9vYmplY3RJZD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QXJ0IE11c2V1bSwgMTkzMSwgYnkgSGVucnkgV2FsdGVy
190
+ cyBiZXF1ZXN0PC9kYzpkZXNjcmlwdGlvbj4KICAgIDxkYzpyZWxhdGlvbiB0
191
+ eXBlPSJjb2xsZWN0aW9uIj5XYWx0ZXJzIE1hbnVzY3JpcHRzPC9kYzpyZWxh
192
+ dGlvbj4KICA8L29haV9kYzpkYz4KICA8cmVsZWFzZURhdGE+CiAgICA8cmVs
193
+ ZWFzZSB0bz0iU2VhcmNod29ya3MiPnRydWU8L3JlbGVhc2U+CiAgPC9yZWxl
194
+ YXNlRGF0YT4KPC9wdWJsaWNPYmplY3Q+Cg==
195
+ http_version:
196
+ recorded_at: Tue, 30 Aug 2016 18:00:06 GMT
197
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,174 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost:8983/solr/update?wt=ruby
6
+ body:
7
+ encoding: UTF-8
8
+ string: <?xml version="1.0" encoding="UTF-8"?><add commitWithin="10000"><doc><field
9
+ name="id">dw077vs7846</field><field name="title">New title</field></doc></add>
10
+ headers:
11
+ Content-Type:
12
+ - text/xml
13
+ response:
14
+ status:
15
+ code: 200
16
+ message: OK
17
+ headers:
18
+ Content-Type:
19
+ - text/plain;charset=UTF-8
20
+ Transfer-Encoding:
21
+ - chunked
22
+ body:
23
+ encoding: UTF-8
24
+ string: |
25
+ {'responseHeader'=>{'status'=>0,'QTime'=>2}}
26
+ http_version:
27
+ recorded_at: Wed, 11 Nov 2015 00:24:48 GMT
28
+ - request:
29
+ method: post
30
+ uri: http://localhost:8983/solr/update?commit=true
31
+ body:
32
+ encoding: ASCII-8BIT
33
+ string: ''
34
+ headers:
35
+ Accept:
36
+ - application/json
37
+ Accept-Encoding:
38
+ - gzip, deflate
39
+ Content-Type:
40
+ - application/x-www-form-urlencoded
41
+ Content-Length:
42
+ - '0'
43
+ User-Agent:
44
+ - Ruby
45
+ response:
46
+ status:
47
+ code: 200
48
+ message: OK
49
+ headers:
50
+ Content-Type:
51
+ - application/xml; charset=UTF-8
52
+ Transfer-Encoding:
53
+ - chunked
54
+ body:
55
+ encoding: UTF-8
56
+ string: |
57
+ <?xml version="1.0" encoding="UTF-8"?>
58
+ <response>
59
+ <lst name="responseHeader"><int name="status">0</int><int name="QTime">18</int></lst>
60
+ </response>
61
+ http_version:
62
+ recorded_at: Wed, 11 Nov 2015 00:24:48 GMT
63
+ - request:
64
+ method: get
65
+ uri: http://localhost:8983/solr/select?q=id:%22dw077vs7846%22&wt=ruby
66
+ body:
67
+ encoding: US-ASCII
68
+ string: ''
69
+ headers: {}
70
+ response:
71
+ status:
72
+ code: 200
73
+ message: OK
74
+ headers:
75
+ Last-Modified:
76
+ - Wed, 11 Nov 2015 00:24:48 GMT
77
+ Etag:
78
+ - '"MjcxMDAwMDAwMDAwMDAwMFNvbHI="'
79
+ Content-Type:
80
+ - text/plain;charset=UTF-8
81
+ Transfer-Encoding:
82
+ - chunked
83
+ body:
84
+ encoding: UTF-8
85
+ string: |
86
+ {'responseHeader'=>{'status'=>0,'QTime'=>1},'response'=>{'numFound'=>1,'start'=>0,'docs'=>[{'id'=>'dw077vs7846','title'=>'New title','_version_'=>1517500747578605568,'timestamp'=>'2015-11-11T00:24:48.093Z'}]}}
87
+ http_version:
88
+ recorded_at: Wed, 11 Nov 2015 00:24:48 GMT
89
+ - request:
90
+ method: post
91
+ uri: http://localhost:8983/solr/update?wt=ruby
92
+ body:
93
+ encoding: UTF-8
94
+ string: <?xml version="1.0" encoding="UTF-8"?><delete><id>dw077vs7846</id></delete>
95
+ headers:
96
+ Content-Type:
97
+ - text/xml
98
+ response:
99
+ status:
100
+ code: 200
101
+ message: OK
102
+ headers:
103
+ Content-Type:
104
+ - text/plain;charset=UTF-8
105
+ Transfer-Encoding:
106
+ - chunked
107
+ body:
108
+ encoding: UTF-8
109
+ string: |
110
+ {'responseHeader'=>{'status'=>0,'QTime'=>1}}
111
+ http_version:
112
+ recorded_at: Wed, 11 Nov 2015 00:24:48 GMT
113
+ - request:
114
+ method: post
115
+ uri: http://localhost:8983/solr/update?commit=true
116
+ body:
117
+ encoding: ASCII-8BIT
118
+ string: ''
119
+ headers:
120
+ Accept:
121
+ - application/json
122
+ Accept-Encoding:
123
+ - gzip, deflate
124
+ Content-Type:
125
+ - application/x-www-form-urlencoded
126
+ Content-Length:
127
+ - '0'
128
+ User-Agent:
129
+ - Ruby
130
+ response:
131
+ status:
132
+ code: 200
133
+ message: OK
134
+ headers:
135
+ Content-Type:
136
+ - application/xml; charset=UTF-8
137
+ Transfer-Encoding:
138
+ - chunked
139
+ body:
140
+ encoding: UTF-8
141
+ string: |
142
+ <?xml version="1.0" encoding="UTF-8"?>
143
+ <response>
144
+ <lst name="responseHeader"><int name="status">0</int><int name="QTime">4</int></lst>
145
+ </response>
146
+ http_version:
147
+ recorded_at: Wed, 11 Nov 2015 00:24:48 GMT
148
+ - request:
149
+ method: get
150
+ uri: http://localhost:8983/solr/select?q=id:%22dw077vs7846%22&wt=ruby
151
+ body:
152
+ encoding: US-ASCII
153
+ string: ''
154
+ headers: {}
155
+ response:
156
+ status:
157
+ code: 200
158
+ message: OK
159
+ headers:
160
+ Last-Modified:
161
+ - Wed, 11 Nov 2015 00:24:48 GMT
162
+ Etag:
163
+ - '"NjcxMDAwMDAwMDAwMDAwMFNvbHI="'
164
+ Content-Type:
165
+ - text/plain;charset=UTF-8
166
+ Transfer-Encoding:
167
+ - chunked
168
+ body:
169
+ encoding: UTF-8
170
+ string: |
171
+ {'responseHeader'=>{'status'=>0,'QTime'=>1},'response'=>{'numFound'=>0,'start'=>0,'docs'=>[]}}
172
+ http_version:
173
+ recorded_at: Wed, 11 Nov 2015 00:24:48 GMT
174
+ recorded_with: VCR 2.9.3