Skip to content

Commit

Permalink
Fix Style/TrailingCommaInArrayLiteral cop
Browse files Browse the repository at this point in the history
  • Loading branch information
archanaserver committed Jul 8, 2024
1 parent 9c25238 commit b705b94
Show file tree
Hide file tree
Showing 81 changed files with 150 additions and 150 deletions.
4 changes: 2 additions & 2 deletions app/controllers/katello/api/v2/host_collections_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Api::V2::HostCollectionsController < Api::V2::ApiController
:destroy,
:add_hosts,
:remove_hosts,
:hosts
:hosts,
]
before_action :find_readable_activation_key, :only => [:index]
before_action :find_editable_host, :only => [:index]
Expand Down Expand Up @@ -187,7 +187,7 @@ def host_collection_params
:description,
:max_hosts,
:unlimited_hosts,
{ :host_ids => [] }
{ :host_ids => [] },
]
params.fetch(:host_collection).permit(*attrs)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def download_policies
{
:name => _("Inherit from Repository"),
:label => SmartProxy::DOWNLOAD_INHERIT
}
},
]

policies.map { |p| OpenStruct.new(p) }
Expand Down
2 changes: 1 addition & 1 deletion app/lib/katello/messaging/stomp_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def initialize(settings:)
host: settings[:broker_host],
port: settings[:broker_port],
ssl: ssl_params
}
},
],
logger: Rails.logger,
max_reconnect_attempts: 2,
Expand Down
4 changes: 2 additions & 2 deletions app/lib/katello/util/deduplication_migrator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def models_to_clean
:model =>
::Katello::ContentViewRepository,
:fields => [:content_view_id, :repository_id]
}
},
]
end

Expand All @@ -34,7 +34,7 @@ def models_to_rename
{
:model => ::Katello::ContentView,
:fields => [:name, :organization_id]
}
},
]
end

Expand Down
4 changes: 2 additions & 2 deletions app/models/katello/concerns/smart_proxy_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def pulp_disk_usage
free: -1,
percentage: -1,
label: 'cloud-storage'
}.with_indifferent_access
}.with_indifferent_access,
]
else
[
Expand All @@ -288,7 +288,7 @@ def pulp_disk_usage
free: storage['free'],
percentage: (storage['used'] / storage['total'].to_f * 100).to_i,
label: 'pulp_dir'
}.with_indifferent_access
}.with_indifferent_access,
]
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/katello/content_view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ def filtered?

def blocking_task
blocking_task_labels = [
::Actions::Katello::ContentView::Publish.name
::Actions::Katello::ContentView::Publish.name,
]
ForemanTasks::Task::DynflowTask.where(:label => blocking_task_labels)
.where.not(state: 'stopped')
Expand Down
2 changes: 1 addition & 1 deletion app/models/katello/content_view_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ContentViewFilter < Katello::Model
def self.yum(include_module_streams = true)
types = [::Katello::ContentViewPackageGroupFilter.name,
::Katello::ContentViewErratumFilter.name,
::Katello::ContentViewPackageFilter.name
::Katello::ContentViewPackageFilter.name,
]
types << ::Katello::ContentViewModuleStreamFilter.name if include_module_streams
where(:type => types)
Expand Down
2 changes: 1 addition & 1 deletion app/models/katello/content_view_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ContentViewRepository < Katello::Model
Repository::FILE_TYPE,
Repository::DEB_TYPE,
Repository::ANSIBLE_COLLECTION_TYPE,
Katello::RepositoryTypeManager.generic_repository_types(false).keys.flatten
Katello::RepositoryTypeManager.generic_repository_types(false).keys.flatten,
].flatten.freeze

ALLOWED_IMPORT_REPOSITORY_TYPES = Repository::EXPORTABLE_TYPES
Expand Down
2 changes: 1 addition & 1 deletion app/models/katello/glue/pulp/repos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def sync_state_aggregated
:canceled,
:error,
:paused,
:running
:running,
]

presented.each do |_repoid, task|
Expand Down
2 changes: 1 addition & 1 deletion app/models/katello/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ def blocking_task
::Actions::Katello::Repository::Sync.name,
::Actions::Katello::Repository::UploadFiles.name,
::Actions::Katello::Repository::RemoveContent.name,
::Actions::Katello::Repository::MetadataGenerate.name
::Actions::Katello::Repository::MetadataGenerate.name,
]
ForemanTasks::Task::DynflowTask.where(:label => blocking_task_labels)
.where.not(state: 'stopped')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def create_repo_params(metadata_repo, product)
:major,
:minor,
:download_policy,
:mirroring_policy
:mirroring_policy,
]

