Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37848 - Support Rails 7.0 #739

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ruby_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ jobs:
uses: theforeman/actions/.github/workflows/foreman_plugin.yml@v0
with:
plugin: foreman_ansible
foreman_version: refs/pull/10299/head
44 changes: 21 additions & 23 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,28 @@
:defaults => { apiv: 'v2' },
:apiv => /v2/,
:constraints => ApiConstraints.new(version: 2, default: true) do
constraints(:id => %r{[^\/]+}) do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this never needed? I can't find anything in the Rails upgrade guide relating to this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes the same issue as in theforeman/foreman_openscap#582 (comment)

resources :hosts, :only => [] do
member do
post :play_roles
get :ansible_roles
post :assign_ansible_roles
put 'ansible_roles/:ansible_role_id', :to => 'hosts#add_ansible_role', :constraints => { id: %r{[^\/]+} }
delete 'ansible_roles/:ansible_role_id', :to => 'hosts#remove_ansible_role', :constraints => { id: %r{[^\/]+} }
end
collection do
post :multiple_play_roles
end
resources :hosts, :only => [] do
member do
post :play_roles
get :ansible_roles
post :assign_ansible_roles
put 'ansible_roles/:ansible_role_id', :to => 'hosts#add_ansible_role'
delete 'ansible_roles/:ansible_role_id', :to => 'hosts#remove_ansible_role'
end
resources :hostgroups, :only => [] do
member do
post :play_roles
get :ansible_roles
post :assign_ansible_roles
put 'ansible_roles/:ansible_role_id', :to => 'hostgroups#add_ansible_role', :constraints => { id: %r{[^\/]+} }
delete 'ansible_roles/:ansible_role_id', :to => 'hostgroups#remove_ansible_role', :constraints => { id: %r{[^\/]+} }
end
collection do
post :multiple_play_roles
end
collection do
post :multiple_play_roles
end
end
resources :hostgroups, :only => [] do
member do
post :play_roles
get :ansible_roles
post :assign_ansible_roles
put 'ansible_roles/:ansible_role_id', :to => 'hostgroups#add_ansible_role'
delete 'ansible_roles/:ansible_role_id', :to => 'hostgroups#remove_ansible_role'
end
collection do
post :multiple_play_roles
end
end
end
Expand Down
1 change: 0 additions & 1 deletion test/test_plugin_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require 'facets'

def ansible_fixture_file(filename)
File.join(
Expand Down
Loading