typesense 0.5.2 → 0.5.3

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: bcf637e89f09c24ce984420370602cc27326e71a4fc813b2b3c530ab6647c91d
4
+ data.tar.gz: 3439e7c8a0eaed0ffeeaf9a2b3c695927251f3b38741181023d581d0813fe9ba
5
5
  SHA512:
6
- metadata.gz: a2f0711831891fc1fadf04e7a791d46840843ef349d467acf9fd92cffd2a00aec9abb82c323ba5a3d0b18cda450902ef166107147df109222817a2db84ff08eb
7
- data.tar.gz: 6199850461ca7f254805f4c27880175843cef342bb3eae13cb9d57f0c90a4e672859b095b94d04daee2f5371a6ed2785a5a443a7acd3c4791a54aa0ab64d35db
6
+ metadata.gz: 002cacde4237f98f06bb1d291eb37b984c394d37dfa544c8e58c723b12ff92813599574acf1207df1d9b539622a28f72a4cd975edee3254f0def13d935684fd2
7
+ data.tar.gz: 0343b17045c714e25091537dc319ae00145d151f8fe30b216deae1170d3b7f24bf9a6003090ee0b9dff8e2adae406a2c723e07a97ee230d16b365ed574601204
@@ -17,3 +17,18 @@ Style/Documentation:
17
17
 
18
18
  RSpec/ExampleLength:
19
19
  Enabled: false
20
+
21
+ Metrics/MethodLength:
22
+ Enabled: false
23
+
24
+ Metrics/AbcSize:
25
+ Enabled: false
26
+
27
+ Metrics/ClassLength:
28
+ Enabled: false
29
+
30
+ Metrics/CyclomaticComplexity:
31
+ Enabled: false
32
+
33
+ Metrics/PerceivedComplexity:
34
+ Enabled: false
@@ -19,31 +19,6 @@ Lint/SuppressedException:
19
19
  - 'examples/search.rb'
20
20
  - 'examples/keys.rb'
21
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
22
  # Offense count: 10
48
23
  RSpec/MultipleExpectations:
49
24
  Max: 5
@@ -82,7 +82,8 @@ module Typesense
82
82
  # If response is 2xx return the object, else raise the response as an exception
83
83
  return response_object.parsed_response if response_object.response.code_type <= Net::HTTPSuccess # 2xx
84
84
 
85
- raise custom_exception_klass_for(response_object.response), response_object.parsed_response['message'] || 'Error message not available'
85
+ exception_message = (response_object.parsed_response && response_object.parsed_response['message']) || 'Error'
86
+ raise custom_exception_klass_for(response_object.response), exception_message
86
87
  rescue Net::ReadTimeout, Net::OpenTimeout,
87
88
  EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError,
88
89
  Errno::EINVAL, Errno::ENETDOWN, Errno::ENETUNREACH, Errno::ENETRESET, Errno::ECONNABORTED, Errno::ECONNRESET,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Typesense
4
- VERSION = '0.5.2'
4
+ VERSION = '0.5.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Typesense, Inc.