params = { name: find_unique_name(metadata_repo, product) }
Expand Down Expand Up @@ -142,7 +142,7 @@ def update_repo_params(metadata_repo)
:major,
:minor,
:download_policy,
:mirroring_policy
:mirroring_policy,
]
params = {}
url = fetch_feed_url(metadata_repo)
Expand Down
2 changes: 1 addition & 1 deletion app/services/katello/registration_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def finalize_registration(host)
host.subscription_facet.save!
host.refresh_statuses([
::Katello::ErrataStatus,
::Katello::RhelLifecycleStatus
::Katello::RhelLifecycleStatus,
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def actions
:href => "/subscriptions?search=expires<\"#{Setting[:expire_soon_days]} days from now\"",
:title => _('Subscriptions'),
:external => true
}
},
]
}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def actions
:href => "/subscriptions",
:title => _('Subscriptions'),
:external => false
}
},
]
}
end
Expand Down
2 changes: 1 addition & 1 deletion app/services/katello/ui_notifications/task_notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def actions
{
:path_method => :foreman_tasks_task_path,
:title => _('Task detail')
}
},
]
).actions
end
Expand Down
2 changes: 1 addition & 1 deletion app/services/katello/upstream_connection_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class UpstreamConnectionChecker
Katello::Errors::ManifestExpired,
Katello::Errors::UpstreamConsumerGone,
Katello::Errors::UpstreamConsumerNotFound,
Katello::Errors::NoManifestImported
Katello::Errors::NoManifestImported,
].freeze

def initialize(organization)
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160808002834_add_files.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def change
add_index :katello_files, [
:id,
:uuid,
:name
:name,
],
:name => 'katello_files_fields_index'

Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20200818192230_update_system_purpose_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def change
"Katello::PurposeAddonsStatus",
"Katello::PurposeRoleStatus",
"Katello::PurposeSlaStatus",
"Katello::PurposeUsageStatus"
"Katello::PurposeUsageStatus",
]

# load both sets of host statuses and *then* update them to make sure we update the correct statuses
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def up
"Katello::PurposeAddonsStatus",
"Katello::PurposeRoleStatus",
"Katello::PurposeSlaStatus",
"Katello::PurposeUsageStatus"
"Katello::PurposeUsageStatus",
]

::HostStatus::Status.where(type: obsolete_statuses).delete_all
Expand Down
2 changes: 1 addition & 1 deletion db/seeds.d/106-mail_notifications.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
:mailer => 'Katello::TaskMailer',
:method => 'proxy_sync_failure',
:subscription_type => 'alert'
}
},
]

notifications.each do |notification|
Expand Down
2 changes: 1 addition & 1 deletion db/seeds.d/108-subcription-bookmarks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
bookmarks = [
{:name => "list hypervisors", :query => 'hypervisor = true', :controller => "hosts"},
{:name => "future", :query => 'starts > Today', :controller => "katello_subscriptions"},
{:name => "expiring soon", :query => 'expires 30 days from now', :controller => "katello_subscriptions"}
{:name => "expiring soon", :query => 'expires 30 days from now', :controller => "katello_subscriptions"},
]

bookmarks.each do |input|
Expand Down
6 changes: 3 additions & 3 deletions db/seeds.d/109-katello-notification-blueprints.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
links:
[
path_method: :smart_proxy_path,
title: N_('Details')
title: N_('Details'),
]
}
},
Expand Down Expand Up @@ -105,10 +105,10 @@
actions: {
links: [
path_method: :about_index_path,
title: N_('About page')
title: N_('About page'),
]
}
}
},
]

blueprints.each { |blueprint| UINotifications::Seed.new(blueprint).configure }
2 changes: 1 addition & 1 deletion db/seeds.d/110-content-view-autopublish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
]
}

}
},
].each { |blueprint| UINotifications::Seed.new(blueprint).configure }
2 changes: 1 addition & 1 deletion db/seeds.d/111-container-image-bookmarks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
User.as_anonymous_admin do
Bookmark.without_auditing do
bookmarks = [
{:name => "Without a Tag", :query => 'not has tag', :controller => "katello_docker_manifests"}
{:name => "Without a Tag", :query => 'not has tag', :controller => "katello_docker_manifests"},
]

bookmarks.each do |input|
Expand Down
2 changes: 1 addition & 1 deletion db/seeds.d/111-upgrade_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
{:name => 'katello:upgrades:4.4:publish_import_cvvs'},
{:name => 'katello:upgrades:4.8:fix_incorrect_providers'},
{:name => 'katello:upgrades:4.8:regenerate_imported_repository_metadata'},
{:name => 'katello:upgrades:4.12:update_content_access_modes'}
{:name => 'katello:upgrades:4.12:update_content_access_modes'},
]
end
2 changes: 1 addition & 1 deletion engines/bastion/lib/bastion/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Engine < ::Rails::Engine

SETTINGS[:bastion][:assets][:precompile] = [
'bastion/bastion.css',
'bastion/bastion.js'
'bastion/bastion.js',
]

locale_files = Dir.glob("#{Bastion::Engine.root}/vendor/assets/javascripts/#{Bastion.localization_path("*")}")
Expand Down
8 changes: 4 additions & 4 deletions lib/katello/permissions/host_permissions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
'katello/api/rhsm/candlepin_proxies/async_hypervisors_update',
'katello/api/rhsm/candlepin_proxies/hypervisors_heartbeat',
'katello/api/rhsm/candlepin_proxies/upload_tracer_profile',
'hosts/change_content_source_data'
'hosts/change_content_source_data',
]

