foreman_rh_cloud 4.0.30 → 4.0.31
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e14db9e6999496bcfba315a4cd476131e102c9694b479f8208938f021633c132
|
|
4
|
+
data.tar.gz: 74742e367059aa5b6e68aaae1eaf16a0de2f9df9e981215a070768654517e51b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f89a0c377c341f85b3568e47a7939233c6ab0ad6b4455ea7774b8d4a1359da1b34b718b2e96d00ae30577e350aafd130e052cee73100094672e69764137d3022
|
|
7
|
+
data.tar.gz: 79969dfbae771637006974db3663d8d86804d4cb2b6056bbacbdaeb21b8d72ee15c34654ade1c0efa14aa6b955973f9ce33401b6ab8bafbcf764cc30882f6a76
|
|
@@ -28,7 +28,7 @@ module ForemanRhCloud
|
|
|
28
28
|
headers: {
|
|
29
29
|
params: forward_params,
|
|
30
30
|
user_agent: http_user_agent(original_request),
|
|
31
|
-
content_type: original_request.media_type,
|
|
31
|
+
content_type: original_request.media_type.presence || original_request.format.to_s,
|
|
32
32
|
},
|
|
33
33
|
}
|
|
34
34
|
base_params.merge(path_params(original_request.path, certs))
|
data/package.json
CHANGED
|
@@ -133,4 +133,23 @@ class CloudRequestForwarderTest < ActiveSupport::TestCase
|
|
|
133
133
|
assert_equal 'GET', actual[:method]
|
|
134
134
|
assert_equal params, actual[:headers][:params]
|
|
135
135
|
end
|
|
136
|
+
|
|
137
|
+
test 'should forward content type correctly' do
|
|
138
|
+
user_agent = { :foo => :bar }
|
|
139
|
+
params = { :page => 5, :per_page => 42 }
|
|
140
|
+
ForemanRhCloud::BranchInfo.any_instance.expects(:core_app_name).returns('test_app')
|
|
141
|
+
ForemanRhCloud::BranchInfo.any_instance.expects(:core_app_version).returns('test_ver')
|
|
142
|
+
|
|
143
|
+
req = ActionDispatch::Request.new(
|
|
144
|
+
'REQUEST_URI' => '/foo/bar',
|
|
145
|
+
'REQUEST_METHOD' => 'GET',
|
|
146
|
+
'HTTP_USER_AGENT' => user_agent,
|
|
147
|
+
'rack.input' => ::Puma::NullIO.new,
|
|
148
|
+
'action_dispatch.request.query_parameters' => params
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
actual = @forwarder.prepare_request_opts(req, 'TEST PAYLOAD', params, generate_certs_hash)
|
|
152
|
+
|
|
153
|
+
assert_match /text\/html/, actual[:headers][:content_type]
|
|
154
|
+
end
|
|
136
155
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foreman_rh_cloud
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.
|
|
4
|
+
version: 4.0.31
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Foreman Red Hat Cloud team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-01-
|
|
11
|
+
date: 2022-01-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: katello
|