Skip to content

Commit

Permalink
Fixes #37848 - Support Rails 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ofedoren committed Sep 20, 2024
1 parent fe91b4b commit 9e30d50
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 24 deletions.
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
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

0 comments on commit 9e30d50

Please sign in to comment.