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 +4 -4
- data/.rubocop.yml +15 -0
- data/.rubocop_todo.yml +0 -25
- data/lib/typesense/api_call.rb +2 -1
- data/lib/typesense/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcf637e89f09c24ce984420370602cc27326e71a4fc813b2b3c530ab6647c91d
|
4
|
+
data.tar.gz: 3439e7c8a0eaed0ffeeaf9a2b3c695927251f3b38741181023d581d0813fe9ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 002cacde4237f98f06bb1d291eb37b984c394d37dfa544c8e58c723b12ff92813599574acf1207df1d9b539622a28f72a4cd975edee3254f0def13d935684fd2
|
7
|
+
data.tar.gz: 0343b17045c714e25091537dc319ae00145d151f8fe30b216deae1170d3b7f24bf9a6003090ee0b9dff8e2adae406a2c723e07a97ee230d16b365ed574601204
|
data/.rubocop.yml
CHANGED
@@ -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
|
data/.rubocop_todo.yml
CHANGED
@@ -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
|
data/lib/typesense/api_call.rb
CHANGED
@@ -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
|
-
|
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,
|
data/lib/typesense/version.rb
CHANGED