foreman_rh_cloud 9.0.58 → 9.0.59

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: 48906395af94f2d71160604c547ba3855d46440ff1f29b60f11b0b1fbe6d9d12
4
- data.tar.gz: fcc42c3924b9bdcf1135ce967298e08b9089610ae9240bcb3fe45421fc658b06
3
+ metadata.gz: 3378f8e87a7fe9991599e5ac7655eced8eadc24d07938cf73c1ab704f88b20da
4
+ data.tar.gz: 387787b59201714c979fa47a346cc1d33516f085810471ebc6a71e6bff6150af
5
5
  SHA512:
6
- metadata.gz: 189c8a3d0f7db4274c10bd0baa57542fbfd82c0d0ddedf9bb7da5429b5045e1bad9dc6434248737db0deb2be792af34f8f8067ef8397ba85a3c3cc9f0ae29f5e
7
- data.tar.gz: 16039e69ed139efee3304bb64086391f1ee8e44bf42732793c8700fc3941d62c1f011cf87f514a931336ad4b20560b150364debcbe1547cbc3cfe75a735b5e05
6
+ metadata.gz: 2f5cb5bf312d31ca4603fad8072e888ddbca038d7d3de30e6c45d14a5eef7f621b50c36dc8e53582927189cc34e829afe61b652b9fd9c197099cca919954b1cb
7
+ data.tar.gz: d0be24da3705256480cbce11035783707ef402a9dadfcdf3fd1696f347b8255dc71b505dec2511afb40b8c0a517849a56538b15434425d5ec111f4c58feaa85a
@@ -38,7 +38,7 @@ module ForemanRhCloud
38
38
  def prepare_forward_payload(original_request, controller_name)
39
39
  forward_payload = original_request.request_parameters[controller_name]
40
40
 
41
- forward_payload = original_request.raw_post.clone if original_request.post? && original_request.raw_post
41
+ forward_payload = original_request.raw_post.clone if (original_request.post? || original_request.patch?) && original_request.raw_post
42
42
  forward_payload = original_request.body.read if original_request.put?
43
43
 
44
44
  forward_payload = original_request.params.slice(:file, :metadata) if original_request.params[:file]
@@ -1,3 +1,3 @@
1
1
  module ForemanRhCloud
2
- VERSION = '9.0.58'.freeze
2
+ VERSION = '9.0.59'.freeze
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foreman_rh_cloud",
3
- "version": "9.0.58",
3
+ "version": "9.0.59",
4
4
  "description": "Inventory Upload =============",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -65,16 +65,15 @@ class CloudRequestForwarderTest < ActiveSupport::TestCase
65
65
  end
66
66
 
67
67
  test 'should forward patch payload' do
68
- params = { 'pumpkin' => 'pie' }
68
+ post_data = 'Random PATCH data'
69
69
  req = ActionDispatch::Request.new(
70
70
  'REQUEST_URI' => '/foo/bar?baz=awesome',
71
71
  'REQUEST_METHOD' => 'PATCH',
72
72
  'rack.input' => ::Puma::NullIO.new,
73
- 'RAW_POST_DATA' => 'Random PATCH data',
74
- "action_dispatch.request.path_parameters" => { :format => "json" },
75
- "action_dispatch.request.request_parameters" => { 'vegetables' => params }
73
+ 'RAW_POST_DATA' => post_data,
74
+ "action_dispatch.request.path_parameters" => { :format => "json" }
76
75
  )
77
- assert_equal params.to_json, @forwarder.prepare_forward_payload(req, 'vegetables')
76
+ assert_equal post_data, @forwarder.prepare_forward_payload(req, 'Random PATCH data')
78
77
  end
79
78
 
80
79
  test 'should forward file with metadata' do
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: 9.0.58
4
+ version: 9.0.59
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: 2024-09-12 00:00:00.000000000 Z
11
+ date: 2024-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foreman_ansible