elastic-site-search 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +58 -0
  3. data/.gitignore +10 -0
  4. data/.travis.yml +13 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.txt +201 -0
  7. data/NOTICE.txt +3 -0
  8. data/README.md +418 -0
  9. data/Rakefile +1 -0
  10. data/elastic-site-search.gemspec +26 -0
  11. data/lib/data/ca-bundle.crt +3554 -0
  12. data/lib/elastic/site-search.rb +9 -0
  13. data/lib/elastic/site-search/client.rb +527 -0
  14. data/lib/elastic/site-search/configuration.rb +67 -0
  15. data/lib/elastic/site-search/exceptions.rb +11 -0
  16. data/lib/elastic/site-search/ext/backport-uri.rb +33 -0
  17. data/lib/elastic/site-search/request.rb +156 -0
  18. data/lib/elastic/site-search/result_set.rb +84 -0
  19. data/lib/elastic/site-search/sso.rb +22 -0
  20. data/lib/elastic/site-search/version.rb +5 -0
  21. data/logo-site-search.png +0 -0
  22. data/spec/client_spec.rb +728 -0
  23. data/spec/configuration_spec.rb +37 -0
  24. data/spec/fixtures/vcr/analytics_autoselects.yml +57 -0
  25. data/spec/fixtures/vcr/analytics_autoselects_with_document_type.yml +57 -0
  26. data/spec/fixtures/vcr/analytics_autoselects_with_document_type_and_time_range.yml +57 -0
  27. data/spec/fixtures/vcr/analytics_autoselects_with_time_range.yml +57 -0
  28. data/spec/fixtures/vcr/analytics_clicks.yml +57 -0
  29. data/spec/fixtures/vcr/analytics_clicks_with_document_type.yml +57 -0
  30. data/spec/fixtures/vcr/analytics_clicks_with_document_type_and_time_range.yml +57 -0
  31. data/spec/fixtures/vcr/analytics_clicks_with_time_range.yml +57 -0
  32. data/spec/fixtures/vcr/analytics_searches.yml +57 -0
  33. data/spec/fixtures/vcr/analytics_searches_with_document_type_and_time_range.yml +57 -0
  34. data/spec/fixtures/vcr/analytics_searches_with_time_range.yml +57 -0
  35. data/spec/fixtures/vcr/analytics_searchs_with_document_type.yml +57 -0
  36. data/spec/fixtures/vcr/analytics_top_no_result_queries.yml +57 -0
  37. data/spec/fixtures/vcr/analytics_top_no_result_queries_paginated.yml +57 -0
  38. data/spec/fixtures/vcr/analytics_top_queries.yml +57 -0
  39. data/spec/fixtures/vcr/analytics_top_queries_paginated.yml +57 -0
  40. data/spec/fixtures/vcr/analytics_top_queries_too_large.yml +53 -0
  41. data/spec/fixtures/vcr/async_create_or_update_document_failure.yml +48 -0
  42. data/spec/fixtures/vcr/async_create_or_update_document_success.yml +52 -0
  43. data/spec/fixtures/vcr/bulk_create_documents.yml +52 -0
  44. data/spec/fixtures/vcr/bulk_create_or_update_documents_failure.yml +47 -0
  45. data/spec/fixtures/vcr/bulk_create_or_update_documents_success.yml +52 -0
  46. data/spec/fixtures/vcr/bulk_create_or_update_documents_verbose_failure.yml +47 -0
  47. data/spec/fixtures/vcr/bulk_create_or_update_documents_verbose_success.yml +52 -0
  48. data/spec/fixtures/vcr/bulk_destroy_documents.yml +47 -0
  49. data/spec/fixtures/vcr/crawl_url.yml +47 -0
  50. data/spec/fixtures/vcr/create_document.yml +52 -0
  51. data/spec/fixtures/vcr/create_document_type.yml +47 -0
  52. data/spec/fixtures/vcr/create_domain.yml +47 -0
  53. data/spec/fixtures/vcr/create_engine.yml +47 -0
  54. data/spec/fixtures/vcr/create_or_update_document_create.yml +51 -0
  55. data/spec/fixtures/vcr/create_or_update_document_update.yml +51 -0
  56. data/spec/fixtures/vcr/create_user.yml +47 -0
  57. data/spec/fixtures/vcr/destroy_document.yml +43 -0
  58. data/spec/fixtures/vcr/destroy_document_type.yml +43 -0
  59. data/spec/fixtures/vcr/destroy_domain.yml +43 -0
  60. data/spec/fixtures/vcr/destroy_engine.yml +43 -0
  61. data/spec/fixtures/vcr/destroy_non_existent_document_type.yml +45 -0
  62. data/spec/fixtures/vcr/document_receipts_multiple.yml +48 -0
  63. data/spec/fixtures/vcr/document_receipts_multiple_complete.yml +48 -0
  64. data/spec/fixtures/vcr/document_type_search.yml +63 -0
  65. data/spec/fixtures/vcr/document_type_search_pagination.yml +47 -0
  66. data/spec/fixtures/vcr/document_type_suggest.yml +52 -0
  67. data/spec/fixtures/vcr/document_type_suggest_pagination.yml +47 -0
  68. data/spec/fixtures/vcr/engine_search.yml +67 -0
  69. data/spec/fixtures/vcr/engine_search_facets.yml +164 -0
  70. data/spec/fixtures/vcr/engine_search_pagination.yml +47 -0
  71. data/spec/fixtures/vcr/engine_suggest.yml +55 -0
  72. data/spec/fixtures/vcr/engine_suggest_pagination.yml +47 -0
  73. data/spec/fixtures/vcr/find_document.yml +50 -0
  74. data/spec/fixtures/vcr/find_document_type.yml +47 -0
  75. data/spec/fixtures/vcr/find_domain.yml +47 -0
  76. data/spec/fixtures/vcr/find_domain_failure.yml +45 -0
  77. data/spec/fixtures/vcr/find_engine.yml +47 -0
  78. data/spec/fixtures/vcr/list_document_type.yml +47 -0
  79. data/spec/fixtures/vcr/list_documents.yml +71 -0
  80. data/spec/fixtures/vcr/list_documents_with_pagination.yml +71 -0
  81. data/spec/fixtures/vcr/list_domains.yml +47 -0
  82. data/spec/fixtures/vcr/list_engines.yml +48 -0
  83. data/spec/fixtures/vcr/list_users.yml +47 -0
  84. data/spec/fixtures/vcr/list_users_with_pagination.yml +47 -0
  85. data/spec/fixtures/vcr/log_clickthrough_failure.yml +45 -0
  86. data/spec/fixtures/vcr/log_clickthrough_success.yml +47 -0
  87. data/spec/fixtures/vcr/recrawl_domain_failure.yml +46 -0
  88. data/spec/fixtures/vcr/recrawl_domain_success.yml +47 -0
  89. data/spec/fixtures/vcr/show_user.yml +47 -0
  90. data/spec/fixtures/vcr/update_document.yml +50 -0
  91. data/spec/fixtures/vcr/update_document_unknown_field_failure.yml +48 -0
  92. data/spec/fixtures/vcr/update_documents_failure_non_existent_document.yml +47 -0
  93. data/spec/fixtures/vcr/update_documents_success.yml +47 -0
  94. data/spec/fixtures/vcr/users_client_secret_incorrect.yml +44 -0
  95. data/spec/fixtures/vcr/users_no_api_key.yml +44 -0
  96. data/spec/fixtures/vcr/users_no_client_id_or_secret.yml +45 -0
  97. data/spec/platform_spec.rb +95 -0
  98. data/spec/spec_helper.rb +27 -0
  99. data/spec/ssl_spec.rb +34 -0
  100. data/spec/sso_spec.rb +24 -0
  101. metadata +279 -0
