typesense 0.5.2 → 0.7.0.pre0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 760daa6bc1d036a79e8d956743918a6fee8956cbd2adb36c34afe6ad84d50739
4
- data.tar.gz: 9a348a24b5babf261b738ba238e5e87959e66bdc3b3f5ed406e5c9749c68a84e
3
+ metadata.gz: 680a4251ea189d959a84665eb824d50efabdbe3359be1f787f23d9ea230ab16f
4
+ data.tar.gz: cdbb99c7ab1d32408c7100c3d1167a1ce8d1177014b80051ad4a5e2c13fbec99
5
5
  SHA512:
6
- metadata.gz: a2f0711831891fc1fadf04e7a791d46840843ef349d467acf9fd92cffd2a00aec9abb82c323ba5a3d0b18cda450902ef166107147df109222817a2db84ff08eb
7
- data.tar.gz: 6199850461ca7f254805f4c27880175843cef342bb3eae13cb9d57f0c90a4e672859b095b94d04daee2f5371a6ed2785a5a443a7acd3c4791a54aa0ab64d35db
6
+ metadata.gz: b161ddf9e1d3445934c77444d0a7d4cfb2ae6efb8879dd9f15020d286f4347bcb40933c7ad201b5d9b8cc5a3848b484586984bb07d7ac584a3e325941f08ca50
7
+ data.tar.gz: 04506357d9defab42a6c85d3c06b963670050944a26e6e0378cbca06b82ad2254312de2862f1fab72d8106a0dcebdc42c3c92c96bb596da9d67de4cfd1b0295c
@@ -1,19 +1,39 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
- require: rubocop-rspec
4
-
5
1
  AllCops:
6
- TargetRubyVersion: "2.4"
7
2
  NewCops: enable
8
3
 
9
- Metrics/BlockLength:
10
- Exclude:
11
- - 'spec/**/*'
12
- - 'Gemfile'
13
- - 'typesense.gemspec'
14
-
15
4
  Style/Documentation:
16
5
  Enabled: false
17
6
 
18
- RSpec/ExampleLength:
7
+ Metrics/AbcSize:
8
+ Enabled: false
9
+
10
+ Metrics/CyclomaticComplexity:
11
+ Enabled: false
12
+
13
+ Metrics/PerceivedComplexity:
14
+ Enabled: false
15
+
16
+ Metrics/ClassLength:
17
+ Enabled: false
18
+
19
+ Metrics/ParameterLists:
20
+ Enabled: false
21
+
22
+ Metrics/MethodLength:
23
+ Enabled: false
24
+
25
+ Metrics/BlockLength:
26
+ Enabled: false
27
+
28
+ Metrics/BlockNesting:
19
29
  Enabled: false
