Skip to content

Commit

Permalink
Merge pull request #10062 from saraycp/rubocop_autocorrect_IV_views
Browse files Browse the repository at this point in the history
Correct Rubocop Style/ConditionalAssignment in views III
  • Loading branch information
saraycp committed Aug 26, 2020
2 parents 3d04b54 + 666ef30 commit df13218
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
4 changes: 0 additions & 4 deletions src/api/.rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1244,10 +1244,6 @@ Style/CommentedKeyword:
Style/ConditionalAssignment:
Exclude:
- 'app/models/bs_request_action_submit.rb'
- 'app/views/message/_messages.xml.builder'
- 'app/views/models/_project.xml.builder'
- 'app/views/models/_remote_project.xml.builder'
- 'app/views/models/staging/_staging_project.xml.builder'
- 'config/initializers/02_apiversion.rb'
- 'config/initializers/airbrake.rb'
- 'lib/rabbitmq_bus.rb'
Expand Down
4 changes: 2 additions & 2 deletions src/api/app/views/message/_messages.xml.builder
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ xml.messages(root_attrs) do
attrs[:severity] = msg.severity || 0
attrs[:sent_at] = msg.sent_at.xmlschema if msg.sent_at
attrs[:user] = msg.user.login if msg.user
msg.send_mail ? attrs[:send_mail] = true : attrs[:send_mail] = false
msg.private ? attrs[:private] = true : attrs[:private] = false
attrs[:send_mail] = msg.send_mail
attrs[:private] = msg.private

xml.message(
msg.text,
Expand Down
10 changes: 5 additions & 5 deletions src/api/app/views/models/_project.xml.builder
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ xml.project(project_attributes) do
end
xml_repository.hostsystem(project: repo.hostsystem.project.name, repository: repo.hostsystem.name) if repo.hostsystem
repo.path_elements.includes(:link).each do |pe|
if pe.link.remote_project_name.present?
project_name = pe.link.project.name + ':' + pe.link.remote_project_name
else
project_name = pe.link.project.name
end
project_name = if pe.link.remote_project_name.present?
pe.link.project.name + ':' + pe.link.remote_project_name
else
pe.link.project.name
end
xml_repository.path(project: project_name, repository: pe.link.name)
end
repo.repository_architectures.joins(:architecture).pluck('architectures.name').each do |arch|
Expand Down

0 comments on commit df13218

Please sign in to comment.