committee 5.5.3 → 5.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d63a9269323d485600c6f853e59ea9ac678faa6090838560cea1e54cec88f40
4
- data.tar.gz: d8168ded9e92aabbf7144e6f98c8b52a90f1b5b956c3c4d9ae1bbba61504fbf2
3
+ metadata.gz: 55b46e3f19c168b4554b537c7f5e29ef861a19437e602b184d97f47e55a90440
4
+ data.tar.gz: 96f8b60ed69dedb9352482bb2d9a8e95358b23e2d97a077f3040ddab43d7d9f9
5
5
  SHA512:
6
- metadata.gz: 3b951a8e7d81870e3d5947145dfdafb777e980367d41f83f4bc66c4ed902face9b29e6e92f7bb2db55e5a3ed56ff0c95544b35305373061501dcba76cb71ee5e
7
- data.tar.gz: ac977e7c4f909abd4707aa0b540cf5efcd885b03212bec6eca6cf69f4199e2bed0ed2711768d7852f93921192d12ea957e7f4f07868cc3259b96374097c89a12
6
+ metadata.gz: beca39b681b278c29d0953d217cf2967979a9124516f4a70e177aea50c40537eb5cd57f621989feb2f73b6c86b8493609eb95ba5ae79019b6724cb43b33e4f76
7
+ data.tar.gz: b6c4456c9c36db3b6b537acbcdaf19170fe6173332379d8f594b150b3a3d533879711a7af7056cdd17182f416ff31fa1217d66a6a449ba9de08dd09e93d08759
@@ -110,7 +110,8 @@ module Committee
110
110
  end
111
111
 
112
112
  def validate_post_request_params(path_params, query_params, body_params, headers, validator_option)
113
- content_type = headers['Content-Type'].to_s.split(";").first.to_s
113
+ content_type_key = headers.keys.detect { |k| k.casecmp?('Content-Type') }
114
+ content_type = headers[content_type_key].to_s.split(';').first.to_s
114
115
 
115
116
  # bad performance because when we coerce value, same check
116
117
  validate_path_and_query_params(path_params, query_params, headers, validator_option)
@@ -28,16 +28,16 @@ module Committee
28
28
 
29
29
  parse_to_json = if validator_option.parse_response_by_content_type
30
30
  content_type_key = headers.keys.detect { |k| k.casecmp?('Content-Type') }
31
- headers.fetch(content_type_key, nil)&.start_with?('application/json')
32
- else
33
- true
34
- end
31
+ headers.fetch(content_type_key, nil)&.start_with?('application/json')
32
+ else
33
+ true
34
+ end
35
35
 
36
36
  data = if parse_to_json
37
37
  full_body.empty? ? {} : JSON.parse(full_body)
38
- else
39
- full_body
40
- end
38
+ else
39
+ full_body
40
+ end
41
41
 
42
42
  # TODO: refactoring name
43
43
  strict = test_method
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Committee
4
- VERSION = '5.5.3'.freeze
4
+ VERSION = '5.5.4'.freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: committee
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.5.3
4
+ version: 5.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandur
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2025-04-07 00:00:00.000000000 Z
13
+ date: 2025-05-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json_schema