Skip to content

Commit

Permalink
Merge pull request #15055 from opf/correcting-single-quotes
Browse files Browse the repository at this point in the history
Switch to double quotes all files not changed by current PRs
  • Loading branch information
toy authored Mar 20, 2024
2 parents 2082cb5 + 28f3ea1 commit 8d8afce
Show file tree
Hide file tree
Showing 4,496 changed files with 66,412 additions and 66,411 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 2 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
21a696ef9b170e14ad2daf53364a4c2113822c2f
# Update copyright information for 2023
c795874f7f281297bbd3bad2fdb58b24cb4ce624
# switch to double quotes in most changed files with a lot of quotes
# switch to double quotes
5c72ea0046a6b5230bf456f55a296ed6fd579535
9e4934cd0a468f46d8f0fc0f11ebc2d4216f789c
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('config/application', __dir__)
require File.expand_path("config/application", __dir__)

Rails.application.load_rake_tasks

Rake::Task[:default].clear
task default: 'test:suite:run'
task default: "test:suite:run"
2 changes: 1 addition & 1 deletion app/components/activities/days_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#++

class Activities::DaysComponent < ViewComponent::Base
def initialize(events:, current_project: nil, display_user: true, header_tag: 'h3', activity_page: nil)
def initialize(events:, current_project: nil, display_user: true, header_tag: "h3", activity_page: nil)
super()
@events = events
@current_project = current_project
Expand Down
10 changes: 5 additions & 5 deletions app/components/add_button_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class AddButtonComponent < ApplicationComponent
options :current_project

def render?
raise 'Implement the conditions for which the component should render or not'
raise "Implement the conditions for which the component should render or not"
end

def dynamic_path
Expand All @@ -45,7 +45,7 @@ def id
end

def li_css_class
'toolbar-item'
"toolbar-item"
end

def title
Expand All @@ -55,7 +55,7 @@ def title
def label
content_tag(:span,
label_text,
class: 'button--text')
class: "button--text")
end

def aria_label
Expand All @@ -71,10 +71,10 @@ def label_text
end

def link_css_class
'button -primary'
"button -primary"
end

def icon
helpers.op_icon('button--icon icon-add')
helpers.op_icon("button--icon icon-add")
end
end
8 changes: 4 additions & 4 deletions app/components/admin/quarantined_attachments/row_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def row_css_id
delegate :filename, to: :attachment

def attached_to
description = attachment.description.present? ? "(#{attachment.description})" : ''
description = attachment.description.present? ? "(#{attachment.description})" : ""
text = "#{container_name} #{attachment.container_id} #{description}"
case container
when Message
Expand Down Expand Up @@ -83,9 +83,9 @@ def button_links

