elastic-workplace-search 0.4.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 +68 -0
- data/.gitignore +10 -0
- data/.travis.yml +15 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +201 -0
- data/NOTICE.txt +3 -0
- data/README.md +171 -0
- data/Rakefile +1 -0
- data/elastic-workplace-search.gemspec +23 -0
- data/lib/data/ca-bundle.crt +3554 -0
- data/lib/elastic-workplace-search.rb +1 -0
- data/lib/elastic/workplace-search.rb +7 -0
- data/lib/elastic/workplace-search/client.rb +53 -0
- data/lib/elastic/workplace-search/client/content_source_documents.rb +45 -0
- data/lib/elastic/workplace-search/client/permissions.rb +29 -0
- data/lib/elastic/workplace-search/configuration.rb +54 -0
- data/lib/elastic/workplace-search/exceptions.rb +11 -0
- data/lib/elastic/workplace-search/request.rb +113 -0
- data/lib/elastic/workplace-search/utils.rb +15 -0
- data/lib/elastic/workplace-search/version.rb +5 -0
- data/spec/client/content_source_documents_spec.rb +55 -0
- data/spec/client/permissions_spec.rb +75 -0
- data/spec/configuration_spec.rb +19 -0
- data/spec/fixtures/vcr/add_user_permissions.yml +55 -0
- data/spec/fixtures/vcr/async_create_or_update_document_success.yml +51 -0
- data/spec/fixtures/vcr/destroy_documents_success.yml +51 -0
- data/spec/fixtures/vcr/get_user_permissions.yml +55 -0
- data/spec/fixtures/vcr/list_all_permissions.yml +55 -0
- data/spec/fixtures/vcr/list_all_permissions_with_paging.yml +55 -0
- data/spec/fixtures/vcr/remove_user_permissions.yml +55 -0
- data/spec/fixtures/vcr/update_user_permissions.yml +55 -0
- data/spec/spec_helper.rb +28 -0
- metadata +143 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'bundler/setup'
|
2
|
+
require 'rspec'
|
3
|
+
require 'webmock'
|
4
|
+
require 'vcr'
|
5
|
+
require 'awesome_print'
|
6
|
+
require 'elastic/workplace-search'
|
7
|
+
|
8
|
+
|
9
|
+
RSpec.configure do |config|
|
10
|
+
# Run specs in random order to surface order dependencies. If you find an
|
11
|
+
# order dependency and want to debug it, you can fix the order by providing
|
12
|
+
# the seed, which is printed after each run.
|
13
|
+
# --seed 1234
|
14
|
+
config.order = "random"
|
15
|
+
|
16
|
+
VCR.configure do |c|
|
17
|
+
c.cassette_library_dir = 'spec/fixtures/vcr'
|
18
|
+
c.hook_into :webmock
|
19
|
+
end
|
20
|
+
|
21
|
+
config.before :each do
|
22
|
+
Elastic::WorkplaceSearch.endpoint = ENV["ENDPOINT"]
|
23
|
+
end
|
24
|
+
|
25
|
+
config.after :each do
|
26
|
+
Elastic::WorkplaceSearch.reset
|
27
|
+
end
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,143 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: elastic-workplace-search
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Quin Hoxie
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-02-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.0.0
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: awesome_print
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: vcr
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 3.0.3
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 3.0.3
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: webmock
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: API client for accessing the Elastic Workplace Search API with no dependencies.
|
70
|
+
email:
|
71
|
+
- support@elastic.co
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".circleci/config.yml"
|
77
|
+
- ".gitignore"
|
78
|
+
- ".travis.yml"
|
79
|
+
- Gemfile
|
80
|
+
- LICENSE.txt
|
81
|
+
- NOTICE.txt
|
82
|
+
- README.md
|
83
|
+
- Rakefile
|
84
|
+
- elastic-workplace-search.gemspec
|
85
|
+
- lib/data/ca-bundle.crt
|
86
|
+
- lib/elastic-workplace-search.rb
|
87
|
+
- lib/elastic/workplace-search.rb
|
88
|
+
- lib/elastic/workplace-search/client.rb
|
89
|
+
- lib/elastic/workplace-search/client/content_source_documents.rb
|
90
|
+
- lib/elastic/workplace-search/client/permissions.rb
|
91
|
+
- lib/elastic/workplace-search/configuration.rb
|
92
|
+
- lib/elastic/workplace-search/exceptions.rb
|
93
|
+
- lib/elastic/workplace-search/request.rb
|
94
|
+
- lib/elastic/workplace-search/utils.rb
|
95
|
+
- lib/elastic/workplace-search/version.rb
|
96
|
+
- spec/client/content_source_documents_spec.rb
|
97
|
+
- spec/client/permissions_spec.rb
|
98
|
+
- spec/configuration_spec.rb
|
99
|
+
- spec/fixtures/vcr/add_user_permissions.yml
|
100
|
+
- spec/fixtures/vcr/async_create_or_update_document_success.yml
|
101
|
+
- spec/fixtures/vcr/destroy_documents_success.yml
|
102
|
+
- spec/fixtures/vcr/get_user_permissions.yml
|
103
|
+
- spec/fixtures/vcr/list_all_permissions.yml
|
104
|
+
- spec/fixtures/vcr/list_all_permissions_with_paging.yml
|
105
|
+
- spec/fixtures/vcr/remove_user_permissions.yml
|
106
|
+
- spec/fixtures/vcr/update_user_permissions.yml
|
107
|
+
- spec/spec_helper.rb
|
108
|
+
homepage: https://github.com/elastic/workplace-search-ruby
|
109
|
+
licenses:
|
110
|
+
- Apache-2.0
|
111
|
+
metadata: {}
|
112
|
+
post_install_message:
|
113
|
+
rdoc_options: []
|
114
|
+
require_paths:
|
115
|
+
- lib
|
116
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
121
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
requirements: []
|
127
|
+
rubygems_version: 3.0.3
|
128
|
+
signing_key:
|
129
|
+
specification_version: 4
|
130
|
+
summary: Official gem for accessing the Elastic Workplace Search API
|
131
|
+
test_files:
|
132
|
+
- spec/client/content_source_documents_spec.rb
|
133
|
+
- spec/client/permissions_spec.rb
|
134
|
+
- spec/configuration_spec.rb
|
135
|
+
- spec/fixtures/vcr/add_user_permissions.yml
|
136
|
+
- spec/fixtures/vcr/async_create_or_update_document_success.yml
|
137
|
+
- spec/fixtures/vcr/destroy_documents_success.yml
|
138
|
+
- spec/fixtures/vcr/get_user_permissions.yml
|
139
|
+
- spec/fixtures/vcr/list_all_permissions.yml
|
140
|
+
- spec/fixtures/vcr/list_all_permissions_with_paging.yml
|
141
|
+
- spec/fixtures/vcr/remove_user_permissions.yml
|
142
|
+
- spec/fixtures/vcr/update_user_permissions.yml
|
143
|
+
- spec/spec_helper.rb
|