@@ -0,0 +1,37 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Configuration' do
4
+ context '.authenticated_url' do
5
+ context 'with non-standard port number' do
6
+ it 'sets the API key and endpoint' do
7
+ Elastic::SiteSearch.authenticated_url = 'http://testkey:@localhost:1234/api/v1'
8
+ expect(Elastic::SiteSearch.api_key).to eq('testkey')
9
+ expect(Elastic::SiteSearch.endpoint).to eq('http://localhost:1234/api/v1/')
10
+ end
11
+
12
+ context 'with implicit port number' do
13
+ it 'sets the API key and endpoint' do
14
+ Elastic::SiteSearch.authenticated_url = 'https://testkey:@api.swiftype.com/api/v1'
15
+ expect(Elastic::SiteSearch.api_key).to eq('testkey')
16
+ expect(Elastic::SiteSearch.endpoint).to eq('https://api.swiftype.com/api/v1/')
17
+ end
18
+ end
19
+ end
20
+ end
21
+
22
+ context '.endpoint' do
23
+ context 'with a trailing /' do
24
+ it 'adds / to the end of of the URL' do
25
+ Elastic::SiteSearch.endpoint = 'https://api.swiftype.com/api/v1'
26
+ expect(Elastic::SiteSearch.endpoint).to eq('https://api.swiftype.com/api/v1/')
27
+ end
28
+ end
29
+
30
+ context 'with a trailing /' do
31
+ it 'leaves the URL alone' do
32
+ Elastic::SiteSearch.endpoint = 'https://api.swiftype.com/api/v1/'
33
+ expect(Elastic::SiteSearch.endpoint).to eq('https://api.swiftype.com/api/v1/')
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/recursion/analytics/autoselects.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ X-Swiftype-Client:
13
+ - elastic-app-search-ruby
14
+ X-Swiftype-Client-Version:
15
+ - 1.0.0
16
+ Content-Type:
17
+ - application/json
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - ngx_openresty/1.2.7.8
25
+ Date:
26
+ - Fri, 13 Sep 2013 00:01:12 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Vary:
34
+ - Accept-Encoding
35
+ Status:
36
+ - 200 OK
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Etag:
40
+ - ! '"5794f59d1c925941f162d1e441d7a1d8"'
41
+ Cache-Control:
42
+ - must-revalidate, private, max-age=0
43
+ Set-Cookie:
44
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTk3ZDNhZTNkNzg5ODEyNTVmMzhhMTA2YzlmN2RkNGYxBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRT6oFg9uoiHqsAAABSSIiJDJhJDEwJE1CYU9abE5nbU01T3hvMFI1Zy5Cay4GOwBU--341d8494621560116b9dd4e5f43a9eba350d1582;
45
+ path=/; HttpOnly; secure
46
+ X-Request-Id:
47
+ - 5dd05df0f299100e39049fb01613e7c1
48
+ X-Runtime:
49
+ - '0.307775'
50
+ X-Rack-Cache:
51
+ - miss
52
+ body:
53
+ encoding: US-ASCII
54
+ string: ! '[["2013-09-13",0],["2013-09-12",0],["2013-09-11",0],["2013-09-10",0],["2013-09-09",0],["2013-09-08",0],["2013-09-07",1],["2013-09-06",0],["2013-09-05",0],["2013-09-04",0],["2013-09-03",0],["2013-09-02",1],["2013-09-01",0],["2013-08-31",0],["2013-08-30",0]]'
55
+ http_version:
56
+ recorded_at: Fri, 13 Sep 2013 00:01:12 GMT
57
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/recursion/document_types/page/analytics/autoselects.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept:
11
+ - ! "*/*"
12
+ X-Swiftype-Client:
13
+ - elastic-app-search-ruby
14
+ X-Swiftype-Client-Version:
15
+ - 1.0.0
16
+ Content-Type:
17
+ - application/json
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - ngx_openresty/1.2.7.8
25
+ Date:
26
+ - Mon, 16 Sep 2013 20:13:50 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Vary:
34
+ - Accept-Encoding
35
+ Status:
36
+ - 200 OK
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Etag:
40
+ - ! '"22ecda56f9548f31bf04990eb1d544c0"'
41
+ Cache-Control:
42
+ - must-revalidate, private, max-age=0
43
+ Set-Cookie:
44
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTdjNzk4NTJmZDBjNjg5OTA5ZWFkYTU3NDRjYzMxZDM2BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRT6oFg9uoiHqsAAABSSIiJDJhJDEwJE1CYU9abE5nbU01T3hvMFI1Zy5Cay4GOwBU--74639b1cb74d827a6aab9de4a4573b9e6b7397ce;
45
+ path=/; HttpOnly; secure
46
+ X-Request-Id:
47
+ - 09bafe68057ff2c10658113b333eaf5f
48
+ X-Runtime:
49
+ - "0.079235"
50
+ X-Rack-Cache:
51
+ - miss
52
+ body:
53
+ encoding: US-ASCII
54
+ string: ! '[["2013-09-16",0],["2013-09-15",0],["2013-09-14",0],["2013-09-13",0],["2013-09-12",0],["2013-09-11",0],["2013-09-10",0],["2013-09-09",0],["2013-09-08",0],["2013-09-07",1],["2013-09-06",0],["2013-09-05",0],["2013-09-04",0],["2013-09-03",0],["2013-09-02",1]]'
55
+ http_version:
56
+ recorded_at: Mon, 16 Sep 2013 20:13:50 GMT
57
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/recursion/document_types/page/analytics/autoselects.json?end_date=2013-07-07&start_date=2013-07-01
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ X-Swiftype-Client:
13
+ - elastic-app-search-ruby
14
+ X-Swiftype-Client-Version:
15
+ - 1.0.0
16
+ Content-Type:
17
+ - application/json
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - ngx_openresty/1.2.7.8
25
+ Date:
26
+ - Mon, 16 Sep 2013 20:14:51 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Vary:
34
+ - Accept-Encoding
35
+ Status:
36
+ - 200 OK
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Etag:
40
+ - ! '"832ef2141a53df6109cbdff72cee0467"'
41
+ Cache-Control:
42
+ - must-revalidate, private, max-age=0
43
+ Set-Cookie:
44
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTg5Yzk3MjMwMTA2NzhjOTIwNjc1ZWE3YWZiZTliODBiBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRT6oFg9uoiHqsAAABSSIiJDJhJDEwJE1CYU9abE5nbU01T3hvMFI1Zy5Cay4GOwBU--eabb926b321b824d15bf9ef8b9ea2f389251fc09;
45
+ path=/; HttpOnly; secure
46
+ X-Request-Id:
47
+ - 11098504784b9e432f142eb6987d6a49
48
+ X-Runtime:
49
+ - '0.075667'
50
+ X-Rack-Cache:
51
+ - miss
52
+ body:
53
+ encoding: US-ASCII
54
+ string: ! '[["2013-07-07",0],["2013-07-06",0],["2013-07-05",0],["2013-07-04",0],["2013-07-03",0],["2013-07-02",1],["2013-07-01",0]]'
55
+ http_version:
56
+ recorded_at: Mon, 16 Sep 2013 20:14:51 GMT
57
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/recursion/analytics/autoselects.json?end_date=2013-07-07&start_date=2013-07-01
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept:
11
+ - ! "*/*"
12
+ X-Swiftype-Client:
13
+ - elastic-app-search-ruby
14
+ X-Swiftype-Client-Version:
15
+ - 1.0.0
16
+ Content-Type:
17
+ - application/json
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - ngx_openresty/1.2.7.8
25
+ Date:
26
+ - Fri, 13 Sep 2013 00:01:11 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Vary:
34
+ - Accept-Encoding
35
+ Status:
36
+ - 200 OK
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Etag:
40
+ - ! '"832ef2141a53df6109cbdff72cee0467"'
41
+ Cache-Control:
42
+ - must-revalidate, private, max-age=0
43
+ Set-Cookie:
44
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWZjYTI3NWFmM2Y3YThjM2M3M2U3OWUzYjliYzNkYjc4BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRT6oFg9uoiHqsAAABSSIiJDJhJDEwJE1CYU9abE5nbU01T3hvMFI1Zy5Cay4GOwBU--098855c66eb1b3848d58b08b736d0152b8a41b29;
45
+ path=/; HttpOnly; secure
46
+ X-Request-Id:
47
+ - 184e8ee03d7064d5a34b3f8efb9c6a69
48
+ X-Runtime:
49
+ - "0.430865"
50
+ X-Rack-Cache:
51
+ - miss
52
+ body:
53
+ encoding: US-ASCII
54
+ string: ! '[["2013-07-07",0],["2013-07-06",0],["2013-07-05",0],["2013-07-04",0],["2013-07-03",0],["2013-07-02",1],["2013-07-01",0]]'
55
+ http_version:
56
+ recorded_at: Fri, 13 Sep 2013 00:01:11 GMT
57
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/recursion/analytics/clicks.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ X-Swiftype-Client:
13
+ - elastic-app-search-ruby
14
+ X-Swiftype-Client-Version:
15
+ - 1.0.0
16
+ Content-Type:
17
+ - application/json
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - ngx_openresty/1.2.7.8
25
+ Date:
26
+ - Tue, 17 Sep 2013 00:07:18 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Vary:
34
+ - Accept-Encoding
35
+ Status:
36
+ - 200 OK
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Etag:
40
+ - ! '"93d2545ee9f722b709a3085753d2297c"'
41
+ Cache-Control:
42
+ - must-revalidate, private, max-age=0
43
+ Set-Cookie:
44
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWZmNTNmMGYyOGFmMDU0MDM1NDQ1MGIxOWM4MDc5ZWQ0BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRT6oFg9uoiHqsAAABSSIiJDJhJDEwJE1CYU9abE5nbU01T3hvMFI1Zy5Cay4GOwBU--934948c1059e91111c29071ea4d6ceeba92eef70;
45
+ path=/; HttpOnly; secure
46
+ X-Request-Id:
47
+ - 95bb207f0e81e9000d8bd38d0cdfcf76
48
+ X-Runtime:
49
+ - '0.049615'
50
+ X-Rack-Cache:
51
+ - miss
52
+ body:
53
+ encoding: US-ASCII
54
+ string: ! '[["2013-09-17",0],["2013-09-16",0],["2013-09-15",0],["2013-09-14",0],["2013-09-13",0],["2013-09-12",0],["2013-09-11",0],["2013-09-10",0],["2013-09-09",0],["2013-09-08",0],["2013-09-07",0],["2013-09-06",0],["2013-09-05",0],["2013-09-04",0],["2013-09-03",0]]'
55
+ http_version:
56
+ recorded_at: Tue, 17 Sep 2013 00:07:18 GMT
57
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/recursion/document_types/page/analytics/clicks.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ X-Swiftype-Client:
13
+ - elastic-app-search-ruby
14
+ X-Swiftype-Client-Version:
15
+ - 1.0.0
16
+ Content-Type:
17
+ - application/json
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - ngx_openresty/1.2.7.8
25
+ Date:
26
+ - Tue, 17 Sep 2013 00:07:18 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Vary:
34
+ - Accept-Encoding
35
+ Status:
36
+ - 200 OK
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Etag:
40
+ - ! '"93d2545ee9f722b709a3085753d2297c"'
41
+ Cache-Control:
42
+ - must-revalidate, private, max-age=0
43
+ Set-Cookie:
44
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWZmNTNmMGYyOGFmMDU0MDM1NDQ1MGIxOWM4MDc5ZWQ0BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRT6oFg9uoiHqsAAABSSIiJDJhJDEwJE1CYU9abE5nbU01T3hvMFI1Zy5Cay4GOwBU--934948c1059e91111c29071ea4d6ceeba92eef70;
45
+ path=/; HttpOnly; secure
46
+ X-Request-Id:
47
+ - 95bb207f0e81e9000d8bd38d0cdfcf76
48
+ X-Runtime:
49
+ - '0.049615'
50
+ X-Rack-Cache:
51
+ - miss
52
+ body:
53
+ encoding: US-ASCII
54
+ string: ! '[["2013-09-17",0],["2013-09-16",0],["2013-09-15",0],["2013-09-14",0],["2013-09-13",0],["2013-09-12",0],["2013-09-11",0],["2013-09-10",0],["2013-09-09",0],["2013-09-08",0],["2013-09-07",0],["2013-09-06",0],["2013-09-05",0],["2013-09-04",0],["2013-09-03",0]]'
55
+ http_version:
56
+ recorded_at: Tue, 17 Sep 2013 00:07:18 GMT
57
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/recursion/document_types/page/analytics/clicks.json?end_date=2013-07-07&start_date=2013-07-01
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ X-Swiftype-Client:
13
+ - elastic-app-search-ruby
14
+ X-Swiftype-Client-Version:
15
+ - 1.0.0
16
+ Content-Type:
17
+ - application/json
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - ngx_openresty/1.2.7.8
25
+ Date:
26
+ - Tue, 17 Sep 2013 00:07:17 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Vary:
34
+ - Accept-Encoding
35
+ Status:
36
+ - 200 OK
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Etag:
40
+ - ! '"b55e3fc5da2c4b1937f7bb6580de94f6"'
41
+ Cache-Control:
42
+ - must-revalidate, private, max-age=0
43
+ Set-Cookie:
44
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTc5Njk1Y2I4MDVkM2JkZmI0MmJjYTU3OTdkMjk5NGE1BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRT6oFg9uoiHqsAAABSSIiJDJhJDEwJE1CYU9abE5nbU01T3hvMFI1Zy5Cay4GOwBU--448a73b8c641507815ddaf760803c397c7d5ea14;
45
+ path=/; HttpOnly; secure
46
+ X-Request-Id:
47
+ - 302a83a9093a45ffd0b652beafaf3870
48
+ X-Runtime:
49
+ - '0.064719'
50
+ X-Rack-Cache:
51
+ - miss
52
+ body:
53
+ encoding: US-ASCII
54
+ string: ! '[["2013-07-07",0],["2013-07-06",0],["2013-07-05",0],["2013-07-04",0],["2013-07-03",0],["2013-07-02",0],["2013-07-01",0]]'
55
+ http_version:
56
+ recorded_at: Tue, 17 Sep 2013 00:07:17 GMT
57
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/recursion/analytics/clicks.json?end_date=2013-07-07&start_date=2013-07-01
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ X-Swiftype-Client:
13
+ - elastic-app-search-ruby
14
+ X-Swiftype-Client-Version:
15
+ - 1.0.0
16
+ Content-Type:
17
+ - application/json
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - ngx_openresty/1.2.7.8
25
+ Date:
26
+ - Tue, 17 Sep 2013 00:07:17 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Vary:
34
+ - Accept-Encoding
35
+ Status:
36
+ - 200 OK
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Etag:
40
+ - ! '"b55e3fc5da2c4b1937f7bb6580de94f6"'
41
+ Cache-Control:
42
+ - must-revalidate, private, max-age=0
43
+ Set-Cookie:
44
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTc5Njk1Y2I4MDVkM2JkZmI0MmJjYTU3OTdkMjk5NGE1BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRT6oFg9uoiHqsAAABSSIiJDJhJDEwJE1CYU9abE5nbU01T3hvMFI1Zy5Cay4GOwBU--448a73b8c641507815ddaf760803c397c7d5ea14;
45
+ path=/; HttpOnly; secure
46
+ X-Request-Id:
47
+ - 302a83a9093a45ffd0b652beafaf3870
48
+ X-Runtime:
49
+ - '0.064719'
50
+ X-Rack-Cache:
51
+ - miss
52
+ body:
53
+ encoding: US-ASCII
54
+ string: ! '[["2013-07-07",0],["2013-07-06",0],["2013-07-05",0],["2013-07-04",0],["2013-07-03",0],["2013-07-02",0],["2013-07-01",0]]'
55
+ http_version:
56
+ recorded_at: Tue, 17 Sep 2013 00:07:17 GMT
57
+ recorded_with: VCR 2.5.0