elastic-site-search 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +58 -0
- data/.gitignore +10 -0
- data/.travis.yml +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +201 -0
- data/NOTICE.txt +3 -0
- data/README.md +418 -0
- data/Rakefile +1 -0
- data/elastic-site-search.gemspec +26 -0
- data/lib/data/ca-bundle.crt +3554 -0
- data/lib/elastic/site-search.rb +9 -0
- data/lib/elastic/site-search/client.rb +527 -0
- data/lib/elastic/site-search/configuration.rb +67 -0
- data/lib/elastic/site-search/exceptions.rb +11 -0
- data/lib/elastic/site-search/ext/backport-uri.rb +33 -0
- data/lib/elastic/site-search/request.rb +156 -0
- data/lib/elastic/site-search/result_set.rb +84 -0
- data/lib/elastic/site-search/sso.rb +22 -0
- data/lib/elastic/site-search/version.rb +5 -0
- data/logo-site-search.png +0 -0
- data/spec/client_spec.rb +728 -0
- data/spec/configuration_spec.rb +37 -0
- data/spec/fixtures/vcr/analytics_autoselects.yml +57 -0
- data/spec/fixtures/vcr/analytics_autoselects_with_document_type.yml +57 -0
- data/spec/fixtures/vcr/analytics_autoselects_with_document_type_and_time_range.yml +57 -0
- data/spec/fixtures/vcr/analytics_autoselects_with_time_range.yml +57 -0
- data/spec/fixtures/vcr/analytics_clicks.yml +57 -0
- data/spec/fixtures/vcr/analytics_clicks_with_document_type.yml +57 -0
- data/spec/fixtures/vcr/analytics_clicks_with_document_type_and_time_range.yml +57 -0
- data/spec/fixtures/vcr/analytics_clicks_with_time_range.yml +57 -0
- data/spec/fixtures/vcr/analytics_searches.yml +57 -0
- data/spec/fixtures/vcr/analytics_searches_with_document_type_and_time_range.yml +57 -0
- data/spec/fixtures/vcr/analytics_searches_with_time_range.yml +57 -0
- data/spec/fixtures/vcr/analytics_searchs_with_document_type.yml +57 -0
- data/spec/fixtures/vcr/analytics_top_no_result_queries.yml +57 -0
- data/spec/fixtures/vcr/analytics_top_no_result_queries_paginated.yml +57 -0
- data/spec/fixtures/vcr/analytics_top_queries.yml +57 -0
- data/spec/fixtures/vcr/analytics_top_queries_paginated.yml +57 -0
- data/spec/fixtures/vcr/analytics_top_queries_too_large.yml +53 -0
- data/spec/fixtures/vcr/async_create_or_update_document_failure.yml +48 -0
- data/spec/fixtures/vcr/async_create_or_update_document_success.yml +52 -0
- data/spec/fixtures/vcr/bulk_create_documents.yml +52 -0
- data/spec/fixtures/vcr/bulk_create_or_update_documents_failure.yml +47 -0
- data/spec/fixtures/vcr/bulk_create_or_update_documents_success.yml +52 -0
- data/spec/fixtures/vcr/bulk_create_or_update_documents_verbose_failure.yml +47 -0
- data/spec/fixtures/vcr/bulk_create_or_update_documents_verbose_success.yml +52 -0
- data/spec/fixtures/vcr/bulk_destroy_documents.yml +47 -0
- data/spec/fixtures/vcr/crawl_url.yml +47 -0
- data/spec/fixtures/vcr/create_document.yml +52 -0
- data/spec/fixtures/vcr/create_document_type.yml +47 -0
- data/spec/fixtures/vcr/create_domain.yml +47 -0
- data/spec/fixtures/vcr/create_engine.yml +47 -0
- data/spec/fixtures/vcr/create_or_update_document_create.yml +51 -0
- data/spec/fixtures/vcr/create_or_update_document_update.yml +51 -0
- data/spec/fixtures/vcr/create_user.yml +47 -0
- data/spec/fixtures/vcr/destroy_document.yml +43 -0
- data/spec/fixtures/vcr/destroy_document_type.yml +43 -0
- data/spec/fixtures/vcr/destroy_domain.yml +43 -0
- data/spec/fixtures/vcr/destroy_engine.yml +43 -0
- data/spec/fixtures/vcr/destroy_non_existent_document_type.yml +45 -0
- data/spec/fixtures/vcr/document_receipts_multiple.yml +48 -0
- data/spec/fixtures/vcr/document_receipts_multiple_complete.yml +48 -0
- data/spec/fixtures/vcr/document_type_search.yml +63 -0
- data/spec/fixtures/vcr/document_type_search_pagination.yml +47 -0
- data/spec/fixtures/vcr/document_type_suggest.yml +52 -0
- data/spec/fixtures/vcr/document_type_suggest_pagination.yml +47 -0
- data/spec/fixtures/vcr/engine_search.yml +67 -0
- data/spec/fixtures/vcr/engine_search_facets.yml +164 -0
- data/spec/fixtures/vcr/engine_search_pagination.yml +47 -0
- data/spec/fixtures/vcr/engine_suggest.yml +55 -0
- data/spec/fixtures/vcr/engine_suggest_pagination.yml +47 -0
- data/spec/fixtures/vcr/find_document.yml +50 -0
- data/spec/fixtures/vcr/find_document_type.yml +47 -0
- data/spec/fixtures/vcr/find_domain.yml +47 -0
- data/spec/fixtures/vcr/find_domain_failure.yml +45 -0
- data/spec/fixtures/vcr/find_engine.yml +47 -0
- data/spec/fixtures/vcr/list_document_type.yml +47 -0
- data/spec/fixtures/vcr/list_documents.yml +71 -0
- data/spec/fixtures/vcr/list_documents_with_pagination.yml +71 -0
- data/spec/fixtures/vcr/list_domains.yml +47 -0
- data/spec/fixtures/vcr/list_engines.yml +48 -0
- data/spec/fixtures/vcr/list_users.yml +47 -0
- data/spec/fixtures/vcr/list_users_with_pagination.yml +47 -0
- data/spec/fixtures/vcr/log_clickthrough_failure.yml +45 -0
- data/spec/fixtures/vcr/log_clickthrough_success.yml +47 -0
- data/spec/fixtures/vcr/recrawl_domain_failure.yml +46 -0
- data/spec/fixtures/vcr/recrawl_domain_success.yml +47 -0
- data/spec/fixtures/vcr/show_user.yml +47 -0
- data/spec/fixtures/vcr/update_document.yml +50 -0
- data/spec/fixtures/vcr/update_document_unknown_field_failure.yml +48 -0
- data/spec/fixtures/vcr/update_documents_failure_non_existent_document.yml +47 -0
- data/spec/fixtures/vcr/update_documents_success.yml +47 -0
- data/spec/fixtures/vcr/users_client_secret_incorrect.yml +44 -0
- data/spec/fixtures/vcr/users_no_api_key.yml +44 -0
- data/spec/fixtures/vcr/users_no_client_id_or_secret.yml +45 -0
- data/spec/platform_spec.rb +95 -0
- data/spec/spec_helper.rb +27 -0
- data/spec/ssl_spec.rb +34 -0
- data/spec/sso_spec.rb +24 -0
- metadata +279 -0
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:3000/api/v1/users.json?client_id=0d94f7cf2bd1e65a7e1f9f929d1bcb2b248af69b8112d24484e87014125538f8&client_secret=wrong
|
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: 401
|
21
|
+
message: Unauthorized
|
22
|
+
headers:
|
23
|
+
Www-Authenticate:
|
24
|
+
- Basic realm="Swiftype"
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge
|
29
|
+
Cache-Control:
|
30
|
+
- no-cache
|
31
|
+
X-Request-Id:
|
32
|
+
- 3605ea2e9f85f5b74652d7bade07e97a
|
33
|
+
X-Runtime:
|
34
|
+
- '0.013547'
|
35
|
+
Connection:
|
36
|
+
- close
|
37
|
+
Server:
|
38
|
+
- thin 1.5.0 codename Knife
|
39
|
+
body:
|
40
|
+
encoding: US-ASCII
|
41
|
+
string: ! '{"error":"You need to sign in or sign up before continuing."}'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Fri, 13 Sep 2013 00:53:23 GMT
|
44
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:3000/api/v1/users.json?client_id=0d94f7cf2bd1e65a7e1f9f929d1bcb2b248af69b8112d24484e87014125538f8&client_secret=f600fb0b16b516cbb9b9f0eeb60f3b35f685b5ec4a94694ae57b5bbb8860f240
|
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: 401
|
21
|
+
message: Unauthorized
|
22
|
+
headers:
|
23
|
+
Www-Authenticate:
|
24
|
+
- Basic realm="Swiftype"
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge
|
29
|
+
Cache-Control:
|
30
|
+
- no-cache
|
31
|
+
X-Request-Id:
|
32
|
+
- 29b283e021cb39b78c9b6ef0c06ec041
|
33
|
+
X-Runtime:
|
34
|
+
- '0.015617'
|
35
|
+
Connection:
|
36
|
+
- close
|
37
|
+
Server:
|
38
|
+
- thin 1.5.0 codename Knife
|
39
|
+
body:
|
40
|
+
encoding: US-ASCII
|
41
|
+
string: ! '{"error":"You need to sign in or sign up before continuing."}'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Fri, 13 Sep 2013 00:53:23 GMT
|
44
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,45 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/users.json?client_id&client_secret
|
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: 400
|
21
|
+
message: Bad Request
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge
|
27
|
+
Cache-Control:
|
28
|
+
- no-cache
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTllNTAzNzFlZDcwYWFhOWQ4MGRiOGYzMTkxMDUzODgzBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--3a3ffdd780afdce5468176fe6593400bdc28ab0e;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- afbbf899940811879d2af25a041fa397
|
34
|
+
X-Runtime:
|
35
|
+
- '0.026651'
|
36
|
+
Connection:
|
37
|
+
- close
|
38
|
+
Server:
|
39
|
+
- thin 1.5.0 codename Knife
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string: ! '{"error":"Missing required parameter: client_id"}'
|
43
|
+
http_version:
|
44
|
+
recorded_at: Fri, 13 Sep 2013 00:53:23 GMT
|
45
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,95 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'platform user API' do
|
4
|
+
let(:client) { Elastic::SiteSearch::Client.new }
|
5
|
+
|
6
|
+
context 'authentication' do
|
7
|
+
it 'succeeds with api_key and correct client_id and client_secret' do
|
8
|
+
Elastic::SiteSearch.api_key = 'hello'
|
9
|
+
Elastic::SiteSearch.platform_client_id = '0d94f7cf2bd1e65a7e1f9f929d1bcb2b248af69b8112d24484e87014125538f8'
|
10
|
+
Elastic::SiteSearch.platform_client_secret = 'f600fb0b16b516cbb9b9f0eeb60f3b35f685b5ec4a94694ae57b5bbb8860f240'
|
11
|
+
|
12
|
+
VCR.use_cassette('list_users') do
|
13
|
+
expect do
|
14
|
+
client.users
|
15
|
+
end.to_not raise_error
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'fails without api_key' do
|
20
|
+
Elastic::SiteSearch.platform_client_id = '0d94f7cf2bd1e65a7e1f9f929d1bcb2b248af69b8112d24484e87014125538f8'
|
21
|
+
Elastic::SiteSearch.platform_client_secret = 'f600fb0b16b516cbb9b9f0eeb60f3b35f685b5ec4a94694ae57b5bbb8860f240'
|
22
|
+
|
23
|
+
VCR.use_cassette('users_no_api_key') do
|
24
|
+
expect do
|
25
|
+
client.users
|
26
|
+
end.to raise_error
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'fails with missing client_id and client_secret' do
|
31
|
+
Elastic::SiteSearch.api_key = 'hello'
|
32
|
+
|
33
|
+
VCR.use_cassette('users_no_client_id_or_secret') do
|
34
|
+
expect do
|
35
|
+
client.users
|
36
|
+
end.to raise_error
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'fails with incorrect client_secret' do
|
41
|
+
Elastic::SiteSearch.platform_client_id = '0d94f7cf2bd1e65a7e1f9f929d1bcb2b248af69b8112d24484e87014125538f8'
|
42
|
+
Elastic::SiteSearch.platform_client_secret = 'wrong'
|
43
|
+
|
44
|
+
VCR.use_cassette('users_client_secret_incorrect') do
|
45
|
+
expect do
|
46
|
+
client.users
|
47
|
+
end.to raise_error
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
context 'with proper authentication' do
|
53
|
+
before :each do
|
54
|
+
Elastic::SiteSearch.api_key = 'hello'
|
55
|
+
Elastic::SiteSearch.platform_client_id = '0d94f7cf2bd1e65a7e1f9f929d1bcb2b248af69b8112d24484e87014125538f8'
|
56
|
+
Elastic::SiteSearch.platform_client_secret = 'f600fb0b16b516cbb9b9f0eeb60f3b35f685b5ec4a94694ae57b5bbb8860f240'
|
57
|
+
end
|
58
|
+
|
59
|
+
context 'creating a user' do
|
60
|
+
it 'returns a Hash with user info' do
|
61
|
+
VCR.use_cassette('create_user') do
|
62
|
+
user = client.create_user
|
63
|
+
expect(user).to have_key('id')
|
64
|
+
expect(user).to have_key('access_token')
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
context 'listing users' do
|
70
|
+
it 'returns the first page of users' do
|
71
|
+
VCR.use_cassette('list_users') do
|
72
|
+
users = client.users
|
73
|
+
expect(users.length).to eq(3)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
it 'returns an empty list of users once you page past the end' do
|
78
|
+
VCR.use_cassette('list_users_with_pagination') do
|
79
|
+
users = client.users(:page => 2)
|
80
|
+
expect(users.length).to eq(0)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
context 'showing a user' do
|
86
|
+
it 'returns a Hash with user info' do
|
87
|
+
VCR.use_cassette('show_user') do
|
88
|
+
user = client.user('5230b8c82ed960ba2000001d')
|
89
|
+
expect(user['id']).to eq('5230b8c82ed960ba2000001d')
|
90
|
+
expect(user['access_token']).to eq('0381294b7ef41db44fba20aad86a52d294b9fae67a26e85139d323eb78106706')
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'bundler/setup'
|
2
|
+
require 'rspec'
|
3
|
+
require 'vcr'
|
4
|
+
require 'awesome_print'
|
5
|
+
require 'elastic/site-search'
|
6
|
+
|
7
|
+
RSpec.configure do |config|
|
8
|
+
# Run specs in random order to surface order dependencies. If you find an
|
9
|
+
# order dependency and want to debug it, you can fix the order by providing
|
10
|
+
# the seed, which is printed after each run.
|
11
|
+
# --seed 1234
|
12
|
+
config.order = "random"
|
13
|
+
|
14
|
+
VCR.configure do |c|
|
15
|
+
c.default_cassette_options = { :record => :once, :match_requests_on => [:host, :path, :method] }
|
16
|
+
c.cassette_library_dir = 'spec/fixtures/vcr'
|
17
|
+
c.hook_into :webmock
|
18
|
+
end
|
19
|
+
|
20
|
+
config.before :each do
|
21
|
+
Elastic::SiteSearch.endpoint = "http://hello:@localhost:3000/api/v1/"
|
22
|
+
end
|
23
|
+
|
24
|
+
config.after :each do
|
25
|
+
Elastic::SiteSearch.reset
|
26
|
+
end
|
27
|
+
end
|
data/spec/ssl_spec.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
# These tests use real network connections to test the SSL
|
4
|
+
# support. Since a real API key is not used, the success condition is
|
5
|
+
# that the connection was made and the approriate error message is
|
6
|
+
# returned from the API
|
7
|
+
describe 'SSL support' do
|
8
|
+
let(:client) { Elastic::SiteSearch::Client.new }
|
9
|
+
|
10
|
+
context 'when the endpoint is configured to use SSL' do
|
11
|
+
it 'connects successfully' do
|
12
|
+
Elastic::SiteSearch.endpoint = 'https://api.swiftype.com/api/v1/'
|
13
|
+
|
14
|
+
VCR.turned_off do
|
15
|
+
WebMock.allow_net_connect!
|
16
|
+
expect do
|
17
|
+
client.search('site-search-api-example', 'test')
|
18
|
+
end.to raise_error(Elastic::SiteSearch::InvalidCredentials)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
context 'when the endpoint is configured not to use SSL' do
|
24
|
+
it 'connects successfully' do
|
25
|
+
Elastic::SiteSearch.endpoint = 'http://api.swiftype.com/api/v1/'
|
26
|
+
VCR.turned_off do
|
27
|
+
WebMock.allow_net_connect!
|
28
|
+
expect do
|
29
|
+
client.search('site-search-api-example', 'test')
|
30
|
+
end.to raise_error(Elastic::SiteSearch::InvalidCredentials)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/spec/sso_spec.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Elastic::SiteSearch::SSO do
|
4
|
+
let(:user_id) { '5064a7de2ed960e715000276' }
|
5
|
+
let(:timestamp) { 1379382520 }
|
6
|
+
before :each do
|
7
|
+
Elastic::SiteSearch.platform_client_id = '3e4fd842fc99aecb4dc50e5b88a186c1e206ddd516cdd336da3622c4afd7e2e9'
|
8
|
+
Elastic::SiteSearch.platform_client_secret = '4441879b5e2a9c3271f5b1a4bc223b715f091e5ed20fe75d1352e1290c7a6dfb'
|
9
|
+
|
10
|
+
allow_any_instance_of(Time).to receive(:to_i).and_return(timestamp)
|
11
|
+
end
|
12
|
+
|
13
|
+
context '.token' do
|
14
|
+
it 'generates an SSO token' do
|
15
|
+
expect(Elastic::SiteSearch::SSO.token(user_id, timestamp)).to eq('81033d182ad51f231cc9cda9fb24f2298a411437')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context '.url' do
|
20
|
+
it 'generates an SSO URL' do
|
21
|
+
expect(Elastic::SiteSearch::SSO.url(user_id)).to eq('https://swiftype.com/sso?user_id=5064a7de2ed960e715000276&client_id=3e4fd842fc99aecb4dc50e5b88a186c1e206ddd516cdd336da3622c4afd7e2e9×tamp=1379382520&token=81033d182ad51f231cc9cda9fb24f2298a411437')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,279 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: elastic-site-search
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Quin Hoxie
|
8
|
+
- Matt Riley
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2019-08-08 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 3.0.0
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 3.0.0
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: awesome_print
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: vcr
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 4.0.0
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 4.0.0
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: webmock
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
description: API client for accessing the Elastic Site Search API with no dependencies
|
71
|
+
(on Ruby 1.9, JSON needed for Ruby 1.8).
|
72
|
+
email:
|
73
|
+
- support@elastic.co
|
74
|
+
executables: []
|
75
|
+
extensions: []
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
78
|
+
- ".circleci/config.yml"
|
79
|
+
- ".gitignore"
|
80
|
+
- ".travis.yml"
|
81
|
+
- Gemfile
|
82
|
+
- LICENSE.txt
|
83
|
+
- NOTICE.txt
|
84
|
+
- README.md
|
85
|
+
- Rakefile
|
86
|
+
- elastic-site-search.gemspec
|
87
|
+
- lib/data/ca-bundle.crt
|
88
|
+
- lib/elastic/site-search.rb
|
89
|
+
- lib/elastic/site-search/client.rb
|
90
|
+
- lib/elastic/site-search/configuration.rb
|
91
|
+
- lib/elastic/site-search/exceptions.rb
|
92
|
+
- lib/elastic/site-search/ext/backport-uri.rb
|
93
|
+
- lib/elastic/site-search/request.rb
|
94
|
+
- lib/elastic/site-search/result_set.rb
|
95
|
+
- lib/elastic/site-search/sso.rb
|
96
|
+
- lib/elastic/site-search/version.rb
|
97
|
+
- logo-site-search.png
|
98
|
+
- spec/client_spec.rb
|
99
|
+
- spec/configuration_spec.rb
|
100
|
+
- spec/fixtures/vcr/analytics_autoselects.yml
|
101
|
+
- spec/fixtures/vcr/analytics_autoselects_with_document_type.yml
|
102
|
+
- spec/fixtures/vcr/analytics_autoselects_with_document_type_and_time_range.yml
|
103
|
+
- spec/fixtures/vcr/analytics_autoselects_with_time_range.yml
|
104
|
+
- spec/fixtures/vcr/analytics_clicks.yml
|
105
|
+
- spec/fixtures/vcr/analytics_clicks_with_document_type.yml
|
106
|
+
- spec/fixtures/vcr/analytics_clicks_with_document_type_and_time_range.yml
|
107
|
+
- spec/fixtures/vcr/analytics_clicks_with_time_range.yml
|
108
|
+
- spec/fixtures/vcr/analytics_searches.yml
|
109
|
+
- spec/fixtures/vcr/analytics_searches_with_document_type_and_time_range.yml
|
110
|
+
- spec/fixtures/vcr/analytics_searches_with_time_range.yml
|
111
|
+
- spec/fixtures/vcr/analytics_searchs_with_document_type.yml
|
112
|
+
- spec/fixtures/vcr/analytics_top_no_result_queries.yml
|
113
|
+
- spec/fixtures/vcr/analytics_top_no_result_queries_paginated.yml
|
114
|
+
- spec/fixtures/vcr/analytics_top_queries.yml
|
115
|
+
- spec/fixtures/vcr/analytics_top_queries_paginated.yml
|
116
|
+
- spec/fixtures/vcr/analytics_top_queries_too_large.yml
|
117
|
+
- spec/fixtures/vcr/async_create_or_update_document_failure.yml
|
118
|
+
- spec/fixtures/vcr/async_create_or_update_document_success.yml
|
119
|
+
- spec/fixtures/vcr/bulk_create_documents.yml
|
120
|
+
- spec/fixtures/vcr/bulk_create_or_update_documents_failure.yml
|
121
|
+
- spec/fixtures/vcr/bulk_create_or_update_documents_success.yml
|
122
|
+
- spec/fixtures/vcr/bulk_create_or_update_documents_verbose_failure.yml
|
123
|
+
- spec/fixtures/vcr/bulk_create_or_update_documents_verbose_success.yml
|
124
|
+
- spec/fixtures/vcr/bulk_destroy_documents.yml
|
125
|
+
- spec/fixtures/vcr/crawl_url.yml
|
126
|
+
- spec/fixtures/vcr/create_document.yml
|
127
|
+
- spec/fixtures/vcr/create_document_type.yml
|
128
|
+
- spec/fixtures/vcr/create_domain.yml
|
129
|
+
- spec/fixtures/vcr/create_engine.yml
|
130
|
+
- spec/fixtures/vcr/create_or_update_document_create.yml
|
131
|
+
- spec/fixtures/vcr/create_or_update_document_update.yml
|
132
|
+
- spec/fixtures/vcr/create_user.yml
|
133
|
+
- spec/fixtures/vcr/destroy_document.yml
|
134
|
+
- spec/fixtures/vcr/destroy_document_type.yml
|
135
|
+
- spec/fixtures/vcr/destroy_domain.yml
|
136
|
+
- spec/fixtures/vcr/destroy_engine.yml
|
137
|
+
- spec/fixtures/vcr/destroy_non_existent_document_type.yml
|
138
|
+
- spec/fixtures/vcr/document_receipts_multiple.yml
|
139
|
+
- spec/fixtures/vcr/document_receipts_multiple_complete.yml
|
140
|
+
- spec/fixtures/vcr/document_type_search.yml
|
141
|
+
- spec/fixtures/vcr/document_type_search_pagination.yml
|
142
|
+
- spec/fixtures/vcr/document_type_suggest.yml
|
143
|
+
- spec/fixtures/vcr/document_type_suggest_pagination.yml
|
144
|
+
- spec/fixtures/vcr/engine_search.yml
|
145
|
+
- spec/fixtures/vcr/engine_search_facets.yml
|
146
|
+
- spec/fixtures/vcr/engine_search_pagination.yml
|
147
|
+
- spec/fixtures/vcr/engine_suggest.yml
|
148
|
+
- spec/fixtures/vcr/engine_suggest_pagination.yml
|
149
|
+
- spec/fixtures/vcr/find_document.yml
|
150
|
+
- spec/fixtures/vcr/find_document_type.yml
|
151
|
+
- spec/fixtures/vcr/find_domain.yml
|
152
|
+
- spec/fixtures/vcr/find_domain_failure.yml
|
153
|
+
- spec/fixtures/vcr/find_engine.yml
|
154
|
+
- spec/fixtures/vcr/list_document_type.yml
|
155
|
+
- spec/fixtures/vcr/list_documents.yml
|
156
|
+
- spec/fixtures/vcr/list_documents_with_pagination.yml
|
157
|
+
- spec/fixtures/vcr/list_domains.yml
|
158
|
+
- spec/fixtures/vcr/list_engines.yml
|
159
|
+
- spec/fixtures/vcr/list_users.yml
|
160
|
+
- spec/fixtures/vcr/list_users_with_pagination.yml
|
161
|
+
- spec/fixtures/vcr/log_clickthrough_failure.yml
|
162
|
+
- spec/fixtures/vcr/log_clickthrough_success.yml
|
163
|
+
- spec/fixtures/vcr/recrawl_domain_failure.yml
|
164
|
+
- spec/fixtures/vcr/recrawl_domain_success.yml
|
165
|
+
- spec/fixtures/vcr/show_user.yml
|
166
|
+
- spec/fixtures/vcr/update_document.yml
|
167
|
+
- spec/fixtures/vcr/update_document_unknown_field_failure.yml
|
168
|
+
- spec/fixtures/vcr/update_documents_failure_non_existent_document.yml
|
169
|
+
- spec/fixtures/vcr/update_documents_success.yml
|
170
|
+
- spec/fixtures/vcr/users_client_secret_incorrect.yml
|
171
|
+
- spec/fixtures/vcr/users_no_api_key.yml
|
172
|
+
- spec/fixtures/vcr/users_no_client_id_or_secret.yml
|
173
|
+
- spec/platform_spec.rb
|
174
|
+
- spec/spec_helper.rb
|
175
|
+
- spec/ssl_spec.rb
|
176
|
+
- spec/sso_spec.rb
|
177
|
+
homepage: https://github.com/elastic/site-search-ruby
|
178
|
+
licenses:
|
179
|
+
- Apache-2.0
|
180
|
+
metadata: {}
|
181
|
+
post_install_message:
|
182
|
+
rdoc_options: []
|
183
|
+
require_paths:
|
184
|
+
- lib
|
185
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
186
|
+
requirements:
|
187
|
+
- - ">="
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0'
|
190
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
requirements: []
|
196
|
+
rubygems_version: 3.0.4
|
197
|
+
signing_key:
|
198
|
+
specification_version: 4
|
199
|
+
summary: Official gem for accessing the Elastic Site Search API
|
200
|
+
test_files:
|
201
|
+
- spec/client_spec.rb
|
202
|
+
- spec/configuration_spec.rb
|
203
|
+
- spec/fixtures/vcr/analytics_autoselects.yml
|
204
|
+
- spec/fixtures/vcr/analytics_autoselects_with_document_type.yml
|
205
|
+
- spec/fixtures/vcr/analytics_autoselects_with_document_type_and_time_range.yml
|
206
|
+
- spec/fixtures/vcr/analytics_autoselects_with_time_range.yml
|
207
|
+
- spec/fixtures/vcr/analytics_clicks.yml
|
208
|
+
- spec/fixtures/vcr/analytics_clicks_with_document_type.yml
|
209
|
+
- spec/fixtures/vcr/analytics_clicks_with_document_type_and_time_range.yml
|
210
|
+
- spec/fixtures/vcr/analytics_clicks_with_time_range.yml
|
211
|
+
- spec/fixtures/vcr/analytics_searches.yml
|
212
|
+
- spec/fixtures/vcr/analytics_searches_with_document_type_and_time_range.yml
|
213
|
+
- spec/fixtures/vcr/analytics_searches_with_time_range.yml
|
214
|
+
- spec/fixtures/vcr/analytics_searchs_with_document_type.yml
|
215
|
+
- spec/fixtures/vcr/analytics_top_no_result_queries.yml
|
216
|
+
- spec/fixtures/vcr/analytics_top_no_result_queries_paginated.yml
|
217
|
+
- spec/fixtures/vcr/analytics_top_queries.yml
|
218
|
+
- spec/fixtures/vcr/analytics_top_queries_paginated.yml
|
219
|
+
- spec/fixtures/vcr/analytics_top_queries_too_large.yml
|
220
|
+
- spec/fixtures/vcr/async_create_or_update_document_failure.yml
|
221
|
+
- spec/fixtures/vcr/async_create_or_update_document_success.yml
|
222
|
+
- spec/fixtures/vcr/bulk_create_documents.yml
|
223
|
+
- spec/fixtures/vcr/bulk_create_or_update_documents_failure.yml
|
224
|
+
- spec/fixtures/vcr/bulk_create_or_update_documents_success.yml
|
225
|
+
- spec/fixtures/vcr/bulk_create_or_update_documents_verbose_failure.yml
|
226
|
+
- spec/fixtures/vcr/bulk_create_or_update_documents_verbose_success.yml
|
227
|
+
- spec/fixtures/vcr/bulk_destroy_documents.yml
|
228
|
+
- spec/fixtures/vcr/crawl_url.yml
|
229
|
+
- spec/fixtures/vcr/create_document.yml
|
230
|
+
- spec/fixtures/vcr/create_document_type.yml
|
231
|
+
- spec/fixtures/vcr/create_domain.yml
|
232
|
+
- spec/fixtures/vcr/create_engine.yml
|
233
|
+
- spec/fixtures/vcr/create_or_update_document_create.yml
|
234
|
+
- spec/fixtures/vcr/create_or_update_document_update.yml
|
235
|
+
- spec/fixtures/vcr/create_user.yml
|
236
|
+
- spec/fixtures/vcr/destroy_document.yml
|
237
|
+
- spec/fixtures/vcr/destroy_document_type.yml
|
238
|
+
- spec/fixtures/vcr/destroy_domain.yml
|
239
|
+
- spec/fixtures/vcr/destroy_engine.yml
|
240
|
+
- spec/fixtures/vcr/destroy_non_existent_document_type.yml
|
241
|
+
- spec/fixtures/vcr/document_receipts_multiple.yml
|
242
|
+
- spec/fixtures/vcr/document_receipts_multiple_complete.yml
|
243
|
+
- spec/fixtures/vcr/document_type_search.yml
|
244
|
+
- spec/fixtures/vcr/document_type_search_pagination.yml
|
245
|
+
- spec/fixtures/vcr/document_type_suggest.yml
|
246
|
+
- spec/fixtures/vcr/document_type_suggest_pagination.yml
|
247
|
+
- spec/fixtures/vcr/engine_search.yml
|
248
|
+
- spec/fixtures/vcr/engine_search_facets.yml
|
249
|
+
- spec/fixtures/vcr/engine_search_pagination.yml
|
250
|
+
- spec/fixtures/vcr/engine_suggest.yml
|
251
|
+
- spec/fixtures/vcr/engine_suggest_pagination.yml
|
252
|
+
- spec/fixtures/vcr/find_document.yml
|
253
|
+
- spec/fixtures/vcr/find_document_type.yml
|
254
|
+
- spec/fixtures/vcr/find_domain.yml
|
255
|
+
- spec/fixtures/vcr/find_domain_failure.yml
|
256
|
+
- spec/fixtures/vcr/find_engine.yml
|
257
|
+
- spec/fixtures/vcr/list_document_type.yml
|
258
|
+
- spec/fixtures/vcr/list_documents.yml
|
259
|
+
- spec/fixtures/vcr/list_documents_with_pagination.yml
|
260
|
+
- spec/fixtures/vcr/list_domains.yml
|
261
|
+
- spec/fixtures/vcr/list_engines.yml
|
262
|
+
- spec/fixtures/vcr/list_users.yml
|
263
|
+
- spec/fixtures/vcr/list_users_with_pagination.yml
|
264
|
+
- spec/fixtures/vcr/log_clickthrough_failure.yml
|
265
|
+
- spec/fixtures/vcr/log_clickthrough_success.yml
|
266
|
+
- spec/fixtures/vcr/recrawl_domain_failure.yml
|
267
|
+
- spec/fixtures/vcr/recrawl_domain_success.yml
|
268
|
+
- spec/fixtures/vcr/show_user.yml
|
269
|
+
- spec/fixtures/vcr/update_document.yml
|
270
|
+
- spec/fixtures/vcr/update_document_unknown_field_failure.yml
|
271
|
+
- spec/fixtures/vcr/update_documents_failure_non_existent_document.yml
|
272
|
+
- spec/fixtures/vcr/update_documents_success.yml
|
273
|
+
- spec/fixtures/vcr/users_client_secret_incorrect.yml
|
274
|
+
- spec/fixtures/vcr/users_no_api_key.yml
|
275
|
+
- spec/fixtures/vcr/users_no_client_id_or_secret.yml
|
276
|
+
- spec/platform_spec.rb
|
277
|
+
- spec/spec_helper.rb
|
278
|
+
- spec/ssl_spec.rb
|
279
|
+
- spec/sso_spec.rb
|