foreman_rh_cloud 10.0.2 → 10.0.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: 2cacfda4be0f9786225bb206cd63b4a1904867fb49383bb9b9f0e911cc948990
4
- data.tar.gz: 3e973105f40419257f6a4555420286ef47955f74962e7798d6f329d7b5b47a01
3
+ metadata.gz: e8215c5bc0f5e21d7c4ee1b09ee2a38a44bc17d36c95606d77e8ee2cffc10d2e
4
+ data.tar.gz: f42e8b38e3f996cf29973a776ec03083aaa8db1fb58639690f7a50048c531260
5
5
  SHA512:
6
- metadata.gz: 7f30326a06444b4f746b129839a3e228d90cfe0237a26cb251d013e09a64ad9c20d530e7611d102082d1f2c252e19d748b058fab75f44649880395ccaa2fb1ec
7
- data.tar.gz: 3b331d263956ff30f8da848ce249ea13a4b16f09a17dce7b70f01d37f92f516aaf2d9ecd4a0db65c5ffb053b02d6d1efa4d6197ad9abc7426a509627dcd70cf1
6
+ metadata.gz: bd2acf961ce05b7043013b695dccaab5d764d526b23aef83adc85373a0699fdc9a161bbd65c621d5fffc9139f254e88b6e6e53e2da9e5da6ade0330523c85f0b
7
+ data.tar.gz: 380d55213867c915d707f52470f6ec3aca269c3f2aa7bfc1aa2ba2db7659806c3c17824675fe5c9b2ef62df9704f0fb09f0cc2738bab17ea5339edd7c832dbad
@@ -51,7 +51,9 @@ module ForemanRhCloud
51
51
 
52
52
  def prepare_forward_params(original_request, branch_id)
53
53
  forward_params = original_request.query_parameters
54
- if original_request.user_agent && !original_request.user_agent.include?('redhat_access_cfme')
54
+ compliance_request = original_request.path.match?(/compliance\/v2(\/.*)?/)
55
+ user_agent = original_request.user_agent.present? && !original_request.user_agent.include?('redhat_access_cfme')
56
+ if user_agent && !compliance_request
55
57
  forward_params = forward_params.merge(:branch_id => branch_id)
56
58
  end
57
59
 
@@ -1,3 +1,3 @@
1
1
  module ForemanRhCloud
2
- VERSION = '10.0.2'.freeze
2
+ VERSION = '10.0.4'.freeze
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foreman_rh_cloud",
3
- "version": "10.0.2",
3
+ "version": "10.0.4",
4
4
  "description": "Inventory Upload =============",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -112,6 +112,30 @@ class CloudRequestForwarderTest < ActiveSupport::TestCase
112
112
  assert_equal params.merge(:branch_id => 74), @forwarder.prepare_forward_params(req, 74)
113
113
  end
114
114
 
115
+ test 'should NOT add branch id into forwarded params for compliance urls' do
116
+ user_agent = { :foo => :bar }
117
+ params = { :page => 5, :per_page => 42 }
118
+
119
+ uris = [
120
+ "/redhat_access/r/insights/platform/compliance/v2/systems/MyUUID/policies",
121
+ "/redhat_access/r/insights/platform/compliance/v2/policies/MyUUID",
122
+ "/redhat_access/r/insights/platform/compliance/v2/systems/MyUUID",
123
+ "/redhat_access/r/insights/platform/compliance/v2/policies",
124
+ "/redhat_access/r/insights/platform/compliance/v2/",
125
+ ]
126
+ uris.each do |uri|
127
+ req = ActionDispatch::Request.new(
128
+ 'REQUEST_URI' => uri,
129
+ 'REQUEST_METHOD' => 'GET',
130
+ 'HTTP_USER_AGENT' => user_agent,
131
+ 'rack.input' => ::Puma::NullIO.new,
132
+ 'action_dispatch.request.query_parameters' => params
133
+ )
134
+ req.stubs(:path).returns(uri)
135
+ refute @forwarder.prepare_forward_params(req, 74).key?(:branch_id), "Branch id should not be added for #{uri}"
136
+ end
137
+ end
138
+
115
139
  test 'should reuse BranchInfo identifiers for user_agent' do
116
140
  user_agent = { :foo => :bar }
117
141
  params = { :page => 5, :per_page => 42 }
@@ -42,7 +42,7 @@ export const PageDescription = () => (
42
42
  {__('For more information about the Subscriptions service, see:')}
43
43
  &nbsp;
44
44
  <a
45
- href="https://access.redhat.com/documentation/en-us/subscription_central/2020-04/html/getting_started_with_subscription_watch/assembly-about-subscriptionwatch"
45
+ href="https://docs.redhat.com/en/documentation/subscription_central/1-latest/html/getting_started_with_the_subscriptions_service/index"
46
46
  target="_blank"
47
47
  rel="noopener noreferrer"
48
48
  >
@@ -40,7 +40,7 @@ exports[`PageDescription rendering render without Props 1`] = `
40
40
  For more information about the Subscriptions service, see:
41
41
   
42
42
  <a
43
- href="https://access.redhat.com/documentation/en-us/subscription_central/2020-04/html/getting_started_with_subscription_watch/assembly-about-subscriptionwatch"
43
+ href="https://docs.redhat.com/en/documentation/subscription_central/1-latest/html/getting_started_with_the_subscriptions_service/index"
44
44
  rel="noopener noreferrer"
45
45
  target="_blank"
46
46
  >
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_rh_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.2
4
+ version: 10.0.4
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-09 00:00:00.000000000 Z
11
+ date: 2025-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foreman_ansible
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "<"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '15'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "<"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '15'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: foreman-tasks
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '10'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "<"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '10'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: katello
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -45,6 +45,9 @@ dependencies:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 4.14.0.rc1.1
48
+ - - "<"
49
+ - !ruby/object:Gem::Version
50
+ version: '4.15'
48
51
  type: :runtime
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
@@ -52,6 +55,9 @@ dependencies:
52
55
  - - ">="
53
56
  - !ruby/object:Gem::Version
54
57
  version: 4.14.0.rc1.1
58
+ - - "<"
59
+ - !ruby/object:Gem::Version
60
+ version: '4.15'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: rdoc
57
63
  requirement: !ruby/object:Gem::Requirement