Foreman::AccessControl.permission(:view_hosts).actions.concat [
Expand All @@ -65,18 +65,18 @@
'katello/remote_execution/new',
'katello/remote_execution/create',
'katello/api/v2/repository_sets/index',
'katello/api/v2/repository_sets/auto_complete_search'
'katello/api/v2/repository_sets/auto_complete_search',
]

Foreman::AccessControl.permission(:destroy_hosts).actions.concat [
'katello/api/v2/host_subscriptions/destroy',
'katello/api/v2/hosts_bulk_actions/destroy_hosts'
'katello/api/v2/hosts_bulk_actions/destroy_hosts',
]

Foreman::AccessControl.permission(:create_hosts).actions.concat [
'katello/api/v2/host_subscriptions/create',
'katello/api/rhsm/candlepin_proxies/consumer_create',
'katello/api/rhsm/candlepin_proxies/consumer_show',
'katello/api/rhsm/candlepin_proxies/hypervisors_update',
'katello/api/rhsm/candlepin_proxies/async_hypervisors_update'
'katello/api/rhsm/candlepin_proxies/async_hypervisors_update',
]
8 changes: 4 additions & 4 deletions lib/katello/permissions/organization_permissions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
'katello/api/v2/organizations/redhat_provider',
'katello/api/v2/organizations/download_debug_certificate',
'katello/api/v2/organizations/releases',
'katello/api/v2/tasks/index'
'katello/api/v2/tasks/index',
]

Foreman::AccessControl.permission(:create_organizations).actions.concat [
'katello/api/v2/organizations/create'
'katello/api/v2/organizations/create',
]

Foreman::AccessControl.permission(:edit_organizations).actions.concat [
'katello/api/v2/organizations/update',
'katello/api/v2/organizations/cdn_configuration'
'katello/api/v2/organizations/cdn_configuration',
]

Foreman::AccessControl.permission(:destroy_organizations).actions.concat [
'katello/api/v2/organizations/destroy'
'katello/api/v2/organizations/destroy',
]
2 changes: 1 addition & 1 deletion lib/katello/permissions/registry_permissions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
'katello/api/registry/registry_proxies/check_blob',
'katello/api/registry/registry_proxies/start_upload_blob',
'katello/api/registry/registry_proxies/upload_blob',
'katello/api/registry/registry_proxies/finish_upload_blob'
'katello/api/registry/registry_proxies/finish_upload_blob',
]
2 changes: 1 addition & 1 deletion lib/katello/permissions/roles_permissions.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'katello/plugin.rb'

Foreman::AccessControl.permission(:edit_roles).actions.concat [
'katello/auto_complete_search/auto_complete_search'
'katello/auto_complete_search/auto_complete_search',
]
2 changes: 1 addition & 1 deletion lib/katello/permissions/user_permissions.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'katello/plugin.rb'

Foreman::AccessControl.permission(:my_account).actions << [
'katello/api/v2/tasks/show'
'katello/api/v2/tasks/show',
]
6 changes: 3 additions & 3 deletions lib/katello/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
apipie_ignored_controllers %w(::Api::V2::OrganizationsController)
ApipieDSL.configuration.dsl_classes_matchers.concat [
"#{Katello::Engine.root}/app/models/katello/**/*.rb",
"#{Katello::Engine.root}/app/lib/actions/**/*.rb"
"#{Katello::Engine.root}/app/lib/actions/**/*.rb",
]

parameter_filter ::Host::Managed, :host_collection_ids => [],
Expand Down Expand Up @@ -693,7 +693,7 @@ def katello_template_setting_values(name)
tests_to_skip("AccessPermissionsTest" => [
'foreman_tasks/api/tasks/callback should have a permission that grants access',
'bastion/bastion/index should have a permission that grants access',
'bastion/bastion/index_ie should have a permission that grants access'
'bastion/bastion/index_ie should have a permission that grants access',
])

add_controller_action_scope('HostsController', :index) do |base_scope|
Expand Down Expand Up @@ -769,7 +769,7 @@ def find_katello_assets(args = {})
'bastion_katello/bastion_katello.css',
'bastion_katello/bastion_katello.js',
'katello/sync_management',
'katello/common'
'katello/common',
]

precompile.concat(javascripts)
Expand Down
2 changes: 1 addition & 1 deletion lib/katello/scheduled_jobs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
CreateHostLifecycleExpireSoonNotifications,
CreatePulpDiskSpaceNotifications,
SendExpireSoonNotifications,
CreateManifestExpireSoonWarningNotifications
CreateManifestExpireSoonWarningNotifications,
].each do |job_class|
job_class.spawn_if_missing(world)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/katello/tasks/reimport.rake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace :katello do
models = [
Katello::Subscription,
Katello::Pool,
Katello::Content
Katello::Content,
]

models.each do |model|
Expand Down
Loading

0 comments on commit b705b94

Please sign in to comment.