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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb7b158329d4dfbb447e55ad06cc9ec60c133fbb20f3fa8de4974e5f807c32af
4
- data.tar.gz: 8e0a71af6badbb6f41327893c18a8eee1fcff3e0638b2823be50233bd30ef756
3
+ metadata.gz: 500fb7ca6f037a311771dca81143327413fef4c42398361abb055feedea7df0d
4
+ data.tar.gz: 04a6715c37cfda625638dad0af924801141aad1b6f72e52d81276bd76c582757
5
5
  SHA512:
6
- metadata.gz: 4d79f2670f5e910f6288b5e891e7cba1901cb975307f58f01410a8a611d8e73215c073db52add6d566fe8142bdc88190ad16b816cde61bfd2f7ae7f5c92e2978
7
- data.tar.gz: 11b6fdd130aac37875a597db56df1064ecb94ed61393325c807f1ac4a7868c68939fdfed2fd28caefd3f1c04bbbee4714dc2d6cd917b0986ea2e76f8b8836d86
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 == '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.1'.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.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-09-11 00:00:00.000000000 Z
11
+ date: 2024-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-schema