30
+
31
+ Style/FrozenStringLiteralComment:
32
+ EnforcedStyle: always_true
33
+
34
+ Layout/LineLength:
35
+ Max: 300
36
+
37
+ Lint/SuppressedException:
38
+ Exclude:
39
+ - examples/**
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ # A sample Guardfile
4
+ # More info at https://github.com/guard/guard#readme
5
+
6
+ ## Uncomment and set this to only include directories you want to watch
7
+ # directories %w(app lib config test spec features) \
8
+ # .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
9
+
10
+ ## Note: if you are using the `directories` clause above and you are not
11
+ ## watching the project directory ('.'), then you will want to move
12
+ ## the Guardfile to a watched dir and symlink it back, e.g.
13
+ #
14
+ # $ mkdir config
15
+ # $ mv Guardfile config/
16
+ # $ ln -s config/Guardfile .
17
+ #
18
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
19
+
20
+ guard :rubocop, cli: '-a' do
21
+ watch(/.+\.rb$/)
22
+ watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
23
+ end
data/README.md CHANGED
@@ -33,6 +33,7 @@ Tests are also a good place to know how the the library works internally: [spec]
33
33
 
34
34
  | Typesense Server | typesense-ruby |
35
35
  |------------------|----------------|
36
+ | \>= v0.15.0 | \>= v0.7.0 |
36
37
  | \>= v0.12.1 | \>= v0.5.0 |
37
38
  | \>= v0.12.0 | \>= v0.4.0 |
38
39
  | <= v0.11 | <= v0.3.0 |
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative '../lib/typesense'
4
4
  require 'awesome_print'
5
+ require 'logger'
5
6
 
6
7
  AwesomePrint.defaults = {
7
8
  indent: -2
@@ -62,6 +63,6 @@ AwesomePrint.defaults = {
62
63
  healthcheck_interval_seconds: 1,
63
64
  retry_interval_seconds: 0.01,
64
65
  connection_timeout_seconds: 10,
65
- logger: Logger.new(STDOUT),
66
+ logger: Logger.new($stdout),
66
67
  log_level: Logger::DEBUG
67
68
  )
@@ -1,11 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'httparty'
3
+ require 'typhoeus'
4
+ require 'oj'
4
5
 
5
6
  module Typesense
6
7
  class ApiCall
7
- include HTTParty
8
-
9
8
  API_KEY_HEADER_NAME = 'X-TYPESENSE-API-KEY'
10
9
 
11
10
  def initialize(configuration)
@@ -30,8 +29,8 @@ module Typesense
30
29
 
31
30
  perform_request :post,
32
31
  endpoint,
33
- body: body,
34
- headers: default_headers.merge(headers)
32
+ headers,
33
+ body: body
35
34
  end
36
35
 
37
36
  def put(endpoint, parameters = {})
@@ -39,8 +38,8 @@ module Typesense
39
38
 
40
39
  perform_request :put,
41
40
  endpoint,
42
- body: body,
43
- headers: default_headers.merge(headers)
41
+ headers,
42
+ body: body
44
43
  end
45
44
 
46
45
  def get(endpoint, parameters = {})
@@ -48,8 +47,8 @@ module Typesense
48
47
 
49
48
  perform_request :get,
50
49
  endpoint,
51
- query: query,
52
- headers: default_headers.merge(headers)
50
+ headers,
51
+ params: query
53
52
  end
54
53
 
55
54
  def delete(endpoint, parameters = {})
@@ -57,11 +56,11 @@ module Typesense
57
56
 
58
57
  perform_request :delete,
59
58
  endpoint,
60
- query: query,
61
- headers: default_headers.merge(headers)
59
+ headers,
60
+ params: query
62
61
  end
63
62
 
64
- def perform_request(method, endpoint, options = {})
63
+ def perform_request(method, endpoint, headers = {}, options = {})
65
64
  @configuration.validate!
66
65
  last_exception = nil
67
66
  @logger.debug "Performing #{method.to_s.upcase} request: #{endpoint}"
@@ -71,23 +70,31 @@ module Typesense
71
70
  @logger.debug "Attempting #{method.to_s.upcase} request Try ##{num_tries} to Node #{node[:index]}"
72
71
 
73
72
  begin
74
- response_object = self.class.send(method,
75
- uri_for(endpoint, node),
76
- default_options.merge(options))
77
- response_code = response_object.response.code.to_i
78
- set_node_healthcheck(node, is_healthy: true) if response_code >= 1 && response_code <= 499
79
-
80
- @logger.debug "Request to Node #{node[:index]} was successfully made (at the network layer). Response Code was #{response_code}."
73
+ response = Typhoeus::Request.new(uri_for(endpoint, node),
74
+ {
75
+ method: method,
76
+ headers: default_headers.merge(headers),
77
+ timeout: @connection_timeout_seconds
78
+ }.merge(options)).run
79
+ set_node_healthcheck(node, is_healthy: true) if response.code >= 1 && response.code <= 499
80
+
81
+ @logger.debug "Request to Node #{node[:index]} was successfully made (at the network layer). Response Code was #{response.code}."
82
+
83
+ parsed_response = if response.headers && (response.headers['content-type'] || '').include?('application/json')
84
+ Oj.load(response.body)
85
+ else
86
+ response.body
87
+ end
81
88
 
82
89
  # If response is 2xx return the object, else raise the response as an exception
83
- return response_object.parsed_response if response_object.response.code_type <= Net::HTTPSuccess # 2xx
90
+ return parsed_response if response.code >= 200 && response.code <= 299
84
91
 
85
- raise custom_exception_klass_for(response_object.response), response_object.parsed_response['message'] || 'Error message not available'
86
- rescue Net::ReadTimeout, Net::OpenTimeout,
87
- EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError,
92
+ exception_message = (parsed_response && parsed_response['message']) || 'Error'
93
+ raise custom_exception_klass_for(response), exception_message
94
+ rescue SocketError, EOFError,
88
95
  Errno::EINVAL, Errno::ENETDOWN, Errno::ENETUNREACH, Errno::ENETRESET, Errno::ECONNABORTED, Errno::ECONNRESET,
89
96
  Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::EHOSTDOWN, Errno::EHOSTUNREACH,
90
- Timeout::Error, HTTParty::ResponseError, Typesense::Error::ServerError, Typesense::Error::HTTPStatus0Error => e
97
+ Typesense::Error::TimeoutError, Typesense::Error::ServerError, Typesense::Error::HTTPStatus0Error => e
91
98
  # Rescue network layer exceptions and HTTP 5xx errors, so the loop can continue.
92
99
  # Using loops for retries instead of rescue...retry to maintain consistency with client libraries in
93
100
  # other languages that might not support the same construct.
@@ -107,7 +114,7 @@ module Typesense
107
114
  def extract_headers_and_body_from(parameters)
108
115
  if json_request?(parameters)
109
116
  headers = { 'Content-Type' => 'application/json' }
110
- body = sanitize_parameters(parameters).to_json
117
+ body = Oj.dump(sanitize_parameters(parameters))
111
118
  else
112
119
  headers = {}
113
120
  body = parameters[:body]
@@ -198,35 +205,31 @@ module Typesense
198
205
  end
199
206
 
200
207
  def custom_exception_klass_for(response)
201
- response_code_type = response.code_type
202
- if response_code_type <= Net::HTTPBadRequest # 400
208
+ if response.code == 400
203
209
  Typesense::Error::RequestMalformed
204
- elsif response_code_type <= Net::HTTPUnauthorized # 401
210
+ elsif response.code == 401
205
211
  Typesense::Error::RequestUnauthorized
206
- elsif response_code_type <= Net::HTTPNotFound # 404
212
+ elsif response.code == 404
207
213
  Typesense::Error::ObjectNotFound
208
- elsif response_code_type <= Net::HTTPConflict # 409
214
+ elsif response.code == 409
209
215
  Typesense::Error::ObjectAlreadyExists
210
- elsif response_code_type <= Net::HTTPUnprocessableEntity # 422
216
+ elsif response.code == 422
211
217
  Typesense::Error::ObjectUnprocessable
212
- elsif response_code_type <= Net::HTTPServerError # 5xx
218
+ elsif response.code >= 500 && response.code <= 599
213
219
  Typesense::Error::ServerError
214
- elsif response.code.to_i.zero?
220
+ elsif response.timed_out?
221
+ Typesense::Error::TimeoutError
222
+ elsif response.code.zero?
215
223
  Typesense::Error::HTTPStatus0Error
216
224
  else
217
225
  Typesense::Error::HTTPError
218
226
  end
219
227
  end
220
228
 
221
- def default_options
222
- {
223
- timeout: @connection_timeout_seconds
224
- }
225
- end
226
-
227
229
  def default_headers
228
230
  {
229
- API_KEY_HEADER_NAME.to_s => @api_key
231
+ API_KEY_HEADER_NAME.to_s => @api_key,
232
+ 'User-Agent' => 'Typesense Ruby Client'
230
233
  }
231
234
  end
232
235
  end
@@ -2,13 +2,7 @@
2
2
 
3
3
  module Typesense
4
4
  class Client
5
- attr_reader :configuration
6
- attr_reader :collections
7
- attr_reader :aliases
8
- attr_reader :keys
9
- attr_reader :debug
10
- attr_reader :health
11
- attr_reader :metrics
5
+ attr_reader :configuration, :collections, :aliases, :keys, :debug, :health, :metrics
12
6
 
13
7
  def initialize(options = {})
14
8
  @configuration = Configuration.new(options)
@@ -2,8 +2,7 @@
2
2
 
3
3
  module Typesense
4
4
  class Collection
5
- attr_reader :documents
6
- attr_reader :overrides
5
+ attr_reader :documents, :overrides
7
6
 
8
7
  def initialize(name, api_call)
9
8
  @name = name
@@ -1,16 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'logger'
4
+
3
5
  module Typesense
4
6
  class Configuration
5
- attr_accessor :nodes
6
- attr_accessor :nearest_node
7
- attr_accessor :connection_timeout_seconds
8
- attr_accessor :healthcheck_interval_seconds
9
- attr_accessor :num_retries
10
- attr_accessor :retry_interval_seconds
11
- attr_accessor :api_key
12
- attr_accessor :logger
13
- attr_accessor :log_level
7
+ attr_accessor :nodes, :nearest_node, :connection_timeout_seconds, :healthcheck_interval_seconds, :num_retries, :retry_interval_seconds, :api_key, :logger, :log_level
14
8
 
15
9
  def initialize(options = {})
16
10
  @nodes = options[:nodes] || []
@@ -21,7 +15,7 @@ module Typesense
21
15
  @retry_interval_seconds = options[:retry_interval_seconds] || 0.1
22
16
  @api_key = options[:api_key]
23
17
 
24
- @logger = options[:logger] || Logger.new(STDOUT)
18
+ @logger = options[:logger] || Logger.new($stdout)
25
19
  @log_level = options[:log_level] || Logger::WARN
26
20
  @logger.level = @log_level
27
21
 
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'oj'
4
+
3
5
  module Typesense
4
6
  class Documents
5
7
  RESOURCE_PATH = '/documents'
@@ -15,12 +17,17 @@ module Typesense
15
17
  end
16
18
 
17
19
  def create_many(documents)
18
- documents_in_jsonl_format = documents.map { |document| JSON.dump(document) }.join("\n")
20
+ documents_in_jsonl_format = documents.map { |document| Oj.dump(document) }.join("\n")
21
+ results_in_jsonl_format = import(documents_in_jsonl_format)
22
+ results_in_jsonl_format.split("\n").map { |r| Oj.load(r) }
23
+ end
24
+
25
+ def import(documents_in_jsonl_format)
19
26
  @api_call.post(endpoint_path('import'), as_json: false, body: documents_in_jsonl_format)
20
27
  end
21
28
 
22
29
  def export
23
- (@api_call.get(endpoint_path('export')) || '').split("\n")
30
+ @api_call.get(endpoint_path('export'))
24
31
  end
25
32
 
26
33
  def search(search_parameters)
@@ -34,7 +41,7 @@ module Typesense
34
41
  private
35
42
 
36
43
  def endpoint_path(operation = nil)
37
- "#{Collections::RESOURCE_PATH}/#{@collection_name}#{Documents::RESOURCE_PATH}#{operation.nil? ? '' : '/' + operation}"
44
+ "#{Collections::RESOURCE_PATH}/#{@collection_name}#{Documents::RESOURCE_PATH}#{operation.nil? ? '' : "/#{operation}"}"
38
45
  end
39
46
  end
40
47
  end
@@ -26,6 +26,9 @@ module Typesense
26
26
  class HTTPStatus0Error < Error
27
27
  end
28
28
 
29
+ class TimeoutError < Error
30
+ end
31
+
29
32
  class NoMethodError < ::NoMethodError
30
33
  end
31
34
 
@@ -25,7 +25,7 @@ module Typesense
25
25
  private
26
26
 
27
27
  def endpoint_path(operation = nil)
28
- "#{Collections::RESOURCE_PATH}/#{@collection_name}#{Overrides::RESOURCE_PATH}#{operation.nil? ? '' : '/' + operation}"
28
+ "#{Collections::RESOURCE_PATH}/#{@collection_name}#{Overrides::RESOURCE_PATH}#{operation.nil? ? '' : "/#{operation}"}"
29
29
  end
30
30
  end
31
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Typesense
4
- VERSION = '0.5.2'
4
+ VERSION = '0.7.0.pre0'
5
5
  end
@@ -15,6 +15,8 @@ Gem::Specification.new do |spec|
15
15
  spec.homepage = 'https://typesense.org'
16
16
  spec.license = 'Apache-2.0'
17
17
 
18
+ spec.required_ruby_version = '>= 2.4'
19
+
18
20
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
19
21
  f.match(%r{^(test|spec|features)/})
20
22
  end
@@ -25,16 +27,19 @@ Gem::Specification.new do |spec|
25
27
  spec.add_development_dependency 'awesome_print', '~> 1.8'
26
28
  spec.add_development_dependency 'bundler', '~> 2.0'
27
29
  spec.add_development_dependency 'codecov', '~> 0.1'
30
+ spec.add_development_dependency 'guard', '~> 2.16'
31
+ spec.add_development_dependency 'guard-rubocop', '~> 1.3'
28
32
  spec.add_development_dependency 'pry-byebug', '~> 3.9'
29
33
  spec.add_development_dependency 'rake', '~> 13.0'
30
34
  spec.add_development_dependency 'rspec', '~> 3.9'
31
- spec.add_development_dependency 'rspec-legacy_formatters', '~> 1.0' # For codecov formatter
32
35
  spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4'
33
- spec.add_development_dependency 'rubocop', '~> 0.83'
36
+ spec.add_development_dependency 'rspec-legacy_formatters', '~> 1.0' # For codecov formatter
37
+ spec.add_development_dependency 'rubocop', '~> 0.88'
34
38
  spec.add_development_dependency 'rubocop-rspec', '~> 1.39'
35
39
  spec.add_development_dependency 'simplecov', '~> 0.18'
36
40
  spec.add_development_dependency 'timecop', '~> 0.9'
37
41
  spec.add_development_dependency 'webmock', '~> 3.8'
38
42
 
39
- spec.add_dependency 'httparty', '~> 0.18'
43
+ spec.add_dependency 'oj', '~> 3.10'
44
+ spec.add_dependency 'typhoeus', '~> 1.4'
40
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typesense
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.7.0.pre0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Typesense, Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-09 00:00:00.000000000 Z
11
+ date: 2020-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -52,6 +52,34 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.1'
55
+ - !ruby/object:Gem::Dependency
56
+ name: guard
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.16'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.16'
69
+ - !ruby/object:Gem::Dependency
70
+ name: guard-rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.3'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.3'
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: pry-byebug
57
85
  requirement: !ruby/object:Gem::Requirement
@@ -95,47 +123,47 @@ dependencies:
95
123
  - !ruby/object:Gem::Version
96
124
  version: '3.9'
97
125
  - !ruby/object:Gem::Dependency
98
- name: rspec-legacy_formatters
126
+ name: rspec_junit_formatter
99
127
  requirement: !ruby/object:Gem::Requirement
100
128
  requirements:
101
129
  - - "~>"
102
130
  - !ruby/object:Gem::Version
103
- version: '1.0'
131
+ version: '0.4'
104
132
  type: :development
105
133
  prerelease: false
106
134
  version_requirements: !ruby/object:Gem::Requirement
107
135
  requirements:
108
136
  - - "~>"
109
137
  - !ruby/object:Gem::Version
110
- version: '1.0'
138
+ version: '0.4'
111
139
  - !ruby/object:Gem::Dependency
112
- name: rspec_junit_formatter
140
+ name: rspec-legacy_formatters
113
141
  requirement: !ruby/object:Gem::Requirement
114
142
  requirements:
115
143
  - - "~>"
116
144
  - !ruby/object:Gem::Version
117
- version: '0.4'
145
+ version: '1.0'
118
146
  type: :development
119
147
  prerelease: false
120
148
  version_requirements: !ruby/object:Gem::Requirement
121
149
  requirements:
122
150
  - - "~>"
123
151
  - !ruby/object:Gem::Version
124
- version: '0.4'
152
+ version: '1.0'
125
153
  - !ruby/object:Gem::Dependency
126
154
  name: rubocop
127
155
  requirement: !ruby/object:Gem::Requirement
128
156
  requirements:
129
157
  - - "~>"
130
158
  - !ruby/object:Gem::Version
131
- version: '0.83'
159
+ version: '0.88'
132
160
  type: :development
133
161
  prerelease: false
134
162
  version_requirements: !ruby/object:Gem::Requirement
135
163
  requirements:
136
164
  - - "~>"
137
165
  - !ruby/object:Gem::Version
138
- version: '0.83'
166
+ version: '0.88'
139
167
  - !ruby/object:Gem::Dependency
140
168
  name: rubocop-rspec
141
169
  requirement: !ruby/object:Gem::Requirement
@@ -193,19 +221,33 @@ dependencies:
193
221
  - !ruby/object:Gem::Version
194
222
  version: '3.8'
195
223
  - !ruby/object:Gem::Dependency
196
- name: httparty
224
+ name: oj
197
225
  requirement: !ruby/object:Gem::Requirement
198
226
  requirements:
199
227
  - - "~>"
200
228
  - !ruby/object:Gem::Version
201
- version: '0.18'
229
+ version: '3.10'
202
230
  type: :runtime
203
231
  prerelease: false
204
232
  version_requirements: !ruby/object:Gem::Requirement
205
233
  requirements:
206
234
  - - "~>"
207
235
  - !ruby/object:Gem::Version
208
- version: '0.18'
236
+ version: '3.10'
237
+ - !ruby/object:Gem::Dependency
238
+ name: typhoeus
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - "~>"
242
+ - !ruby/object:Gem::Version
243
+ version: '1.4'
244
+ type: :runtime
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - "~>"
249
+ - !ruby/object:Gem::Version
250
+ version: '1.4'
209
251
  description: Typesense is an open source search engine for building a delightful search
210
252
  experience.
211
253
  email:
@@ -218,8 +260,8 @@ files:
218
260
  - ".gitignore"
219
261
  - ".rspec"
220
262
  - ".rubocop.yml"
221
- - ".rubocop_todo.yml"
222
263
  - Gemfile
264
+ - Guardfile
223
265
  - LICENSE
224
266
  - README.md
225
267
  - Rakefile
@@ -256,7 +298,7 @@ homepage: https://typesense.org
256
298
  licenses:
257
299
  - Apache-2.0
258
300
  metadata: {}
259
- post_install_message:
301
+ post_install_message:
260
302
  rdoc_options: []
261
303
  require_paths:
262
304
  - lib
@@ -264,15 +306,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
264
306
  requirements:
265
307
  - - ">="
266
308
  - !ruby/object:Gem::Version
267
- version: '0'
309
+ version: '2.4'
268
310
  required_rubygems_version: !ruby/object:Gem::Requirement
269
311
  requirements:
270
- - - ">="
312
+ - - ">"
271
313
  - !ruby/object:Gem::Version
272
- version: '0'
314
+ version: 1.3.1
273
315
  requirements: []
274
316
  rubygems_version: 3.0.6
275
- signing_key:
317
+ signing_key:
276
318
  specification_version: 4
277
319
  summary: Ruby Library for Typesense
278
320
  test_files: []
@@ -1,75 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2020-05-21 20:10:36 -0700 using RuboCop version 0.83.0.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 1
10
- Lint/ShadowedException:
11
- Exclude:
12
- - 'lib/typesense/api_call.rb'
13
-
14
- # Offense count: 2
15
- # Configuration parameters: AllowComments.
16
- Lint/SuppressedException:
17
- Exclude:
18
- - 'examples/collections_and_documents.rb'
19
- - 'examples/search.rb'
20
- - 'examples/keys.rb'
21
-
22
- # Offense count: 3
23
- # Configuration parameters: IgnoredMethods.
24
- Metrics/AbcSize:
25
- Max: 43
26
-
27
- # Offense count: 1
28
- # Configuration parameters: CountComments.
29
- Metrics/ClassLength:
30
- Max: 184
31
-
32
- # Offense count: 3
33
- # Configuration parameters: IgnoredMethods.
34
- Metrics/CyclomaticComplexity:
35
- Max: 11
36
-
37
- # Offense count: 5
38
- # Configuration parameters: CountComments, ExcludedMethods.
39
- Metrics/MethodLength:
40
- Max: 29
41
-
42
- # Offense count: 3
43
- # Configuration parameters: IgnoredMethods.
44
- Metrics/PerceivedComplexity:
45
- Max: 11
46
-
47
- # Offense count: 10
48
- RSpec/MultipleExpectations:
49
- Max: 5
50
-
51
- # Offense count: 13
52
- Style/Documentation:
53
- Exclude:
54
- - 'spec/**/*'
55
- - 'test/**/*'
56
- - 'lib/typesense.rb'
57
- - 'lib/typesense/alias.rb'
58
- - 'lib/typesense/aliases.rb'
59
- - 'lib/typesense/api_call.rb'
60
- - 'lib/typesense/client.rb'
61
- - 'lib/typesense/collection.rb'
62
- - 'lib/typesense/collections.rb'
63
- - 'lib/typesense/configuration.rb'
64
- - 'lib/typesense/debug.rb'
65
- - 'lib/typesense/document.rb'
66
- - 'lib/typesense/documents.rb'
67
- - 'lib/typesense/override.rb'
68
- - 'lib/typesense/overrides.rb'
69
-
70
- # Offense count: 157
71
- # Cop supports --auto-correct.
72
- # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
73
- # URISchemes: http, https
74
- Layout/LineLength:
75
- Max: 312