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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb7b158329d4dfbb447e55ad06cc9ec60c133fbb20f3fa8de4974e5f807c32af
4
- data.tar.gz: 8e0a71af6badbb6f41327893c18a8eee1fcff3e0638b2823be50233bd30ef756
3
+ metadata.gz: 234461ea748d27b191a303a1ace422787c7f451ddd59b3f4fe0a2f9954702427
4
+ data.tar.gz: d58c3d4c4e675b82289bc244d4f69f4186da63d5dd8e265f002fe71c3962aba3
5
5
  SHA512:
6
- metadata.gz: 4d79f2670f5e910f6288b5e891e7cba1901cb975307f58f01410a8a611d8e73215c073db52add6d566fe8142bdc88190ad16b816cde61bfd2f7ae7f5c92e2978
7
- data.tar.gz: 11b6fdd130aac37875a597db56df1064ecb94ed61393325c807f1ac4a7868c68939fdfed2fd28caefd3f1c04bbbee4714dc2d6cd917b0986ea2e76f8b8836d86
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).to_s.bytesize
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 == 'GET'
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
@@ -1,3 +1,3 @@
1
1
  module Kapellmeister
2
- VERSION = '0.10.0'.freeze
2
+ VERSION = '0.10.2'.freeze
3
3
  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.0
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-09-11 00:00:00.000000000 Z
11
+ date: 2024-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-schema