kapellmeister 0.10.0 → 0.10.1
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: 500fb7ca6f037a311771dca81143327413fef4c42398361abb055feedea7df0d
|
4
|
+
data.tar.gz: 04a6715c37cfda625638dad0af924801141aad1b6f72e52d81276bd76c582757
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d11daa3bbcba9ccac050f84c4a6de6e723b61c29d1e1b6de262cd291aca28cca2a4c8d03474961eb5bc5a4d68423d35522f7f87ed675e7264359cdd4162c38b
|
7
|
+
data.tar.gz: e0bbefe760e600fbc2d52ed49460416874053dc8cd59e2a01f82bf31d988b66330291263a75754c922c688295f2faf2da6082bbd7f7274376b36e47184beb278
|
@@ -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).to_s.bytesize
|
45
|
+
additional_headers['Content-Length'] = requests_data.merge(data).to_s.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.1
|
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-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-schema
|