Skip to content

Commit

Permalink
Fix Layout/ArgumentAlignment cop
Browse files Browse the repository at this point in the history
  • Loading branch information
archanaserver authored and stejskalleos committed Jul 1, 2024
1 parent c65734a commit 542d163
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
7 changes: 0 additions & 7 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ Layout/ArgumentAlignment:
- 'db/seeds.d/10_leapp_preupgrade.rb'
- 'lib/foreman_leapp/engine.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 134

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/api/v2/concerns/api_authorizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def hosts_permission
return if User.current.can?('view_hosts')

render_error 'access_denied', status: :forbidden,
locals: { details: N_('Missing one of the required permissions: view_hosts'),
missing_permissions: 'view_hosts' }
locals: { details: N_('Missing one of the required permissions: view_hosts'),
missing_permissions: 'view_hosts' }
end

def resource_scope(_options = {})
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace :api, defaults: { format: 'json' } do
scope '(:apiv)', module: :v2, defaults: { apiv: 'v2' }, apiv: /v2/,
constraints: ApiConstraints.new( version: 2, default: true) do
constraints: ApiConstraints.new( version: 2, default: true) do
resources :preupgrade_reports, only: %i[index show]
get 'job_invocations/:id/preupgrade_reports', to: 'preupgrade_reports#job_invocation'
end
Expand Down
4 changes: 2 additions & 2 deletions test/helpers/template_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class TemplateHelperTest < ActionView::TestCase

test 'without remediation commands' do
empty_entry = FactoryBot.create(:preupgrade_report_entry, host: host, preupgrade_report: report,
detail: { remediations: [{ type: 'hint',
context: 'meh.' }] })
detail: { remediations: [{ type: 'hint',
context: 'meh.' }] })
template = build_remediation_plan([empty_entry.id], host)
assert_equal template, ''
end
Expand Down
2 changes: 1 addition & 1 deletion test/unit/actions/preupgrade_job_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class PreupgradeJobTest < ActiveSupport::TestCase
let(:host) { FactoryBot.create(:host) }
let(:job_template) do
FactoryBot.create(:job_template, template: 'echo "1"', job_category: 'leapp',
provider_type: 'SSH', name: 'Leapp preupgrade')
provider_type: 'SSH', name: 'Leapp preupgrade')
end
let(:job_invocation) { FactoryBot.create(:job_invocation) }
let(:template_invocation) do
Expand Down
2 changes: 1 addition & 1 deletion test/unit/helpers/job_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class JobHelperTest < ActionView::TestCase

let(:job_template) do
FactoryBot.create(:job_template, template: 'echo "1"', job_category: 'leapp',
provider_type: 'SSH', name: 'Leapp preupgrade')
provider_type: 'SSH', name: 'Leapp preupgrade')
end
let(:job_invocation) { FactoryBot.create(:job_invocation) }

Expand Down

0 comments on commit 542d163

Please sign in to comment.