def delete_link
helpers.link_to(
helpers.op_icon('icon icon-delete'),
{ controller: '/admin/attachments/quarantined_attachments', action: :destroy, id: model },
title: I18n.t('antivirus_scan.quarantined_attachments.delete'),
helpers.op_icon("icon icon-delete"),
{ controller: "/admin/attachments/quarantined_attachments", action: :destroy, id: model },
title: I18n.t("antivirus_scan.quarantined_attachments.delete"),
method: :delete,
data: { confirm: I18n.t(:text_are_you_sure), disable_with: I18n.t(:label_loading) }
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def sortable?

def headers
[
['filename', { caption: Attachment.human_attribute_name(:filename) }],
['attached_to', { caption: I18n.t('antivirus_scan.quarantined_attachments.container') }],
['author', { caption: Attachment.human_attribute_name(:author) }],
['created_at', { caption: Attachment.human_attribute_name(:created_at) }]
["filename", { caption: Attachment.human_attribute_name(:filename) }],
["attached_to", { caption: I18n.t("antivirus_scan.quarantined_attachments.container") }],
["author", { caption: Attachment.human_attribute_name(:author) }],
["created_at", { caption: Attachment.human_attribute_name(:created_at) }]
]
end
end
Expand Down
6 changes: 3 additions & 3 deletions app/components/custom_actions/row_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def name
delegate :description, to: :action

def sort
helpers.reorder_links('custom_action', { action: 'update', id: action }, method: :put)
helpers.reorder_links("custom_action", { action: "update", id: action }, method: :put)
end

def button_links
Expand All @@ -53,15 +53,15 @@ def button_links

def edit_link
link_to(
helpers.op_icon('icon icon-edit'),
helpers.op_icon("icon icon-edit"),
helpers.edit_custom_action_path(action),
title: t(:button_edit)
)
end

def delete_link
link_to(
helpers.op_icon('icon icon-delete'),
helpers.op_icon("icon icon-delete"),
helpers.custom_action_path(action),
method: :delete,
data: { confirm: I18n.t(:text_are_you_sure) },
Expand Down
14 changes: 7 additions & 7 deletions app/components/custom_actions/table_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ class TableComponent < ::TableComponent

def headers
[
['name', { caption: CustomAction.human_attribute_name(:name) }],
['description', { caption: CustomAction.human_attribute_name(:description) }],
['sort', { caption: I18n.t(:label_sort) }]
["name", { caption: CustomAction.human_attribute_name(:name) }],
["description", { caption: CustomAction.human_attribute_name(:description) }],
["sort", { caption: I18n.t(:label_sort) }]
]
end

def inline_create_link
link_to new_custom_action_path,
aria: { label: t('custom_actions.new') },
class: 'wp-inline-create--add-link',
title: t('custom_actions.new') do
helpers.op_icon('icon icon-add')
aria: { label: t("custom_actions.new") },
class: "wp-inline-create--add-link",
title: t("custom_actions.new") do
helpers.op_icon("icon icon-add")
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions app/components/enumerations/row_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def active
end

def sort
helpers.reorder_links('enumeration', { action: 'move', id: enumeration }, method: :post)
helpers.reorder_links("enumeration", { action: "move", id: enumeration }, method: :post)
end

def button_links
Expand All @@ -62,7 +62,7 @@ def button_links

def delete_link
helpers.link_to(
helpers.op_icon('icon icon-delete'),
helpers.op_icon("icon icon-delete"),
helpers.enumeration_path(enumeration),
method: :delete,
data: { confirm: I18n.t(:text_are_you_sure) },
Expand Down
16 changes: 8 additions & 8 deletions app/components/enumerations/table_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ def sortable?

def headers
[
['name', { caption: Enumeration.human_attribute_name(:name) }],
['is_default', { caption: Enumeration.human_attribute_name(:is_default) }],
['active', { caption: Enumeration.human_attribute_name(:active) }],
['sort', { caption: I18n.t(:label_sort) }]
["name", { caption: Enumeration.human_attribute_name(:name) }],
["is_default", { caption: Enumeration.human_attribute_name(:is_default) }],
["active", { caption: Enumeration.human_attribute_name(:active) }],
["sort", { caption: I18n.t(:label_sort) }]
].tap do |default|
if with_colors
default.insert 3, ['color', { caption: Enumeration.human_attribute_name(:color) }]
default.insert 3, ["color", { caption: Enumeration.human_attribute_name(:color) }]
end
end
end
Expand All @@ -62,10 +62,10 @@ def with_colors
def inline_create_link
link_to new_enumeration_path(type: rows.name),
aria: { label: t(:label_enumeration_new) },
class: 'wp-inline-create--add-link',
data: { 'test-selector': "create-enumeration-#{rows.name.underscore.dasherize}" },
class: "wp-inline-create--add-link",
data: { "test-selector": "create-enumeration-#{rows.name.underscore.dasherize}" },
title: t(:label_enumeration_new) do
helpers.op_icon('icon icon-add')
helpers.op_icon("icon icon-add")
end
end
end
Expand Down
8 changes: 4 additions & 4 deletions app/components/individual_principal_base_filter_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,25 @@ def filtered?(params)

def filter_name(query, name)
if name.present?
query.where(:any_name_attribute, '~', name)
query.where(:any_name_attribute, "~", name)
end
end

def filter_group(query, group_id)
if group_id.present?
query.where(:group, '=', group_id)
query.where(:group, "=", group_id)
end
end

def filter_role(query, role_id)
if role_id.present?
query.where(:role_id, '=', role_id)
query.where(:role_id, "=", role_id)
end
end

def filter_project(query, project_id)
if project_id.present?
query.where(:project_id, '=', project_id)
query.where(:project_id, "=", project_id)
end
end

Expand Down
8 changes: 4 additions & 4 deletions app/components/ldap_auth_sources/row_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class RowComponent < ::RowComponent
def name
content = link_to model.name, edit_ldap_auth_source_path(model)
if model.seeded_from_env?
content += helpers.op_icon('icon icon-info2', title: I18n.t(:label_seeded_from_env_warning))
content += helpers.op_icon("icon icon-info2", title: I18n.t(:label_seeded_from_env_warning))
end

content
Expand All @@ -54,17 +54,17 @@ def button_links
end

def test_link
link_to t(:button_test), { controller: 'ldap_auth_sources', action: 'test_connection', id: model }
link_to t(:button_test), { controller: "ldap_auth_sources", action: "test_connection", id: model }
end

def delete_link
return if users > 0

link_to I18n.t(:button_delete),
{ controller: 'ldap_auth_sources', id: model.id, action: :destroy },
{ controller: "ldap_auth_sources", id: model.id, action: :destroy },
method: :delete,
data: { confirm: I18n.t(:text_are_you_sure) },
class: 'icon icon-delete',
class: "icon icon-delete",
title: I18n.t(:button_delete)
end
end
Expand Down
10 changes: 5 additions & 5 deletions app/components/ldap_auth_sources/table_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ def sortable_column?(_column)

def inline_create_link
link_to(new_ldap_auth_source_path,
class: 'budget-add-row wp-inline-create--add-link',
class: "budget-add-row wp-inline-create--add-link",
title: I18n.t(:label_ldap_auth_source_new)) do
helpers.op_icon('icon icon-add')
helpers.op_icon("icon icon-add")
end
end

def headers
[
['name', { caption: LdapAuthSource.human_attribute_name('name') }],
['host', { caption: LdapAuthSource.human_attribute_name('host') }],
['users', { caption: I18n.t(:label_user_plural) }]
["name", { caption: LdapAuthSource.human_attribute_name("name") }],
["host", { caption: LdapAuthSource.human_attribute_name("host") }],
["users", { caption: I18n.t(:label_user_plural) }]
]
end
end
Expand Down
12 changes: 6 additions & 6 deletions app/components/members/index_page_header_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ def initialize(project: nil)

def add_button_data_attributes
attributes = {
'members-form-target': 'addMemberButton',
action: 'members-form#showAddMemberForm',
'test-selector': 'member-add-button'
"members-form-target": "addMemberButton",
action: "members-form#showAddMemberForm",
"test-selector": "member-add-button"
}

attributes['trigger-initially'] = "true" if params[:show_add_members]
attributes["trigger-initially"] = "true" if params[:show_add_members]

attributes
end

def filter_button_data_attributes
{
'members-form-target': 'filterMemberButton',
action: 'members-form#toggleMemberFilter'
"members-form-target": "filterMemberButton",
action: "members-form#toggleMemberFilter"
}
end
end
2 changes: 1 addition & 1 deletion app/components/members/role_form_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def form_html_options
id: "#{row.roles_css_id}-form",
class: row.toggle_item_class_name,
style: "display:none",
data: { 'members-form-target': 'membershipEditForm' }
data: { "members-form-target": "membershipEditForm" }
}
end

Expand Down
26 changes: 13 additions & 13 deletions app/components/members/user_filter_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

module Members
class UserFilterComponent < ::UserFilterComponent
ALL_SHARED_FILTER_KEY = 'all'
ALL_SHARED_FILTER_KEY = "all"

def initially_visible?
false
Expand All @@ -52,12 +52,12 @@ def shares
# Adapts the user filter counts to count members as opposed to users.
def extra_user_status_options
{
all: status_members_query('all').count,
blocked: status_members_query('blocked').count,
active: status_members_query('active').count,
invited: status_members_query('invited').count,
registered: status_members_query('registered').count,
locked: status_members_query('locked').count
all: status_members_query("all").count,
blocked: status_members_query("blocked").count,
active: status_members_query("active").count,
invited: status_members_query("invited").count,
registered: status_members_query("registered").count,
locked: status_members_query("locked").count
}
end

Expand Down Expand Up @@ -89,7 +89,7 @@ def share_options
.order(builtin: :asc)
.map { |role| [mapped_shared_role_name(role), role.id] }

share_options.unshift([I18n.t('members.filters.all_shares'), ALL_SHARED_FILTER_KEY])
share_options.unshift([I18n.t("members.filters.all_shares"), ALL_SHARED_FILTER_KEY])
end

def builtin_share_roles
Expand All @@ -103,11 +103,11 @@ def builtin_share_roles
def mapped_shared_role_name(role)
case role.builtin
when Role::BUILTIN_WORK_PACKAGE_VIEWER
I18n.t('work_package.sharing.permissions.view')
I18n.t("work_package.sharing.permissions.view")
when Role::BUILTIN_WORK_PACKAGE_COMMENTER
I18n.t('work_package.sharing.permissions.comment')
I18n.t("work_package.sharing.permissions.comment")
when Role::BUILTIN_WORK_PACKAGE_EDITOR
I18n.t('work_package.sharing.permissions.edit')
I18n.t("work_package.sharing.permissions.edit")
else
role.name
end
Expand All @@ -121,9 +121,9 @@ def filter_shares(query, role_id)
.where(builtin: builtin_share_roles)
.pluck(:id)

query.where(:role_id, '=', ids.uniq)
query.where(:role_id, "=", ids.uniq)
elsif role_id.to_i > 0
query.where(:role_id, '=', role_id.to_i)
query.where(:role_id, "=", role_id.to_i)
end
end

Expand Down
Loading

0 comments on commit 8d8afce

Please sign in to comment.