kapellmeister 0.10.0 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kapellmeister/dispatcher.rb +6 -2
- data/lib/kapellmeister/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 234461ea748d27b191a303a1ace422787c7f451ddd59b3f4fe0a2f9954702427
|
4
|
+
data.tar.gz: d58c3d4c4e675b82289bc244d4f69f4186da63d5dd8e265f002fe71c3962aba3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e422f21a8214b00c362eb299e703ebc04abcc3947ce9069d06d26a0fb254262cd87f92d8c57e87904649fe7e8a08277c19b00c648d8deceaec4e6ade6dfb06c
|
7
|
+
data.tar.gz: 9276f441138746193d2a60799055c4483661563d34066cc65657ec0d710e5a3172db602ec8313357cf669ca6663537ada9b39927b89e38da7c3bc3b575d602a7
|
@@ -42,7 +42,7 @@ class Kapellmeister::Dispatcher
|
|
42
42
|
additional_headers = data.delete(:headers) || {}
|
43
43
|
requests_data = data.delete(:request) || {}
|
44
44
|
data_json = data.blank? ? '' : data.to_json
|
45
|
-
additional_headers['Content-Length'] = requests_data.merge(data).
|
45
|
+
additional_headers['Content-Length'] = requests_data.merge(data).to_json.bytesize unless get?(method_name)
|
46
46
|
|
47
47
|
generated_connection = connection(additional_headers: additional_headers, requests_data: requests_data) # rubocop:disable Style/HashSyntax (for support ruby 2.4+)
|
48
48
|
|
@@ -98,7 +98,7 @@ class Kapellmeister::Dispatcher
|
|
98
98
|
url_part.ascii_only? ? url_part : CGI.escape(url_part)
|
99
99
|
end.join('/')
|
100
100
|
|
101
|
-
url = url_repacking(url, data) if method_name
|
101
|
+
url = url_repacking(url, data) if get?(method_name)
|
102
102
|
|
103
103
|
return url if query_params.blank?
|
104
104
|
|
@@ -112,6 +112,10 @@ class Kapellmeister::Dispatcher
|
|
112
112
|
uri.to_s
|
113
113
|
end
|
114
114
|
|
115
|
+
def get?(method_name)
|
116
|
+
method_name.downcase.to_sym.eql?(:get)
|
117
|
+
end
|
118
|
+
|
115
119
|
def failed_response(**args)
|
116
120
|
FailedResponse.new(false, { message: "#{self.class} no connection" }, { status: 555, **args })
|
117
121
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kapellmeister
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DarkWater
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-schema
|