From 099bbf724475495aea3bf1d3072f93b80f5e7d07 Mon Sep 17 00:00:00 2001 From: Ivan Kuchin Date: Wed, 20 Mar 2024 14:25:04 +0100 Subject: [PATCH 1/3] change quotes in lib/generators/**/*.tt --- .../plugin/templates/%full_name%.gemspec.tt | 6 ++-- .../plugin/templates/README.md.tt | 4 +-- .../plugin/templates/bin/rails.tt | 14 ++++----- .../plugin/templates/lib/%full_name%.rb.tt | 2 +- .../open_project/%plugin_name%/engine.rb.tt | 8 ++--- .../service/templates/service_spec.rb.tt | 30 +++++++++---------- 6 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lib/generators/open_project/plugin/templates/%full_name%.gemspec.tt b/lib/generators/open_project/plugin/templates/%full_name%.gemspec.tt index e5011f880d8d..cc93e80f4fab 100644 --- a/lib/generators/open_project/plugin/templates/%full_name%.gemspec.tt +++ b/lib/generators/open_project/plugin/templates/%full_name%.gemspec.tt @@ -1,7 +1,7 @@ $:.push File.expand_path("../lib", __FILE__) $:.push File.expand_path("../../lib", __dir__) -require 'open_project/<%= plugin_name %>/version' +require "open_project/<%= plugin_name %>/version" # Describe your gem and declare its dependencies: Gem::Specification.new do |s| @@ -10,8 +10,8 @@ Gem::Specification.new do |s| s.authors = "OpenProject GmbH" s.email = "info@openproject.org" - s.homepage = "https://community.openproject.org/projects/<%= plugin_name.gsub('_','-') %>" # TODO check this URL - s.summary = 'OpenProject <%= plugin_name.gsub('_', ' ').titleize %>' + s.homepage = "https://community.openproject.org/projects/<%= plugin_name.gsub("_", "-") %>" # TODO check this URL + s.summary = "OpenProject <%= plugin_name.gsub("_", " ").titleize %>" s.description = "FIXME" s.license = "FIXME" # e.g. "MIT" or "GPLv3" diff --git a/lib/generators/open_project/plugin/templates/README.md.tt b/lib/generators/open_project/plugin/templates/README.md.tt index 00d2bfa98d6f..61151e4a6d2a 100644 --- a/lib/generators/open_project/plugin/templates/README.md.tt +++ b/lib/generators/open_project/plugin/templates/README.md.tt @@ -1,7 +1,7 @@ -# OpenProject <%= plugin_name.gsub('_',' ').titlecase %> Plugin +# OpenProject <%= plugin_name.gsub("_", " ").titlecase %> Plugin FIXME Add description and check issue tracker link below ## Issue Tracker -https://community.openproject.org/projects/<%= plugin_name.gsub('_','-') %>/work_packages +https://community.openproject.org/projects/<%= plugin_name.gsub("_", "-") %>/work_packages diff --git a/lib/generators/open_project/plugin/templates/bin/rails.tt b/lib/generators/open_project/plugin/templates/bin/rails.tt index 8fcd60c45aca..0268f3dbcbea 100755 --- a/lib/generators/open_project/plugin/templates/bin/rails.tt +++ b/lib/generators/open_project/plugin/templates/bin/rails.tt @@ -2,16 +2,16 @@ # This command will automatically be run when you run "rails" with Rails gems # installed from the root of your application. -ENGINE_ROOT = File.expand_path('../..', __FILE__) -ENGINE_PATH = File.expand_path('../../lib/open_project/<%= plugin_name %>/engine', __FILE__) +ENGINE_ROOT = File.expand_path("../..", __FILE__) +ENGINE_PATH = File.expand_path("../../lib/open_project/<%= plugin_name %>/engine", __FILE__) # Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__) +require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) ## # This is not ideal but better than nothing. -if ENV['OPENPROJECT_ROOT'] +if ENV["OPENPROJECT_ROOT"] # /Users/mkahl/dev/openproject/release/lib path = Pathname(ENV["OPENPROJECT_ROOT"]).join("lib") $LOAD_PATH.unshift(path.to_s) @@ -22,5 +22,5 @@ else Kernel.exit(1) end -require 'rails/all' -require 'rails/engine/commands' +require "rails/all" +require "rails/engine/commands" diff --git a/lib/generators/open_project/plugin/templates/lib/%full_name%.rb.tt b/lib/generators/open_project/plugin/templates/lib/%full_name%.rb.tt index 386dd21254bc..1a90fec6ebed 100644 --- a/lib/generators/open_project/plugin/templates/lib/%full_name%.rb.tt +++ b/lib/generators/open_project/plugin/templates/lib/%full_name%.rb.tt @@ -1 +1 @@ -require 'open_project/<%= plugin_name %>' +require "open_project/<%= plugin_name %>" diff --git a/lib/generators/open_project/plugin/templates/lib/open_project/%plugin_name%/engine.rb.tt b/lib/generators/open_project/plugin/templates/lib/open_project/%plugin_name%/engine.rb.tt index f96a60bad4f2..879db493856d 100644 --- a/lib/generators/open_project/plugin/templates/lib/open_project/%plugin_name%/engine.rb.tt +++ b/lib/generators/open_project/plugin/templates/lib/open_project/%plugin_name%/engine.rb.tt @@ -1,6 +1,6 @@ # Prevent load-order problems in case openproject-plugins is listed after a plugin in the Gemfile # or not at all -require 'open_project/plugins' +require "open_project/plugins" module OpenProject::<%= plugin_name.camelcase %> class Engine < ::Rails::Engine @@ -8,9 +8,9 @@ module OpenProject::<%= plugin_name.camelcase %> include OpenProject::Plugins::ActsAsOpEngine - register '<%= full_name %>', - :author_url => 'https://openproject.org', - :requires_openproject => '>= 6.0.0' + register "<%= full_name %>", + :author_url => "https://openproject.org", + :requires_openproject => ">= 6.0.0" end end diff --git a/lib/generators/open_project/rspec/service/templates/service_spec.rb.tt b/lib/generators/open_project/rspec/service/templates/service_spec.rb.tt index b373d377fab8..e26fc1da9471 100644 --- a/lib/generators/open_project/rspec/service/templates/service_spec.rb.tt +++ b/lib/generators/open_project/rspec/service/templates/service_spec.rb.tt @@ -28,27 +28,27 @@ # See COPYRIGHT and LICENSE files for more details. # ++ -require 'spec_helper' +require "spec_helper" # Require the file for the BaseServices shared example you're keeping # -# require 'services/base_services/behaves_like_create_service' -# require 'services/base_services/behaves_like_update_service' -# require 'services/base_services/behaves_like_delete_service' +# require "services/base_services/behaves_like_create_service" +# require "services/base_services/behaves_like_update_service" +# require "services/base_services/behaves_like_delete_service" RSpec.describe <%= service_name %> do # Keep the BaseServices shared_example that applies from below # - # it_behaves_like 'BaseServices create service' - # it_behaves_like 'BaseServices update service' - # it_behaves_like 'BaseService delete service' + # it_behaves_like "BaseServices create service" + # it_behaves_like "BaseServices update service" + # it_behaves_like "BaseService delete service" # AND/OR build your own # Here's something to get started with - shared_examples 'is success' do + shared_examples "is success" do it { is_expected.to be_success } end - shared_examples 'is failure' do + shared_examples "is failure" do it { is_expected.to be_failure } end @@ -57,15 +57,15 @@ RSpec.describe <%= service_name %> do subject(:service_call) { instance.call(params) } - describe '#call' do - context 'with valid params' do - let(:params) { raise 'Define me' } + describe "#call" do + context "with valid params" do + let(:params) { raise "Define me" } - it_behaves_like 'is success' + it_behaves_like "is success" end - context 'with invalid params' do - it_behaves_like 'is failure' + context "with invalid params" do + it_behaves_like "is failure" end end end From 9e4934cd0a468f46d8f0fc0f11ebc2d4216f789c Mon Sep 17 00:00:00 2001 From: Ivan Kuchin Date: Wed, 20 Mar 2024 16:27:46 +0100 Subject: [PATCH 2/3] change quotes using `rubocop --only Style/StringLiterals,Style/QuotedSymbols -a` --- Rakefile | 4 +- app/components/activities/days_component.rb | 2 +- app/components/add_button_component.rb | 10 +- .../quarantined_attachments/row_component.rb | 8 +- .../table_component.rb | 8 +- .../custom_actions/row_component.rb | 6 +- .../custom_actions/table_component.rb | 14 +- app/components/enumerations/row_component.rb | 4 +- .../enumerations/table_component.rb | 16 +- ...ividual_principal_base_filter_component.rb | 8 +- .../ldap_auth_sources/row_component.rb | 8 +- .../ldap_auth_sources/table_component.rb | 10 +- .../members/index_page_header_component.rb | 12 +- app/components/members/role_form_component.rb | 2 +- .../members/user_filter_component.rb | 26 +- .../oauth/applications/row_component.rb | 6 +- .../oauth/applications/table_component.rb | 18 +- .../open_project/common/duration_component.rb | 2 +- .../placeholder_user_filter_component.rb | 2 +- .../placeholder_users/row_component.rb | 4 +- .../placeholder_users/table_component.rb | 2 +- .../configure_view_modal_component.rb | 6 +- .../projects/delete_list_modal_component.rb | 2 +- .../projects/export_list_modal_component.rb | 2 +- app/components/projects/row_component.rb | 54 +- app/components/projects/table_component.rb | 12 +- app/components/row_component.rb | 2 +- .../settings/time_zone_setting_component.rb | 2 +- app/components/statuses/row_component.rb | 6 +- app/components/statuses/table_component.rb | 4 +- app/components/table_component.rb | 2 +- app/components/user_filter_component.rb | 16 +- .../users/auto_login_tokens/row_component.rb | 14 +- .../auto_login_tokens/table_component.rb | 8 +- app/components/users/avatar_component.rb | 2 +- .../users/sessions/row_component.rb | 16 +- .../users/sessions/table_component.rb | 8 +- app/components/users/table_component.rb | 2 +- app/components/versions/row_component.rb | 18 +- app/components/versions/table_component.rb | 2 +- .../share/concerns/displayable_roles.rb | 12 +- .../share/modal_body_component.rb | 40 +- .../share/permission_button_component.rb | 6 +- .../share/share_row_component.rb | 4 +- .../attachments/validate_replacements.rb | 2 +- .../omniauth_auth_hash_contract.rb | 4 +- .../assignable_custom_field_values.rb | 4 +- app/contracts/custom_actions/cu_contract.rb | 2 +- app/contracts/groups/create_contract.rb | 2 +- app/contracts/model_contract.rb | 2 +- .../placeholder_users/create_contract.rb | 2 +- app/contracts/queries/copy_contract.rb | 2 +- .../queries/global_create_contract.rb | 2 +- .../queries/ical_sharing_contract.rb | 2 +- app/contracts/queries/update_contract.rb | 2 +- app/contracts/queries/update_form_contract.rb | 2 +- app/contracts/relations/base_contract.rb | 2 +- app/contracts/relations/create_contract.rb | 2 +- app/contracts/types/base_contract.rb | 4 +- .../user_preferences/base_contract.rb | 4 +- app/contracts/users/base_contract.rb | 2 +- app/contracts/users/create_contract.rb | 2 +- .../work_packages/copy_project_contract.rb | 2 +- .../work_packages/create_contract.rb | 4 +- app/controllers/account_controller.rb | 30 +- app/controllers/activities_controller.rb | 6 +- .../quarantined_attachments_controller.rb | 6 +- .../aggregation_settings_controller.rb | 2 +- .../attachments_settings_controller.rb | 2 +- .../date_format_settings_controller.rb | 2 +- .../mail_notifications_settings_controller.rb | 2 +- .../settings/users_settings_controller.rb | 2 +- .../virus_scanning_settings_controller.rb | 16 +- .../working_days_settings_controller.rb | 2 +- app/controllers/admin/settings_controller.rb | 6 +- app/controllers/admin_controller.rb | 26 +- app/controllers/angular_controller.rb | 4 +- app/controllers/announcements_controller.rb | 6 +- app/controllers/application_controller.rb | 60 +- .../attribute_help_texts_controller.rb | 18 +- app/controllers/categories_controller.rb | 4 +- app/controllers/colors_controller.rb | 8 +- .../accounts/authentication_stages.rb | 4 +- .../concerns/accounts/omniauth_login.rb | 12 +- .../concerns/accounts/user_consent.rb | 10 +- .../concerns/accounts/user_password_change.rb | 10 +- app/controllers/concerns/auth_source_sso.rb | 2 +- app/controllers/concerns/layout.rb | 2 +- app/controllers/concerns/member_helper.rb | 2 +- app/controllers/concerns/user_invitation.rb | 4 +- app/controllers/custom_actions_controller.rb | 18 +- app/controllers/custom_styles_controller.rb | 4 +- app/controllers/enterprises_controller.rb | 2 +- app/controllers/enumerations_controller.rb | 16 +- app/controllers/errors_controller.rb | 2 +- app/controllers/forums_controller.rb | 28 +- app/controllers/groups_controller.rb | 24 +- app/controllers/highlighting_controller.rb | 4 +- app/controllers/homescreen_controller.rb | 4 +- app/controllers/journals_controller.rb | 12 +- .../ldap_auth_sources_controller.rb | 16 +- app/controllers/members/menus_controller.rb | 12 +- app/controllers/messages_controller.rb | 14 +- .../my/auto_login_tokens_controller.rb | 2 +- app/controllers/my/sessions_controller.rb | 6 +- app/controllers/news_controller.rb | 10 +- .../oauth/applications_controller.rb | 8 +- app/controllers/oauth/auth_base_controller.rb | 8 +- app/controllers/oauth/grants_controller.rb | 6 +- .../memberships_controller.rb | 4 +- .../placeholder_users_controller.rb | 14 +- .../projects/archive_controller.rb | 2 +- .../projects/identifier_controller.rb | 2 +- app/controllers/projects/menus_controller.rb | 4 +- .../projects/queries_controller.rb | 8 +- .../settings/custom_fields_controller.rb | 4 +- .../projects/settings/modules_controller.rb | 2 +- .../projects/templated_controller.rb | 2 +- app/controllers/projects_controller.rb | 10 +- app/controllers/queries/params_parser.rb | 14 +- app/controllers/repositories_controller.rb | 64 +- app/controllers/roles_controller.rb | 26 +- app/controllers/search_controller.rb | 18 +- app/controllers/statuses_controller.rb | 20 +- app/controllers/sys_controller.rb | 22 +- app/controllers/types_controller.rb | 16 +- .../users/memberships_controller.rb | 6 +- app/controllers/users_controller.rb | 38 +- app/controllers/versions_controller.rb | 8 +- app/controllers/wiki_controller.rb | 44 +- app/controllers/wiki_menu_items_controller.rb | 18 +- .../auto_completes_controller.rb | 6 +- .../work_packages/bulk_error_message.rb | 2 +- .../work_packages/moves_controller.rb | 6 +- .../work_packages/reports_controller.rb | 16 +- .../work_packages/shares/bulk_controller.rb | 2 +- .../work_packages/shares_controller.rb | 8 +- app/controllers/work_packages_controller.rb | 16 +- app/controllers/workflows_controller.rb | 26 +- app/forms/queries/projects/create.rb | 6 +- app/helpers/accessibility_helper.rb | 4 +- app/helpers/admin_helper.rb | 4 +- app/helpers/angular_helper.rb | 6 +- app/helpers/announcements_helper.rb | 4 +- app/helpers/application_helper.rb | 112 +-- app/helpers/appsignal_helper.rb | 4 +- app/helpers/archived_projects_helper.rb | 10 +- app/helpers/attachments_helper.rb | 14 +- app/helpers/augmenting_helper.rb | 2 +- app/helpers/browser_helper.rb | 16 +- app/helpers/calendars_helper.rb | 6 +- app/helpers/colors_helper.rb | 18 +- app/helpers/confirmation_dialog_helper.rb | 2 +- app/helpers/error_message_helper.rb | 6 +- app/helpers/errors_helper.rb | 2 +- app/helpers/flash_messages_helper.rb | 26 +- app/helpers/groups_helper.rb | 20 +- app/helpers/homescreen_helper.rb | 4 +- app/helpers/hook_helper.rb | 2 +- app/helpers/icons_helper.rb | 4 +- app/helpers/journals_helper.rb | 10 +- app/helpers/mail_digest_helper.rb | 30 +- app/helpers/mail_layout_helper.rb | 30 +- app/helpers/mail_notification_helper.rb | 4 +- app/helpers/members_helper.rb | 10 +- app/helpers/meta_tags_helper.rb | 4 +- app/helpers/no_results_helper.rb | 10 +- app/helpers/oauth_helper.rb | 2 +- app/helpers/omniauth_helper.rb | 2 +- app/helpers/pagination_helper.rb | 44 +- app/helpers/password_helper.rb | 4 +- app/helpers/project_status_helper.rb | 8 +- app/helpers/projects_helper.rb | 4 +- app/helpers/removed_js_helpers_helper.rb | 2 +- app/helpers/reorder_links_helper.rb | 14 +- app/helpers/reports_helper.rb | 6 +- app/helpers/repositories_helper.rb | 106 +- app/helpers/settings_helper.rb | 60 +- app/helpers/sort_helper.rb | 24 +- app/helpers/static_links_helper.rb | 4 +- app/helpers/stimulus_helper.rb | 2 +- app/helpers/tabs_helper.rb | 4 +- app/helpers/text_formatting_helper.rb | 2 +- app/helpers/toolbar_helper.rb | 36 +- app/helpers/tooltip_helper.rb | 2 +- app/helpers/types_helper.rb | 26 +- app/helpers/user_consent_helper.rb | 4 +- app/helpers/users_helper.rb | 36 +- app/helpers/warning_bar_helper.rb | 6 +- app/helpers/watchers_helper.rb | 14 +- app/helpers/wiki_helper.rb | 6 +- app/helpers/wiki_pages/at_version.rb | 2 +- .../work_packages_controller_helper.rb | 2 +- app/mailers/application_mailer.rb | 22 +- app/mailers/digest_mailer.rb | 4 +- app/mailers/interceptors/default_headers.rb | 10 +- app/mailers/member_mailer.rb | 6 +- app/mailers/project_mailer.rb | 18 +- app/mailers/sharing_mailer.rb | 28 +- app/mailers/user_mailer.rb | 56 +- app/models/actions/scopes/default.rb | 8 +- .../activities/changeset_activity_provider.rb | 28 +- .../activities/message_activity_provider.rb | 24 +- .../activities/news_activity_provider.rb | 12 +- .../activities/project_activity_provider.rb | 16 +- .../activities/wiki_page_activity_provider.rb | 12 +- .../work_package_activity_provider.rb | 26 +- app/models/announcement.rb | 4 +- app/models/anonymous_user.rb | 2 +- app/models/application_record.rb | 2 +- app/models/associations/groupable.rb | 2 +- app/models/attribute_help_text.rb | 4 +- app/models/attribute_help_text/project.rb | 2 +- .../attribute_help_text/work_package.rb | 8 +- app/models/capabilities/scopes/default.rb | 2 +- app/models/capability.rb | 2 +- app/models/category.rb | 2 +- app/models/change.rb | 2 +- app/models/changeset.rb | 50 +- app/models/color.rb | 4 +- app/models/colors/hex_color.rb | 14 +- app/models/comment.rb | 2 +- app/models/custom_action.rb | 10 +- .../custom_actions/actions/custom_field.rb | 16 +- app/models/custom_actions/actions/notify.rb | 6 +- app/models/custom_actions/actions/project.rb | 2 +- .../actions/strategies/associated.rb | 4 +- .../custom_actions/actions/strategies/date.rb | 4 +- .../actions/strategies/me_associated.rb | 4 +- .../custom_actions/conditions/project.rb | 2 +- app/models/custom_field/order_statements.rb | 22 +- app/models/custom_option.rb | 2 +- app/models/custom_style.rb | 2 +- app/models/custom_value/bool_strategy.rb | 2 +- app/models/custom_value/format_strategy.rb | 4 +- app/models/day.rb | 4 +- app/models/deleted_user.rb | 4 +- app/models/enabled_module.rb | 6 +- app/models/enterprise_token.rb | 2 +- app/models/enumeration.rb | 12 +- app/models/exports/concerns/csv.rb | 6 +- app/models/exports/exporter.rb | 4 +- app/models/exports/formatters/custom_field.rb | 10 +- app/models/exports/formatters/default.rb | 4 +- app/models/forum.rb | 4 +- app/models/global_role.rb | 2 +- app/models/group.rb | 2 +- app/models/issue_priority.rb | 4 +- .../historic_active_record_relation.rb | 12 +- .../journable/with_historic_attributes.rb | 4 +- .../with_historic_attributes/loader.rb | 6 +- app/models/journal/associated_journal.rb | 2 +- app/models/journal/attachable_journal.rb | 2 +- app/models/journal/attachment_journal.rb | 2 +- app/models/journal/base_journal.rb | 2 +- app/models/journal/changeset_journal.rb | 2 +- app/models/journal/customizable_journal.rb | 2 +- app/models/journal/message_journal.rb | 2 +- app/models/journal/news_journal.rb | 2 +- app/models/journal/project_journal.rb | 2 +- app/models/journal/storable_journal.rb | 4 +- app/models/journal/timestamps.rb | 2 +- app/models/journal/wiki_page_journal.rb | 4 +- app/models/journal/work_package_journal.rb | 6 +- app/models/ldap_auth_source.rb | 10 +- app/models/mail_handler/user_creator.rb | 14 +- app/models/members/scopes/assignable.rb | 4 +- app/models/menu_item.rb | 6 +- app/models/menu_items/wiki_menu_item.rb | 4 +- app/models/message.rb | 16 +- app/models/news.rb | 6 +- app/models/notification.rb | 4 +- .../scopes/applicable.rb | 2 +- app/models/notifications/scopes/visible.rb | 2 +- app/models/oauth_client.rb | 2 +- app/models/principal.rb | 30 +- .../principals/scopes/ordered_by_name.rb | 4 +- .../principals/scopes/possible_assignee.rb | 8 +- .../principals/scopes/possible_member.rb | 4 +- app/models/project_role.rb | 10 +- app/models/projects/activity.rb | 6 +- .../projects/exports/formatters/status.rb | 2 +- app/models/projects/storage.rb | 20 +- app/models/queries/base_query.rb | 8 +- .../queries/capabilities/capability_query.rb | 6 +- .../capabilities/filters/capability_filter.rb | 2 +- app/models/queries/filters/base.rb | 6 +- app/models/queries/filters/me_value.rb | 2 +- .../queries/filters/not_existing_filter.rb | 2 +- .../filters/shared/custom_field_filter.rb | 12 +- .../filters/shared/custom_fields/base.rb | 12 +- .../filters/shared/custom_fields/bool.rb | 2 +- .../shared/custom_fields/list_optional.rb | 6 +- .../filters/shared/custom_fields/user.rb | 2 +- .../queries/filters/shared/group_filter.rb | 10 +- .../queries/filters/shared/me_value_filter.rb | 2 +- .../queries/filters/shared/parsed_filter.rb | 6 +- .../filters/shared/user_blocked_filter.rb | 2 +- .../filters/shared/user_name_filter.rb | 16 +- .../filters/strategies/boolean_list.rb | 4 +- .../filters/strategies/boolean_list_strict.rb | 2 +- .../filters/strategies/cf_list_optional.rb | 8 +- .../queries/filters/strategies/cf_numeric.rb | 8 +- app/models/queries/filters/strategies/date.rb | 6 +- .../filters/strategies/date_interval.rb | 4 +- .../filters/strategies/date_time_past.rb | 10 +- .../filters/strategies/integer_list.rb | 4 +- .../strategies/integer_list_optional.rb | 4 +- app/models/queries/filters/strategies/list.rb | 10 +- .../queries/filters/strategies/list_all.rb | 2 +- .../filters/strategies/list_optional.rb | 2 +- .../queries/filters/strategies/numeric.rb | 4 +- .../queries/filters/strategies/relation.rb | 2 +- .../queries/filters/strategies/search.rb | 4 +- .../queries/filters/strategies/string.rb | 4 +- app/models/queries/filters/strategies/text.rb | 4 +- .../queries/filters/strategies/validations.rb | 2 +- .../shared_with_user/list_optional.rb | 6 +- app/models/queries/filters/templated_value.rb | 6 +- .../group_bys/not_existing_group_by.rb | 2 +- .../queries/members/filters/role_filter.rb | 2 +- app/models/queries/operators/ago.rb | 4 +- app/models/queries/operators/all.rb | 4 +- app/models/queries/operators/between_date.rb | 4 +- .../queries/operators/between_date_time.rb | 4 +- .../queries/operators/boolean_equals.rb | 10 +- .../operators/boolean_equals_strict.rb | 4 +- .../queries/operators/boolean_not_equals.rb | 10 +- .../operators/casted_greater_or_equal.rb | 4 +- .../queries/operators/casted_less_or_equal.rb | 4 +- app/models/queries/operators/child.rb | 4 +- app/models/queries/operators/children.rb | 4 +- .../queries/operators/closed_work_packages.rb | 4 +- .../operators/concerns/contains_all_values.rb | 2 +- app/models/queries/operators/contains.rb | 4 +- .../operators/custom_fields/equals_all.rb | 8 +- .../operators/custom_fields/not_equals_all.rb | 4 +- .../queries/operators/date_range_clauses.rb | 2 +- .../operators/datetime_range_clauses.rb | 2 +- app/models/queries/operators/equals.rb | 12 +- app/models/queries/operators/equals_all.rb | 4 +- app/models/queries/operators/equals_or.rb | 2 +- app/models/queries/operators/everywhere.rb | 4 +- app/models/queries/operators/follows.rb | 2 +- .../queries/operators/greater_or_equal.rb | 4 +- app/models/queries/operators/in.rb | 4 +- app/models/queries/operators/in_less_than.rb | 4 +- app/models/queries/operators/in_more_than.rb | 4 +- app/models/queries/operators/less_or_equal.rb | 4 +- app/models/queries/operators/less_than_ago.rb | 4 +- app/models/queries/operators/more_than_ago.rb | 4 +- app/models/queries/operators/none.rb | 4 +- app/models/queries/operators/not_contains.rb | 4 +- app/models/queries/operators/not_equals.rb | 8 +- app/models/queries/operators/on_date.rb | 4 +- app/models/queries/operators/on_date_time.rb | 4 +- .../queries/operators/open_work_packages.rb | 4 +- .../operators/ordered_work_packages.rb | 4 +- app/models/queries/operators/parent.rb | 4 +- app/models/queries/operators/relates.rb | 2 +- app/models/queries/operators/this_week.rb | 6 +- app/models/queries/operators/today.rb | 4 +- .../work_packages/shared_with_user/any.rb | 2 +- .../queries/orders/not_existing_order.rb | 2 +- .../access_to_anything_in_project_filter.rb | 8 +- .../queries/principals/filters/id_filter.rb | 2 +- .../principals/filters/member_filter.rb | 8 +- .../mentionable_on_work_package_filter.rb | 6 +- .../queries/principals/filters/type_filter.rb | 2 +- .../principals/filters/typeahead_filter.rb | 2 +- app/models/queries/projects/factory.rb | 42 +- .../projects/filters/ancestor_filter.rb | 4 +- .../filters/latest_activity_at_filter.rb | 2 +- .../filters/name_and_identifier_filter.rb | 14 +- .../queries/projects/filters/name_filter.rb | 14 +- .../projects/filters/principal_filter.rb | 2 +- .../projects/filters/project_status_filter.rb | 2 +- .../projects/filters/typeahead_filter.rb | 2 +- .../projects/filters/user_action_filter.rb | 6 +- .../projects/filters/visible_filter.rb | 2 +- .../projects/orders/custom_field_order.rb | 2 +- .../queries/projects/orders/name_order.rb | 2 +- .../queries/projects/selects/custom_field.rb | 2 +- .../queries/projects/selects/default.rb | 2 +- app/models/queries/projects/selects/status.rb | 2 +- .../filters/project_identifier_filter.rb | 2 +- .../relations/filters/involved_filter.rb | 2 +- .../allows_becoming_assignee_filter.rb | 10 +- .../queries/roles/filters/grantable_filter.rb | 2 +- .../queries/roles/filters/unit_filter.rb | 6 +- app/models/queries/selects/base.rb | 2 +- .../queries/selects/not_existing_select.rb | 4 +- app/models/queries/serialization/filters.rb | 6 +- .../queries/views/filters/type_filter.rb | 2 +- .../filter/assigned_to_filter.rb | 2 +- .../filter/assignee_or_group_filter.rb | 4 +- .../filter/attachment_base_filter.rb | 2 +- .../filter/attachment_content_filter.rb | 4 +- .../filter/attachment_file_name_filter.rb | 4 +- .../work_packages/filter/comment_filter.rb | 2 +- .../filter/custom_field_context.rb | 4 +- .../filter/filter_for_wp_mixin.rb | 6 +- .../filter_on_directed_relations_mixin.rb | 4 +- .../filter_on_undirected_relations_mixin.rb | 2 +- .../work_packages/filter/group_filter.rb | 12 +- .../work_packages/filter/milestone_filter.rb | 10 +- .../filter/only_subproject_filter.rb | 2 +- .../filter/or_filter_for_wp_mixin.rb | 2 +- .../work_packages/filter/principal_loader.rb | 8 +- .../work_packages/filter/project_filter.rb | 2 +- .../work_packages/filter/relatable_filter.rb | 2 +- .../work_packages/filter/role_filter.rb | 10 +- .../work_packages/filter/search_filter.rb | 4 +- .../filter/shared_with_me_filter.rb | 8 +- .../filter/shared_with_user_filter.rb | 12 +- .../work_packages/filter/status_filter.rb | 8 +- .../filter/subject_or_id_filter.rb | 6 +- .../work_packages/filter/subproject_filter.rb | 4 +- .../filter/text_filter_on_join_mixin.rb | 6 +- .../work_packages/filter/type_filter.rb | 2 +- .../work_packages/filter/typeahead_filter.rb | 6 +- .../work_packages/filter/version_filter.rb | 2 +- .../work_packages/filter/watcher_filter.rb | 6 +- .../work_packages/filter_serializer.rb | 6 +- .../selects/custom_field_select.rb | 6 +- .../selects/manual_sorting_select.rb | 2 +- .../work_packages/selects/property_select.rb | 38 +- .../selects/relation_of_type_select.rb | 2 +- .../selects/relation_to_type_select.rb | 2 +- app/models/query.rb | 28 +- app/models/query/results.rb | 2 +- app/models/query/results/group_by.rb | 6 +- app/models/query/results/sums.rb | 6 +- app/models/query/sort_criteria.rb | 4 +- app/models/relation.rb | 32 +- app/models/repository.rb | 16 +- app/models/repository/git.rb | 24 +- app/models/repository/subversion.rb | 16 +- app/models/role.rb | 8 +- app/models/sessions/sql_bypass.rb | 6 +- app/models/sessions/user_session.rb | 2 +- app/models/setting/aliases.rb | 4 +- app/models/status.rb | 12 +- app/models/system_user.rb | 4 +- app/models/timestamp.rb | 18 +- app/models/token/base.rb | 2 +- app/models/token/ical.rb | 2 +- app/models/type.rb | 8 +- app/models/type/attribute_groups.rb | 2 +- app/models/type/attributes.rb | 22 +- app/models/type/query_group.rb | 2 +- app/models/user_password.rb | 4 +- app/models/user_password/sha1.rb | 2 +- app/models/user_preference.rb | 14 +- app/models/user_preferences/schema.rb | 6 +- .../scopes/having_reminder_mail_to_send.rb | 4 +- app/models/users/scopes/with_time_zone.rb | 2 +- app/models/versions/project_sharing.rb | 16 +- app/models/versions/scopes/shared_with.rb | 6 +- app/models/watcher.rb | 2 +- app/models/week_day.rb | 2 +- app/models/wiki.rb | 14 +- app/models/wikis/annotate.rb | 4 +- app/models/work_package.rb | 56 +- app/models/work_package/ancestors.rb | 2 +- .../work_package/ask_before_destruction.rb | 2 +- app/models/work_package/exports/csv.rb | 2 +- .../work_package/exports/formatters/costs.rb | 6 +- .../exports/formatters/currency.rb | 2 +- .../work_package/exports/formatters/days.rb | 2 +- .../work_package/exports/formatters/hours.rb | 2 +- .../exports/formatters/spent_units.rb | 6 +- app/models/work_package/journalized.rb | 24 +- .../work_package/pdf_export/attachments.rb | 4 +- app/models/work_package/pdf_export/common.rb | 12 +- app/models/work_package/pdf_export/cover.rb | 2 +- .../work_package/pdf_export/markdown.rb | 6 +- .../work_package/pdf_export/overview_table.rb | 4 +- app/models/work_package/pdf_export/page.rb | 2 +- app/models/work_package/pdf_export/style.rb | 8 +- .../work_package/pdf_export/sums_table.rb | 8 +- .../pdf_export/table_of_contents.rb | 2 +- app/models/work_package/pdf_export/view.rb | 14 +- .../pdf_export/work_package_detail.rb | 6 +- .../pdf_export/work_package_list_to_pdf.rb | 4 +- .../work_package/time_entries_cleaner.rb | 12 +- app/models/work_package_custom_field.rb | 4 +- app/models/work_package_role.rb | 2 +- app/models/work_packages/costs.rb | 8 +- app/models/work_packages/derived_dates.rb | 4 +- app/models/work_packages/relations.rb | 8 +- .../work_packages/scopes/for_scheduling.rb | 2 +- .../scopes/include_derived_dates.rb | 2 +- .../scopes/include_spent_time.rb | 4 +- .../scopes/left_join_self_and_descendants.rb | 2 +- app/models/work_packages/scopes/relatable.rb | 16 +- app/models/work_packages/spent_time.rb | 2 +- app/models/workflow.rb | 18 +- app/policies/redirect_policy.rb | 10 +- app/seeders/admin_user_seeder.rb | 8 +- app/seeders/basic_data/base_role_seeder.rb | 20 +- app/seeders/basic_data/color_scheme_seeder.rb | 4 +- app/seeders/basic_data/color_seeder.rb | 6 +- app/seeders/basic_data/global_role_seeder.rb | 2 +- app/seeders/basic_data/model_seeder.rb | 6 +- app/seeders/basic_data/priority_seeder.rb | 10 +- app/seeders/basic_data/project_role_seeder.rb | 4 +- app/seeders/basic_data/setting_seeder.rb | 10 +- .../basic_data/time_entry_activity_seeder.rb | 8 +- .../basic_data/type_configuration_seeder.rb | 10 +- app/seeders/basic_data/type_seeder.rb | 16 +- .../basic_data/work_package_role_seeder.rb | 2 +- app/seeders/basic_data/workflow_seeder.rb | 10 +- app/seeders/basic_data_seeder.rb | 2 +- app/seeders/composite_seeder.rb | 6 +- app/seeders/demo_data/create_attachments.rb | 2 +- app/seeders/demo_data/global_query_seeder.rb | 4 +- app/seeders/demo_data/group_seeder.rb | 8 +- app/seeders/demo_data/overview_seeder.rb | 32 +- app/seeders/demo_data/project_seeder.rb | 46 +- app/seeders/demo_data/projects_seeder.rb | 12 +- app/seeders/demo_data/query_builder.rb | 6 +- app/seeders/demo_data/references.rb | 8 +- app/seeders/demo_data/version_builder.rb | 14 +- app/seeders/demo_data/wiki_seeder.rb | 6 +- .../demo_data/work_package_board_seeder.rb | 66 +- app/seeders/demo_data/work_package_seeder.rb | 36 +- app/seeders/demo_data_seeder.rb | 2 +- .../development_data/custom_fields_seeder.rb | 34 +- .../development_data/projects_seeder.rb | 26 +- .../shared_work_packages_seeder.rb | 22 +- app/seeders/development_data/users_seeder.rb | 8 +- app/seeders/development_data_seeder.rb | 2 +- app/seeders/env_data/ldap_seeder.rb | 46 +- app/seeders/env_data_seeder.rb | 2 +- app/seeders/root_seeder.rb | 16 +- app/seeders/source/seed_data.rb | 2 +- app/seeders/source/seed_data_loader.rb | 6 +- app/seeders/source/seed_file.rb | 2 +- app/seeders/source/translate.rb | 6 +- .../api/parse_resource_params_service.rb | 2 +- .../api/v3/parse_query_params_service.rb | 12 +- ...ge_collection_from_query_params_service.rb | 2 +- ...k_package_collection_from_query_service.rb | 4 +- app/services/attachments/clamav_service.rb | 2 +- app/services/attachments/create_service.rb | 6 +- .../authentication/omniauth_service.rb | 4 +- app/services/authorization/project_query.rb | 4 +- .../query_transformation_visitor.rb | 2 +- .../authorization/user_allowed_query.rb | 4 +- .../authorization/user_allowed_service.rb | 2 +- app/services/base_type_service.rb | 16 +- .../copy/concerns/copy_attachments.rb | 6 +- app/services/copy/dependency.rb | 2 +- .../grids/copy/widgets_dependent_service.rb | 2 +- app/services/groups/update_service.rb | 2 +- .../members/concerns/role_assignment.rb | 2 +- .../oauth/persist_application_service.rb | 2 +- .../oauth_clients/set_attributes_service.rb | 2 +- app/services/params_to_query_service.rb | 4 +- .../parse_schema_filter_params_service.rb | 10 +- .../principals/replace_references_service.rb | 4 +- .../projects/copy/boards_dependent_service.rb | 2 +- .../copy/categories_dependent_service.rb | 4 +- .../projects/copy/forums_dependent_service.rb | 26 +- .../copy/members_dependent_service.rb | 4 +- .../copy/overview_dependent_service.rb | 2 +- .../copy/queries_dependent_service.rb | 2 +- .../copy/versions_dependent_service.rb | 2 +- .../projects/copy/wiki_dependent_service.rb | 4 +- ...wiki_page_attachments_dependent_service.rb | 4 +- ...k_package_attachments_dependent_service.rb | 4 +- .../copy/work_packages_dependent_service.rb | 8 +- .../projects/gantt_query_generator_service.rb | 16 +- .../projects/set_attributes_service.rb | 10 +- app/services/projects/update_service.rb | 4 +- app/services/queries/copy/filters_mapper.rb | 2 +- .../project_queries/set_attributes_service.rb | 4 +- app/services/reports/assignee_report.rb | 4 +- app/services/reports/author_report.rb | 4 +- app/services/reports/category_report.rb | 4 +- app/services/reports/priority_report.rb | 4 +- app/services/reports/report.rb | 2 +- app/services/reports/reports_service.rb | 2 +- app/services/reports/responsible_report.rb | 4 +- app/services/reports/subproject_report.rb | 4 +- app/services/reports/type_report.rb | 4 +- app/services/reports/version_report.rb | 4 +- .../scm/checkout_instructions_service.rb | 6 +- .../scm/create_managed_repository_service.rb | 6 +- .../scm/delete_managed_repository_service.rb | 4 +- .../scm/repository_factory_service.rb | 2 +- app/services/set_localization_service.rb | 2 +- app/services/update_projects_types_service.rb | 2 +- .../user_preferences/update_service.rb | 4 +- app/services/user_search_service.rb | 20 +- app/services/users/create_service.rb | 4 +- app/services/users/login_service.rb | 4 +- app/services/users/register_user_service.rb | 4 +- .../users/replace_mentions_service.rb | 2 +- app/services/users/set_attributes_service.rb | 2 +- .../versions/set_attributes_service.rb | 4 +- app/services/views/global_create_service.rb | 2 +- app/services/wiki_pages/copy_service.rb | 2 +- .../work_packages/bulk/bulked_service.rb | 2 +- .../work_packages/bulk/copy_service.rb | 2 +- app/services/work_packages/copy_service.rb | 14 +- .../work_packages/exports/schedule_service.rb | 2 +- app/services/work_packages/shared/all_days.rb | 4 +- .../work_packages/shared/working_days.rb | 4 +- .../work_packages/update_ancestors/loader.rb | 2 +- app/services/workflows/bulk_update_service.rb | 6 +- app/uploaders/direct_fog_uploader.rb | 6 +- app/uploaders/file_uploader.rb | 2 +- app/uploaders/fog_file_uploader.rb | 4 +- app/uploaders/local_file_uploader.rb | 2 +- app/validators/json_validator.rb | 20 +- .../secure_context_uri_validator.rb | 4 +- app/validators/url_validator.rb | 2 +- app/views/common/feed.atom.builder | 2 +- app/workers/application_job.rb | 2 +- .../attachments/extract_fulltext_job.rb | 2 +- app/workers/attachments/virus_rescan_job.rb | 4 +- app/workers/attachments/virus_scan_job.rb | 6 +- app/workers/copy_project_job.rb | 10 +- app/workers/cron/clear_old_sessions_job.rb | 2 +- app/workers/cron/clear_tmp_cache_job.rb | 2 +- app/workers/cron/clear_uploaded_files_job.rb | 2 +- app/workers/exports/cleanup_outdated_job.rb | 2 +- app/workers/exports/export_job.rb | 10 +- app/workers/mails/deliver_job.rb | 2 +- app/workers/mails/watcher_added_job.rb | 2 +- app/workers/mails/watcher_job.rb | 2 +- app/workers/mails/watcher_removed_job.rb | 2 +- app/workers/mails/work_package_shared_job.rb | 4 +- .../service.rb | 2 +- app/workers/oauth/cleanup_job.rb | 2 +- app/workers/paper_trail_audits/cleanup_job.rb | 2 +- app/workers/projects/delete_project_job.rb | 2 +- app/workers/projects/export_job.rb | 2 +- app/workers/rake_job.rb | 2 +- .../scm/create_local_repository_job.rb | 2 +- .../scm/create_remote_repository_job.rb | 6 +- app/workers/scm/relocate_repository_job.rb | 4 +- app/workers/scm/remote_repository_job.rb | 12 +- app/workers/work_packages/bulk_copy_job.rb | 2 +- app/workers/work_packages/bulk_move_job.rb | 2 +- app/workers/work_packages/export_job.rb | 6 +- config.ru | 4 +- config/boot.rb | 18 +- config/constants/ar_to_api_conversions.rb | 36 +- config/environment.rb | 2 +- config/environments/production.rb | 22 +- config/environments/test_pgsql.rb | 2 +- config/initializers/00-load_plugins.rb | 6 +- config/initializers/03-db_check.rb | 4 +- config/initializers/05-null_db_fallback.rb | 2 +- .../06-pending_migrations_check.rb | 2 +- config/initializers/10-load_patches.rb | 4 +- .../initializers/30-open_project_loading.rb | 2 +- config/initializers/activity.rb | 30 +- config/initializers/airbrake.rb | 12 +- .../application_controller_renderer.rb | 6 +- config/initializers/appsignal.rb | 32 +- config/initializers/bullet.rb | 2 +- config/initializers/carrierwave.rb | 14 +- config/initializers/cronjobs.rb | 36 +- config/initializers/custom_deprecators.rb | 2 +- config/initializers/custom_field_format.rb | 42 +- config/initializers/database_pool_size.rb | 2 +- config/initializers/doorkeeper.rb | 10 +- config/initializers/feature_decisions.rb | 2 +- config/initializers/grape_logging.rb | 2 +- config/initializers/health_checks.rb | 26 +- config/initializers/homescreen.rb | 32 +- config/initializers/i18n.rb | 2 +- config/initializers/inflections.rb | 8 +- config/initializers/lookbook.rb | 12 +- config/initializers/mail_starttls_patch.rb | 2 +- config/initializers/mime_types.rb | 4 +- config/initializers/module_handler.rb | 2 +- config/initializers/paper_trail.rb | 2 +- config/initializers/rack-attack.rb | 4 +- config/initializers/rack-cors.rb | 4 +- config/initializers/rack_profiler.rb | 8 +- config/initializers/rack_timeout.rb | 2 +- config/initializers/register_renderer.rb | 4 +- config/initializers/register_views.rb | 2 +- config/initializers/secure_headers.rb | 10 +- config/initializers/session_store.rb | 4 +- config/initializers/warden.rb | 12 +- config/initializers/zeitwerk.rb | 46 +- config/puma.rb | 6 +- ...000000000_to_v710_aggregated_migrations.rb | 12 +- ...0562_aggregated_global_roles_migrations.rb | 6 +- .../20170829095701_generate_wp_closure.rb | 8 +- ...0171106074835_move_hashed_token_to_core.rb | 4 +- db/migrate/20180105130053_rebuild_dag.rb | 32 +- db/migrate/20180108132929_vacuum_relations.rb | 4 +- ...7065255_remove_timelines_and_reportings.rb | 2 +- ...0305130811_remove_wiki_content_versions.rb | 8 +- .../20180419061910_timestamp_for_caching.rb | 2 +- ...emove_non_null_container_on_attachments.rb | 4 +- .../20180706150714_convert_to_markdown.rb | 8 +- ...0120550_migrate_light_background_themes.rb | 24 +- ...20181112125034_create_doorkeeper_tables.rb | 2 +- .../20190220080647_migrate_my_page_layout.rb | 8 +- ...0227163226_add_tls_mode_to_auth_sources.rb | 2 +- .../20190301122554_remove_hierarchy_paths.rb | 4 +- .../20190312083304_rename_boards_to_forums.rb | 14 +- ...90502102512_ensure_postgres_index_names.rb | 4 +- .../20190507132517_add_board_view_to_roles.rb | 4 +- .../20190618115620_fix_available_languages.rb | 16 +- .../20190710132957_rename_my_page_widgets.rb | 32 +- ...190724093332_add_journal_versions_table.rb | 4 +- .../20190920102446_clean_custom_values.rb | 4 +- ...135213_join_table_for_active_activities.rb | 2 +- db/migrate/20200217155632_rename_tokens.rb | 8 +- .../20200220171133_rename_bim_module.rb | 10 +- ...8_strip_whitespace_from_user_attributes.rb | 2 +- .../20200326102408_rename_fixed_version.rb | 4 +- .../20200428105404_unique_member_role.rb | 2 +- ...522140244_remove_journal_versions_table.rb | 2 +- ...133727_fix_inherited_group_member_roles.rb | 2 +- ...00708065116_fix_members_inconsistencies.rb | 2 +- ...e_current_project_custom_fields_columns.rb | 2 +- ..._defaults_for_bcf_viewpoints_and_issues.rb | 8 +- ...924085508_cleanup_orphaned_journal_data.rb | 16 +- ...925084550_members_allow_null_on_project.rb | 8 +- ...rename_timestamp_on_time_and_cost_entry.rb | 4 +- ...sure_integer_for_relations_foreign_keys.rb | 2 +- .../20201005184411_rename_timestamps.rb | 8 +- ...45_replace_invalid_principal_references.rb | 2 +- .../20210510193438_remove_project_setting.rb | 2 +- .../20210615150558_aggregate_journals.rb | 12 +- ...20210616145324_polymorphic_journal_data.rb | 2 +- ...0210618132206_add_notification_settings.rb | 10 +- .../20210726070813_remove_journal_versions.rb | 2 +- ...210825183540_make_user_preferences_json.rb | 4 +- .../20210914065555_cleanup_notifications.rb | 18 +- ...56_add_user_preference_settings_indices.rb | 6 +- .../20210928133538_add_reminder_workdays.rb | 2 +- ...20_add_indexes_for_email_reminder_pause.rb | 2 +- ...40_redistribute_edit_project_permission.rb | 8 +- ...0211102161932_remove_custom_field_types.rb | 6 +- .../20211103120946_clean_emails_footer.rb | 12 +- ...05142202_queue_notification_update_mail.rb | 8 +- ...20220202140507_reorder_project_children.rb | 2 +- .../20220319211253_add_parent_id_to_wp.rb | 4 +- ...2637_refix_inherited_group_member_roles.rb | 2 +- ...1221_restore_defaults_on_empty_settings.rb | 4 +- ...ime_to_log_own_time_in_role_permissions.rb | 2 +- ...backfill_time_entries_with_logged_by_id.rb | 2 +- ...4112533_remove_notification_cleanup_job.rb | 2 +- ...061024_rename_work_package_export_limit.rb | 12 +- ..._packages_duration_field_active_setting.rb | 2 +- .../20220818074150_fix_invalid_journals.rb | 2 +- ...0220818074159_fix_deleted_data_journals.rb | 16 +- ...0926124435_constrain_work_package_dates.rb | 4 +- ...018160449_add_logged_by_to_cost_entries.rb | 2 +- .../20221027151959_remove_plaintext_tokens.rb | 6 +- .../20221115082403_add_ldap_tls_options.rb | 2 +- ...t_values_from_journal_tables_definition.rb | 20 +- ...315103437_add_foreign_keys_to_workflows.rb | 4 +- ...0322135932_merge_wiki_content_into_page.rb | 6 +- ...rgm_index_on_journals_and_custom_values.rb | 10 +- ...31093004_remove_default_from_query_name.rb | 2 +- ...8151123_add_validity_period_to_journals.rb | 4 +- ...649_add_create_user_permission_to_roles.rb | 8 +- ...10074642_add_optional_entity_to_members.rb | 4 +- ..._copy_work_packages_permission_to_roles.rb | 6 +- ...90205_add_share_workpackages_permission.rb | 6 +- ...dd_view_shared_work_packages_permission.rb | 6 +- ...t_language_value_for_chinese_simplified.rb | 2 +- .../20231005113307_role_to_project_role.rb | 4 +- ...trgm_index_to_meeting_agenda_item_notes.rb | 4 +- ...5144701_migrate_agenda_item_permissions.rb | 4 +- ...ing_agendas_and_split_edit_meeting_role.rb | 6 +- .../20231128080650_add_work_package_roles.rb | 12 +- ..._view_of_queries_with_timeline_to_gantt.rb | 12 +- ...49_enable_gantt_module_for_all_projects.rb | 2 +- ...019_add_gantt_module_to_default_modules.rb | 4 +- db/migrate/20240206085104_remove_enums.rb | 44 +- ...841_fix_untranslated_work_package_roles.rb | 2 +- .../20240227154544_remove_delayed_jobs.rb | 14 +- ...ange_default_value_of_alternative_color.rb | 6 +- ...41_reduce_configurable_design_variables.rb | 22 +- ...20240307190126_rename_portuguese_locale.rb | 4 +- ...0240311111957_enable_unaccent_extension.rb | 2 +- db/migrate/aggregated/base.rb | 2 +- db/migrate/aggregated/to_3_0.rb | 2 +- db/migrate/aggregated/to_7_1.rb | 2 +- .../migration_utils/migration_squasher.rb | 8 +- db/migrate/migration_utils/module_renamer.rb | 4 +- db/migrate/migration_utils/setting_renamer.rb | 2 +- db/migrate/migration_utils/typed_dag.rb | 14 +- db/migrate/tables/announcements.rb | 2 +- db/migrate/tables/attachable_journals.rb | 4 +- db/migrate/tables/attachment_journals.rb | 12 +- db/migrate/tables/attachments.rb | 18 +- db/migrate/tables/auth_sources.rb | 10 +- .../tables/available_project_statuses.rb | 4 +- db/migrate/tables/boards.rb | 4 +- db/migrate/tables/categories.rb | 8 +- db/migrate/tables/changes.rb | 6 +- db/migrate/tables/changeset_journals.rb | 2 +- db/migrate/tables/changesets.rb | 12 +- db/migrate/tables/changesets_work_packages.rb | 2 +- db/migrate/tables/comments.rb | 8 +- db/migrate/tables/custom_fields.rb | 10 +- db/migrate/tables/custom_fields_projects.rb | 4 +- db/migrate/tables/custom_fields_types.rb | 2 +- db/migrate/tables/custom_options.rb | 2 +- db/migrate/tables/custom_styles.rb | 2 +- db/migrate/tables/custom_values.rb | 8 +- .../tables/customizable_journals_table.rb | 2 +- db/migrate/tables/delayed_jobs.rb | 4 +- db/migrate/tables/design_colors.rb | 2 +- db/migrate/tables/enabled_modules.rb | 4 +- db/migrate/tables/enterprise_tokens.rb | 2 +- db/migrate/tables/enumerations.rb | 8 +- db/migrate/tables/forums.rb | 4 +- db/migrate/tables/group_users.rb | 2 +- db/migrate/tables/journals.rb | 2 +- db/migrate/tables/member_roles.rb | 6 +- db/migrate/tables/members.rb | 8 +- db/migrate/tables/menu_items.rb | 2 +- db/migrate/tables/message_journals.rb | 4 +- db/migrate/tables/messages.rb | 14 +- db/migrate/tables/news.rb | 12 +- db/migrate/tables/news_journals.rb | 6 +- .../tables/planning_element_type_colors.rb | 2 +- db/migrate/tables/project_associations.rb | 2 +- db/migrate/tables/project_types.rb | 4 +- db/migrate/tables/projects.rb | 8 +- db/migrate/tables/projects_types.rb | 2 +- db/migrate/tables/queries.rb | 8 +- db/migrate/tables/relations.rb | 8 +- db/migrate/tables/reportings.rb | 2 +- db/migrate/tables/repositories.rb | 12 +- db/migrate/tables/role_permissions.rb | 2 +- db/migrate/tables/roles.rb | 4 +- db/migrate/tables/sessions.rb | 2 +- db/migrate/tables/settings.rb | 6 +- db/migrate/tables/statuses.rb | 10 +- db/migrate/tables/time_entries.rb | 12 +- db/migrate/tables/time_entry_journals.rb | 2 +- db/migrate/tables/timelines.rb | 2 +- db/migrate/tables/tokens.rb | 8 +- db/migrate/tables/types.rb | 4 +- db/migrate/tables/user_passwords.rb | 2 +- db/migrate/tables/user_preferences.rb | 4 +- db/migrate/tables/users.rb | 20 +- db/migrate/tables/versions.rb | 10 +- db/migrate/tables/watchers.rb | 10 +- db/migrate/tables/wiki_content_journals.rb | 2 +- db/migrate/tables/wiki_content_versions.rb | 10 +- db/migrate/tables/wiki_contents.rb | 6 +- db/migrate/tables/wiki_pages.rb | 10 +- db/migrate/tables/wiki_redirects.rb | 14 +- db/migrate/tables/wikis.rb | 4 +- db/migrate/tables/work_package_journals.rb | 4 +- db/migrate/tables/work_packages.rb | 4 +- db/migrate/tables/workflows.rb | 10 +- docker/prod/wait_for_db.rb | 4 +- extra/mail_handler/rdm-mailhandler.rb | 74 +- lib/api/api_docs_helper.rb | 2 +- lib/api/caching/cached_representer.rb | 16 +- lib/api/caching/helpers.rb | 4 +- ...llowed_values_by_collection_representer.rb | 4 +- .../allowed_values_by_link_representer.rb | 4 +- lib/api/decorators/collection.rb | 4 +- lib/api/decorators/form.rb | 2 +- lib/api/decorators/formattable_property.rb | 2 +- lib/api/decorators/link_object.rb | 2 +- lib/api/decorators/linked_resource.rb | 6 +- .../decorators/offset_paginated_collection.rb | 4 +- .../decorators/property_schema_representer.rb | 10 +- lib/api/decorators/schema_representer.rb | 2 +- lib/api/decorators/single.rb | 8 +- lib/api/decorators/sql/hal.rb | 14 +- .../decorators/sql_collection_representer.rb | 6 +- lib/api/errors/bad_request.rb | 4 +- lib/api/errors/conflict.rb | 4 +- lib/api/errors/enterprise_token_missing.rb | 4 +- lib/api/errors/internal_error.rb | 4 +- lib/api/errors/invalid_query.rb | 2 +- lib/api/errors/invalid_render_context.rb | 2 +- lib/api/errors/invalid_request_body.rb | 2 +- lib/api/errors/invalid_resource_link.rb | 4 +- lib/api/errors/invalid_signal.rb | 6 +- .../errors/invalid_user_status_transition.rb | 4 +- lib/api/errors/multiple_errors.rb | 6 +- lib/api/errors/not_found.rb | 6 +- lib/api/errors/not_implemented.rb | 4 +- lib/api/errors/outbound_request_forbidden.rb | 4 +- lib/api/errors/outbound_request_not_found.rb | 4 +- lib/api/errors/parse_error.rb | 4 +- lib/api/errors/property_format_error.rb | 4 +- lib/api/errors/property_missing_error.rb | 4 +- lib/api/errors/too_many_requests.rb | 4 +- lib/api/errors/unauthenticated.rb | 4 +- lib/api/errors/unauthorized.rb | 4 +- lib/api/errors/unsupported_media_type.rb | 2 +- lib/api/errors/unwritable_property.rb | 2 +- lib/api/errors/validation.rb | 2 +- lib/api/helpers/attachment_renderer.rb | 8 +- lib/api/root.rb | 14 +- lib/api/root_api.rb | 20 +- lib/api/utilities/camel_casing_strategy.rb | 2 +- lib/api/utilities/grape_helper.rb | 4 +- lib/api/utilities/json_gem_parser.rb | 2 +- lib/api/utilities/payload_representer.rb | 6 +- .../utilities/query_filters_name_converter.rb | 4 +- .../utilities/representer_to_json_cache.rb | 2 +- lib/api/utilities/resource_link_parser.rb | 8 +- lib/api/utilities/url_props_parsing_helper.rb | 8 +- .../utilities/wp_property_name_converter.rb | 4 +- lib/api/v3.rb | 2 +- lib/api/v3/actions/actions_api.rb | 4 +- .../activity_eager_loading_wrapper.rb | 2 +- .../activity_property_formatters.rb | 4 +- .../attachable_payload_representer_mixin.rb | 4 +- .../attachable_representer_mixin.rb | 2 +- .../attachment_parsing_representer.rb | 8 +- .../v3/attachments/attachment_representer.rb | 10 +- .../attachment_upload_representer.rb | 8 +- lib/api/v3/attachments/attachments_api.rb | 4 +- .../attachments_by_container_api.rb | 6 +- .../attachments_by_work_package_api.rb | 2 +- lib/api/v3/backups/backup_representer.rb | 2 +- lib/api/v3/capabilities/capabilities_api.rb | 4 +- .../capability_sql_representer.rb | 2 +- .../contexts/global_representer.rb | 4 +- lib/api/v3/categories/categories_api.rb | 4 +- .../categories/categories_by_project_api.rb | 2 +- lib/api/v3/categories/category_representer.rb | 6 +- lib/api/v3/configuration/configuration_api.rb | 2 +- .../configuration_representer.rb | 64 +- .../custom_action_representer.rb | 6 +- .../v3/custom_actions/custom_actions_api.rb | 4 +- .../custom_option_representer.rb | 2 +- .../v3/custom_options/custom_options_api.rb | 2 +- lib/api/v3/days/day_representer.rb | 2 +- .../v3/days/non_working_day_representer.rb | 2 +- lib/api/v3/days/non_working_days_api.rb | 2 +- lib/api/v3/days/week_api.rb | 2 +- lib/api/v3/days/week_day_representer.rb | 2 +- lib/api/v3/errors/error_representer.rb | 6 +- lib/api/v3/formatter/txt_charset.rb | 2 +- lib/api/v3/groups/group_representer.rb | 2 +- lib/api/v3/groups/group_sql_representer.rb | 2 +- lib/api/v3/groups/groups_api.rb | 2 +- .../v3/help_texts/help_text_representer.rb | 4 +- lib/api/v3/help_texts/help_texts_api.rb | 2 +- lib/api/v3/memberships/create_form_api.rb | 2 +- .../v3/memberships/create_form_representer.rb | 2 +- .../v3/memberships/membership_representer.rb | 4 +- lib/api/v3/memberships/memberships_api.rb | 12 +- .../schemas/membership_schema_api.rb | 2 +- .../schemas/membership_schema_representer.rb | 20 +- lib/api/v3/memberships/update_form_api.rb | 2 +- .../v3/memberships/update_form_representer.rb | 2 +- lib/api/v3/news/news_api.rb | 2 +- lib/api/v3/news/news_representer.rb | 2 +- .../notifications/notification_representer.rb | 2 +- lib/api/v3/notifications/notifications_api.rb | 4 +- lib/api/v3/notifications/property_factory.rb | 4 +- lib/api/v3/oauth/oauth_applications_api.rb | 2 +- .../oauth/oauth_applications_representer.rb | 4 +- .../v3/oauth/oauth_client_credentials_api.rb | 2 +- .../oauth_client_credentials_representer.rb | 2 +- .../placeholder_user_representer.rb | 4 +- .../placeholder_user_sql_representer.rb | 2 +- .../placeholder_users_api.rb | 2 +- lib/api/v3/posts/post_representer.rb | 2 +- lib/api/v3/posts/posts_api.rb | 2 +- .../v3/principals/principal_representer.rb | 6 +- lib/api/v3/priorities/priorities_api.rb | 6 +- lib/api/v3/priorities/priority_representer.rb | 6 +- .../v3/projects/available_assignees_api.rb | 2 +- lib/api/v3/projects/available_parents_api.rb | 2 +- .../v3/projects/available_responsibles_api.rb | 2 +- lib/api/v3/projects/copy/copy_api.rb | 2 +- .../copy/project_copy_schema_representer.rb | 6 +- .../project_collection_representer.rb | 16 +- lib/api/v3/projects/project_representer.rb | 10 +- .../v3/projects/project_sql_representer.rb | 8 +- lib/api/v3/projects/projects_api.rb | 2 +- .../schemas/project_schema_representer.rb | 28 +- .../projects/statuses/status_representer.rb | 2 +- lib/api/v3/projects/statuses/statuses_api.rb | 2 +- .../columns/query_column_representer.rb | 2 +- .../v3/queries/columns/query_columns_api.rb | 2 +- .../query_property_column_representer.rb | 2 +- ...ery_relation_of_type_column_representer.rb | 2 +- ...ery_relation_to_type_column_representer.rb | 2 +- lib/api/v3/queries/create_form_api.rb | 2 +- .../query_filter_instance_representer.rb | 6 +- .../filters/query_filter_representer.rb | 2 +- .../v3/queries/filters/query_filters_api.rb | 2 +- .../group_bys/query_group_by_representer.rb | 2 +- .../queries/group_bys/query_group_bys_api.rb | 2 +- .../v3/queries/ical_url/query_ical_url_api.rb | 4 +- .../ical_url/query_ical_url_representer.rb | 6 +- .../operators/query_operator_representer.rb | 2 +- .../queries/operators/query_operators_api.rb | 2 +- lib/api/v3/queries/queries_api.rb | 10 +- lib/api/v3/queries/query_helper.rb | 2 +- .../v3/queries/query_params_representer.rb | 2 +- lib/api/v3/queries/query_representer.rb | 20 +- ...o_project_filter_dependency_representer.rb | 6 +- .../boolean_filter_dependency_representer.rb | 2 +- ...k_package_filter_dependency_representer.rb | 2 +- ...om_option_filter_dependency_representer.rb | 2 +- .../date_filter_dependency_representer.rb | 4 +- ...date_time_filter_dependency_representer.rb | 4 +- .../schemas/filter_dependency_representer.rb | 6 +- .../filter_dependency_representer_factory.rb | 28 +- .../float_filter_dependency_representer.rb | 2 +- .../group_filter_dependency_representer.rb | 6 +- .../integer_filter_dependency_representer.rb | 2 +- ...ubproject_filter_dependency_representer.rb | 2 +- ...principal_filter_dependency_representer.rb | 2 +- .../project_filter_dependency_representer.rb | 2 +- ...t_members_filter_dependency_representer.rb | 6 +- .../query_filter_instance_schema_api.rb | 2 +- ...uery_filter_instance_schema_representer.rb | 12 +- .../schemas/query_schema_representer.rb | 60 +- .../role_filter_dependency_representer.rb | 4 +- ...ubproject_filter_dependency_representer.rb | 2 +- .../text_filter_dependency_representer.rb | 2 +- .../user_filter_dependency_representer.rb | 6 +- .../version_filter_dependency_representer.rb | 2 +- .../sort_bys/query_sort_by_representer.rb | 2 +- .../v3/queries/sort_bys/query_sort_bys_api.rb | 6 +- .../v3/queries/sort_bys/sort_by_decorator.rb | 6 +- lib/api/v3/queries/update_form_api.rb | 2 +- lib/api/v3/relations/relation_representer.rb | 2 +- lib/api/v3/relations/relations_api.rb | 2 +- .../v3/repositories/revision_representer.rb | 4 +- lib/api/v3/repositories/revisions_api.rb | 2 +- .../revisions_by_work_package_api.rb | 2 +- lib/api/v3/roles/role_representer.rb | 2 +- lib/api/v3/roles/roles_api.rb | 2 +- lib/api/v3/root.rb | 12 +- lib/api/v3/root_representer.rb | 4 +- .../schemas/schema_collection_representer.rb | 2 +- .../schemas/schema_dependency_representer.rb | 2 +- lib/api/v3/shares/share_representer.rb | 6 +- lib/api/v3/shares/shares_api.rb | 6 +- lib/api/v3/statuses/status_representer.rb | 2 +- lib/api/v3/statuses/statuses_api.rb | 6 +- lib/api/v3/types/type_representer.rb | 2 +- lib/api/v3/types/types_api.rb | 6 +- lib/api/v3/types/types_by_project_api.rb | 2 +- .../preferences_by_user_api.rb | 4 +- .../user_preference_representer.rb | 14 +- .../user_preferences/user_preferences_api.rb | 4 +- .../users/schemas/user_schema_representer.rb | 28 +- lib/api/v3/users/user_representer.rb | 6 +- lib/api/v3/users/user_sql_representer.rb | 14 +- lib/api/v3/users/users_api.rb | 12 +- lib/api/v3/utilities/custom_field_injector.rb | 56 +- .../link_value_getter.rb | 4 +- lib/api/v3/utilities/date_time_formatter.rb | 8 +- .../v3/utilities/endpoints/delayed_modify.rb | 2 +- lib/api/v3/utilities/endpoints/index.rb | 2 +- lib/api/v3/utilities/endpoints/sql_index.rb | 2 +- lib/api/v3/utilities/endpoints/sql_show.rb | 4 +- lib/api/v3/utilities/eprops_conversion.rb | 4 +- lib/api/v3/utilities/params_to_query.rb | 4 +- lib/api/v3/utilities/path_helper.rb | 16 +- .../v3/utilities/sql_representer_walker.rb | 4 +- lib/api/v3/values/property_representer.rb | 2 +- .../schemas/property_schema_representer.rb | 4 +- lib/api/v3/values/schemas/value_schema_api.rb | 4 +- .../v3/values/schemas/value_schema_factory.rb | 2 +- .../v3/versions/projects_by_version_api.rb | 2 +- .../schemas/version_schema_representer.rb | 20 +- .../version_collection_representer.rb | 8 +- lib/api/v3/versions/version_representer.rb | 8 +- lib/api/v3/versions/versions_api.rb | 2 +- .../v3/versions/versions_by_project_api.rb | 4 +- lib/api/v3/views/view_representer.rb | 2 +- lib/api/v3/views/views_api.rb | 8 +- .../v3/wiki_pages/wiki_page_representer.rb | 2 +- lib/api/v3/wiki_pages/wiki_pages_api.rb | 2 +- .../work_packages/available_assignees_api.rb | 2 +- .../available_relation_candidates_api.rb | 4 +- .../work_packages/create_form_representer.rb | 8 +- .../create_project_form_representer.rb | 8 +- .../work_packages/eager_loading/checksum.rb | 6 +- .../eager_loading/custom_value.rb | 14 +- .../eager_loading/historic_attributes.rb | 2 +- .../work_packages/link_to_object_extractor.rb | 4 +- .../schema/base_work_package_schema.rb | 2 +- .../schema/work_package_schemas_api.rb | 22 +- .../work_package_sums_schema_representer.rb | 16 +- lib/api/v3/work_packages/show_end_point.rb | 2 +- lib/api/v3/work_packages/watchers_api.rb | 8 +- .../work_package_at_timestamp_representer.rb | 6 +- .../work_package_collection_representer.rb | 66 +- .../work_package_deleted_representer.rb | 2 +- .../work_package_eager_loading_wrapper.rb | 14 +- .../work_package_payload_representer.rb | 4 +- .../work_package_relations_api.rb | 4 +- ...work_package_sql_collection_representer.rb | 2 +- .../work_package_sql_representer.rb | 20 +- .../work_package_sums_representer.rb | 2 +- lib/api/v3/work_packages/work_packages_api.rb | 4 +- .../work_packages_shared_helpers.rb | 2 +- lib/ar_condition.rb | 2 +- lib/core_extensions.rb | 4 +- lib/custom_field_form_builder.rb | 26 +- .../open_project/plugin/plugin_generator.rb | 14 +- .../open_project/plugin/templates/Gemfile | 2 +- .../rspec/service/service_generator.rb | 6 +- lib/open_project/access_control.rb | 4 +- lib/open_project/access_keys.rb | 18 +- .../acts_as_url/adapter/op_active_record.rb | 8 +- lib/open_project/assets.rb | 10 +- lib/open_project/cache.rb | 2 +- lib/open_project/content_type_detector.rb | 4 +- lib/open_project/custom_field_format.rb | 2 +- .../custom_styles/color_themes.rb | 100 +- lib/open_project/custom_styles/design.rb | 10 +- lib/open_project/deprecation.rb | 2 +- .../file_command_content_type_detector.rb | 6 +- lib/open_project/files.rb | 10 +- lib/open_project/form_tag_helper.rb | 52 +- lib/open_project/full_text_search.rb | 10 +- .../health_checks/good_job_backed_up_check.rb | 2 +- lib/open_project/hook.rb | 2 +- lib/open_project/hooks.rb | 4 +- .../hooks/view_account_login_auth_provider.rb | 2 +- .../hooks/view_account_login_bottom.rb | 2 +- lib/open_project/info.rb | 2 +- .../journal_formatter/active_status.rb | 6 +- .../journal_formatter/attachment.rb | 4 +- lib/open_project/journal_formatter/cause.rb | 20 +- .../journal_formatter/custom_field.rb | 12 +- lib/open_project/journal_formatter/diff.rb | 8 +- .../journal_formatter/file_link.rb | 12 +- .../ignore_non_working_days.rb | 6 +- .../journal_formatter/project_status_code.rb | 2 +- .../journal_formatter/schedule_manually.rb | 2 +- .../subproject_named_association.rb | 6 +- .../journal_formatter/template.rb | 6 +- .../journal_formatter/time_entry_hours.rb | 8 +- .../journal_formatter/visibility.rb | 6 +- .../journal_formatter/wiki_diff.rb | 4 +- lib/open_project/logging.rb | 4 +- lib/open_project/logging/log_delegator.rb | 2 +- lib/open_project/logging/tee_logger.rb | 2 +- lib/open_project/mime_type.rb | 112 +-- lib/open_project/nested_set/rebuild_patch.rb | 6 +- lib/open_project/object_linking.rb | 4 +- lib/open_project/omni_auth/authorization.rb | 4 +- lib/open_project/page_hierarchy_helper.rb | 28 +- lib/open_project/passwords.rb | 30 +- .../patches/action_view_accessible_errors.rb | 16 +- .../patches/active_record_i18n.rb | 2 +- .../patches/carrierwave_sanitized_file.rb | 12 +- lib/open_project/patches/fog_file.rb | 4 +- .../patches/i18n_reject_empty_string.rb | 4 +- .../patches/lookbook_tree_node_inflector.rb | 4 +- .../patches/mail_smtp_start_tls_auto_fix.rb | 2 +- .../patches/mailer_controller_preview.rb | 2 +- lib/open_project/patches/representable.rb | 8 +- lib/open_project/patches/string.rb | 4 +- lib/open_project/plugins.rb | 6 +- lib/open_project/plugins/acts_as_op_engine.rb | 30 +- .../plugins/frontend_linking/erb_context.rb | 2 +- .../plugins/frontend_linking/generator.rb | 24 +- lib/open_project/plugins/migration_mapping.rb | 2 +- lib/open_project/rate_limiting.rb | 2 +- lib/open_project/rate_limiting/api_v3.rb | 2 +- lib/open_project/rate_limiting/base.rb | 14 +- .../rate_limiting/lost_password.rb | 2 +- .../rate_limiting/throttled_api_error.rb | 4 +- lib/open_project/repository_authentication.rb | 2 +- lib/open_project/scm/adapters.rb | 6 +- lib/open_project/scm/adapters/base.rb | 24 +- .../scm/adapters/checkout_instructions.rb | 2 +- lib/open_project/scm/adapters/git.rb | 78 +- lib/open_project/scm/adapters/local_client.rb | 22 +- lib/open_project/scm/adapters/subversion.rb | 114 +-- lib/open_project/scm/exceptions.rb | 6 +- lib/open_project/static_routing.rb | 4 +- lib/open_project/storage.rb | 4 +- lib/open_project/text_formatting.rb | 4 +- .../filters/attachment_filter.rb | 12 +- .../filters/autolink_filter.rb | 2 +- .../text_formatting/filters/bem_css_filter.rb | 60 +- .../filters/figure_wrapped_filter.rb | 10 +- .../filters/link_attribute_filter.rb | 2 +- .../text_formatting/filters/macro_filter.rb | 10 +- .../filters/macros/child_pages.rb | 4 +- .../macros/child_pages/child_pages_context.rb | 6 +- .../macros/create_work_package_link.rb | 14 +- .../filters/macros/embedded_table.rb | 8 +- .../filters/macros/include_wiki_page.rb | 4 +- .../text_formatting/filters/macros/toc.rb | 4 +- .../text_formatting/filters/mention_filter.rb | 18 +- .../filters/pattern_matcher_filter.rb | 2 +- .../filters/relative_link_filter.rb | 2 +- .../filters/sanitization_filter.rb | 32 +- .../filters/setting_macros_filter.rb | 6 +- .../filters/table_of_contents_filter.rb | 30 +- .../filters/task_list_filter.rb | 4 +- .../formats/markdown/formatter.rb | 2 +- .../formats/markdown/helper.rb | 4 +- .../text_formatting/formats/plain/helper.rb | 2 +- .../text_formatting/helpers/link_rewriter.rb | 2 +- .../matchers/attribute_macros.rb | 4 +- .../matchers/link_handlers/colon_separator.rb | 50 +- .../matchers/link_handlers/hash_separator.rb | 28 +- .../matchers/link_handlers/revisions.rb | 6 +- .../matchers/link_handlers/work_packages.rb | 10 +- .../matchers/wiki_links_matcher.rb | 6 +- lib/open_project/text_formatting/renderer.rb | 2 +- .../text_formatting/truncation.rb | 2 +- .../translations/pluralization_backend.rb | 2 +- lib/open_project/ui/extensible_tabs.rb | 36 +- lib/redmine/ciphering.rb | 10 +- lib/redmine/codeset_util.rb | 34 +- lib/redmine/diff_table.rb | 20 +- lib/redmine/gmail.rb | 12 +- lib/redmine/helpers/diff.rb | 16 +- lib/redmine/imap.rb | 18 +- lib/redmine/menu_manager/menu_controller.rb | 4 +- lib/redmine/menu_manager/menu_helper.rb | 76 +- lib/redmine/menu_manager/menu_item.rb | 10 +- .../menu_manager/top_menu/help_menu.rb | 68 +- .../menu_manager/top_menu/projects_menu.rb | 8 +- .../menu_manager/top_menu/quick_add_menu.rb | 20 +- lib/redmine/menu_manager/top_menu_helper.rb | 64 +- lib/redmine/menu_manager/tree_node.rb | 10 +- lib/redmine/menu_manager/wiki_menu_helper.rb | 16 +- lib/redmine/platform.rb | 4 +- lib/redmine/plugin.rb | 16 +- lib/redmine/pop3.rb | 14 +- lib/redmine/unified_diff.rb | 4 +- lib/redmine/views/other_formats_builder.rb | 6 +- lib/tabular_form_builder.rb | 66 +- lib/tasks/api.rake | 4 +- lib/tasks/assets.rake | 36 +- lib/tasks/attachment_migrations.rake | 14 +- lib/tasks/attachments.rake | 20 +- lib/tasks/backup.rake | 16 +- lib/tasks/ciphering.rake | 8 +- lib/tasks/code.rake | 12 +- lib/tasks/copyright.rake | 122 +-- lib/tasks/copyright_authors.rake | 4 +- lib/tasks/cron.rake | 4 +- lib/tasks/database.rake | 14 +- lib/tasks/delete_documents.rake | 14 +- lib/tasks/dependencies.rake | 16 +- lib/tasks/deprecated.rake | 14 +- lib/tasks/email.rake | 52 +- lib/tasks/environment.rake | 6 +- lib/tasks/extract_fixtures.rake | 8 +- lib/tasks/fetch_changesets.rake | 2 +- lib/tasks/git.rake | 36 +- lib/tasks/jdbc.rake | 4 +- lib/tasks/ldap.rake | 16 +- lib/tasks/load_default_data.rake | 20 +- lib/tasks/metrics.rake | 2 +- lib/tasks/packager.rake | 66 +- lib/tasks/parallel_testing.rake | 46 +- lib/tasks/permissions.rake | 4 +- lib/tasks/plugin_specs.rake | 10 +- lib/tasks/plugins.rake | 6 +- lib/tasks/release.rake | 10 +- lib/tasks/reregister_password_migrations.rake | 6 +- lib/tasks/scm.rake | 20 +- lib/tasks/secret_token.rake | 10 +- lib/tasks/setting.rake | 12 +- lib/tasks/shared/attachment_migration.rb | 8 +- lib/tasks/shared/legacy_attachment.rb | 4 +- lib/tasks/shared/user_feedback.rb | 2 +- lib/tasks/testing.rake | 4 +- lib/tasks/time_entry_activities.rake | 12 +- lib/tasks/version.rake | 4 +- lib/tasks/watchers.rake | 2 +- lib/tasks/yardoc.rake | 20 +- lib_static/open_project/appsignal.rb | 2 +- lib_static/open_project/authentication.rb | 8 +- .../authentication/failure_app.rb | 8 +- .../strategies/warden/anonymous_fallback.rb | 4 +- .../strategies/warden/doorkeeper_oauth.rb | 4 +- .../strategies/warden/global_basic_auth.rb | 4 +- .../strategies/warden/session.rb | 8 +- .../strategies/warden/user_basic_auth.rb | 4 +- lib_static/open_project/configuration.rb | 22 +- .../open_project/configuration/helpers.rb | 42 +- lib_static/open_project/database.rb | 14 +- lib_static/open_project/notifications.rb | 2 +- lib_static/plugins/acts_as_attachable/init.rb | 2 +- .../plugins/acts_as_customizable/init.rb | 4 +- lib_static/plugins/acts_as_event/init.rb | 2 +- .../acts_as_event/lib/acts_as_event.rb | 4 +- .../plugins/acts_as_journalized/init.rb | 2 +- .../lib/acts/journalized/data_class.rb | 2 +- .../journalized/file_link_journal_differ.rb | 8 +- .../lib/acts/journalized/options.rb | 2 +- .../lib/journal_formatter.rb | 20 +- .../lib/journal_formatter/base.rb | 8 +- .../lib/journal_formatter/day_count.rb | 2 +- .../journal_formatter/named_association.rb | 2 +- lib_static/plugins/acts_as_searchable/init.rb | 2 +- .../lib/acts_as_searchable.rb | 14 +- lib_static/plugins/acts_as_watchable/init.rb | 4 +- lib_static/plugins/load_path_helper.rb | 2 +- lib_static/plugins/verification/Rakefile | 28 +- lib_static/plugins/verification/init.rb | 2 +- lib_static/redmine/diff.rb | 20 +- lib_static/redmine/diff/array_string_diff.rb | 4 +- lib_static/redmine/diff/diffable.rb | 8 +- lib_static/redmine/i18n.rb | 20 +- .../add_preview_for_view_component.rb | 8 +- ...k_with_rspec_capybara_matcher_in_expect.rb | 2 +- .../use_service_result_factory_methods.rb | 8 +- .../op_turbo/stream_component_preview.rb | 2 +- .../common/attribute_component_preview.rb | 6 +- .../open_project/common/dialog_preview.rb | 24 +- .../common/duration_component_preview.rb | 4 +- .../common/filters_component_preview.rb | 4 +- .../common/relative_time_component_preview.rb | 2 +- .../common/submenu_component_preview.rb | 14 +- .../on_off_status_component_preview.rb | 16 +- ...ess_grant_nudge_modal_component_preview.rb | 2 +- .../lib/omni_auth/flexible_strategy.rb | 2 +- .../lib/open_project/auth_plugins.rb | 8 +- .../lib/open_project/auth_plugins/engine.rb | 6 +- .../lib/open_project/auth_plugins/hooks.rb | 4 +- .../lib/open_project/plugins/auth_plugin.rb | 4 +- .../lib/openproject-auth_plugins.rb | 2 +- .../openproject-auth_plugins.gemspec | 22 +- .../spec/features/auth_provider_spec.rb | 16 +- .../spec/requests/auth_plugins_spec.rb | 20 +- .../spec/requests/flexible_strategy_spec.rb | 62 +- .../spec/views/base.html.erb_spec.rb | 14 +- .../hooks/login/_providers.html.erb_spec.rb | 22 +- .../auth_saml/lib/open_project/auth_saml.rb | 2 +- .../auth_saml/lib/openproject-auth_saml.rb | 2 +- .../auth_saml/openproject-auth_saml.gemspec | 22 +- .../spec/lib/open_project/auth_saml_spec.rb | 16 +- .../requests/saml_provider_callback_spec.rb | 62 +- .../controllers/avatars/avatar_controller.rb | 2 +- .../avatars/my_avatar_controller.rb | 4 +- .../controllers/avatars/users_controller.rb | 4 +- modules/avatars/app/helpers/avatar_helper.rb | 18 +- modules/avatars/app/models/users/avatars.rb | 6 +- .../app/services/avatars/update_service.rb | 2 +- modules/avatars/config/routes.rb | 10 +- .../lib/api/v3/users/user_avatar_api.rb | 2 +- .../lib/open_project/avatars/engine.rb | 18 +- modules/avatars/lib/openproject-avatars.rb | 2 +- modules/avatars/openproject-avatars.gemspec | 16 +- .../avatars/avatar_controller_spec.rb | 26 +- .../controllers/avatars/my_controller_spec.rb | 42 +- .../avatars/users_controller_spec.rb | 52 +- .../factories/avatar_attachment_factory.rb | 4 +- .../avatars/spec/features/my_avatar_spec.rb | 16 +- .../spec/features/shared_avatar_examples.rb | 70 +- .../avatars/spec/features/user_avatar_spec.rb | 30 +- .../spec/helpers/avatar_helper_spec.rb | 90 +- .../lib/api/v3/users/user_representer_spec.rb | 20 +- .../spec/requests/user_avatar_api_spec.rb | 32 +- .../services/avatars/update_service_spec.rb | 14 +- modules/avatars/spec/shared_examples.rb | 14 +- modules/avatars/spec/spec_helper.rb | 2 +- .../backlogs_settings_controller.rb | 2 +- .../projects/settings/backlogs_controller.rb | 4 +- .../controllers/rb_application_controller.rb | 6 +- .../controllers/rb_impediments_controller.rb | 2 +- .../app/controllers/rb_queries_controller.rb | 12 +- .../app/controllers/rb_sprints_controller.rb | 2 +- .../app/controllers/rb_stories_controller.rb | 2 +- .../controllers/rb_taskboards_controller.rb | 2 +- .../app/controllers/rb_tasks_controller.rb | 2 +- .../app/controllers/rb_wikis_controller.rb | 4 +- .../version_settings_controller.rb | 2 +- .../work_package_boxes_controller.rb | 8 +- .../app/helpers/burndown_charts_helper.rb | 8 +- .../backlogs/app/helpers/rb_common_helper.rb | 52 +- .../app/helpers/rb_master_backlogs_helper.rb | 38 +- .../app/helpers/version_settings_helper.rb | 22 +- modules/backlogs/app/models/backlog.rb | 6 +- modules/backlogs/app/models/burndown.rb | 6 +- modules/backlogs/app/models/sprint.rb | 28 +- modules/backlogs/app/models/story.rb | 10 +- modules/backlogs/app/models/task.rb | 4 +- .../app/services/tasks/create_service.rb | 2 +- .../app/services/tasks/update_service.rb | 2 +- modules/backlogs/config/routes.rb | 16 +- ..._to_v710_aggregated_backlogs_migrations.rb | 30 +- .../backlogs_type_dependency_representer.rb | 2 +- modules/backlogs/lib/open_project/backlogs.rb | 2 +- .../backlogs/burndown/series_raw_data.rb | 14 +- .../lib/open_project/backlogs/engine.rb | 50 +- .../backlogs/hooks/layout_hook.rb | 20 +- .../backlogs/hooks/user_settings_hook.rb | 6 +- .../lib/open_project/backlogs/list.rb | 10 +- .../backlogs/mixins/prevent_issue_sti.rb | 4 +- .../api/work_package_schema_representer.rb | 4 +- .../backlogs/patches/project_patch.rb | 4 +- .../backlogs/patches/project_seeder_patch.rb | 14 +- .../patches/set_attributes_service_patch.rb | 4 +- .../backlogs/patches/setting_seeder_patch.rb | 4 +- .../backlogs/patches/update_service_patch.rb | 4 +- .../backlogs/patches/user_patch.rb | 4 +- .../backlogs/patches/version_patch.rb | 6 +- .../patches/versions/row_component_patch.rb | 6 +- .../patches/versions_controller_patch.rb | 8 +- .../backlogs/patches/work_package_patch.rb | 6 +- .../backlogs/query_backlogs_select.rb | 2 +- .../backlogs/work_package_filter.rb | 34 +- modules/backlogs/lib/openproject-backlogs.rb | 2 +- modules/backlogs/openproject-backlogs.gemspec | 20 +- .../spec/api/work_package_resource_spec.rb | 34 +- .../api/work_packages/form_resource_spec.rb | 64 +- .../work_package_schema_representer_spec.rb | 24 +- .../work_packages/base_contract_spec.rb | 146 +-- .../work_packages/create_contract_spec.rb | 14 +- .../work_packages/update_contract_spec.rb | 14 +- .../backlogs_settings_controller_spec.rb | 38 +- .../controllers/versions_controller_spec.rb | 16 +- .../spec/factories/impediment_factory.rb | 4 +- .../backlogs/spec/factories/sprint_factory.rb | 6 +- .../backlogs/spec/factories/story_factory.rb | 2 +- .../backlogs/spec/factories/task_factory.rb | 4 +- .../features/backlogs/change_status_spec.rb | 36 +- .../features/backlogs/context_menu_spec.rb | 64 +- .../features/backlogs/create_story_spec.rb | 40 +- .../features/backlogs_in_backlog_view_spec.rb | 48 +- .../spec/features/empty_backlogs_spec.rb | 26 +- .../spec/features/impediments_spec.rb | 82 +- .../spec/features/resolved_status_spec.rb | 12 +- .../spec/features/stories_in_backlog_spec.rb | 36 +- .../spec/features/tasks_on_taskboard_spec.rb | 20 +- .../features/work_packages/filter_spec.rb | 18 +- .../work_packages/story_points_spec.rb | 16 +- .../helpers/version_settings_helper_spec.rb | 10 +- modules/backlogs/spec/models/backlog_spec.rb | 14 +- modules/backlogs/spec/models/burndown_spec.rb | 44 +- .../backlogs/spec/models/impediment_spec.rb | 24 +- .../spec/models/issue_position_spec.rb | 154 +-- modules/backlogs/spec/models/issue_spec.rb | 54 +- modules/backlogs/spec/models/sprint_spec.rb | 70 +- modules/backlogs/spec/models/story_spec.rb | 18 +- modules/backlogs/spec/models/task_spec.rb | 18 +- modules/backlogs/spec/models/user_spec.rb | 16 +- .../spec/models/version_setting_spec.rb | 12 +- modules/backlogs/spec/models/version_spec.rb | 32 +- .../backlogs/spec/models/work_package_spec.rb | 38 +- .../rb_burndown_charts_routing_spec.rb | 12 +- .../routing/rb_impediments_routing_spec.rb | 22 +- .../rb_master_backlogs_routing_spec.rb | 10 +- .../spec/routing/rb_queries_routing_spec.rb | 12 +- .../spec/routing/rb_sprints_routing_spec.rb | 12 +- .../spec/routing/rb_stories_routing_spec.rb | 22 +- .../routing/rb_taskboards_routing_spec.rb | 12 +- .../spec/routing/rb_tasks_routing_spec.rb | 22 +- .../spec/routing/rb_wikis_routing_spec.rb | 20 +- .../impediments/create_services_spec.rb | 48 +- .../impediments/update_service_spec.rb | 56 +- .../services/stories/create_service_spec.rb | 14 +- ...update_service_version_inheritance_spec.rb | 134 +-- .../backlogs/spec/support/pages/backlogs.rb | 48 +- .../backlogs/spec/support/pages/taskboard.rb | 18 +- .../views/rb_burndown_charts/show_spec.rb | 20 +- .../rb_master_backlogs/index.html.erb_spec.rb | 8 +- .../spec/views/rb_taskboards/show_spec.rb | 76 +- .../spec/views/shared/not_configured_spec.rb | 6 +- modules/bim/Gemfile | 2 +- .../bim/ifc_models/row_component.rb | 16 +- .../bim/ifc_models/table_component.rb | 20 +- .../bim/app/controllers/bim/bcf/api/root.rb | 2 +- .../bim/bcf/api/v2_1/comments/api.rb | 2 +- .../bim/bcf/api/v2_1/current_user_api.rb | 2 +- .../bim/bcf/api/v2_1/topics_api.rb | 10 +- .../bim/bcf/api/v2_1/viewpoints/api.rb | 2 +- .../controllers/bim/bcf/issues_controller.rb | 32 +- .../bim/ifc_models/ifc_models_controller.rb | 6 +- .../bim/ifc_models/ifc_viewer_controller.rb | 2 +- modules/bim/app/models/bim/bcf/issue.rb | 4 +- modules/bim/app/models/bim/bcf/viewpoint.rb | 8 +- .../app/models/bim/ifc_models/ifc_model.rb | 2 +- .../filter/bcf_issue_associated_filter.rb | 16 +- .../selects/bcf_thumbnail_select.rb | 2 +- .../bcf/api/v2_1/errors/error_representer.rb | 2 +- .../v2_1/project_extensions/representer.rb | 6 +- .../v2_1/viewpoints/coloring_representer.rb | 2 +- .../api/v2_1/viewpoints/full_representer.rb | 2 +- .../v2_1/viewpoints/selection_representer.rb | 2 +- .../api/v2_1/viewpoints/single_representer.rb | 2 +- .../v2_1/viewpoints/visibility_representer.rb | 2 +- .../seeders/bim/basic_data/setting_seeder.rb | 6 +- .../seeders/bim/demo_data/bcf_xml_seeder.rb | 12 +- .../seeders/bim/demo_data/ifc_model_seeder.rb | 12 +- .../issues/transform_attributes_service.rb | 16 +- .../bim/bcf/viewpoints/create_service.rb | 2 +- .../bcf/viewpoints/set_attributes_service.rb | 20 +- .../bim/ifc_models/set_attributes_service.rb | 4 +- .../bim/ifc_models/view_converter_service.rb | 40 +- modules/bim/config/routes.rb | 12 +- ...154216_seed_custom_style_with_bim_theme.rb | 22 +- .../20210521080035_update_xkt_to_version8.rb | 16 +- ...d_column_conversion_status_to_ifc_model.rb | 6 +- .../bim/lib/api/bim/bcf_xml/v1/bcf_xml_api.rb | 10 +- .../bim/bcf_json/viewpoint_reader.rb | 64 +- modules/bim/lib/open_project/bim/bcf_xml.rb | 2 +- .../open_project/bim/bcf_xml/base_writer.rb | 2 +- .../lib/open_project/bim/bcf_xml/exporter.rb | 10 +- .../lib/open_project/bim/bcf_xml/importer.rb | 32 +- .../open_project/bim/bcf_xml/issue_reader.rb | 12 +- .../open_project/bim/bcf_xml/issue_writer.rb | 34 +- .../bim/bcf_xml/markup_extractor.rb | 36 +- .../bim/bcf_xml/viewpoint_writer.rb | 56 +- modules/bim/lib/open_project/bim/engine.rb | 44 +- modules/bim/lib/open_project/bim/hooks.rb | 2 +- .../bim/patches/activity_representer_patch.rb | 2 +- .../bim/patches/api/v3/export_formats.rb | 2 +- .../bim/patches/attachment_patch.rb | 2 +- .../bim/patches/color_themes_patch.rb | 20 +- .../open_project/bim/patches/journal_patch.rb | 2 +- .../open_project/bim/patches/project_patch.rb | 2 +- .../bim/patches/query_builder_patch.rb | 2 +- .../open_project/bim/patches/type_patch.rb | 2 +- .../work_package_board_seeder_patch.rb | 18 +- .../bim/patches/work_package_patch.rb | 2 +- .../bim/patches/work_package_seeder_patch.rb | 10 +- .../exporter/formatters/bcf_thumbnail.rb | 2 +- modules/bim/lib/openproject-bim.rb | 2 +- modules/bim/lib/tasks/openproject-bim.rake | 10 +- modules/bim/openproject-bcf.gemspec | 6 +- .../activities/activity_representer_spec.rb | 46 +- .../query_filter_instance_representer_spec.rb | 16 +- .../work_package_representer_spec.rb | 78 +- modules/bim/spec/bcf/bcf_xml/exporter_spec.rb | 6 +- modules/bim/spec/bcf/bcf_xml/importer_spec.rb | 34 +- .../bim/spec/bcf/bcf_xml/issue_reader_spec.rb | 38 +- .../bim/spec/bcf/bcf_xml/issue_writer_spec.rb | 86 +- .../spec/bcf/bcf_xml/markup_extractor_spec.rb | 86 +- .../bcf/issues/create_contract_spec.rb | 6 +- .../bcf/issues/shared_contract_examples.rb | 38 +- .../bcf/issues/update_contract_spec.rb | 10 +- .../bcf/viewpoints/create_contract_spec.rb | 408 ++++---- .../ifc_models/create_contract_spec.rb | 6 +- .../ifc_models/shared_contract_examples.rb | 54 +- .../ifc_models/update_contract_spec.rb | 18 +- .../views/create_contract_bim_spec.rb | 42 +- .../controllers/issues_controller_spec.rb | 48 +- .../work_packages_controller_spec.rb | 30 +- .../bim/spec/factories/bcf_comment_factory.rb | 4 +- .../bim/spec/factories/bcf_issue_factory.rb | 2 +- .../bcf_viewpoint_attachment_factory.rb | 4 +- .../spec/factories/bcf_viewpoint_factory.rb | 2 +- .../bim/spec/factories/ifc_model_factory.rb | 8 +- .../spec/factories/xml_viewpoint_factory.rb | 2 +- .../features/bcf/api_authorization_spec.rb | 60 +- .../features/bcf/bcf_snapshot_column_spec.rb | 10 +- modules/bim/spec/features/bcf/create_spec.rb | 48 +- modules/bim/spec/features/bcf/export_spec.rb | 30 +- .../spec/features/bcf_view_management_spec.rb | 12 +- modules/bim/spec/features/bim_filter_spec.rb | 28 +- .../bim/spec/features/bim_navigation_spec.rb | 52 +- .../features/card_view/bulk_actions_spec.rb | 74 +- .../features/card_view/context_menu_spec.rb | 24 +- .../features/card_view/select_card_spec.rb | 26 +- .../features/card_view/wp_card_status_spec.rb | 18 +- .../switch_display_representations_spec.rb | 20 +- .../ifc_models/direct_ifc_upload_spec.rb | 10 +- .../ifc_models/ifc_upload_shared_examples.rb | 20 +- .../ifc_models/regular_ifc_upload_spec.rb | 10 +- .../spec/features/model_management_spec.rb | 28 +- .../bim/spec/features/model_viewer_spec.rb | 36 +- .../bim_revit_add_in_navigation_spec.rb | 58 +- .../bim_revit_add_in_refresh_button_spec.rb | 16 +- .../bim/spec/features/show_default_spec.rb | 22 +- .../features/viewer/create_viewpoint_spec.rb | 24 +- .../features/viewer/delete_viewpoint_spec.rb | 10 +- .../features/viewer/show_viewpoint_spec.rb | 38 +- .../cache_checksum_integration_spec.rb | 10 +- .../lib/open_project/access_control_spec.rb | 32 +- .../bcf/bcf_json/faster_converter_spec.rb | 42 +- .../viewpoint_reader_shared_examples.rb | 128 +-- .../bcf/bcf_json/viewpoint_reader_spec.rb | 66 +- .../bcf/bcf_xml/viewpoint_writer_spec.rb | 38 +- .../exporter/formatters/bcf_thumbnail_spec.rb | 14 +- modules/bim/spec/models/bcf/issue_spec.rb | 10 +- modules/bim/spec/models/ifc_model_spec.rb | 14 +- .../queries/views/filters/type_filter_spec.rb | 8 +- .../bcf_issue_associated_filter_spec.rb | 16 +- .../selects/bcf_thumbnail_select_spec.rb | 14 +- modules/bim/spec/models/type_spec.rb | 10 +- .../auth/single_representer_rendering_spec.rb | 34 +- .../project_extensions/representer_spec.rb | 104 +- .../single_representer_rendering_spec.rb | 20 +- .../bcf/api/v2_1/shared_examples.rb | 4 +- .../single_representer_rendering_spec.rb | 128 +-- .../single_representer_rendering_spec.rb | 20 +- .../single_representer_rendering_spec.rb | 10 +- .../single_representers_parsing_spec.rb | 26 +- .../requests/api/bcf/v2_1/auth_api_spec.rb | 12 +- .../api/bcf/v2_1/comments_api_spec.rb | 122 +-- .../api/bcf/v2_1/current_user_api_spec.rb | 12 +- .../bcf/v2_1/project_extensions_api_spec.rb | 28 +- .../api/bcf/v2_1/projects_api_spec.rb | 42 +- .../requests/api/bcf/v2_1/shared_responses.rb | 54 +- .../requests/api/bcf/v2_1/topics_api_spec.rb | 192 ++-- .../api/bcf/v2_1/viewpoints_api_spec.rb | 124 +-- .../api/bcf_xml/v1/bcf_xml_api_spec.rb | 40 +- .../seeders/root_seeder_bim_edition_spec.rb | 102 +- .../bcf/issues/create_service_spec.rb | 10 +- .../bcf/viewpoints/create_service_spec.rb | 30 +- .../viewpoints/set_attributes_service_spec.rb | 34 +- .../ifc_models/create_service_spec.rb | 20 +- .../ifc_models/set_attributes_service_spec.rb | 42 +- .../ifc_models/update_service_spec.rb | 56 +- .../view_conversion_service_spec.rb | 40 +- modules/bim/spec/spec_helper.rb | 4 +- .../support/bcf_topic_with_stubbed_comment.rb | 4 +- .../components/bcf_details_viewpoints.rb | 14 +- .../support/components/xeokit_model_tree.rb | 34 +- .../spec/support/pages/bcf/create_split.rb | 8 +- .../pages/ifc_models/bcf_details_page.rb | 6 +- .../spec/support/pages/ifc_models/index.rb | 42 +- .../bim/spec/support/pages/ifc_models/show.rb | 2 +- .../ifc_models/index.html.erb_spec.rb | 42 +- .../spec/workers/ifc_conversion_job_spec.rb | 4 +- .../work_packages/exports/export_job_spec.rb | 20 +- .../components/boards/add_button_component.rb | 6 +- .../app/components/boards/row_component.rb | 10 +- .../app/components/boards/table_component.rb | 8 +- .../controllers/boards/boards_controller.rb | 20 +- modules/boards/app/helpers/boards_helper.rb | 12 +- modules/boards/app/models/boards/grid.rb | 2 +- .../widgets/board_options_representer.rb | 4 +- .../services/boards/base_create_service.rb | 14 +- .../boards/basic_board_create_service.rb | 4 +- .../boards/copy/widgets_dependent_service.rb | 2 +- .../boards/status_board_create_service.rb | 2 +- .../boards/version_board_create_service.rb | 2 +- modules/boards/config/routes.rb | 8 +- .../boards/lib/open_project/boards/engine.rb | 28 +- .../open_project/boards/grid_registration.rb | 10 +- .../boards/patches/setting_seeder_patch.rb | 4 +- modules/boards/lib/openproject-boards.rb | 2 +- modules/boards/openproject-boards.gemspec | 18 +- .../contracts/boards/create_contract_spec.rb | 18 +- .../contracts/grids/create_contract_spec.rb | 14 +- .../boards/spec/factories/board_factory.rb | 42 +- .../action_boards/assignee_board_spec.rb | 96 +- .../custom_field_filters_spec.rb | 36 +- .../action_boards/status_board_spec.rb | 144 +-- .../status_type_moving_board_spec.rb | 48 +- .../action_boards/subproject_board_spec.rb | 86 +- .../action_boards/subtasks_board_spec.rb | 104 +- .../action_boards/version_board_spec.rb | 174 ++-- .../spec/features/board_conflicts_spec.rb | 28 +- .../spec/features/board_enterprise_spec.rb | 54 +- .../spec/features/board_highlighting_spec.rb | 26 +- .../boards/spec/features/board_index_spec.rb | 54 +- .../spec/features/board_management_spec.rb | 158 +-- .../spec/features/board_navigation_spec.rb | 74 +- .../spec/features/board_overview_spec.rb | 66 +- .../board_reference_work_package_spec.rb | 44 +- .../boards/spec/features/board_update_spec.rb | 24 +- .../features/boards_global_create_spec.rb | 72 +- .../spec/features/boards_sorting_spec.rb | 38 +- .../menu_items/global_menu_item_spec.rb | 16 +- .../features/menu_items/top_menu_item_spec.rb | 22 +- .../onboarding/boards_onboarding_tour_spec.rb | 26 +- .../spec/features/support/board_index_page.rb | 26 +- .../spec/features/support/board_list_page.rb | 28 +- .../spec/features/support/board_new_page.rb | 10 +- .../features/support/board_overview_page.rb | 8 +- .../spec/features/support/board_page.rb | 116 +-- .../spec/features/support/onboarding_steps.rb | 10 +- .../boards/grid_registration_spec.rb | 24 +- .../boards/spec/models/boards/grid_spec.rb | 34 +- .../queries/grids/query_integration_spec.rb | 22 +- .../grids/grids_create_form_resource_spec.rb | 46 +- .../api/v3/grids/grids_resource_spec.rb | 196 ++-- .../grids/grids_update_form_resource_spec.rb | 52 +- .../spec/routing/boards_routing_spec.rb | 28 +- .../assignee_board_create_service_spec.rb | 12 +- .../base_create_service_shared_examples.rb | 6 +- .../basic_board_create_service_spec.rb | 22 +- .../services/copy_service_integration_spec.rb | 36 +- .../status_board_create_service_spec.rb | 24 +- .../subproject_board_create_service_spec.rb | 12 +- .../subtasks_board_create_service_spec.rb | 12 +- .../version_board_create_service_spec.rb | 38 +- modules/budgets/Gemfile | 2 +- .../app/controllers/budgets_controller.rb | 30 +- modules/budgets/app/helpers/budgets_helper.rb | 8 +- modules/budgets/app/models/budget.rb | 28 +- .../app/models/journal/budget_journal.rb | 2 +- .../budgets/app/models/labor_budget_item.rb | 2 +- .../work_packages/filter/budget_filter.rb | 4 +- modules/budgets/budgets.gemspec | 4 +- modules/budgets/config/routes.rb | 2 +- .../20200807083950_keep_enabled_module.rb | 10 +- ...0810152654_rename_cost_object_to_budget.rb | 14 +- .../lib/api/v3/budgets/budget_representer.rb | 6 +- .../budgets/lib/api/v3/budgets/budgets_api.rb | 2 +- modules/budgets/lib/budgets/engine.rb | 14 +- .../lib/budgets/hooks/work_package_hook.rb | 8 +- .../spec/features/budgets/add_budget_spec.rb | 102 +- .../budgets/attachment_upload_spec.rb | 62 +- .../spec/features/budgets/copy_budget_spec.rb | 20 +- .../features/budgets/delete_budget_spec.rb | 18 +- .../features/budgets/update_budget_spec.rb | 170 ++-- .../spec/features/costs_edit_fields_spec.rb | 18 +- .../spec/features/work_package_filter_spec.rb | 16 +- .../spec/helpers/budgets_helper_spec.rb | 12 +- .../api/v3/budgets/budget_representer_spec.rb | 26 +- .../spec/lib/api/v3/path_helper_spec.rb | 18 +- ...cost_object_dependency_representer_spec.rb | 28 +- modules/budgets/spec/models/budget_spec.rb | 16 +- .../spec/models/labor_budget_item_spec.rb | 56 +- .../spec/models/permitted_params_spec.rb | 86 +- .../api/v3/budgets/budget_resource_spec.rb | 36 +- .../services/budgets/create_service_spec.rb | 6 +- .../services/budgets/update_service_spec.rb | 6 +- modules/budgets/spec/spec_helper.rb | 4 +- .../budgets/spec/support/pages/budget_form.rb | 26 +- .../spec/support/pages/destroy_info.rb | 14 +- .../budgets/spec/support/pages/edit_budget.rb | 12 +- .../spec/support/pages/index_budget.rb | 2 +- .../budgets/spec/support/pages/new_budget.rb | 4 +- .../calendar/add_button_component.rb | 4 +- .../app/components/calendar/row_component.rb | 6 +- .../components/calendar/table_component.rb | 6 +- .../calendar/calendars_controller.rb | 10 +- .../app/models/ical_token_query_assignment.rb | 4 +- .../services/calendar/create_ical_service.rb | 6 +- .../calendar/views/global_create_service.rb | 2 +- modules/calendar/config/routes.rb | 12 +- .../20230502094813_add_name_to_ical_tokens.rb | 2 +- modules/calendar/lib/open_project/calendar.rb | 2 +- .../lib/open_project/calendar/engine.rb | 34 +- modules/calendar/lib/openproject-calendar.rb | 2 +- modules/calendar/openproject-calendar.gemspec | 20 +- .../controllers/calendar_controller_spec.rb | 16 +- .../spec/controllers/ical_controller_spec.rb | 72 +- .../calendar_create_work_package_spec.rb | 16 +- .../spec/features/calendar_dates_spec.rb | 82 +- .../features/calendar_project_include_spec.rb | 18 +- .../spec/features/calendar_sharing_spec.rb | 92 +- .../calendar_user_interaction_spec.rb | 28 +- .../spec/features/calendar_widget_spec.rb | 30 +- .../features/calendars_global_create_spec.rb | 38 +- .../spec/features/calendars_index_spec.rb | 96 +- .../calendar/spec/features/calendars_spec.rb | 94 +- .../spec/features/query_handling_spec.rb | 40 +- .../calendar/spec/features/shared_context.rb | 6 +- .../spec/routing/calendar_routing_spec.rb | 36 +- .../spec/routing/ical_routing_spec.rb | 10 +- .../spec/services/create_ical_service_spec.rb | 20 +- .../services/global_create_service_spec.rb | 10 +- .../resolve_ical_token_service_spec.rb | 16 +- .../resolve_work_packages_service_spec.rb | 12 +- .../calendar/spec/support/pages/calendar.rb | 50 +- .../app/controllers/cost_types_controller.rb | 34 +- .../app/controllers/costlog_controller.rb | 10 +- .../controllers/hourly_rates_controller.rb | 14 +- .../app/controllers/my/timer_controller.rb | 4 +- modules/costs/app/helpers/costlog_helper.rb | 2 +- .../costs/app/helpers/costs/number_helper.rb | 16 +- .../time_entry_activity_provider.rb | 40 +- modules/costs/app/models/cost_entry.rb | 4 +- modules/costs/app/models/cost_rate.rb | 4 +- modules/costs/app/models/cost_type.rb | 6 +- .../costs/app/models/default_hourly_rate.rb | 10 +- modules/costs/app/models/hourly_rate.rb | 12 +- .../app/models/journal/time_entry_journal.rb | 2 +- modules/costs/app/models/rate.rb | 8 +- modules/costs/app/models/time_entry.rb | 18 +- .../models/time_entry_activities_project.rb | 2 +- .../costs/app/models/time_entry_activity.rb | 4 +- .../app/models/work_package/abstract_costs.rb | 2 +- .../app/models/work_package/labor_costs.rb | 4 +- .../app/models/work_package/material_costs.rb | 4 +- modules/costs/config/routes.rb | 18 +- modules/costs/costs.gemspec | 18 +- ...404_to_v710_aggregated_costs_migrations.rb | 136 +-- ...4416_rename_fixed_version_in_cost_query.rb | 4 +- ...00807083952_rename_time_and_cost_module.rb | 22 +- .../20210726065912_rename_cost_object_type.rb | 4 +- ...0230622074222_add_ongoing_to_time_entry.rb | 2 +- .../aggregated_cost_entry_representer.rb | 2 +- .../api/v3/cost_entries/cost_entries_api.rb | 4 +- .../cost_entries_by_work_package_api.rb | 2 +- .../v3/cost_entries/cost_entry_representer.rb | 2 +- .../work_package_costs_by_type_representer.rb | 2 +- .../v3/cost_types/cost_type_representer.rb | 2 +- .../lib/api/v3/cost_types/cost_types_api.rb | 4 +- .../schemas/time_entry_schema_representer.rb | 22 +- .../time_entries/time_entries_activity_api.rb | 2 +- .../time_entries_activity_representer.rb | 2 +- .../api/v3/time_entries/time_entries_api.rb | 2 +- .../v3/time_entries/time_entry_representer.rb | 8 +- modules/costs/lib/costs.rb | 2 +- modules/costs/lib/costs/engine.rb | 44 +- .../costs/lib/costs/patches/members_patch.rb | 2 +- .../number_to_currency_converter_patch.rb | 4 +- .../costs/lib/costs/patches/project_patch.rb | 4 +- .../lib/costs/patches/setting_seeder_patch.rb | 4 +- modules/costs/lib/costs/patches/user_patch.rb | 6 +- .../time_entries/create_contract_spec.rb | 34 +- .../time_entries/delete_contract_spec.rb | 30 +- .../time_entries/shared_contract_examples.rb | 94 +- .../time_entries/update_contract_spec.rb | 42 +- .../controllers/cost_types_controller_spec.rb | 10 +- .../controllers/costlog_controller_spec.rb | 222 ++-- .../hourly_rates_controller_spec.rb | 18 +- .../work_packages_bulk_controller_spec.rb | 6 +- .../spec/factories/cost_entry_factory.rb | 2 +- .../costs/spec/factories/cost_type_factory.rb | 4 +- .../journal/budget_journal_factory.rb | 2 +- .../journal/time_entry_journal_factory.rb | 2 +- .../cost_entries/add_cost_entry_spec.rb | 86 +- .../add_entry_without_rate_permission_spec.rb | 24 +- .../cost_types/create_cost_type_spec.rb | 60 +- .../cost_types/delete_cost_type_spec.rb | 20 +- .../spec/features/costs_context_menu_spec.rb | 8 +- ...roy_work_package_with_cost_entries_spec.rb | 20 +- .../features/members_hourly_rates_spec.rb | 36 +- .../costs/spec/features/time_entries_spec.rb | 20 +- .../spec/features/time_entry/activity_spec.rb | 22 +- modules/costs/spec/features/timer_spec.rb | 82 +- .../spec/features/users_hourly_rates_spec.rb | 50 +- .../spec/features/view_own_rates_spec.rb | 18 +- .../spec/helpers/costs/number_helper_spec.rb | 56 +- .../aggregated_cost_entry_representer_spec.rb | 14 +- .../cost_entry_representer_spec.rb | 48 +- ..._package_costs_by_type_representer_spec.rb | 22 +- .../cost_types/cost_type_representer_spec.rb | 32 +- .../costs_api_user_permission_check_spec.rb | 120 +-- .../costs/spec/lib/api/v3/path_helper_spec.rb | 18 +- .../time_entry_schema_representer_spec.rb | 172 ++-- ...ies_activity_representer_rendering_spec.rb | 28 +- .../time_entry_representer_parsing_spec.rb | 50 +- .../time_entry_representer_rendering_spec.rb | 124 +-- .../work_package_representer_spec.rb | 156 +-- .../work_package_schema_representer_spec.rb | 66 +- .../lib/costs/query_currency_select_spec.rb | 52 +- modules/costs/spec/models/cost_entry_spec.rb | 78 +- modules/costs/spec/models/cost_type_spec.rb | 16 +- .../spec/models/default_hourly_rate_spec.rb | 8 +- modules/costs/spec/models/hourly_rate_spec.rb | 8 +- .../spec/models/permitted_params_spec.rb | 100 +- .../spec/models/project/activity_spec.rb | 10 +- .../scopes/activated_time_activity_spec.rb | 24 +- ...sible_with_activated_time_activity_spec.rb | 32 +- .../filters/activity_filter_spec.rb | 10 +- .../filters/created_at_filter_spec.rb | 14 +- .../filters/ongoing_filter_spec.rb | 4 +- .../filters/project_filter_spec.rb | 10 +- .../filters/spent_on_filter_spec.rb | 14 +- .../filters/updated_at_filter_spec.rb | 14 +- .../time_entries/filters/user_filter_spec.rb | 10 +- .../filters/work_package_filter_spec.rb | 10 +- .../time_entry_query_integration_spec.rb | 16 +- .../time_entries/time_entry_query_spec.rb | 82 +- modules/costs/spec/models/rate_spec.rb | 40 +- .../scopes/of_user_and_day_spec.rb | 10 +- .../time_entries/scopes/visible_spec.rb | 12 +- .../scopes/active_in_project_spec.rb | 34 +- .../spec/models/time_entry_activity_spec.rb | 14 +- modules/costs/spec/models/time_entry_spec.rb | 96 +- modules/costs/spec/models/user_spec.rb | 32 +- .../ask_before_destruction_spec.rb | 88 +- .../costs/spec/models/work_package_spec.rb | 8 +- .../attachments_by_budget_resource_spec.rb | 4 +- ...t_entries_by_work_package_resource_spec.rb | 42 +- .../cost_entries/cost_entry_resource_spec.rb | 46 +- .../api/cost_types/cost_type_resource_spec.rb | 34 +- .../available_projects_resource_spec.rb | 30 +- .../time_entries/create_form_resource_spec.rb | 82 +- .../time_entry_schema_resource_spec.rb | 24 +- .../time_entries/update_form_resource_spec.rb | 76 +- .../api/time_entry_activity_resource_spec.rb | 28 +- .../requests/api/time_entry_resource_spec.rb | 224 ++--- .../spec/routing/cost_objects_routing_spec.rb | 58 +- .../spec/routing/cost_types_routing_spec.rb | 46 +- .../spec/routing/costlog_routing_spec.rb | 40 +- .../spec/routing/hourly_rates_routing_spec.rb | 42 +- ...set_attributes_service_integration_spec.rb | 8 +- .../set_attributes_service_spec.rb | 38 +- modules/costs/spec/spec_helper.rb | 6 +- modules/dashboards/config/routes.rb | 2 +- modules/dashboards/dashboards.gemspec | 6 +- modules/dashboards/lib/dashboards/engine.rb | 24 +- .../lib/dashboards/grid_registration.rb | 10 +- .../contracts/grids/create_contract_spec.rb | 22 +- .../spec/contracts/grids/shared_examples.rb | 108 +- .../dashboards/spec/factories/grid_factory.rb | 18 +- .../spec/features/custom_text_spec.rb | 76 +- .../dashboards/spec/features/docments_spec.rb | 16 +- .../spec/features/members_principals_spec.rb | 34 +- .../dashboards/spec/features/members_spec.rb | 22 +- .../features/modifying_with_unallowed_spec.rb | 14 +- .../spec/features/navigation_spec.rb | 12 +- modules/dashboards/spec/features/news_spec.rb | 16 +- .../spec/features/project_description_spec.rb | 52 +- .../spec/features/project_status_spec.rb | 46 +- .../spec/features/read_only_allowed_spec.rb | 10 +- .../spec/features/subprojects_spec.rb | 18 +- .../spec/features/time_entries_spec.rb | 40 +- .../features/work_package_calendar_spec.rb | 30 +- .../work_package_graph_overview_spec.rb | 14 +- .../spec/features/work_package_graph_spec.rb | 44 +- .../spec/features/work_package_table_spec.rb | 58 +- .../lib/dashboards/grid_registration_spec.rb | 50 +- .../requests/api/v3/attachments/grid_spec.rb | 2 +- .../grids/grids_create_form_resource_spec.rb | 64 +- .../api/v3/grids/grids_resource_spec.rb | 80 +- .../spec/support/pages/dashboard.rb | 4 +- .../app/controllers/documents_controller.rb | 20 +- .../documents/app/mailers/documents_mailer.rb | 6 +- .../activities/document_activity_provider.rb | 10 +- modules/documents/app/models/document.rb | 4 +- .../documents/app/models/document_category.rb | 2 +- .../documents/enumeration_seeder.rb | 4 +- ...to_v710_aggregated_documents_migrations.rb | 2 +- .../api/v3/documents/document_representer.rb | 2 +- .../lib/api/v3/documents/documents_api.rb | 2 +- .../lib/open_project/documents/engine.rb | 10 +- .../documents/lib/openproject-documents.rb | 2 +- .../documents/openproject-documents.gemspec | 4 +- .../document_representer_rendering_spec.rb | 48 +- .../documents/spec/application_helper_spec.rb | 14 +- .../controllers/documents_controller_spec.rb | 14 +- .../journal/document_journal_factory.rb | 2 +- .../spec/features/attachment_upload_spec.rb | 68 +- .../open_project/markdown_formatting_spec.rb | 22 +- .../spec/lib/redmine/access_control_spec.rb | 10 +- .../spec/mailers/documents_mailer_spec.rb | 8 +- .../spec/models/document_category_spec.rb | 2 +- .../documents/spec/models/document_spec.rb | 8 +- .../queries/documents/document_query_spec.rb | 26 +- .../documents/filters/project_filter_spec.rb | 10 +- .../attachments_by_documents_resource_spec.rb | 4 +- .../v3/documents/documents_resource_spec.rb | 40 +- .../spec/routing/documents_routing_spec.rb | 44 +- ...create_from_model_service_document_spec.rb | 56 +- .../notifications/mail_service_spec.rb | 14 +- .../app/controllers/gantt/gantt_controller.rb | 2 +- .../app/controllers/gantt/menus_controller.rb | 24 +- .../gantt/default_query_generator_service.rb | 12 +- modules/gantt/config/routes.rb | 16 +- modules/gantt/lib/open_project/gantt.rb | 2 +- .../gantt/lib/open_project/gantt/engine.rb | 34 +- modules/gantt/lib/openproject-gantt.rb | 2 +- modules/gantt/openproject-gantt.gemspec | 18 +- .../gantt/gantt_controller_spec.rb | 16 +- .../features/menu/global_gantt_menu_spec.rb | 28 +- .../features/timeline/timeline_dates_spec.rb | 158 +-- .../timeline/timeline_hierarchy_spec.rb | 14 +- .../features/timeline/timeline_labels_spec.rb | 58 +- .../timeline/timeline_navigation_spec.rb | 108 +- ..._of_queries_with_timeline_to_gantt_spec.rb | 10 +- .../gantt/spec/routing/gantt_routing_spec.rb | 56 +- .../app/models/github_check_run.rb | 22 +- .../app/models/github_pull_request.rb | 8 +- ...0210407110000_github_integration_models.rb | 2 +- .../github_check_run_representer.rb | 6 +- .../github_pull_request_representer.rb | 6 +- .../github_pull_requests_api.rb | 2 +- .../github_user_representer.rb | 6 +- .../open_project/github_integration/engine.rb | 28 +- .../github_integration/hook_handler.rb | 10 +- .../notification_handler.rb | 6 +- .../notification_handler/check_run.rb | 2 +- .../notification_handler/helper.rb | 2 +- .../notification_handler/issue_comment.rb | 6 +- .../notification_handler/pull_request.rb | 22 +- .../github_integration/services.rb | 6 +- .../services/upsert_check_run.rb | 32 +- .../services/upsert_github_user.rb | 10 +- .../services/upsert_pull_request.rb | 56 +- .../lib/openproject-github_integration.rb | 2 +- .../openproject-github_integration.gemspec | 10 +- .../factories/github_check_run_factory.rb | 10 +- .../factories/github_pull_request_factory.rb | 6 +- .../features/work_package_activity_spec.rb | 120 +-- .../features/work_package_github_tab_spec.rb | 56 +- .../github_check_run_representer_spec.rb | 52 +- .../github_pull_request_representer_spec.rb | 94 +- .../github_user_representer_spec.rb | 34 +- .../hook_handler_integration_spec.rb | 396 ++++---- .../github_integration/hook_handler_spec.rb | 38 +- .../notification_handler/check_run_spec.rb | 22 +- .../notification_handler/helper_spec.rb | 44 +- .../issue_comment_spec.rb | 124 +-- .../notification_handler/pull_request_spec.rb | 198 ++-- .../notification_handler_spec.rb | 22 +- .../services/upsert_check_run_spec.rb | 58 +- .../services/upsert_github_user_spec.rb | 26 +- .../upsert_partial_pull_request_spec.rb | 56 +- .../services/upsert_pull_request_spec.rb | 150 +-- .../spec/models/github_pull_request_spec.rb | 72 +- .../github_integration/spec/spec_helper.rb | 4 +- .../support/pages/work_package_github_tab.rb | 14 +- .../spec/support/webhook_fixture_helpers.rb | 4 +- .../cron/clear_old_pull_requests_job_spec.rb | 4 +- .../app/models/gitlab_issue.rb | 4 +- .../app/models/gitlab_merge_request.rb | 8 +- .../app/models/gitlab_pipeline.rb | 22 +- ...0211015110000_gitlab_integration_models.rb | 2 +- .../20211015110002_add_gitlab_issues.rb | 2 +- .../gitlab_issues/gitlab_issue_representer.rb | 6 +- .../gitlab_issues/gitlab_user_representer.rb | 6 +- .../gitlab_merge_request_representer.rb | 6 +- .../gitlab_pipeline_representer.rb | 6 +- .../gitlab_user_representer.rb | 6 +- .../open_project/gitlab_integration/engine.rb | 40 +- .../gitlab_integration/hook_handler.rb | 8 +- .../notification_handler/helper.rb | 8 +- .../notification_handler/issue_hook.rb | 8 +- .../merge_request_hook.rb | 20 +- .../notification_handler/note_hook.rb | 32 +- .../notification_handler/push_hook.rb | 12 +- .../notification_handler/system_hook.rb | 12 +- .../notification_handlers.rb | 24 +- .../gitlab_integration/services.rb | 8 +- .../services/params_helper.rb | 4 +- .../services/upsert_issue.rb | 4 +- .../services/upsert_issue_note.rb | 4 +- .../services/upsert_merge_request.rb | 8 +- .../lib/openproject-gitlab_integration.rb | 2 +- .../openproject-gitlab_integration.gemspec | 18 +- .../spec/factories/gitlab_issues.rb | 6 +- .../spec/factories/gitlab_merge_requests.rb | 6 +- .../spec/factories/gitlab_pipelines.rb | 8 +- ...work_package_gitlab_issue_activity_spec.rb | 84 +- ...kage_gitlab_merge_request_activity_spec.rb | 84 +- .../features/work_package_gitlab_tab_spec.rb | 64 +- .../gitlab_issue_representer_spec.rb | 62 +- .../gitlab_user_representer_spec.rb | 34 +- .../gitlab_merge_request_representer_spec.rb | 84 +- .../gitlab_pipeline_representer_spec.rb | 52 +- .../gitlab_user_representer_spec.rb | 34 +- .../notification_handler/issue_hook_spec.rb | 128 +-- .../merge_request_hook_spec.rb | 158 +-- .../pipeline_hook_spec.rb | 26 +- .../spec/models/gitlab_issue_spec.rb | 72 +- .../spec/models/gitlab_merge_request_spec.rb | 82 +- .../spec/models/gitlab_pipeline_spec.rb | 30 +- .../spec/models/gitlab_user_spec.rb | 6 +- .../gitlab_integration/spec/spec_helper.rb | 2 +- .../support/pages/work_package_gitlab_tab.rb | 14 +- modules/grids/Gemfile | 2 +- .../app/contracts/grids/base_contract.rb | 2 +- .../app/contracts/grids/create_contract.rb | 2 +- .../app/contracts/grids/delete_contract.rb | 2 +- .../app/contracts/grids/update_contract.rb | 2 +- .../app/controllers/api/v3/grids/grids_api.rb | 4 +- .../grids/base_in_project_controller.rb | 2 +- modules/grids/app/models/grids/grid.rb | 2 +- .../app/queries/grids/filters/page_filter.rb | 8 +- .../app/queries/grids/filters/scope_filter.rb | 8 +- .../api/v3/grids/grid_representer.rb | 8 +- .../grids/schemas/grid_schema_representer.rb | 18 +- .../widgets/chart_options_representer.rb | 2 +- .../widgets/default_options_representer.rb | 2 +- .../widgets/query_options_representer.rb | 4 +- ...time_entry_calendar_options_representer.rb | 2 +- .../v3/grids/widgets/widget_representer.rb | 2 +- .../services/grids/set_attributes_service.rb | 4 +- modules/grids/grids.gemspec | 4 +- modules/grids/lib/grids.rb | 2 +- .../in_project_base_registration.rb | 54 +- .../lib/grids/configuration/registration.rb | 6 +- .../grids/configuration/widget_strategy.rb | 2 +- .../contracts/grids/create_contract_spec.rb | 40 +- .../contracts/grids/delete_contract_spec.rb | 14 +- .../spec/contracts/grids/shared_examples.rb | 72 +- .../contracts/grids/update_contract_spec.rb | 26 +- modules/grids/spec/factories/grid_factory.rb | 2 +- .../spec/factories/grid_widget_factory.rb | 2 +- .../grid_payload_representer_parsing_spec.rb | 40 +- .../grids/grid_representer_rendering_spec.rb | 108 +- .../schemas/grid_schema_representer_spec.rb | 156 +-- .../lib/api/v3/utilities/file_helper_spec.rb | 10 +- modules/grids/spec/models/grids/grid_spec.rb | 6 +- .../grids/spec/models/grids/shared_model.rb | 22 +- .../grids/spec/models/grids/widget_spec.rb | 24 +- .../grids/grids_create_form_resource_spec.rb | 26 +- .../api/v3/grids/grids_resource_spec.rb | 28 +- .../v3/grids/grids_schema_resource_spec.rb | 20 +- .../grids/grids_update_form_resource_spec.rb | 12 +- .../services/grids/create_service_spec.rb | 6 +- .../grids/set_attributes_service_spec.rb | 138 +-- .../services/grids/update_service_spec.rb | 38 +- modules/grids/spec/support/pages/grid.rb | 20 +- .../app/models/job_status/status.rb | 14 +- modules/job_status/config/routes.rb | 6 +- .../migrate/20200422105623_add_job_status.rb | 2 +- .../20200610124259_extend_job_status.rb | 4 +- .../lib/api/v3/job_status/job_status_api.rb | 2 +- .../v3/job_status/job_status_representer.rb | 2 +- .../job_status/lib/open_project/job_status.rb | 2 +- .../lib/open_project/job_status/engine.rb | 12 +- .../open_project/job_status/event_listener.rb | 14 +- .../job_status/lib/openproject-job_status.rb | 2 +- .../job_status/openproject-job_status.gemspec | 16 +- .../factories/delayed_job_status_factory.rb | 2 +- .../spec/features/job_status_spec.rb | 36 +- .../services/documents/create_service_spec.rb | 6 +- .../services/documents/update_service_spec.rb | 6 +- .../memberships/table_component.rb | 6 +- .../synchronized_filters/row_component.rb | 4 +- .../synchronized_filters/table_component.rb | 16 +- .../synchronized_groups/row_component.rb | 2 +- .../synchronized_groups/table_component.rb | 20 +- .../synchronized_filters_controller.rb | 8 +- .../synchronized_groups_controller.rb | 10 +- modules/ldap_groups/app/models/ldap_groups.rb | 2 +- .../app/models/ldap_groups/membership.rb | 2 +- .../models/ldap_groups/synchronized_filter.rb | 10 +- .../models/ldap_groups/synchronized_group.rb | 10 +- .../ldap_groups/synchronize_filter_service.rb | 2 +- modules/ldap_groups/config/routes.rb | 8 +- .../20200427082928_ldap_groups_timestamps.rb | 12 +- ...0210219092709_move_base_dn_into_filters.rb | 2 +- .../lib/open_project/ldap_groups/engine.rb | 14 +- .../ldap_groups/patches/group_patch.rb | 2 +- .../patches/ldap_auth_source_patch.rb | 4 +- .../ldap_groups/patches/user_patch.rb | 2 +- .../lib/openproject-ldap_groups.rb | 2 +- .../ldap_groups/lib/tasks/ldap_groups.rake | 48 +- .../openproject-ldap_groups.gemspec | 12 +- .../synchronized_groups_controller_spec.rb | 132 +-- .../factories/synchronized_filter_factory.rb | 10 +- .../factories/synchronized_group_factory.rb | 4 +- .../spec/features/administration_spec.rb | 60 +- .../features/filter_administration_spec.rb | 18 +- .../spec/models/membership_spec.rb | 6 +- .../spec/models/synchronized_filter_spec.rb | 16 +- .../spec/models/synchronized_group_spec.rb | 54 +- .../spec/services/synchronization_spec.rb | 154 +-- .../spec/services/synchronize_filter_spec.rb | 78 +- .../components/banner_message_component.rb | 2 +- .../meeting_agenda_items/form_component.rb | 6 +- .../meeting_agenda_items/item_component.rb | 2 +- .../item_component/show_component.rb | 8 +- .../meeting_agenda_items/list_component.rb | 8 +- .../meetings/add_button_component.rb | 2 +- .../app/components/meetings/row_component.rb | 6 +- .../sidebar/participants_component.rb | 8 +- .../components/meetings/table_component.rb | 2 +- .../controllers/meeting_agendas_controller.rb | 6 +- .../meeting_contents_controller.rb | 20 +- .../controllers/meeting_minutes_controller.rb | 2 +- .../work_package_meetings_tab_controller.rb | 4 +- .../app/forms/meeting_agenda_item/duration.rb | 2 +- .../forms/meeting_agenda_item/meeting_form.rb | 2 +- .../app/forms/meeting_agenda_item/title.rb | 4 +- .../forms/meeting_agenda_item/work_package.rb | 6 +- .../app/helpers/meeting_contents_helper.rb | 66 +- .../meeting/app/helpers/meetings_helper.rb | 38 +- modules/meeting/app/mailers/meeting_mailer.rb | 18 +- .../journal/meeting_agenda_item_journal.rb | 6 +- .../models/journal/meeting_content_journal.rb | 4 +- .../app/models/journal/meeting_journal.rb | 4 +- modules/meeting/app/models/meeting_agenda.rb | 4 +- .../meeting/app/models/meeting_agenda_item.rb | 8 +- modules/meeting/app/models/meeting_content.rb | 4 +- .../meeting/app/models/meeting_participant.rb | 6 +- .../queries/meetings/filters/time_filter.rb | 4 +- .../meeting/app/models/structured_meeting.rb | 4 +- .../demo_data/meeting_agenda_items_seeder.rb | 14 +- .../meetings/demo_data/meeting_seeder.rb | 8 +- .../app/services/meetings/copy_service.rb | 10 +- .../app/services/meetings/create_service.rb | 2 +- .../app/services/meetings/ical_service.rb | 6 +- ...8_to_v710_aggregated_meeting_migrations.rb | 62 +- .../20230911102918_add_type_to_meeting.rb | 2 +- .../meeting_content_representer.rb | 2 +- .../api/v3/meetings/meeting_representer.rb | 2 +- .../lib/api/v3/meetings/meetings_api.rb | 2 +- modules/meeting/lib/open_project/meeting.rb | 2 +- .../meeting/patches/setting_seeder_patch.rb | 4 +- modules/meeting/lib/openproject-meeting.rb | 2 +- modules/meeting/openproject-meeting.gemspec | 18 +- .../create_contract_spec.rb | 30 +- .../delete_contract_spec.rb | 20 +- .../update_contract_spec.rb | 26 +- .../meeting_contents/update_contract_spec.rb | 16 +- .../meetings/create_contract_spec.rb | 16 +- .../meetings/update_contract_spec.rb | 20 +- .../controllers/meetings_controller_spec.rb | 92 +- .../factories/meeting_agenda_item_factory.rb | 2 +- .../meeting_content_journal_factory.rb | 2 +- .../meeting/spec/factories/meeting_factory.rb | 6 +- .../spec/factories/meeting_journal_factory.rb | 4 +- .../spec/features/meetings_activity_spec.rb | 24 +- .../spec/features/meetings_close_spec.rb | 34 +- .../spec/features/meetings_copy_spec.rb | 28 +- .../spec/features/meetings_delete_spec.rb | 22 +- .../meetings_global_menu_item_spec.rb | 22 +- .../spec/features/meetings_index_spec.rb | 154 +-- .../spec/features/meetings_locking_spec.rb | 24 +- .../spec/features/meetings_new_spec.rb | 154 +-- .../features/meetings_participants_spec.rb | 24 +- .../spec/features/meetings_search_spec.rb | 24 +- .../spec/features/meetings_show_spec.rb | 116 +-- .../attachment_upload_spec.rb | 28 +- .../mobile_structure_meeting_spec.rb | 26 +- .../structured_meeting_crud_spec.rb | 170 ++-- .../work_package_meetings_tab_spec.rb | 118 +-- .../v3/meetings/meeting_representer_spec.rb | 46 +- .../lib/api/v3/utilities/path_helper_spec.rb | 10 +- .../open_project/markdown_formatting_spec.rb | 22 +- .../spec/mailers/meeting_mailer_spec.rb | 120 +-- .../meeting_acts_as_journalized_spec.rb | 90 +- .../spec/models/meeting_agenda_item_spec.rb | 118 +-- .../spec/models/meeting_agenda_spec.rb | 18 +- .../spec/models/meeting_minutes_spec.rb | 16 +- modules/meeting/spec/models/meeting_spec.rb | 90 +- .../spec/models/permitted_params_spec.rb | 6 +- .../spec/models/project/activity_spec.rb | 10 +- .../spec/models/queries/meeting_query_spec.rb | 44 +- .../api/v3/attachments/meeting_agenda_spec.rb | 4 +- .../v3/attachments/meeting_minutes_spec.rb | 4 +- .../api/v3/attachments/meetings_spec.rb | 4 +- .../api/v3/meetings/meetings_resource_spec.rb | 30 +- .../meeting/spec/requests/meetings_spec.rb | 30 +- .../spec/routing/previews_routing_spec.rb | 20 +- .../seeders/demo_data/project_seeder_spec.rb | 26 +- .../meeting_contents/update_service_spec.rb | 6 +- .../meetings/copy_service_integration_spec.rb | 32 +- .../services/meetings/create_service_spec.rb | 6 +- .../services/meetings/ical_service_spec.rb | 26 +- .../services/meetings/update_service_spec.rb | 6 +- ...eferences_service_call_integration_spec.rb | 14 +- modules/meeting/spec/spec_helper.rb | 2 +- .../spec/support/pages/meetings/edit.rb | 6 +- .../spec/support/pages/meetings/index.rb | 68 +- .../spec/support/pages/meetings/new.rb | 18 +- .../spec/support/pages/meetings/show.rb | 8 +- .../pages/structured_meeting/mobile/show.rb | 4 +- .../support/pages/structured_meeting/show.rb | 44 +- .../pages/work_package_meetings_tab.rb | 42 +- modules/my_page/Gemfile | 2 +- modules/my_page/config/routes.rb | 2 +- modules/my_page/lib/my_page/engine.rb | 4 +- .../my_page/lib/my_page/grid_registration.rb | 54 +- modules/my_page/my_page.gemspec | 6 +- .../contracts/grids/create_contract_spec.rb | 22 +- .../spec/contracts/grids/shared_examples.rb | 110 +- .../contracts/grids/update_contract_spec.rb | 10 +- .../my_page/spec/factories/grid_factory.rb | 6 +- .../spec/features/my/accountable_spec.rb | 30 +- .../spec/features/my/assigned_to_me_spec.rb | 50 +- .../spec/features/my/custom_text_spec.rb | 42 +- .../spec/features/my/documents_spec.rb | 16 +- .../my_page/spec/features/my/my_page_spec.rb | 20 +- ...e_widget_with_a_negative_time_zone_spec.rb | 34 +- modules/my_page/spec/features/my/news_spec.rb | 16 +- .../my/time_entries_current_user_spec.rb | 106 +- .../features/my/work_package_table_spec.rb | 56 +- .../my_page/spec/models/grids/my_page_spec.rb | 18 +- .../my_page/spec/models/grids/shared_model.rb | 20 +- .../grids/filters/scope_filter_spec.rb | 18 +- .../queries/grids/query_integration_spec.rb | 24 +- .../grids/grids_create_form_resource_spec.rb | 58 +- .../api/v3/grids/grids_resource_spec.rb | 152 +-- .../grids/grids_update_form_resource_spec.rb | 50 +- modules/my_page/spec/support/pages/my/page.rb | 4 +- .../openid_connect/providers/row_component.rb | 8 +- .../providers/table_component.rb | 4 +- .../openid_connect/providers_controller.rb | 8 +- .../openid_connect/user_session_link.rb | 4 +- .../app/session/session_controller.rb | 2 +- modules/openid_connect/config/routes.rb | 2 +- .../20221122072857_add_oidc_session_link.rb | 2 +- .../lib/open_project/openid_connect.rb | 8 +- .../open_project/openid_connect/hooks/hook.rb | 2 +- .../lib/openproject-openid_connect.rb | 2 +- .../openproject-openid_connect.gemspec | 24 +- .../controllers/providers_controller_spec.rb | 102 +- .../factories/user_session_link_factory.rb | 4 +- .../spec/lib/session_mapper_spec.rb | 36 +- .../models/openid_connect/provider_spec.rb | 12 +- .../spec/models/user_session_link_spec.rb | 6 +- .../spec/requests/openid_connect_spec.rb | 96 +- .../requests/openid_connect_spec_helpers.rb | 8 +- .../providers_controller_spec.rb | 32 +- modules/openid_connect/spec/spec_helper.rb | 2 +- .../20190826083604_my_project_page_to_grid.rb | 76 +- .../lib/overviews/grid_registration.rb | 22 +- modules/overviews/overviews.gemspec | 6 +- .../contracts/grids/create_contract_spec.rb | 52 +- .../contracts/roles/base_contract_spec.rb | 20 +- .../overviews/overviews_controller_spec.rb | 18 +- .../overviews/spec/factories/grid_factory.rb | 2 +- .../low_permissions_page_creation_spec.rb | 14 +- .../features/managing_overview_page_spec.rb | 32 +- .../spec/features/navigation_spec.rb | 12 +- .../lib/overview/grid_registration_spec.rb | 16 +- .../api/v3/grids/grids_resource_spec.rb | 70 +- .../services/copy_service_integration_spec.rb | 38 +- .../overviews/spec/support/pages/overview.rb | 4 +- modules/recaptcha/Gemfile | 2 +- .../controllers/recaptcha/admin_controller.rb | 6 +- .../recaptcha/request_controller.rb | 14 +- .../recaptcha/app/helpers/recaptcha_helper.rb | 8 +- .../recaptcha/app/models/recaptcha/entry.rb | 2 +- modules/recaptcha/config/routes.rb | 10 +- .../recaptcha/lib/open_project/recaptcha.rb | 8 +- .../open_project/recaptcha/configuration.rb | 6 +- .../lib/open_project/recaptcha/engine.rb | 12 +- .../recaptcha/lib/openproject-recaptcha.rb | 2 +- .../recaptcha/openproject-recaptcha.gemspec | 6 +- .../spec/controllers/admin_controller_spec.rb | 20 +- .../controllers/request_controller_spec.rb | 36 +- .../controllers/cost_reports_controller.rb | 44 +- .../reporting/app/helpers/reporting_helper.rb | 34 +- modules/reporting/app/models/cost_query.rb | 24 +- .../models/cost_query/custom_field_mixin.rb | 14 +- .../models/cost_query/filter/activity_id.rb | 2 +- .../app/models/cost_query/filter/budget_id.rb | 2 +- .../models/cost_query/filter/cost_type_id.rb | 2 +- .../models/cost_query/filter/created_on.rb | 2 +- .../cost_query/filter/custom_field_entries.rb | 16 +- .../models/cost_query/filter/logged_by_id.rb | 2 +- .../app/models/cost_query/filter/no_filter.rb | 2 +- .../cost_query/filter/overridden_costs.rb | 2 +- .../cost_query/filter/permission_filter.rb | 12 +- .../models/cost_query/filter/priority_id.rb | 2 +- .../models/cost_query/filter/project_id.rb | 4 +- .../app/models/cost_query/filter/status_id.rb | 4 +- .../app/models/cost_query/filter/tmonth.rb | 2 +- .../app/models/cost_query/filter/type_id.rb | 2 +- .../models/cost_query/filter/updated_on.rb | 2 +- .../app/models/cost_query/filter/user_id.rb | 2 +- .../cost_query/filter/work_package_id.rb | 4 +- .../app/models/cost_query/operator.rb | 6 +- .../app/models/cost_query/sql_statement.rb | 2 +- modules/reporting/app/models/entry.rb | 4 +- .../app/workers/cost_query/export_job.rb | 12 +- modules/reporting/config/routes.rb | 2 +- ...to_v710_aggregated_reporting_migrations.rb | 2 +- .../reporting/cost_entry_xls_table.rb | 14 +- .../lib/open_project/reporting/engine.rb | 36 +- .../reporting/patches/setting_seeder_patch.rb | 4 +- .../reporting/patches/to_date_patch.rb | 2 +- .../reporting/lib/openproject-reporting.rb | 2 +- modules/reporting/lib/report/chainable.rb | 8 +- modules/reporting/lib/report/filter/base.rb | 4 +- .../lib/report/filter/multi_choice.rb | 2 +- .../reporting/lib/report/filter/no_filter.rb | 2 +- modules/reporting/lib/report/group_by/base.rb | 4 +- .../lib/report/group_by/singleton_value.rb | 8 +- .../lib/report/group_by/sql_aggregation.rb | 2 +- modules/reporting/lib/report/operator.rb | 94 +- modules/reporting/lib/report/query_utils.rb | 10 +- modules/reporting/lib/report/result.rb | 4 +- modules/reporting/lib/report/sql_statement.rb | 14 +- modules/reporting/lib/report/validation.rb | 2 +- modules/reporting/lib/report/walker.rb | 4 +- modules/reporting/lib/widget/base.rb | 10 +- .../reporting/lib/widget/controls/apply.rb | 8 +- .../reporting/lib/widget/controls/clear.rb | 6 +- .../reporting/lib/widget/controls/delete.rb | 18 +- .../lib/widget/controls/query_name.rb | 10 +- modules/reporting/lib/widget/controls/save.rb | 10 +- .../reporting/lib/widget/controls/save_as.rb | 42 +- modules/reporting/lib/widget/cost_types.rb | 4 +- modules/reporting/lib/widget/filters.rb | 32 +- modules/reporting/lib/widget/filters/date.rb | 16 +- modules/reporting/lib/widget/filters/heavy.rb | 16 +- modules/reporting/lib/widget/filters/label.rb | 2 +- .../reporting/lib/widget/filters/operators.rb | 18 +- .../reporting/lib/widget/filters/option.rb | 4 +- .../lib/widget/filters/remove_button.rb | 6 +- .../reporting/lib/widget/filters/text_box.rb | 12 +- modules/reporting/lib/widget/group_bys.rb | 30 +- modules/reporting/lib/widget/settings.rb | 14 +- .../reporting/lib/widget/settings/fieldset.rb | 8 +- modules/reporting/lib/widget/table.rb | 10 +- .../reporting/lib/widget/table/entry_table.rb | 84 +- .../lib/widget/table/report_table.rb | 50 +- .../reporting/openproject-reporting.gemspec | 4 +- .../cost_reports_controller_spec.rb | 26 +- .../custom_fields_controller_spec.rb | 48 +- .../spec/features/calculations_spec.rb | 16 +- .../spec/features/custom_fields_spec.rb | 134 +-- .../spec/features/export_cost_report_spec.rb | 18 +- .../reporting/spec/features/filter_spec.rb | 16 +- .../reporting/spec/features/group_by_spec.rb | 68 +- .../spec/features/main_menu_item_spec.rb | 30 +- .../reporting/spec/features/me_value_spec.rb | 38 +- modules/reporting/spec/features/menu_spec.rb | 42 +- .../reporting/spec/features/my_time_spec.rb | 20 +- .../spec/features/permissions_spec.rb | 90 +- .../spec/features/project_context_spec.rb | 10 +- .../reporting/spec/features/saving_spec.rb | 44 +- .../spec/features/subproject_spec.rb | 14 +- .../components/cost_reports_base_table.rb | 16 +- .../support/pages/cost_report_page.rb | 34 +- .../spec/features/top_menu_item_spec.rb | 32 +- .../spec/features/update_cost_report_spec.rb | 14 +- .../spec/features/update_entries_spec.rb | 42 +- .../features/work_package_costlog_spec.rb | 20 +- .../spec/helpers/reporting_helper_spec.rb | 24 +- .../lib/open_project/configuration_spec.rb | 12 +- .../spec/models/cost_query/cache_spec.rb | 18 +- .../spec/models/cost_query/chaining_spec.rb | 20 +- .../spec/models/cost_query/filter_spec.rb | 68 +- .../spec/models/cost_query/group_by_spec.rb | 2 +- .../models/cost_query/integration_spec.rb | 16 +- .../spec/models/cost_query/operator_spec.rb | 146 +-- .../spec/models/cost_query/validation_spec.rb | 2 +- .../spec/requests/custom_field_cache_spec.rb | 14 +- modules/reporting/spec/spec_helper.rb | 2 +- .../spec/support/configuration_helper.rb | 2 +- .../reporting/spec/support/query_helper.rb | 2 +- .../parse_create_params_service.rb | 8 +- .../nextcloud/add_user_to_group_command.rb | 16 +- .../nextcloud/create_folder_command.rb | 14 +- .../nextcloud/download_link_query.rb | 24 +- .../nextcloud/file_ids_query.rb | 2 +- .../nextcloud/file_info_query.rb | 24 +- .../nextcloud/files_info_query.rb | 28 +- .../folder_files_file_ids_deep_query.rb | 2 +- .../nextcloud/internal/propfind_query.rb | 24 +- .../nextcloud/open_storage_query.rb | 2 +- .../remove_user_from_group_command.rb | 14 +- .../nextcloud/rename_file_command.rb | 8 +- .../nextcloud/set_permissions_command.rb | 38 +- .../nextcloud/upload_link_query.rb | 24 +- .../storage_parent_folder_extractor.rb | 4 +- ..._managed_project_folders_form_component.rb | 6 +- .../forms/general_info_form_component.rb | 10 +- .../forms/oauth_client_form_component.rb | 10 +- .../storages/admin/health_status_component.rb | 2 +- ...auth_access_grant_nudge_modal_component.rb | 24 +- .../oauth_application_info_copy_component.rb | 6 +- .../admin/oauth_client_info_component.rb | 4 +- .../storages/admin/redirect_uri_component.rb | 2 +- .../storages/admin/row_component.rb | 14 +- .../admin/storage_view_information.rb | 14 +- .../storages/admin/table_component.rb | 18 +- .../open_project_storage_modal_component.rb | 8 +- .../body.rb | 8 +- .../project_storages/members/row_component.rb | 4 +- .../members/table_component.rb | 6 +- .../project_storages/row_component.rb | 14 +- .../project_storages/table_component.rb | 16 +- .../storages/app/constants/storages/admin.rb | 10 +- .../storages/file_links/create_contract.rb | 2 +- .../storages/storages/base_contract.rb | 6 +- .../storages/storages/nextcloud_contract.rb | 2 +- ...ally_managed_project_folders_controller.rb | 16 +- .../admin/oauth_clients_controller.rb | 6 +- .../storages/admin/storages_controller.rb | 22 +- .../project_storage_members_controller.rb | 4 +- .../storages/project_storages_controller.rb | 2 +- .../application_password_input.rb | 8 +- .../automatic_management_checkbox.rb | 4 +- .../forms/storages/admin/oauth_client_form.rb | 2 +- .../admin/provider_drive_id_input_form.rb | 6 +- .../admin/provider_host_input_form.rb | 4 +- .../admin/provider_name_input_form.rb | 4 +- .../admin/provider_tenant_id_input_form.rb | 10 +- .../admin/provider_type_hidden_input_form.rb | 2 +- .../storages/admin/submit_or_cancel_form.rb | 4 +- .../file_links/filter/storage_filter.rb | 2 +- .../filter/storage_url_filter.rb | 4 +- .../projects/filter/storage_id_filter.rb | 2 +- .../projects/filter/storage_url_filter.rb | 4 +- .../filter/file_link_origin_id_filter.rb | 2 +- .../filter/linkable_to_storage_id_filter.rb | 2 +- .../filter/linkable_to_storage_url_filter.rb | 2 +- .../work_packages/filter/storage_id_filter.rb | 2 +- .../filter/storage_url_filter.rb | 2 +- .../filter/storages_filter_mixin.rb | 4 +- .../storages/app/models/storages/file_link.rb | 2 +- .../models/storages/last_project_folder.rb | 4 +- .../app/models/storages/nextcloud_storage.rb | 4 +- .../app/models/storages/one_drive_storage.rb | 2 +- .../app/models/storages/project_storage.rb | 18 +- .../app/models/storages/storage_file_info.rb | 2 +- .../app/models/storages/upload_link.rb | 2 +- ...ud_group_folder_properties_sync_service.rb | 10 +- .../oauth_applications/create_service.rb | 2 +- .../one_drive_managed_folder_sync_service.rb | 8 +- .../storages/set_attributes_service.rb | 4 +- .../nextcloud_compatible_host_validator.rb | 8 +- modules/storages/config/routes.rb | 24 +- ...65928_add_storages_permissions_to_roles.rb | 2 +- ...0063148_add_provider_fields_to_storages.rb | 2 +- ..._change_storage_provider_fields_default.rb | 2 +- ...30601082746_create_last_project_folders.rb | 2 +- ...31109080454_add_health_info_to_storages.rb | 4 +- ...43303_add_health_checked_at_to_storages.rb | 2 +- .../v3/file_links/file_link_representer.rb | 18 +- .../lib/api/v3/file_links/file_links_api.rb | 2 +- .../work_packages_file_links_api.rb | 4 +- .../project_storage_representer.rb | 2 +- .../project_storages/project_storages_api.rb | 4 +- .../storage_files/storage_file_representer.rb | 2 +- .../storage_files_representer.rb | 2 +- .../storage_upload_link_representer.rb | 4 +- .../lib/api/v3/storages/storages_api.rb | 2 +- modules/storages/lib/open_project/storages.rb | 2 +- modules/storages/lib/openproject-storages.rb | 2 +- modules/storages/openproject-storages.gemspec | 16 +- .../storages/peripherals/registry_spec.rb | 176 ++-- .../nextcloud/download_link_query_spec.rb | 28 +- .../nextcloud/files_info_query_spec.rb | 48 +- .../nextcloud/open_file_link_query_spec.rb | 18 +- .../nextcloud/open_storage_query_spec.rb | 14 +- .../nextcloud/upload_link_query_spec.rb | 18 +- .../one_drive/create_folder_command_spec.rb | 24 +- .../one_drive/delete_folder_command_spec.rb | 18 +- .../one_drive/download_link_query_spec.rb | 18 +- .../one_drive/files_info_query_spec.rb | 124 +-- .../one_drive/rename_file_command_spec.rb | 14 +- .../one_drive/set_permissions_command_spec.rb | 84 +- .../one_drive/upload_link_query_spec.rb | 26 +- .../one_drive/util_spec.rb | 28 +- .../project_storages/row_component_spec.rb | 24 +- .../admin/health_status_component_spec.rb | 34 +- .../new_storage_button_component_spec.rb | 8 +- ...access_grant_nudge_modal_component_spec.rb | 32 +- .../admin/oauth_client_info_component_spec.rb | 12 +- .../admin/storage_list_component_spec.rb | 10 +- .../admin/storage_row_component_spec.rb | 72 +- .../file_links/create_contract_spec.rb | 18 +- .../file_links/delete_contract_spec.rb | 16 +- .../file_links/shared_contract_examples.rb | 108 +- .../base_contract_spec.rb | 30 +- .../project_storages/base_contract_spec.rb | 40 +- .../project_storages/create_contract_spec.rb | 16 +- .../project_storages/delete_contract_spec.rb | 16 +- .../shared_contract_examples.rb | 34 +- .../storages/nextcloud_contract_spec.rb | 38 +- .../nextcloud_create_contract_spec.rb | 10 +- .../nextcloud_delete_contract_spec.rb | 10 +- .../nextcloud_update_contract_spec.rb | 10 +- .../storages/one_drive_contract_spec.rb | 12 +- .../one_drive_create_contract_spec.rb | 14 +- .../one_drive_delete_contract_spec.rb | 10 +- .../one_drive_update_contract_spec.rb | 10 +- .../storages/shared_contract_examples.rb | 206 ++-- .../factories/file_link_element_factory.rb | 6 +- .../spec/factories/file_link_factory.rb | 2 +- .../factories/last_project_folder_factory.rb | 2 +- .../spec/factories/project_storage_factory.rb | 6 +- .../factories/storage_file_info_factory.rb | 2 +- .../spec/factories/webdav_data_factory.rb | 256 ++--- .../spec/features/create_file_links_spec.rb | 82 +- ...ete_project_storage_and_file_links_spec.rb | 32 +- .../storages/spec/features/shared_context.rb | 6 +- .../spec/features/show_file_links_spec.rb | 56 +- .../storages/admin/create_storage_spec.rb | 230 ++--- .../storages/admin/index_storages_spec.rb | 28 +- .../oauth_access_grant_spec.rb | 26 +- .../spec/features/storages_module_spec.rb | 64 +- .../view_project_storage_members_spec.rb | 36 +- .../file_link_representer_parsing_spec.rb | 24 +- .../file_link_representer_rendering_spec.rb | 132 +-- .../project_storage_representer_spec.rb | 48 +- .../storage_file_representer_spec.rb | 44 +- .../storage_files_representer_spec.rb | 42 +- .../storage_upload_link_representer_spec.rb | 32 +- .../storages_representer_parsing_spec.rb | 32 +- .../append_storages_hosts_to_csp_hook_spec.rb | 52 +- .../spec/models/storages/file_link_spec.rb | 6 +- .../storages/last_project_folder_spec.rb | 6 +- .../models/storages/nextcloud_storage_spec.rb | 98 +- .../models/storages/one_drive_storage_spec.rb | 22 +- .../models/storages/project_storage_spec.rb | 64 +- .../storages/shared_base_storage_spec.rb | 46 +- .../spec/models/storages/storage_spec.rb | 18 +- .../manage_storage_in_project_spec.rb | 4 +- .../mixed_case_file_links_integration_spec.rb | 34 +- .../project_storages/project_storages_spec.rb | 128 +-- .../projects/projects_storages_filter_spec.rb | 44 +- .../api/v3/storages/storage_files_api_spec.rb | 180 ++-- .../work_packages_linkable_filter_spec.rb | 42 +- .../work_packages_linked_filter_spec.rb | 90 +- .../append_content_security_policy_spec.rb | 28 +- .../requests/project_storages_open_spec.rb | 88 +- .../oauth_access_grant_flow_spec.rb | 22 +- modules/storages/spec/seeders/seeder_spec.rb | 6 +- ...eferences_service_call_integration_spec.rb | 22 +- .../file_links/create_service_spec.rb | 10 +- .../file_links/delete_service_spec.rb | 8 +- .../file_links/file_link_sync_service_spec.rb | 40 +- .../file_links/set_attributes_service_spec.rb | 22 +- ...oup_folder_properties_sync_service_spec.rb | 252 ++--- .../oauth_applications/create_service_spec.rb | 10 +- ..._drive_managed_folder_sync_service_spec.rb | 104 +- .../project_storages/create_service_spec.rb | 10 +- .../project_storages/delete_service_spec.rb | 42 +- .../set_attributes_service_spec.rb | 22 +- .../shared_event_gun_examples.rb | 6 +- .../project_storages/update_service_spec.rb | 10 +- .../storages/storages/create_service_spec.rb | 12 +- .../storages/storages/delete_service_spec.rb | 6 +- .../storages/set_attributes_service_spec.rb | 64 +- ...provider_fields_attributes_service_spec.rb | 32 +- .../storages/storages/update_service_spec.rb | 26 +- modules/storages/spec/spec_helper.rb | 16 +- .../support/components/file_picker_dialog.rb | 14 +- .../support/ensure_connection_path_helper.rb | 2 +- .../spec/support/json_response_helper.rb | 22 +- .../spec/support/storage_server_helpers.rb | 18 +- .../spec/support/user_permissions_helper.rb | 4 +- ...eanup_uncontainered_file_links_job_spec.rb | 6 +- .../manage_nextcloud_integration_job_spec.rb | 44 +- .../team_planner/add_button_component.rb | 6 +- .../team_planner/overview/table_component.rb | 8 +- .../components/team_planner/row_component.rb | 6 +- .../team_planner/table_component.rb | 6 +- .../team_planner/team_planner_controller.rb | 10 +- .../views/global_create_service.rb | 2 +- modules/team_planner/config/routes.rb | 18 +- .../lib/open_project/team_planner.rb | 2 +- .../lib/open_project/team_planner/engine.rb | 40 +- .../lib/openproject-team_planner.rb | 2 +- .../openproject-team_planner.gemspec | 18 +- .../create_contract_team_planner_spec.rb | 26 +- .../team_planner_onboarding_tour_spec.rb | 18 +- .../spec/features/query_handling_spec.rb | 36 +- .../spec/features/shared_context.rb | 6 +- ...planner_add_existing_work_packages_spec.rb | 64 +- .../team_planner_context_menu_spec.rb | 12 +- .../spec/features/team_planner_create_spec.rb | 36 +- .../spec/features/team_planner_dates_spec.rb | 56 +- .../team_planner_error_handling_spec.rb | 18 +- .../team_planner_global_create_spec.rb | 44 +- .../spec/features/team_planner_index_spec.rb | 36 +- .../spec/features/team_planner_menu_spec.rb | 60 +- .../features/team_planner_overview_spec.rb | 64 +- .../team_planner_project_include_spec.rb | 18 +- .../team_planner_remove_event_spec.rb | 24 +- .../spec/features/team_planner_spec.rb | 82 +- .../features/team_planner_split_view_spec.rb | 18 +- ...eam_planner_subproject_constraints_spec.rb | 14 +- .../spec/features/team_planner_upsale_spec.rb | 20 +- .../team_planner_user_interaction_spec.rb | 34 +- .../features/team_planner_view_modes_spec.rb | 40 +- .../permissions/view_team_planner_spec.rb | 8 +- .../api/v3/views/create_resource_spec.rb | 24 +- .../spec/routing/team_planner_routing_spec.rb | 70 +- .../views/global_create_service_spec.rb | 14 +- .../support/onboarding/onboarding_steps.rb | 12 +- .../spec/support/pages/team_planner.rb | 98 +- modules/two_factor_authentication/Gemfile | 2 +- .../devices/row_component.rb | 22 +- .../devices/table_component.rb | 20 +- .../two_factor_authentication/backup_codes.rb | 4 +- .../two_factor_devices_controller.rb | 6 +- .../my/backup_codes_controller.rb | 2 +- .../my/remember_cookie_controller.rb | 4 +- .../my/two_factor_devices_controller.rb | 14 +- .../two_factor_settings_controller.rb | 8 +- .../users/two_factor_devices_controller.rb | 16 +- .../app/models/two_factor_authentication.rb | 2 +- .../two_factor_authentication/device.rb | 2 +- .../two_factor_authentication/device/sms.rb | 10 +- .../two_factor_authentication/device/totp.rb | 6 +- .../two_factor_authentication/login_token.rb | 2 +- .../remembered_auth_token.rb | 2 +- .../token_service.rb | 6 +- .../use_backup_code_service.rb | 2 +- .../config/routes.rb | 46 +- ...103300_aggregated_mobile_otp_migrations.rb | 2 +- ...4130336_add_default_otp_channel_to_user.rb | 2 +- .../20160331190036_change_default_channel.rb | 8 +- .../20171023190036_model_reorganization.rb | 10 +- .../two_factor_authentication/engine.rb | 26 +- .../patches/user_patch.rb | 6 +- .../token_strategy/base.rb | 6 +- .../token_strategy/message_bird.rb | 24 +- .../token_strategy/sns.rb | 16 +- .../token_strategy/totp.rb | 2 +- .../token_strategy/webauthn.rb | 2 +- .../token_strategy_manager.rb | 16 +- .../openproject-two_factor_authentication.rb | 2 +- ...nproject-two_factor_authentication.gemspec | 12 +- ...thentication_controller_shared_examples.rb | 74 +- .../authentication_controller_spec.rb | 62 +- .../two_factor_devices_controller_spec.rb | 110 +- .../my/remember_cookie_controller_spec.rb | 16 +- .../my/two_factor_devices_controller_spec.rb | 138 +-- .../two_factor_devices_controller_spec.rb | 100 +- ...wo_factor_authentication_device_factory.rb | 14 +- .../spec/features/account_activation_spec.rb | 40 +- .../admin_edit_two_factor_devices_spec.rb | 64 +- .../generate_backup_codes_spec.rb | 26 +- .../login_with_backup_code_spec.rb | 48 +- .../features/login/login_enforced_2fa_spec.rb | 28 +- .../features/login/login_with_2fa_spec.rb | 22 +- .../features/login/login_without_2fa_spec.rb | 24 +- .../login/switch_available_devices_spec.rb | 24 +- .../features/my_two_factor_devices_spec.rb | 102 +- .../spec/features/password_change_spec.rb | 54 +- .../login_with_remember_cookie_spec.rb | 38 +- .../spec/features/shared_2fa_examples.rb | 52 +- .../lib/token_strategies/message_bird_spec.rb | 50 +- .../spec/lib/token_strategy_manager_spec.rb | 52 +- .../spec/models/device/default_device_spec.rb | 12 +- .../spec/models/device/totp_spec.rb | 32 +- .../spec/models/device/webauthn_spec.rb | 2 +- .../spec/models/login_token_spec.rb | 2 +- .../spec/models/user_spec.rb | 4 +- .../my/two_factor_devices_spec.rb | 48 +- .../users/two_factor_devices_spec.rb | 48 +- .../token_delivery/message_bird_spec.rb | 84 +- .../spec/services/token_delivery/sns_spec.rb | 48 +- .../spec/services/token_delivery/totp_spec.rb | 26 +- .../spec/services/token_service_spec.rb | 56 +- .../outgoing/deliveries/response_component.rb | 2 +- .../outgoing/deliveries/table_component.rb | 12 +- .../outgoing/webhooks/row_component.rb | 18 +- .../outgoing/webhooks/table_component.rb | 20 +- .../webhooks/incoming/hooks_controller.rb | 4 +- .../webhooks/outgoing/admin_controller.rb | 2 +- modules/webhooks/app/models/webhooks.rb | 2 +- modules/webhooks/app/models/webhooks/log.rb | 2 +- .../webhooks/app/models/webhooks/project.rb | 2 +- .../webhooks/app/models/webhooks/webhook.rb | 6 +- .../outgoing/update_webhook_service.rb | 2 +- .../app/workers/cleanup_webhook_logs_job.rb | 2 +- .../app/workers/project_webhook_job.rb | 2 +- .../app/workers/represented_webhook_job.rb | 2 +- modules/webhooks/config/routes.rb | 10 +- .../lib/open_project/webhooks/engine.rb | 14 +- .../webhooks/event_resources/attachment.rb | 6 +- .../webhooks/event_resources/base.rb | 2 +- .../webhooks/event_resources/project.rb | 4 +- .../webhooks/event_resources/time_entry.rb | 4 +- .../webhooks/event_resources/work_package.rb | 2 +- modules/webhooks/lib/openproject-webhooks.rb | 2 +- modules/webhooks/openproject-webhooks.gemspec | 10 +- .../deliveries/table_component_spec.rb | 12 +- .../outgoing/admin_controller_spec.rb | 100 +- .../controllers/webhooks_controller_spec.rb | 14 +- .../spec/factories/webhook_factory.rb | 2 +- .../spec/factories/webhook_log_factory.rb | 10 +- .../spec/features/manage_webhooks_spec.rb | 90 +- modules/webhooks/spec/lib/hook_spec.rb | 14 +- modules/webhooks/spec/lib/webhooks_spec.rb | 30 +- modules/webhooks/spec/models/webhook_spec.rb | 28 +- .../outgoing/admin_controller_spec.rb | 44 +- modules/webhooks/spec/spec_helper.rb | 2 +- .../workers/attachment_webhook_job_spec.rb | 16 +- .../spec/workers/project_webhook_job_spec.rb | 14 +- .../workers/time_entry_webhook_job_spec.rb | 10 +- .../workers/work_package_webhook_job_spec.rb | 8 +- .../concerns/spreadsheet_builder.rb | 2 +- .../xls_export/work_package/exporter/xls.rb | 4 +- .../lib/open_project/xls_export/engine.rb | 10 +- .../xls_export/spreadsheet_builder.rb | 16 +- .../lib/open_project/xls_export/xls_views.rb | 4 +- .../xls_export/lib/openproject-xls_export.rb | 2 +- .../xls_export/openproject-xls_export.gemspec | 8 +- .../spec/lib/custom_field_xls_export_spec.rb | 18 +- .../spec/lib/spreadsheet_builder_spec.rb | 2 +- .../exporter/xls_integration_spec.rb | 112 +-- .../work_packages_controller_patch_spec.rb | 40 +- script/api/spec | 8 +- script/api/validate_spec | 8 +- script/bulk_run_rspec | 46 +- script/docs/check_links | 54 +- script/github_pr_errors | 88 +- script/i18n/generate_languages_translations | 36 +- script/i18n/generate_seeders_i18n_source_file | 26 +- script/i18n/print_packager_languages_choices | 10 +- script/pdf_export/generate_styles_doc | 8 +- script/pdf_export/validate_styles | 12 +- .../activities/item_component_spec.rb | 62 +- spec/components/application_component_spec.rb | 16 +- .../attribute_group_component_spec.rb | 30 +- .../attribute_group_header_component_spec.rb | 6 +- .../attribute_key_value_component_spec.rb | 36 +- .../op_turbo/frame_component_spec.rb | 32 +- .../common/duration_component_spec.rb | 50 +- .../share/user_details_component_spec.rb | 98 +- spec/constants/settings/definition_spec.rb | 580 +++++------ .../create_contract_integration_spec.rb | 28 +- .../attachments/create_contract_spec.rb | 60 +- .../base_contract_spec.rb | 8 +- .../omniauth_auth_hash_contract_spec.rb | 58 +- .../custom_actions/cu_contract_spec.rb | 52 +- .../custom_fields/create_contract_spec.rb | 8 +- .../custom_fields/update_contract_spec.rb | 8 +- spec/contracts/groups/create_contract_spec.rb | 14 +- .../groups/shared_contract_examples.rb | 48 +- spec/contracts/groups/update_contract_spec.rb | 14 +- .../contracts/members/create_contract_spec.rb | 32 +- .../members/shared_contract_examples.rb | 56 +- .../contracts/members/update_contract_spec.rb | 22 +- .../messages/create_contract_spec.rb | 6 +- .../messages/shared_contract_examples.rb | 10 +- .../messages/update_contract_spec.rb | 10 +- .../notifications/create_contract_spec.rb | 40 +- .../oauth_clients/create_contract_spec.rb | 48 +- .../oauth_clients/delete_contract_spec.rb | 10 +- .../placeholder_users/create_contract_spec.rb | 22 +- .../placeholder_users/delete_contract_spec.rb | 20 +- .../shared_contract_examples.rb | 46 +- .../placeholder_users/update_contract_spec.rb | 8 +- .../projects/archive_contract_spec.rb | 46 +- spec/contracts/projects/base_contract_spec.rb | 16 +- .../projects/create_contract_spec.rb | 12 +- .../projects/delete_contract_spec.rb | 8 +- .../projects/enabled_modules_contract_spec.rb | 18 +- .../projects/shared_contract_examples.rb | 138 +-- .../projects/unarchive_contract_spec.rb | 8 +- .../projects/update_contract_spec.rb | 10 +- spec/contracts/queries/base_contract_spec.rb | 40 +- .../contracts/queries/create_contract_spec.rb | 22 +- .../queries/global_create_contract_spec.rb | 12 +- .../queries/ical_sharing_contract_spec.rb | 72 +- .../project_queries/create_contract_spec.rb | 6 +- .../project_queries/delete_contract_spec.rb | 12 +- .../project_queries/loading_contract_spec.rb | 14 +- .../shared_contract_examples.rb | 38 +- .../queries/shared_contract_examples.rb | 26 +- .../contracts/queries/update_contract_spec.rb | 36 +- .../relations/create_contract_spec.rb | 6 +- .../relations/shared_contract_examples.rb | 36 +- .../relations/update_contract_spec.rb | 16 +- spec/contracts/roles/create_contract_spec.rb | 20 +- .../roles/shared_contract_examples.rb | 36 +- spec/contracts/roles/update_contract_spec.rb | 20 +- .../settings/update_contract_spec.rb | 8 +- .../shared/model_contract_shared_context.rb | 34 +- .../user_preferences/params_contract_spec.rb | 80 +- .../user_preferences/update_contract_spec.rb | 170 ++-- spec/contracts/users/create_contract_spec.rb | 24 +- .../users/shared_contract_examples.rb | 58 +- spec/contracts/users/update_contract_spec.rb | 40 +- .../versions/create_contract_spec.rb | 30 +- .../versions/shared_contract_examples.rb | 144 +-- .../versions/update_contract_spec.rb | 28 +- ...reate_contract_work_packages_table_spec.rb | 32 +- .../views/shared_contract_examples.rb | 38 +- spec/contracts/views/update_contract_spec.rb | 14 +- .../wiki_pages/create_contract_spec.rb | 16 +- .../wiki_pages/shared_contract_examples.rb | 62 +- .../create_contract_spec.rb | 38 +- .../shared_contract_examples.rb | 34 +- .../update_contract_spec.rb | 24 +- .../create_note_contract_spec.rb | 24 +- .../work_packages/shared_base_contract.rb | 50 +- .../work_packages/update_contract_spec.rb | 180 ++-- spec/controllers/account_controller_spec.rb | 494 ++++----- .../controllers/activities_controller_spec.rb | 92 +- .../aggregation_settings_controller_spec.rb | 4 +- .../settings/api_settings_controller_spec.rb | 4 +- .../attachments_settings_controller_spec.rb | 4 +- ...authentication_settings_controller_spec.rb | 32 +- .../date_format_settings_controller_spec.rb | 18 +- .../general_settings_controller_spec.rb | 4 +- .../icalendar_settings_controller_spec.rb | 12 +- ...incoming_mails_settings_controller_spec.rb | 4 +- .../languages_settings_controller_spec.rb | 36 +- ..._notifications_settings_controller_spec.rb | 4 +- .../projects_settings_controller_spec.rb | 94 +- .../repositories_settings_controller_spec.rb | 4 +- .../users_settings_controller_spec.rb | 4 +- .../work_packages_settings_controller_spec.rb | 4 +- .../working_days_settings_controller_spec.rb | 50 +- spec/controllers/admin_controller_spec.rb | 40 +- .../announcements_controller_spec.rb | 12 +- .../application_controller_spec.rb | 42 +- .../attribute_help_texts_controller_spec.rb | 40 +- .../controllers/categories_controller_spec.rb | 68 +- spec/controllers/colors_controller_spec.rb | 52 +- .../concerns/auth_source_slo_spec.rb | 20 +- .../concerns/auth_source_sso_spec.rb | 42 +- .../concerns/omniauth_login_spec.rb | 316 +++--- .../concerns/user_invitation_spec.rb | 10 +- .../custom_actions_controller_spec.rb | 136 +-- .../custom_fields_controller_spec.rb | 42 +- .../custom_styles_controller_spec.rb | 154 +-- .../enterprises_controller_spec.rb | 80 +- .../enumerations_controller_spec.rb | 30 +- spec/controllers/forums_controller_spec.rb | 148 +-- spec/controllers/groups_controller_spec.rb | 74 +- .../controllers/homescreen_controller_spec.rb | 56 +- spec/controllers/journals_controller_spec.rb | 48 +- .../ldap_auth_sources_controller_spec.rb | 52 +- spec/controllers/messages_controller_spec.rb | 58 +- spec/controllers/my_controller_spec.rb | 148 +-- .../news/comments_controller_spec.rb | 16 +- spec/controllers/news_controller_spec.rb | 78 +- .../oauth/applications_controller_spec.rb | 34 +- .../oauth/grants_controller_spec.rb | 18 +- .../memberships_controller_spec.rb | 56 +- .../placeholder_users_controller_spec.rb | 164 +-- .../projects/identifier_controller_spec.rb | 18 +- spec/controllers/projects_controller_spec.rb | 64 +- .../projects_settings_menu_controller_spec.rb | 62 +- .../controllers/queries/params_parser_spec.rb | 116 +-- .../repositories_controller_spec.rb | 162 +-- spec/controllers/roles_controller_spec.rb | 148 +-- spec/controllers/search_controller_spec.rb | 116 +-- spec/controllers/statuses_controller_spec.rb | 96 +- spec/controllers/sys_controller_spec.rb | 484 ++++----- spec/controllers/types_controller_spec.rb | 220 ++-- .../users/memberships_controller_spec.rb | 10 +- spec/controllers/users_controller_spec.rb | 410 ++++---- spec/controllers/versions_controller_spec.rb | 132 +-- spec/controllers/wiki_controller_spec.rb | 530 +++++----- .../wiki_menu_authentication_spec.rb | 16 +- .../wiki_menu_items_controller_spec.rb | 50 +- .../auto_completes_controller_spec.rb | 52 +- .../work_packages/bulk_controller_spec.rb | 216 ++-- .../work_packages/moves_controller_spec.rb | 186 ++-- .../work_packages/reports_controller_spec.rb | 68 +- .../work_packages_controller_spec.rb | 136 +-- spec/controllers/workflows_controller_spec.rb | 134 +-- spec/decorators/single_spec.rb | 6 +- spec/factories/announcement_factory.rb | 2 +- spec/factories/attachment_factory.rb | 8 +- spec/factories/attribute_help_text_factory.rb | 16 +- spec/factories/color_factory.rb | 38 +- spec/factories/custom_style_factory.rb | 14 +- spec/factories/custom_value_factory.rb | 4 +- spec/factories/day_factory.rb | 2 +- spec/factories/design_color_factory.rb | 2 +- spec/factories/enumerations_factory.rb | 22 +- spec/factories/export_factory.rb | 2 +- spec/factories/file_factory.rb | 14 +- spec/factories/group_factory.rb | 2 +- .../journal/attachable_journal_factory.rb | 2 +- .../journal/attachment_journal_factory.rb | 2 +- .../journal/changeset_journal_factory.rb | 2 +- .../journal/customizable_journal_factory.rb | 2 +- .../journal/message_journal_factory.rb | 4 +- .../factories/journal/news_journal_factory.rb | 4 +- .../journal/project_journal_factory.rb | 2 +- .../journal/wiki_page_journal_factory.rb | 2 +- .../journal/work_package_journal_factory.rb | 4 +- spec/factories/journal_factory.rb | 26 +- spec/factories/ldap_auth_source_factory.rb | 12 +- spec/factories/menu_item_factory.rb | 2 +- spec/factories/oauth_access_token_factory.rb | 4 +- spec/factories/oauth_application_factory.rb | 10 +- spec/factories/oauth_client_factory.rb | 2 +- spec/factories/oauth_client_token_factory.rb | 4 +- spec/factories/placeholder_user_factory.rb | 2 +- spec/factories/project_factory.rb | 2 +- spec/factories/project_role_factory.rb | 6 +- .../queries/project_query_factory.rb | 2 +- spec/factories/relation_factory.rb | 4 +- spec/factories/repository_factory.rb | 14 +- spec/factories/token_factory.rb | 16 +- spec/factories/type_factory.rb | 24 +- spec/factories/user_password_factory.rb | 8 +- spec/factories/user_session_factory.rb | 4 +- spec/factories/view_factory.rb | 8 +- spec/factories/view_team_planner_factory.rb | 6 +- spec/factories/wiki_factory.rb | 2 +- spec/factories/wiki_redirect_factory.rb | 4 +- .../work_package_custom_field_factory.rb | 10 +- spec/factories/work_package_role_factory.rb | 6 +- spec/factories/work_packags_export_factory.rb | 2 +- spec/features/a11y/home_spec.rb | 12 +- .../alternative_name_autcompleting_spec.rb | 30 +- .../work_packages/work_package_query_spec.rb | 130 +-- .../activity_page_navigation_spec.rb | 114 +-- .../activities/disabled_activity_spec.rb | 6 +- .../project_attributes_activity_spec.rb | 64 +- .../activities/time_entry_activity_spec.rb | 42 +- .../features/activities/wiki_activity_spec.rb | 34 +- .../quarantined_attachments_spec.rb | 22 +- .../admin/attribute_help_texts_spec.rb | 94 +- spec/features/admin/backup_spec.rb | 16 +- .../custom_fields/list_custom_field_spec.rb | 30 +- .../multi_value_custom_fields_spec.rb | 54 +- .../custom_fields/user_custom_field_spec.rb | 28 +- .../admin/enterprise/enterprise_spec.rb | 62 +- .../admin/enterprise/enterprise_trial_spec.rb | 130 +-- .../admin/enterprise/token_domain_spec.rb | 64 +- spec/features/admin/enumerations_spec.rb | 8 +- .../features/admin/languages_settings_spec.rb | 40 +- .../admin/menu_item_traversal_spec.rb | 30 +- .../oauth_applications_management_spec.rb | 60 +- spec/features/admin/settings_spec.rb | 8 +- .../admin/test_mail_notification_spec.rb | 12 +- spec/features/admin/working_days_spec.rb | 170 ++-- spec/features/api_docs/index_spec.rb | 20 +- spec/features/attachments/attachments_spec.rb | 20 +- .../auth/auth_source_sso_login_spec.rb | 10 +- .../auth/auth_source_sso_logout_spec.rb | 22 +- spec/features/auth/auth_stages_spec.rb | 52 +- spec/features/auth/consent_auth_stage_spec.rb | 136 +-- spec/features/auth/login_spec.rb | 68 +- spec/features/auth/logout_spec.rb | 12 +- spec/features/auth/lost_password_spec.rb | 58 +- spec/features/auth/omniauth_spec.rb | 170 ++-- spec/features/categories/delete_spec.rb | 26 +- .../colors/color_administration_spec.rb | 10 +- .../custom_fields/activate_in_project_spec.rb | 16 +- .../custom_fields/create_bool_spec.rb | 6 +- .../custom_fields/create_date_spec.rb | 6 +- .../custom_fields/create_float_spec.rb | 6 +- .../features/custom_fields/create_int_spec.rb | 6 +- .../custom_fields/create_long_text_spec.rb | 16 +- .../custom_fields/custom_fields_page.rb | 6 +- .../multi_user_custom_field_spec.rb | 34 +- .../multi_value_custom_field_spec.rb | 92 +- .../multi_version_custom_field_spec.rb | 8 +- .../non_open_version_custom_field_spec.rb | 8 +- .../custom_fields/reorder_options_spec.rb | 12 +- spec/features/errors/errors_handler_spec.rb | 24 +- .../features/forums/attachment_upload_spec.rb | 62 +- spec/features/forums/message_spec.rb | 50 +- spec/features/forums/sticky_spec.rb | 12 +- .../global_create_project_spec.rb | 40 +- .../global_role_assignment_spec.rb | 60 +- .../global_roles/global_role_crud_spec.rb | 28 +- .../global_roles/global_role_update_spec.rb | 12 +- .../global_roles/member_roles_spec.rb | 14 +- .../global_roles/mock_global_permissions.rb | 6 +- spec/features/global_roles/no_module_spec.rb | 14 +- .../features/groups/group_memberships_spec.rb | 132 +-- spec/features/groups/group_show_spec.rb | 24 +- spec/features/groups/groups_spec.rb | 10 +- spec/features/groups/membership_spec.rb | 72 +- spec/features/homescreen/index_spec.rb | 32 +- spec/features/homescreen/robots_spec.rb | 22 +- spec/features/ldap_auth_sources/crud_spec.rb | 70 +- spec/features/localization_spec.rb | 22 +- spec/features/members/error_messages_spec.rb | 22 +- .../members/membership_filter_spec.rb | 42 +- .../features/members/membership_share_spec.rb | 36 +- spec/features/members/membership_spec.rb | 146 +-- spec/features/members/pagination_spec.rb | 50 +- spec/features/members/roles_spec.rb | 36 +- spec/features/menu_items/help_menu_spec.rb | 30 +- .../menu_items/menu_permissions_spec.rb | 36 +- .../menu_items/query_menu_item_spec.rb | 52 +- .../menu_items/quick_add_menu_spec.rb | 34 +- .../features/menu_items/top_menu_item_spec.rb | 76 +- .../users_and_permissions_menu_item_spec.rb | 8 +- .../menu_items/wiki_menu_item_spec.rb | 74 +- .../my/autologin_tokens_management_spec.rb | 46 +- spec/features/my/sessions_management_spec.rb | 40 +- .../news/creation_and_commenting_spec.rb | 28 +- spec/features/news/global_menu_item_spec.rb | 22 +- .../features/notifications/navigation_spec.rb | 24 +- .../notification_center_date_alerts_spec.rb | 80 +- .../notification_center_sidemenu_spec.rb | 86 +- .../notification_center_spec.rb | 64 +- .../notification_center/split_screen_spec.rb | 22 +- .../notifications/reminder_mail_spec.rb | 18 +- .../settings/immediate_reminder_spec.rb | 22 +- .../my_notifications_settings_spec.rb | 8 +- .../settings/pause_reminder_settings_spec.rb | 16 +- .../settings/reminder_email_settings_spec.rb | 20 +- .../settings/workdays_settings_spec.rb | 36 +- .../oauth/authorization_code_flow_spec.rb | 74 +- spec/features/oauth/pkce_spec.rb | 32 +- .../onboarding/onboarding_tour_spec.rb | 70 +- .../features/placeholder_users/create_spec.rb | 38 +- .../features/placeholder_users/delete_spec.rb | 50 +- .../edit_placeholder_users_spec.rb | 34 +- spec/features/placeholder_users/index_spec.rb | 44 +- .../placeholder_user_memberships_spec.rb | 16 +- .../principals/shared_memberships_examples.rb | 56 +- .../projects/attribute_help_texts_spec.rb | 36 +- spec/features/projects/destroy_spec.rb | 10 +- spec/features/projects/export_spec.rb | 46 +- .../projects/global_menu_item_spec.rb | 32 +- spec/features/projects/modules_spec.rb | 60 +- .../features/projects/persisted_lists_spec.rb | 150 +-- .../projects/project_autocomplete_spec.rb | 78 +- .../project_status_administration_spec.rb | 34 +- .../projects/projects_portfolio_spec.rb | 84 +- .../projects/subproject_creation_spec.rb | 18 +- spec/features/projects/template_spec.rb | 60 +- .../projects/work_package_type_mgmt_spec.rb | 26 +- .../checkout_instructions_spec.rb | 22 +- .../repositories/create_repository_spec.rb | 134 +-- .../repositories/repository_settings_spec.rb | 78 +- spec/features/roles/create_spec.rb | 64 +- .../recently_viewed_work_packages_spec.rb | 22 +- spec/features/search/search_spec.rb | 188 ++-- .../features/security/expire_sessions_spec.rb | 28 +- spec/features/security/session_ttl_spec.rb | 30 +- .../statuses/read_only_statuses_spec.rb | 26 +- .../statuses/statuses_administration_spec.rb | 40 +- .../components/attribute_help_text_modal.rb | 14 +- .../support/components/danger_zone.rb | 8 +- .../components/ng_select_autocomplete.rb | 2 +- .../support/components/time_logging_modal.rb | 42 +- spec/features/support/work_package_table.rb | 4 +- .../types/activate_in_project_spec.rb | 10 +- spec/features/types/crud_spec.rb | 46 +- .../types/form_configuration_query_spec.rb | 152 +-- .../features/types/form_configuration_spec.rb | 204 ++-- .../types/reset_form_configuration_spec.rb | 20 +- spec/features/users/brute_force_spec.rb | 12 +- spec/features/users/create_spec.rb | 124 +-- spec/features/users/delete_spec.rb | 78 +- spec/features/users/edit_users_spec.rb | 86 +- spec/features/users/index_spec.rb | 56 +- spec/features/users/invitation_spec.rb | 32 +- .../invite_user_modal/custom_fields_spec.rb | 46 +- .../invite_user_modal_spec.rb | 112 +-- ...permission_lacking_current_project_spec.rb | 18 +- .../subproject_invite_spec.rb | 28 +- .../users/notifications/shared_examples.rb | 64 +- .../user_notifications_settings_spec.rb | 14 +- spec/features/users/password_change_spec.rb | 118 +-- spec/features/users/self_registration_spec.rb | 78 +- spec/features/users/show_spec.rb | 14 +- .../users/unaccent_user_filter_spec.rb | 46 +- spec/features/users/user_memberships_spec.rb | 16 +- spec/features/versions/create_spec.rb | 22 +- spec/features/versions/delete_spec.rb | 30 +- spec/features/versions/edit_spec.rb | 16 +- .../versions/project_settings_index_spec.rb | 8 +- .../versions/roadmap_filtering_spec.rb | 34 +- spec/features/views/shared_examples.rb | 46 +- .../features/watching/toggle_watching_spec.rb | 14 +- .../wiki/adding_editing_history_spec.rb | 90 +- spec/features/wiki/attachment_upload_spec.rb | 58 +- spec/features/wiki/child_pages_spec.rb | 16 +- spec/features/wiki/edit_new_page_spec.rb | 12 +- spec/features/wiki/rename_spec.rb | 22 +- spec/features/wiki/restore_main_item_spec.rb | 10 +- .../wiki/wiki_page_external_link_spec.rb | 14 +- .../wiki/wiki_page_navigation_spec.rb | 18 +- spec/features/wiki/wiki_unicode_spec.rb | 32 +- spec/features/work_package_show_spec.rb | 6 +- .../attribute_help_texts_spec.rb | 20 +- .../bulk/copy_work_package_spec.rb | 144 +-- .../bulk/move_work_package_spec.rb | 124 +-- .../bulk/update_work_package_spec.rb | 138 +-- .../work_packages/cancel_editing_spec.rb | 56 +- spec/features/work_packages/copy_spec.rb | 60 +- .../custom_actions_me_value_spec.rb | 20 +- .../custom_actions/custom_actions_spec.rb | 276 ++--- .../datepicker_follows_relation_spec.rb | 48 +- .../datepicker/datepicker_logic_spec.rb | 674 ++++++------- .../datepicker_non_working_day_spec.rb | 20 +- .../datepicker/datepicker_parent_spec.rb | 14 +- .../details/closed_status_and_version_spec.rb | 10 +- .../details/context_menu_spec.rb | 18 +- .../custom_fields/custom_field_spec.rb | 140 +-- .../work_packages/details/date_editor_spec.rb | 248 ++--- .../details/details_refreshing_spec.rb | 10 +- .../details/details_toolbar_spec.rb | 20 +- .../details/inplace_editor/shared_examples.rb | 114 +-- .../inplace_editor/subject_editor_spec.rb | 62 +- .../inplace_editor/version_editor_spec.rb | 78 +- .../markdown/activity_comments_spec.rb | 158 +-- .../markdown/description_editor_spec.rb | 58 +- .../work_packages/details/milestones_spec.rb | 20 +- .../query_groups/relation_query_group_spec.rb | 62 +- .../relations/hierarchy_custom_fields_spec.rb | 28 +- .../relations/hierarchy_milestone_spec.rb | 18 +- .../details/relations/hierarchy_spec.rb | 100 +- .../details/relations/relations_spec.rb | 138 +-- .../work_packages/details/workdays_spec.rb | 26 +- .../display_fields/date_field_display_spec.rb | 12 +- .../estimated_hours_display_spec.rb | 44 +- .../display_fields/spent_time_display_spec.rb | 78 +- ..._display_representations_on_mobile_spec.rb | 16 +- .../edit_on_assign_version_permission_spec.rb | 26 +- ...nge_work_package_status_permission_spec.rb | 28 +- .../work_packages/edit_work_package_spec.rb | 120 +-- spec/features/work_packages/export_spec.rb | 72 +- .../work_packages/highlighting_spec.rb | 86 +- .../features/work_packages/index_sums_spec.rb | 204 ++-- .../features/work_packages/navigation_spec.rb | 86 +- .../new/attributes_from_filter_spec.rb | 84 +- .../new/new_work_package_datepicker_spec.rb | 18 +- .../new/new_work_package_spec.rb | 186 ++-- .../work_package_default_description_spec.rb | 44 +- .../features/work_packages/pagination_spec.rb | 38 +- .../project_include_shared_examples.rb | 58 +- .../work_packages/remaining_time_spec.rb | 22 +- spec/features/work_packages/reports_spec.rb | 66 +- .../scheduling/scheduling_mode_spec.rb | 102 +- .../work_packages/select/select_query_spec.rb | 34 +- .../select/select_work_package_row_spec.rb | 28 +- .../work_packages/share/access_spec.rb | 44 +- .../work_packages/share/bulk_sharing_spec.rb | 84 +- .../share/enterprise_restriction_spec.rb | 14 +- .../work_packages/share/filter_spec.rb | 142 +-- .../work_packages/share/multi_invite_spec.rb | 84 +- .../work_packages/share/notification_spec.rb | 14 +- .../share/share_account_activation_spec.rb | 34 +- .../work_packages/share/share_spec.rb | 148 +-- .../features/work_packages/shared_contexts.rb | 4 +- .../sorting/manual_sorting_spec.rb | 122 +-- .../sorting/table_sorting_spec.rb | 40 +- ...ching_to_project_from_work_package_spec.rb | 10 +- .../baseline_invisible_project_spec.rb | 30 +- .../table/baseline/baseline_query_spec.rb | 104 +- .../table/baseline/baseline_rendering_spec.rb | 132 +-- .../table/configuration_modal/column_spec.rb | 54 +- .../table/configuration_modal/filter_spec.rb | 16 +- .../table_configuration_modal_spec.rb | 14 +- .../context_menu_shared_examples.rb | 60 +- .../table/context_menu/context_menu_spec.rb | 32 +- .../table/delete_work_packages_spec.rb | 30 +- .../table/duration_field_spec.rb | 12 +- .../table/edit_work_packages_spec.rb | 76 +- .../work_packages/table/empty_filters_spec.rb | 6 +- .../table/group_by/group_by_boolean_spec.rb | 16 +- .../table/group_by/group_by_progress_spec.rb | 32 +- .../table/group_by/group_by_spec.rb | 6 +- .../table/group_by/group_headers_spec.rb | 26 +- .../table/hierarchy/hierarchy_indent_spec.rb | 30 +- .../hierarchy/hierarchy_parent_below_spec.rb | 40 +- .../table/hierarchy/hierarchy_sorting_spec.rb | 16 +- .../table/hierarchy/hierarchy_spec.rb | 56 +- .../hierarchy/hierarchy_vs_grouping_spec.rb | 14 +- .../table/hierarchy/parent_column_spec.rb | 16 +- .../create_work_packages_spec.rb | 68 +- .../inline_create_refresh_spec.rb | 22 +- .../inline_create/parallel_creation_spec.rb | 42 +- .../work_packages/table/invalid_query_spec.rb | 40 +- .../work_packages/table/milestones_spec.rb | 18 +- .../table/queries/assignee_filter_spec.rb | 28 +- .../queries/assignees_role_filter_spec.rb | 20 +- .../table/queries/bool_cf_filter_spec.rb | 10 +- .../queries/date_is_empty_filter_spec.rb | 14 +- .../table/queries/default_queries_spec.rb | 20 +- .../table/queries/filter_pagination_spec.rb | 22 +- .../table/queries/filter_spec.rb | 318 +++--- .../table/queries/id_filter_spec.rb | 30 +- .../table/queries/me_filter_spec.rb | 70 +- .../table/queries/mobile_date_filter_spec.rb | 38 +- .../table/queries/query_history_spec.rb | 56 +- .../table/queries/query_menu_refresh_spec.rb | 14 +- .../table/queries/query_menu_spec.rb | 80 +- .../queries/query_name_inline_edit_spec.rb | 34 +- .../table/queries/responsible_filter_spec.rb | 22 +- .../queries/shared_with_user_filter_spec.rb | 46 +- .../table/queries/subject_filter_spec.rb | 24 +- .../table/queries/summary_spec.rb | 16 +- .../table/queries/user_cf_filter_spec.rb | 22 +- .../table/queries/version_cf_filter_spec.rb | 14 +- .../work_packages/table/relations_spec.rb | 26 +- .../scheduling/manual_scheduling_spec.rb | 42 +- .../work_packages/table/switch_types_spec.rb | 66 +- ...ork_packages_table_project_include_spec.rb | 26 +- .../tabs/activity_notifications_spec.rb | 74 +- .../tabs/activity_revisions_spec.rb | 114 +-- .../work_packages/tabs/activity_tab_spec.rb | 100 +- .../work_packages/tabs/keep_tab_spec.rb | 8 +- .../work_packages/tabs/watcher_tab_spec.rb | 90 +- .../work_packages/update_ancestors_spec.rb | 52 +- .../work_packages/work_package_index_spec.rb | 36 +- .../work_package_workflow_form_spec.rb | 12 +- .../work_packages/work_packages_page.rb | 16 +- spec/features/work_packages/zen_mode_spec.rb | 14 +- spec/features/workflows/copy_spec.rb | 12 +- .../workflows/missing_for_sharing_wp_spec.rb | 22 +- spec/features/wysiwyg/bold_behavior_spec.rb | 30 +- .../wysiwyg/custom_css_classes_spec.rb | 74 +- spec/features/wysiwyg/html_encoding_spec.rb | 26 +- spec/features/wysiwyg/linking_spec.rb | 14 +- .../wysiwyg/macros/attribute_macros_spec.rb | 48 +- .../wysiwyg/macros/child_pages_spec.rb | 98 +- .../wysiwyg/macros/code_block_macro_spec.rb | 106 +- .../wysiwyg/macros/embedded_tables_spec.rb | 78 +- .../wysiwyg/macros/quicklink_macros_spec.rb | 92 +- .../macros/work_package_button_spec.rb | 50 +- spec/features/wysiwyg/mentions_spec.rb | 74 +- .../wysiwyg/paragraphs_in_lists_spec.rb | 10 +- spec/features/wysiwyg/tables_spec.rb | 198 ++-- spec/features/wysiwyg/ui_localization_spec.rb | 16 +- .../wysiwyg/work_package_linking_spec.rb | 20 +- spec/helpers/additional_url_helper_spec.rb | 16 +- spec/helpers/angular_helper_spec.rb | 16 +- spec/helpers/application_helper_spec.rb | 70 +- spec/helpers/archived_projects_helper_spec.rb | 6 +- spec/helpers/custom_styles_helper_spec.rb | 54 +- spec/helpers/error_message_helper_spec.rb | 52 +- spec/helpers/frontend_asset_helper_spec.rb | 22 +- spec/helpers/hook_helper_spec.rb | 14 +- .../individual_principal_hooks_helper_spec.rb | 28 +- spec/helpers/journals_helper_spec.rb | 14 +- spec/helpers/no_results_helper_spec.rb | 26 +- spec/helpers/pagination_helper_spec.rb | 114 +-- spec/helpers/projects_helper_spec.rb | 30 +- .../helpers/removed_js_helpers_helper_spec.rb | 14 +- spec/helpers/search_helper_spec.rb | 54 +- spec/helpers/security_badge_helper_spec.rb | 6 +- spec/helpers/settings_helper_spec.rb | 214 ++-- spec/helpers/sort_helper_spec.rb | 96 +- spec/helpers/tabs_helper_spec.rb | 14 +- spec/helpers/text_formatting_helper_spec.rb | 48 +- spec/helpers/toolbar_helper_spec.rb | 30 +- spec/helpers/types_helper_spec.rb | 12 +- spec/helpers/users_helper_spec.rb | 58 +- spec/helpers/versions_helper_spec.rb | 40 +- spec/helpers/wiki_pages/at_version_spec.rb | 206 ++-- spec/helpers/work_packages_helper_spec.rb | 168 ++-- .../jobs/attachments/virus_rescan_job_spec.rb | 8 +- spec/jobs/attachments/virus_scan_job_spec.rb | 36 +- .../journable_differ_spec.rb | 30 +- .../journal_formatter_cache_spec.rb | 28 +- .../lib/acts_as_journalized/journaled_spec.rb | 10 +- .../acts_as_list/acts_as_list_patch_spec.rb | 24 +- .../lib/acts_as_watchable/routes_spec.rb | 30 +- spec/lib/api/contracts/model_contract_spec.rb | 48 +- .../api/decorators/aggregation_group_spec.rb | 10 +- spec/lib/api/decorators/formattable_spec.rb | 40 +- spec/lib/api/decorators/link_object_spec.rb | 46 +- .../utilities/property_name_converter_spec.rb | 130 +-- .../utilities/resource_link_parser_spec.rb | 110 +- .../url_props_parsing_helper_spec.rb | 16 +- .../action_sql_respresenter_rendering_spec.rb | 12 +- .../activity_eager_loading_wrapper_spec.rb | 30 +- .../activity_representer_rendering_spec.rb | 112 +-- .../attachment_metadata_representer_spec.rb | 30 +- .../attachment_representer_spec.rb | 122 +-- ...pability_sql_representer_rendering_spec.rb | 20 +- .../global_representer_rendering_spec.rb | 22 +- .../category_collection_representer_spec.rb | 10 +- .../categories/category_representer_spec.rb | 70 +- .../configuration_representer_spec.rb | 198 ++-- ...action_execute_representer_parsing_spec.rb | 24 +- ...stom_action_representer_generation_spec.rb | 30 +- .../custom_option_representer_spec.rb | 20 +- .../days/day_collection_representer_spec.rb | 10 +- spec/lib/api/v3/days/day_representer_spec.rb | 86 +- ...working_day_collection_representer_spec.rb | 10 +- .../days/non_working_day_representer_spec.rb | 44 +- .../week_day_collection_representer_spec.rb | 10 +- .../api/v3/days/week_day_representer_spec.rb | 56 +- spec/lib/api/v3/formatter/txt_charset_spec.rb | 18 +- .../group_collection_representer_spec.rb | 10 +- .../api/v3/groups/group_representer_spec.rb | 120 +-- .../group_sql_representer_rendering_spec.rb | 10 +- .../help_text_collection_representer_spec.rb | 16 +- .../help_texts/help_text_representer_spec.rb | 12 +- .../membership_collection_representer_spec.rb | 10 +- .../membership_payload_representer_spec.rb | 36 +- .../membership_representer_rendering_spec.rb | 138 +-- .../membership_schema_representer_spec.rb | 192 ++-- .../news/news_representer_rendering_spec.rb | 50 +- ...otification_collection_representer_spec.rb | 72 +- ...notification_representer_rendering_spec.rb | 140 +-- .../v3/notifications/property_factory_spec.rb | 82 +- ...holder_user_collection_representer_spec.rb | 10 +- ...eholder_user_representer_rendering_spec.rb | 106 +- ...der_user_sql_representer_rendering_spec.rb | 10 +- .../posts/post_representer_rendering_spec.rb | 32 +- .../principal_representer_factory_spec.rb | 88 +- ...rincipal_sql_representer_rendering_spec.rb | 24 +- .../api/v3/principals/principal_type_spec.rb | 38 +- .../priority_collection_representer_spec.rb | 8 +- .../priorities/priority_representer_spec.rb | 58 +- .../project_copy_payload_representer_spec.rb | 68 +- .../project_copy_schema_representer_spec.rb | 26 +- .../project_collection_representer_spec.rb | 36 +- ...roject_payload_representer_parsing_spec.rb | 90 +- .../project_representer_rendering_spec.rb | 332 +++--- ...l_collection_representer_rendering_spec.rb | 24 +- .../project_sql_representer_rendering_spec.rb | 42 +- .../project_schema_representer_spec.rb | 196 ++-- .../status_representer_rendering_spec.rb | 22 +- .../query_property_column_representer_spec.rb | 70 +- ...elation_of_type_column_representer_spec.rb | 38 +- ...elation_to_type_column_representer_spec.rb | 42 +- .../query_filter_instance_representer_spec.rb | 84 +- .../filters/query_filter_representer_spec.rb | 56 +- .../query_group_by_representer_spec.rb | 70 +- .../query_ical_url_representer_spec.rb | 26 +- .../query_operator_representer_spec.rb | 24 +- .../queries_params_representer_spec.rb | 12 +- .../queries/query_representer_parsing_spec.rb | 60 +- .../query_representer_rendering_spec.rb | 486 ++++----- ...ocks_filter_dependency_representer_spec.rb | 4 +- ...lean_filter_dependency_representer_spec.rb | 26 +- ...gory_filter_dependency_representer_spec.rb | 32 +- ...tion_filter_dependency_representer_spec.rb | 34 +- ...date_filter_dependency_representer_spec.rb | 44 +- ...time_filter_dependency_representer_spec.rb | 40 +- ...ated_filter_dependency_representer_spec.rb | 4 +- ...ates_filter_dependency_representer_spec.rb | 4 +- ...ter_dependency_representer_factory_spec.rb | 150 +-- ...loat_filter_dependency_representer_spec.rb | 34 +- ...lows_filter_dependency_representer_spec.rb | 4 +- ...roup_filter_dependency_representer_spec.rb | 48 +- .../id_filter_dependency_representer_spec.rb | 40 +- ...udes_filter_dependency_representer_spec.rb | 4 +- ...eger_filter_dependency_representer_spec.rb | 34 +- ...rent_filter_dependency_representer_spec.rb | 4 +- ...rtof_filter_dependency_representer_spec.rb | 4 +- ...edes_filter_dependency_representer_spec.rb | 4 +- ...rity_filter_dependency_representer_spec.rb | 26 +- ...ject_filter_dependency_representer_spec.rb | 34 +- ...bers_filter_dependency_representer_spec.rb | 48 +- ...filter_instance_schema_representer_spec.rb | 150 +-- .../schemas/query_schema_representer_spec.rb | 350 +++---- ...ates_filter_dependency_representer_spec.rb | 4 +- ...ired_filter_dependency_representer_spec.rb | 4 +- ...ires_filter_dependency_representer_spec.rb | 4 +- ...role_filter_dependency_representer_spec.rb | 34 +- ...atus_filter_dependency_representer_spec.rb | 32 +- ...ject_filter_dependency_representer_spec.rb | 34 +- ...text_filter_dependency_representer_spec.rb | 30 +- ...type_filter_dependency_representer_spec.rb | 36 +- ...user_filter_dependency_representer_spec.rb | 44 +- ...sion_filter_dependency_representer_spec.rb | 42 +- .../query_sort_by_representer_spec.rb | 112 +-- .../relation_collection_representer_spec.rb | 12 +- ...n_paginated_collection_representer_spec.rb | 8 +- .../v3/relations/relation_representer_spec.rb | 6 +- .../repositories/revision_representer_spec.rb | 82 +- spec/lib/api/v3/root_representer_spec.rb | 100 +- .../share_collection_representer_spec.rb | 10 +- .../share_representer_rendering_spec.rb | 110 +- .../status_collection_representer_spec.rb | 8 +- .../v3/statuses/status_representer_spec.rb | 68 +- spec/lib/api/v3/support/api_v3_collection.rb | 82 +- spec/lib/api/v3/support/api_v3_digest.rb | 8 +- .../v3/support/api_v3_filter_dependency.rb | 86 +- spec/lib/api/v3/support/api_v3_formattable.rb | 10 +- .../lib/api/v3/support/collection_examples.rb | 2 +- spec/lib/api/v3/support/date_time_examples.rb | 14 +- spec/lib/api/v3/support/link_examples.rb | 40 +- spec/lib/api/v3/support/property_examples.rb | 14 +- spec/lib/api/v3/support/schema_examples.rb | 50 +- .../lib/api/v3/types/type_representer_spec.rb | 76 +- ...tion_setting_representer_rendering_spec.rb | 56 +- ...ser_preference_representer_parsing_spec.rb | 58 +- ...r_preference_representer_rendering_spec.rb | 72 +- ...inated_user_collection_representer_spec.rb | 8 +- .../users/user_collection_representer_spec.rb | 12 +- .../lib/api/v3/users/user_representer_spec.rb | 236 ++--- .../user_sql_representer_rendering_spec.rb | 70 +- .../utilities/custom_field_injector_spec.rb | 272 ++--- .../v3/utilities/date_time_formatter_spec.rb | 176 ++-- spec/lib/api/v3/utilities/path_helper_spec.rb | 534 +++++----- .../utilities/resource_link_generator_spec.rb | 16 +- ...roperty_date_representer_rendering_spec.rb | 42 +- ...perty_schema_representer_rendering_spec.rb | 42 +- .../schemas/value_schema_factory_spec.rb | 40 +- .../version_schema_representer_spec.rb | 174 ++-- .../version_collection_representer_spec.rb | 38 +- .../version_representer_rendering_spec.rb | 134 +-- .../views/view_representer_rendering_spec.rb | 68 +- .../wiki_page_representer_rendering_spec.rb | 32 +- .../create_form_representer_spec.rb | 96 +- .../create_project_form_representer_spec.rb | 74 +- .../cache_checksum_integration_spec.rb | 42 +- .../cost_eager_loading_integration_spec.rb | 10 +- .../custom_actions_integration_spec.rb | 8 +- .../eager_loading/project_integration_spec.rb | 8 +- .../v3/work_packages/form_representer_spec.rb | 24 +- ...rk_package_sums_schema_representer_spec.rb | 78 +- .../schema/work_package_sums_schema_spec.rb | 8 +- .../update_form_representer_spec.rb | 46 +- ...at_timestamp_representer_rendering_spec.rb | 298 +++--- ...ork_package_collection_representer_spec.rb | 392 ++++---- .../work_package_representer_spec.rb | 946 +++++++++--------- ..._package_sql_representer_rendering_spec.rb | 42 +- .../work_package_sums_representer_spec.rb | 50 +- spec/lib/core_extensions/squish_sql_spec.rb | 4 +- .../core_extensions/to_localized_slug_spec.rb | 32 +- spec/lib/custom_field_form_builder_spec.rb | 126 +-- spec/lib/database_spec.rb | 18 +- spec/lib/deprecated_alias_spec.rb | 8 +- spec/lib/i18n/pluralization_spec.rb | 32 +- .../journal_formatter/active_status_spec.rb | 2 +- spec/lib/journal_formatter/attachment_spec.rb | 26 +- spec/lib/journal_formatter/attribute_spec.rb | 16 +- spec/lib/journal_formatter/cause_spec.rb | 62 +- .../journal_formatter/custom_field_spec.rb | 64 +- spec/lib/journal_formatter/day_count_spec.rb | 18 +- spec/lib/journal_formatter/diff_spec.rb | 38 +- spec/lib/journal_formatter/file_link_spec.rb | 44 +- .../ignore_non_working_days_spec.rb | 6 +- .../project_status_code_spec.rb | 20 +- .../schedule_manually_spec.rb | 14 +- spec/lib/journal_formatter/template_spec.rb | 2 +- spec/lib/journal_formatter/wiki_diff_spec.rb | 16 +- .../access_control/permission_spec.rb | 38 +- spec/lib/open_project/access_control_spec.rb | 146 +-- .../warden/global_basic_auth_spec.rb | 24 +- .../open_project/changed_by_system_spec.rb | 42 +- .../configuration/helpers_spec.rb | 50 +- spec/lib/open_project/configuration_spec.rb | 54 +- .../content_type_detector_spec.rb | 58 +- spec/lib/open_project/enterprise_spec.rb | 4 +- spec/lib/open_project/events_spec.rb | 32 +- .../open_project/feature_decisions_spec.rb | 44 +- ...file_command_content_type_detector_spec.rb | 22 +- spec/lib/open_project/files_spec.rb | 48 +- spec/lib/open_project/footer_spec.rb | 20 +- spec/lib/open_project/form_tag_helper_spec.rb | 220 ++-- spec/lib/open_project/hook_spec.rb | 64 +- .../open_project/logging/log_extender_spec.rb | 14 +- spec/lib/open_project/mime_type_spec.rb | 42 +- spec/lib/open_project/notifications_spec.rb | 28 +- .../omni_auth/authorization_spec.rb | 14 +- spec/lib/open_project/passwords_spec.rb | 24 +- .../plugins/acts_as_op_engine_spec.rb | 8 +- .../plugins/module_handler_spec.rb | 8 +- .../scm/adapters/git_adapter_spec.rb | 386 +++---- .../scm/adapters/subversion_adapter_spec.rb | 276 ++--- spec/lib/open_project/scm/manager_spec.rb | 10 +- spec/lib/open_project/static_routing_spec.rb | 16 +- spec/lib/open_project/storage_spec.rb | 48 +- .../markdown/attribute_macros_spec.rb | 16 +- .../markdown/blockquote_spec.rb | 10 +- .../markdown/child_pages_macro_spec.rb | 54 +- .../text_formatting/markdown/code_spec.rb | 26 +- .../markdown/embedded_table_macro_spec.rb | 10 +- .../markdown/expected_markdown.rb | 6 +- .../text_formatting/markdown/headings_spec.rb | 48 +- .../text_formatting/markdown/images_spec.rb | 52 +- .../markdown/in_tool_links_spec.rb | 286 +++--- .../markdown/include_wiki_page_macro_spec.rb | 10 +- .../text_formatting/markdown/lists_spec.rb | 28 +- .../markdown/markdown_formatting_spec.rb | 36 +- .../text_formatting/markdown/mentions_spec.rb | 90 +- .../markdown/paragraphs_spec.rb | 10 +- .../markdown/setting_variable_spec.rb | 12 +- .../text_formatting/markdown/tables_spec.rb | 20 +- .../markdown/toc_macro_spec.rb | 14 +- .../markdown/user_provided_links_spec.rb | 32 +- .../work_package_buttons_macro_spec.rb | 38 +- .../text_formatting/plain_spec.rb | 10 +- .../text_formatting/text_formatting_spec.rb | 24 +- spec/lib/redmine/i18n_spec.rb | 278 ++--- spec/lib/redmine/menu_manager/mapper_spec.rb | 132 +-- .../redmine/menu_manager/menu_helper_spec.rb | 74 +- .../redmine/menu_manager/menu_item_spec.rb | 44 +- spec/lib/redmine/menu_manager_spec.rb | 34 +- spec/lib/redmine/plugin_spec.rb | 92 +- spec/lib/redmine/unified_diff_spec.rb | 68 +- spec/lib/representable_spec.rb | 14 +- ...h_rspec_capybara_matcher_in_expect_spec.rb | 16 +- ...use_service_result_factory_methods_spec.rb | 34 +- spec/lib/tabular_form_builder_spec.rb | 430 ++++---- spec/mailers/announcement_mailer_spec.rb | 12 +- spec/mailers/digest_mailer_spec.rb | 102 +- spec/mailers/member_mailer_spec.rb | 82 +- .../mailers/previews/digest_mailer_preview.rb | 2 +- .../previews/meeting_mailer_preview.rb | 8 +- .../previews/sharing_mailer_preview.rb | 6 +- spec/mailers/shared_examples.rb | 18 +- spec/mailers/sharing_mailer_spec.rb | 22 +- spec/mailers/smtp_settings_spec.rb | 6 +- spec/mailers/user_mailer_spec.rb | 184 ++-- spec/mailers/work_package_mailer_spec.rb | 54 +- ...default_value_of_alternative_color_spec.rb | 22 +- spec/migrations/fix_invalid_journals_spec.rb | 4 +- ...ix_untranslated_work_package_roles_spec.rb | 42 +- .../migrate_team_planner_permissions_spec.rb | 58 +- ...duce_configurable_design_variables_spec.rb | 42 +- .../reorder_project_children_spec.rb | 32 +- ...restore_defaults_on_empty_settings_spec.rb | 8 +- spec/models/actions/scopes/default_spec.rb | 6 +- .../activities/fetcher_integration_spec.rb | 96 +- .../work_package_activity_provider_spec.rb | 28 +- spec/models/announcement_spec.rb | 44 +- spec/models/attachment_spec.rb | 128 +-- .../attribute_help_text/work_package_spec.rb | 68 +- .../capabilities/scopes/default_spec.rb | 218 ++-- spec/models/category_spec.rb | 22 +- spec/models/changeset_spec.rb | 164 +-- spec/models/color_spec.rb | 62 +- spec/models/comment_spec.rb | 30 +- spec/models/custom_action_spec.rb | 84 +- .../actions/assigned_to_spec.rb | 38 +- .../actions/custom_field_spec.rb | 224 ++--- .../custom_actions/actions/date_spec.rb | 18 +- .../custom_actions/actions/done_ratio_spec.rb | 32 +- .../custom_actions/actions/due_date_spec.rb | 16 +- .../actions/estimated_hours_spec.rb | 20 +- .../custom_actions/actions/notify_spec.rb | 22 +- .../custom_actions/actions/priority_spec.rb | 12 +- .../custom_actions/actions/project_spec.rb | 12 +- .../custom_actions/actions/start_date_spec.rb | 16 +- .../custom_actions/actions/status_spec.rb | 12 +- .../custom_actions/actions/type_spec.rb | 12 +- .../custom_actions/conditions/project_spec.rb | 18 +- .../custom_actions/conditions/role_spec.rb | 24 +- .../custom_actions/conditions/status_spec.rb | 18 +- .../custom_actions/conditions/type_spec.rb | 18 +- .../custom_actions/shared_expectations.rb | 190 ++-- spec/models/custom_field_spec.rb | 230 ++--- spec/models/custom_option_spec.rb | 22 +- spec/models/custom_style_spec.rb | 12 +- .../models/custom_value/bool_strategy_spec.rb | 106 +- .../models/custom_value/date_strategy_spec.rb | 70 +- .../custom_value/float_strategy_spec.rb | 68 +- .../custom_value/format_strategy_spec.rb | 18 +- spec/models/custom_value/int_strategy_spec.rb | 56 +- .../list_strategy_integration_spec.rb | 14 +- .../models/custom_value/list_strategy_spec.rb | 58 +- .../custom_value/string_strategy_spec.rb | 50 +- .../models/custom_value/user_strategy_spec.rb | 64 +- .../custom_value/version_strategy_spec.rb | 64 +- spec/models/day_spec.rb | 74 +- .../db_and_ar_length_constraints_spec.rb | 6 +- spec/models/deleted_user_spec.rb | 36 +- spec/models/design_color_spec.rb | 12 +- spec/models/enabled_module_spec.rb | 60 +- spec/models/enterprise_token_spec.rb | 60 +- spec/models/forum_spec.rb | 16 +- spec/models/global_role_spec.rb | 38 +- spec/models/group_performance_spec.rb | 10 +- spec/models/group_spec.rb | 58 +- spec/models/issue_priority_spec.rb | 68 +- .../historic_active_record_relation_spec.rb | 22 +- spec/models/journable/timestamps_spec.rb | 20 +- .../with_historic_attributes_spec.rb | 78 +- .../notification_configuration_spec.rb | 50 +- spec/models/journal/project_journal_spec.rb | 64 +- spec/models/journal/timestamps_spec.rb | 2 +- spec/models/journal_spec.rb | 18 +- spec/models/ldap_auth_source_spec.rb | 310 +++--- spec/models/mail_handler/user_creator_spec.rb | 32 +- spec/models/members/roles_diff_spec.rb | 52 +- spec/models/members/scopes/global_spec.rb | 6 +- spec/models/members/scopes/not_locked_spec.rb | 6 +- .../members/scopes/of_any_entity_spec.rb | 6 +- .../members/scopes/of_any_project_spec.rb | 6 +- .../scopes/of_any_work_package_spec.rb | 6 +- .../scopes/of_anything_in_project_spec.rb | 6 +- spec/models/members/scopes/of_project_spec.rb | 6 +- .../members/scopes/of_work_package_spec.rb | 6 +- spec/models/members/scopes/visible_spec.rb | 12 +- .../scopes/without_inherited_roles_spec.rb | 6 +- spec/models/menu_item_spec.rb | 18 +- spec/models/menu_items/wiki_menu_item_spec.rb | 48 +- .../messages/acts_as_journalized_spec.rb | 10 +- spec/models/messages_spec.rb | 40 +- spec/models/news_spec.rb | 52 +- spec/models/non_working_day_spec.rb | 12 +- .../scopes/applicable_spec.rb | 16 +- spec/models/notification_spec.rb | 8 +- .../scopes/reminder_mail_unsent_spec.rb | 6 +- .../scopes/unsent_reminders_before_spec.rb | 32 +- .../notifications/scopes/visible_spec.rb | 20 +- spec/models/oauth_client_token_spec.rb | 32 +- .../placeholder_user_spec.rb | 10 +- .../placeholder_users/scopes/visible_spec.rb | 16 +- spec/models/principal_spec.rb | 24 +- .../scopes/having_entity_membership_spec.rb | 12 +- spec/models/principals/scopes/human_spec.rb | 6 +- spec/models/principals/scopes/like_spec.rb | 36 +- .../principals/scopes/not_builtin_spec.rb | 6 +- .../principals/scopes/ordered_by_name_spec.rb | 44 +- .../scopes/possible_assignee_spec.rb | 56 +- .../principals/scopes/possible_member_spec.rb | 16 +- spec/models/principals/scopes/user_spec.rb | 6 +- spec/models/principals/scopes/visible_spec.rb | 50 +- spec/models/project_role_spec.rb | 38 +- spec/models/project_spec.rb | 156 +-- spec/models/projects/activity_spec.rb | 22 +- spec/models/projects/allowed_to_scope_spec.rb | 130 +-- .../project_acts_as_journalized_spec.rb | 80 +- .../projects/reorder_nested_set_spec.rb | 32 +- spec/models/projects/scopes/visible_spec.rb | 26 +- spec/models/projects/storage_spec.rb | 36 +- .../capabilities/capability_query_spec.rb | 52 +- .../filters/action_filter_spec.rb | 28 +- .../filters/context_filter_spec.rb | 30 +- .../capabilities/filters/id_filter_spec.rb | 30 +- .../filters/principal_id_filter_spec.rb | 6 +- spec/models/queries/days/day_query_spec.rb | 42 +- .../filters/dates_interval_filter_spec.rb | 14 +- .../days/filters/working_filter_spec.rb | 4 +- .../queries/filters/available_filters_spec.rb | 32 +- spec/models/queries/filters/base_spec.rb | 92 +- .../also_project_member_filter_spec.rb | 16 +- .../members/filters/blocked_filter_spec.rb | 8 +- .../members/filters/created_at_filter_spec.rb | 6 +- .../members/filters/group_filter_spec.rb | 12 +- .../members/filters/name_filter_spec.rb | 30 +- .../members/filters/principal_filter_spec.rb | 12 +- .../members/filters/project_filter_spec.rb | 8 +- .../members/filters/role_filter_spec.rb | 10 +- .../members/filters/status_filter_spec.rb | 8 +- .../members/filters/updated_at_filter_spec.rb | 6 +- .../members/members_query_integration_spec.rb | 20 +- .../news/filters/project_filter_spec.rb | 10 +- spec/models/queries/news/news_query_spec.rb | 32 +- .../filters/dates_interval_filter_spec.rb | 14 +- .../non_working_day_query_spec.rb | 28 +- .../notifications/filters/id_filter_spec.rb | 6 +- .../filters/read_ian_filter_spec.rb | 10 +- .../filters/reason_filter_spec.rb | 18 +- .../notifications/notification_query_spec.rb | 92 +- .../placeholder_user_query_spec.rb | 82 +- ...mentionable_on_work_package_filter_spec.rb | 18 +- .../principal_query_integrations_spec.rb | 18 +- spec/models/queries/projects/factory_spec.rb | 438 ++++---- .../projects/filters/active_filter_spec.rb | 4 +- .../filters/created_at_filter_spec.rb | 16 +- .../filters/custom_field_filter_spec.rb | 186 ++-- .../filters/latest_activity_at_filter_spec.rb | 16 +- .../projects/filters/member_of_filter_spec.rb | 18 +- .../name_and_identifier_filter_spec.rb | 14 +- .../projects/filters/name_filter_spec.rb | 14 +- .../projects/filters/parent_filter_spec.rb | 10 +- .../projects/filters/principal_filter_spec.rb | 8 +- .../filters/project_status_filter_spec.rb | 12 +- .../projects/filters/public_filter_spec.rb | 4 +- .../projects/filters/type_filter_spec.rb | 14 +- .../filters/user_action_filter_spec.rb | 6 +- .../projects/filters/visible_filter_spec.rb | 24 +- .../orders/latest_activity_at_order_spec.rb | 16 +- .../orders/required_disk_space_order_spec.rb | 16 +- .../projects/project_query_results_spec.rb | 48 +- .../queries/projects/project_query_spec.rb | 32 +- .../queries/filters/project_filter_spec.rb | 8 +- .../queries/filters/updated_at_filter_spec.rb | 14 +- .../queries/queries/query_query_spec.rb | 32 +- .../relations/filters/from_filter_spec.rb | 28 +- .../relations/filters/involved_filter_spec.rb | 26 +- .../relations/filters/to_filter_spec.rb | 28 +- .../queries/relations/relation_query_spec.rb | 42 +- .../allows_becoming_assignee_filter_spec.rb | 18 +- .../roles/filters/grantable_filter_spec.rb | 28 +- .../queries/roles/filters/unit_filter_spec.rb | 34 +- spec/models/queries/scopes/visible_spec.rb | 28 +- .../filters/any_name_attribute_filter_spec.rb | 26 +- .../users/filters/group_filter_spec.rb | 12 +- .../queries/users/filters/name_filter_spec.rb | 30 +- .../users/filters/status_filter_spec.rb | 16 +- spec/models/queries/users/user_query_spec.rb | 98 +- .../queries/views/filters/type_filter_spec.rb | 10 +- .../filter/assigned_to_filter_spec.rb | 118 +-- .../filter/assignee_or_group_filter_spec.rb | 56 +- .../filter/attachment_content_filter_spec.rb | 36 +- .../attachment_file_name_filter_spec.rb | 26 +- .../filter/author_filter_spec.rb | 32 +- .../filter/blocked_filter_spec.rb | 6 +- .../filter/blocks_filter_spec.rb | 6 +- .../filter/category_filter_spec.rb | 28 +- .../filter/comment_filter_spec.rb | 26 +- .../filter/created_at_filter_spec.rb | 14 +- .../contains_text_custom_field_filter_spec.rb | 24 +- .../custom_fields/custom_field_filter_spec.rb | 198 ++-- .../filter/dates_interval_filter_spec.rb | 14 +- .../filter/description_filter_spec.rb | 22 +- .../filter/done_ratio_filter_spec.rb | 12 +- .../filter/due_date_filter_spec.rb | 14 +- .../filter/duplicated_filter_spec.rb | 6 +- .../filter/duplicates_filter_spec.rb | 6 +- .../filter/duration_filter_spec.rb | 20 +- .../filter/estimated_hours_filter_spec.rb | 18 +- .../filter/follows_filter_spec.rb | 6 +- .../work_packages/filter/group_filter_spec.rb | 24 +- .../work_packages/filter/id_filter_spec.rb | 10 +- .../filter/includes_filter_spec.rb | 6 +- .../filter/manual_sort_filter_spec.rb | 8 +- .../filter/milestone_filter_spec.rb | 42 +- .../filter/parent_filter_spec.rb | 82 +- .../filter/partof_filter_spec.rb | 6 +- .../filter/precedes_filter_spec.rb | 6 +- .../filter/principal_loader_spec.rb | 48 +- .../filter/priority_filter_spec.rb | 22 +- .../filter/project_filter_instance_spec.rb | 8 +- .../filter/project_filter_spec.rb | 42 +- .../filter/relates_filter_spec.rb | 6 +- .../filter/required_filter_spec.rb | 6 +- .../filter/requires_filter_spec.rb | 6 +- .../filter/responsible_filter_spec.rb | 96 +- .../work_packages/filter/role_filter_spec.rb | 24 +- .../filter/search_filter_spec.rb | 94 +- .../filter/shared_with_me_filter_spec.rb | 24 +- .../filter/shared_with_user_filter_spec.rb | 58 +- .../filter/start_date_filter_spec.rb | 14 +- .../filter/status_filter_spec.rb | 28 +- .../filter/subject_filter_spec.rb | 22 +- .../filter/subject_or_id_filter_spec.rb | 14 +- .../filter/subproject_filter_spec.rb | 58 +- .../work_packages/filter/type_filter_spec.rb | 36 +- .../filter/updated_at_filter_spec.rb | 14 +- .../filter/version_filter_spec.rb | 34 +- .../filter/watcher_filter_spec.rb | 34 +- .../work_packages/manual_sorting_spec.rb | 18 +- .../selects/custom_field_select_spec.rb | 20 +- .../selects/property_select_spec.rb | 20 +- .../selects/relation_of_type_select_spec.rb | 18 +- .../selects/relation_to_type_select_spec.rb | 28 +- .../selects/shared_query_select_specs.rb | 48 +- .../selects/work_package_select_spec.rb | 6 +- spec/models/query/default_query_spec.rb | 2 +- .../results_cf_sorting_integration_spec.rb | 22 +- ...ts_custom_field_filter_integration_spec.rb | 72 +- .../results_filter_on_historic_data_spec.rb | 44 +- ...results_project_filter_integration_spec.rb | 56 +- .../query/results_sort_intergration_spec.rb | 156 +-- spec/models/query/results_spec.rb | 154 +-- ...results_subject_filter_integration_spec.rb | 34 +- ...ults_subproject_filter_integration_spec.rb | 74 +- .../query/results_version_integration_spec.rb | 50 +- spec/models/query/sort_criteria_spec.rb | 60 +- spec/models/query/timestamps_spec.rb | 2 +- spec/models/query_spec.rb | 378 +++---- spec/models/relation_spec.rb | 94 +- spec/models/relations/scopes/visible_spec.rb | 18 +- spec/models/reports_services_spec.rb | 6 +- spec/models/repository/git_spec.rb | 294 +++--- spec/models/repository/subversion_spec.rb | 230 ++--- spec/models/role_spec.rb | 68 +- .../sessions/active_record_sessions_spec.rb | 28 +- .../sessions/sql_bypass_sessions_spec.rb | 14 +- spec/models/setting_spec.rb | 256 ++--- spec/models/status_spec.rb | 44 +- spec/models/system_user_spec.rb | 6 +- spec/models/timestamp_spec.rb | 46 +- spec/models/token/base_token_spec.rb | 6 +- spec/models/token/hashed_token_spec.rb | 18 +- spec/models/token/ical_token_spec.rb | 52 +- spec/models/type/attribute_groups_spec.rb | 76 +- spec/models/type_spec.rb | 38 +- spec/models/types/scopes/milestone_spec.rb | 6 +- spec/models/user_password_spec.rb | 44 +- spec/models/user_passwords/sha1_spec.rb | 14 +- spec/models/user_preference_spec.rb | 96 +- spec/models/user_spec.rb | 464 ++++----- spec/models/users/allowed_scope_spec.rb | 48 +- spec/models/users/allowed_to_spec.rb | 168 ++-- spec/models/users/permission_checks_spec.rb | 86 +- .../models/users/scopes/find_by_login_spec.rb | 20 +- .../having_reminder_mail_to_send_spec.rb | 236 ++--- spec/models/users/scopes/newest_spec.rb | 6 +- .../users/scopes/with_time_zone_spec.rb | 50 +- .../scopes/order_by_semver_name_spec.rb | 4 +- spec/models/versions/scopes/rolled_up_spec.rb | 8 +- .../versions/scopes/shared_with_spec.rb | 50 +- spec/models/watcher_spec.rb | 92 +- spec/models/week_day_spec.rb | 14 +- spec/models/wiki_page_spec.rb | 190 ++-- spec/models/wiki_redirect_spec.rb | 66 +- spec/models/wiki_spec.rb | 92 +- .../work_package/aggregate_ancestors_spec.rb | 28 +- .../ask_before_destruction_spec.rb | 102 +- .../exporter/csv_integration_spec.rb | 8 +- spec/models/work_package/hooks_spec.rb | 2 +- .../openproject_notifications_spec.rb | 12 +- .../work_package_acts_as_customizable_spec.rb | 96 +- .../work_package_acts_as_event_spec.rb | 6 +- .../work_package_acts_as_searchable_spec.rb | 14 +- .../work_package_acts_as_watchable_spec.rb | 6 +- .../work_package_custom_actions_spec.rb | 30 +- .../work_package_custom_fields_spec.rb | 172 ++-- ..._package_multi_value_custom_fields_spec.rb | 34 +- .../work_package_relations_spec.rb | 50 +- .../work_package_scheduling_spec.rb | 28 +- .../work_package/work_package_status_spec.rb | 14 +- .../work_package_visibility_spec.rb | 22 +- spec/models/work_package_custom_field_spec.rb | 8 +- spec/models/work_package_role_spec.rb | 10 +- .../work_packages/blocks_relation_spec.rb | 18 +- .../work_packages/derived_dates_spec.rb | 46 +- .../work_package_list_to_pdf_spec.rb | 132 +-- .../pdf_export/work_package_to_pdf_spec.rb | 38 +- .../work_packages/scopes/allowed_to_spec.rb | 78 +- .../covering_dates_and_days_of_week_spec.rb | 30 +- .../scopes/directly_related_spec.rb | 10 +- .../scopes/for_scheduling_spec.rb | 176 ++-- .../scopes/involving_user_spec.rb | 14 +- .../work_packages/scopes/relatable_spec.rb | 156 +-- spec/models/work_packages/search_spec.rb | 18 +- spec/models/work_packages/spent_time_spec.rb | 34 +- spec/models/workflow_spec.rb | 42 +- .../backlogs/setting_seeder_spec.rb | 18 +- spec/permissions/add_messages_spec.rb | 8 +- spec/permissions/copy_projects_spec.rb | 8 +- spec/permissions/delete_work_packages_spec.rb | 8 +- spec/permissions/edit_messages_spec.rb | 8 +- spec/permissions/edit_own_messages_spec.rb | 8 +- spec/permissions/edit_wiki_pages_spec.rb | 8 +- spec/permissions/export_work_packages_spec.rb | 10 +- spec/permissions/manage_forums_spec.rb | 10 +- spec/permissions/manage_news_spec.rb | 8 +- spec/permissions/manage_repositories_spec.rb | 8 +- spec/permissions/translations_spec.rb | 6 +- spec/permissions/view_work_packages_spec.rb | 10 +- spec/permissions/work_packages_bulk_spec.rb | 10 +- spec/policies/query_policy_spec.rb | 160 +-- spec/policies/redirect_policy_spec.rb | 62 +- spec/policies/work_package_policy_spec.rb | 30 +- spec/rails_helper.rb | 38 +- .../quarantined_attachments_spec.rb | 14 +- .../virus_scanning_settings_spec.rb | 54 +- spec/requests/api/v3/action_resource_spec.rb | 42 +- spec/requests/api/v3/activities_api_spec.rb | 88 +- .../attachment_resource_shared_examples.rb | 270 ++--- .../api/v3/attachments/forum_message_spec.rb | 4 +- .../api/v3/attachments/wiki_page_spec.rb | 4 +- .../api/v3/attachments/work_package_spec.rb | 6 +- .../attachments/work_packages_export_spec.rb | 20 +- spec/requests/api/v3/attachments_spec.rb | 40 +- spec/requests/api/v3/authentication_spec.rb | 166 +-- .../api/v3/backups/backups_api_spec.rb | 4 +- .../contexts/global_resource_spec.rb | 20 +- .../api/v3/capability_resource_spec.rb | 266 ++--- .../requests/api/v3/category_resource_spec.rb | 44 +- .../api/v3/configuration_resource_spec.rb | 46 +- .../api/v3/content_type_header_spec.rb | 22 +- spec/requests/api/v3/cors_header_spec.rb | 84 +- .../custom_actions/custom_actions_api_spec.rb | 72 +- .../custom_options_resource_spec.rb | 92 +- spec/requests/api/v3/days/day_spec.rb | 20 +- .../non_working_days_index_resource_spec.rb | 16 +- .../non_working_days_show_resource_spec.rb | 40 +- .../api/v3/days/week_show_resource_spec.rb | 34 +- spec/requests/api/v3/days/week_spec.rb | 8 +- .../api/v3/groups/group_resource_spec.rb | 148 +-- .../v3/help_texts/help_texts_resource_spec.rb | 40 +- spec/requests/api/v3/locale_spec.rb | 20 +- .../api/v3/membership_resources_spec.rb | 430 ++++---- .../available_projects_resource_spec.rb | 42 +- .../memberships/create_form_resource_spec.rb | 64 +- .../membership_schema_resource_spec.rb | 24 +- .../memberships/update_form_resource_spec.rb | 94 +- spec/requests/api/v3/news_resource_spec.rb | 58 +- .../bulk_read_ian_resource_spec.rb | 30 +- .../bulk_unread_ian_resource_spec.rb | 30 +- .../v3/notifications/details_resource_spec.rb | 60 +- .../v3/notifications/index_resource_spec.rb | 142 +-- .../notifications/read_ian_resource_spec.rb | 12 +- .../notifications/show_resource_examples.rb | 16 +- .../v3/notifications/show_resource_spec.rb | 30 +- .../placeholder_users/create_resource_spec.rb | 22 +- .../create_shared_examples.rb | 54 +- .../delete_resource_examples.rb | 16 +- .../placeholder_users/delete_resource_spec.rb | 38 +- .../placeholder_users/index_resource_spec.rb | 36 +- .../show_resource_examples.rb | 8 +- .../placeholder_users/show_resource_spec.rb | 24 +- .../update_resource_examples.rb | 26 +- .../placeholder_users/update_resource_spec.rb | 20 +- spec/requests/api/v3/posts_resource_spec.rb | 22 +- .../v3/principals/principals_resource_spec.rb | 90 +- .../requests/api/v3/priority_resource_spec.rb | 38 +- .../projects/available_assignees_api_spec.rb | 4 +- .../available_parents_resource_spec.rb | 40 +- .../available_responsibles_api_spec.rb | 4 +- .../projects/copy/copy_form_resource_spec.rb | 64 +- .../v3/projects/copy/copy_resource_spec.rb | 60 +- .../v3/projects/create_form_resource_spec.rb | 88 +- .../api/v3/projects/delete_resource_spec.rb | 44 +- .../api/v3/projects/index_resource_spec.rb | 94 +- .../schemas/project_schema_resource_spec.rb | 20 +- .../statuses/project_status_resource_spec.rb | 26 +- .../v3/projects/update_form_resource_spec.rb | 128 +-- .../api/v3/projects/version_resource_spec.rb | 14 +- .../columns/query_columns_resource_spec.rb | 26 +- .../api/v3/queries/create_form_api_spec.rb | 202 ++-- .../api/v3/queries/create_query_spec.rb | 20 +- .../filters/query_filters_resource_spec.rb | 34 +- .../query_group_bys_resource_spec.rb | 32 +- .../ical_url/query_ical_url_api_spec.rb | 62 +- .../query_operators_resource_spec.rb | 26 +- .../v3/queries/order/query_order_api_spec.rb | 18 +- .../queries_by_project_resource_spec.rb | 16 +- .../api/v3/queries/query_resource_spec.rb | 194 ++-- ...ry_filter_instance_schema_resource_spec.rb | 68 +- .../query_project_schema_resource_spec.rb | 18 +- .../schemas/query_schema_resource_spec.rb | 18 +- .../sort_bys/query_sort_bys_resource_spec.rb | 40 +- .../api/v3/queries/update_form_api_spec.rb | 198 ++-- .../api/v3/queries/update_query_spec.rb | 20 +- spec/requests/api/v3/rack_deflater_spec.rb | 18 +- .../api/v3/relations/relations_api_spec.rb | 76 +- .../api/v3/relations/relations_index_spec.rb | 14 +- .../api/v3/relations_resource_spec.rb | 18 +- spec/requests/api/v3/render_resource_spec.rb | 102 +- ...revisions_by_work_package_resource_spec.rb | 34 +- .../repositories/revisions_resource_spec.rb | 32 +- spec/requests/api/v3/role_resource_spec.rb | 64 +- spec/requests/api/v3/root_resource_spec.rb | 38 +- spec/requests/api/v3/status_resource_spec.rb | 40 +- .../api/v3/string_objects_resource_spec.rb | 24 +- spec/requests/api/v3/support/api_helper.rb | 12 +- .../v3/support/api_v3_collection_response.rb | 18 +- spec/requests/api/v3/support/authorization.rb | 10 +- .../api/v3/support/response_examples.rb | 208 ++-- .../api/v3/types/type_resource_spec.rb | 40 +- .../types/types_by_project_resource_spec.rb | 28 +- .../api/v3/user/create_form_resource_spec.rb | 104 +- .../v3/user/create_user_common_examples.rb | 90 +- .../api/v3/user/create_user_resource_spec.rb | 126 +-- spec/requests/api/v3/user/filters_spec.rb | 28 +- .../user/schemas/user_schema_resource_spec.rb | 16 +- .../api/v3/user/update_form_resource_spec.rb | 62 +- .../api/v3/user/update_user_resource_spec.rb | 82 +- .../api/v3/user/user_resource_spec.rb | 192 ++-- .../api/v3/user/userlock_resource_spec.rb | 50 +- .../user_preferences_resource_spec.rb | 88 +- .../schemas/value_schema_resource_spec.rb | 74 +- spec/requests/api/v3/version_resource_spec.rb | 208 ++-- .../available_projects_resource_spec.rb | 28 +- .../v3/versions/create_form_resource_spec.rb | 92 +- .../api/v3/versions/project_resource_spec.rb | 20 +- .../schemas/version_schema_resource_spec.rb | 24 +- .../v3/versions/update_form_resource_spec.rb | 108 +- .../api/v3/views/create_resource_spec.rb | 56 +- .../api/v3/views/index_resource_spec.rb | 34 +- .../api/v3/views/show_resource_spec.rb | 20 +- spec/requests/api/v3/watcher_resource_spec.rb | 140 +-- .../api/v3/wiki_pages_resource_spec.rb | 22 +- .../available_assignees_api_spec.rb | 4 +- .../available_projects_on_create_api_spec.rb | 20 +- .../available_projects_on_edit_api_spec.rb | 14 +- ...lable_relation_candidates_resource_spec.rb | 38 +- .../by_project_create_resource_spec.rb | 52 +- .../by_project_index_resource_spec.rb | 70 +- .../create_form_resource_spec.rb | 46 +- .../create_project_form_resource_spec.rb | 10 +- .../v3/work_packages/create_resource_spec.rb | 104 +- .../v3/work_packages/delete_resource_spec.rb | 36 +- .../form/work_package_form_resource_spec.rb | 544 +++++----- .../v3/work_packages/index_resource_spec.rb | 544 +++++----- .../v3/work_packages/show_resource_spec.rb | 192 ++-- .../v3/work_packages/update_resource_spec.rb | 454 ++++----- .../work_packages_schemas_resource_spec.rb | 104 +- spec/requests/auth/auth_source_sso_spec.rb | 46 +- spec/requests/auth/oauth_login_csp_spec.rb | 22 +- spec/requests/auth/token_based_access_spec.rb | 6 +- .../oauth/client_credentials_flow_spec.rb | 34 +- spec/requests/oauth/oauth_application_spec.rb | 12 +- .../oauth_clients/callback_flow_spec.rb | 84 +- .../ensure_connection_flow_spec.rb | 50 +- .../oauth_client_credentials_spec.rb | 12 +- .../openid_google_provider_callback_spec.rb | 22 +- .../api_v3_rate_limiting_spec.rb | 26 +- .../lost_password_rate_limiting_spec.rb | 26 +- spec/routing/account_spec.rb | 20 +- spec/routing/activities_spec.rb | 40 +- spec/routing/admin/incoming_mails_spec.rb | 12 +- spec/routing/admin/mail_notifications_spec.rb | 12 +- spec/routing/admin_spec.rb | 34 +- spec/routing/attachments_spec.rb | 24 +- spec/routing/attribute_help_text_spec.rb | 24 +- spec/routing/categories_spec.rb | 42 +- spec/routing/custom_actions_spec.rb | 52 +- spec/routing/enterprise_routing_spec.rb | 14 +- spec/routing/enumerations_spec.rb | 36 +- spec/routing/errors_routing_spec.rb | 10 +- spec/routing/forums_routing_spec.rb | 84 +- spec/routing/groups_spec.rb | 76 +- spec/routing/help_routing_spec.rb | 10 +- spec/routing/homescreen_spec.rb | 8 +- spec/routing/journals_spec.rb | 20 +- .../routing/language_settings_routing_spec.rb | 16 +- spec/routing/messages_spec.rb | 54 +- spec/routing/my_spec.rb | 46 +- spec/routing/news_comments_spec.rb | 18 +- spec/routing/news_spec.rb | 76 +- spec/routing/old_issue_2_wp_spec.rb | 16 +- spec/routing/project_menu_routing_spec.rb | 8 +- spec/routing/project_queries_routing_spec.rb | 18 +- spec/routing/project_routing_spec.rb | 68 +- spec/routing/project_settings_routing_spec.rb | 48 +- spec/routing/repositories_routing_spec.rb | 420 ++++---- spec/routing/roles_spec.rb | 44 +- spec/routing/search_spec.rb | 8 +- spec/routing/settings_spec.rb | 20 +- spec/routing/short_uri_wp_spec.rb | 16 +- spec/routing/status_routing_spec.rb | 30 +- spec/routing/types_spec.rb | 10 +- spec/routing/user_memberships_routing_spec.rb | 32 +- spec/routing/users_routing_spec.rb | 116 +-- spec/routing/versions_spec.rb | 60 +- spec/routing/watchers_spec.rb | 24 +- spec/routing/wiki_routing_spec.rb | 220 ++-- .../auto_completes_routing_spec.rb | 14 +- .../work_package/reports_routing_spec.rb | 20 +- spec/routing/work_package/shares/bulk_spec.rb | 28 +- spec/routing/work_package/shares_spec.rb | 20 +- spec/routing/work_package_bulk_spec.rb | 20 +- spec/routing/work_packages_spec.rb | 138 +-- spec/routing/workflows_spec.rb | 14 +- spec/security/active_support_to_json_spec.rb | 6 +- spec/seeders/admin_user_seeder_spec.rb | 46 +- .../basic_data/global_role_seeder_spec.rb | 18 +- spec/seeders/basic_data/model_seeder_spec.rb | 10 +- .../basic_data/project_role_seeder_spec.rb | 36 +- .../type_configuration_seeder_spec.rb | 16 +- .../work_package_role_seeder_spec.rb | 28 +- .../demo_data/global_query_seeder_spec.rb | 8 +- spec/seeders/demo_data/group_seeder_spec.rb | 10 +- spec/seeders/demo_data/project_seeder_spec.rb | 110 +- .../demo_data/work_package_seeder_spec.rb | 144 +-- spec/seeders/env_data/ldap_seeder_spec.rb | 108 +- spec/seeders/root_seeder_shared_examples.rb | 6 +- .../root_seeder_standard_edition_spec.rb | 118 +-- spec/seeders/seeder_spec.rb | 8 +- spec/seeders/setting_seeder_spec.rb | 24 +- .../source/filter_translatables_spec.rb | 132 +-- spec/seeders/source/seed_data_loader_spec.rb | 70 +- spec/seeders/source/seed_data_spec.rb | 90 +- spec/seeders/source/translate_spec.rb | 122 +-- .../add_work_package_note_service_spec.rb | 36 +- spec/services/api/parser_struct_spec.rb | 44 +- .../api/v3/parse_query_params_service_spec.rb | 224 ++--- ...pdate_query_from_v3_params_service_spec.rb | 20 +- ...llection_from_query_params_service_spec.rb | 12 +- ...kage_collection_from_query_service_spec.rb | 162 +-- .../create_service_integration_spec.rb | 68 +- .../delete_service_integration_spec.rb | 58 +- ...prepare_upload_service_integration_spec.rb | 26 +- .../authentication/omniauth_service_spec.rb | 140 +-- .../authorization/enterprise_service_spec.rb | 26 +- .../query_transformation_spec.rb | 26 +- .../query_transformations_spec.rb | 54 +- .../authorization/user_allowed_query_spec.rb | 38 +- .../user_allowed_service_spec.rb | 94 +- .../user_entity_roles_query_spec.rb | 22 +- .../user_global_roles_query_spec.rb | 34 +- .../user_permissible_service_spec.rb | 148 +-- .../user_project_roles_query_spec.rb | 40 +- spec/services/authorization_spec.rb | 104 +- spec/services/backups/create_service_spec.rb | 6 +- spec/services/base/base_callable_spec.rb | 26 +- .../behaves_like_create_service.rb | 38 +- .../behaves_like_delete_service.rb | 28 +- .../behaves_like_update_service.rb | 32 +- spec/services/create_type_service_spec.rb | 8 +- .../custom_actions/update_service_spec.rb | 48 +- .../update_work_package_service_spec.rb | 30 +- .../custom_fields/create_service_spec.rb | 10 +- .../set_attributes_service_spec.rb | 22 +- .../custom_fields/update_service_spec.rb | 6 +- .../add_users_service_integration_spec.rb | 64 +- ...nherited_roles_service_integration_spec.rb | 48 +- ...nherited_roles_service_integration_spec.rb | 66 +- .../groups/set_attributes_service_spec.rb | 48 +- .../update_roles_service_integration_spec.rb | 152 +-- spec/services/groups/update_service_spec.rb | 26 +- ...port_user_list_service_integration_spec.rb | 46 +- ...rs_from_filter_service_integration_spec.rb | 18 +- .../ldap/post_login_sync_service_spec.rb | 58 +- ...chronize_users_service_integration_spec.rb | 92 +- .../cleanup_service_integration_spec.rb | 28 +- .../create_service_integration_spec.rb | 10 +- spec/services/members/create_service_spec.rb | 24 +- .../members/set_attributes_service_spec.rb | 32 +- spec/services/members/update_service_spec.rb | 18 +- spec/services/messages/create_service_spec.rb | 6 +- .../messages/set_attributes_service_spec.rb | 22 +- spec/services/messages/update_service_spec.rb | 6 +- .../create_from_journal_job_shared.rb | 12 +- .../create_from_model_service_comment_spec.rb | 46 +- .../create_from_model_service_message_spec.rb | 96 +- .../create_from_model_service_news_spec.rb | 34 +- .../create_from_model_service_wiki_spec.rb | 86 +- ...te_from_model_service_work_package_spec.rb | 326 +++--- .../create_service_intergration_spec.rb | 12 +- .../notifications/create_service_spec.rb | 6 +- ...mail_service_mentioned_integration_spec.rb | 12 +- .../notifications/mail_service_spec.rb | 64 +- .../mentioned_journals_shared.rb | 4 +- .../set_attributes_service_spec.rb | 30 +- .../oauth_clients/create_service_spec.rb | 12 +- .../oauth_clients/delete_service_spec.rb | 6 +- .../redirect_uri_from_state_service_spec.rb | 32 +- .../set_attributes_service_spec.rb | 26 +- ..._to_query_service_capability_query_spec.rb | 12 +- ...ams_to_query_service_project_query_spec.rb | 22 +- ...parse_schema_filter_params_service_spec.rb | 58 +- .../placeholder_users/create_service_spec.rb | 6 +- .../placeholder_users/delete_service_spec.rb | 22 +- .../set_attributes_service_spec.rb | 24 +- .../placeholder_users/update_service_spec.rb | 6 +- ...eferences_service_call_integration_spec.rb | 142 +-- .../services/projects/archive_service_spec.rb | 36 +- spec/services/projects/create_service_spec.rb | 12 +- spec/services/projects/delete_service_spec.rb | 36 +- .../gantt_query_generator_service_spec.rb | 38 +- .../schedule_deletion_service_spec.rb | 36 +- ...set_attributes_service_integration_spec.rb | 34 +- .../projects/set_attributes_service_spec.rb | 110 +- .../projects/unarchive_service_spec.rb | 10 +- .../update_service_integration_spec.rb | 32 +- spec/services/projects/update_service_spec.rb | 22 +- spec/services/queries/create_service_spec.rb | 8 +- spec/services/queries/filter_mappper_spec.rb | 68 +- .../project_queries/create_service_spec.rb | 6 +- .../set_attributes_service_spec.rb | 82 +- .../update_from_params_service_spec.rb | 54 +- spec/services/queries/update_service_spec.rb | 6 +- .../services/relations/create_service_spec.rb | 32 +- .../services/relations/update_service_spec.rb | 32 +- spec/services/roles/delete_service_spec.rb | 8 +- .../roles/set_attributes_service_spec.rb | 40 +- spec/services/roles/update_service_spec.rb | 8 +- .../scm/checkout_instructions_service_spec.rb | 98 +- .../create_managed_repository_service_spec.rb | 90 +- .../delete_managed_repository_service_spec.rb | 56 +- .../scm/repository_factory_service_spec.rb | 52 +- spec/services/service_result_spec.rb | 72 +- spec/services/services/create_service_spec.rb | 6 +- .../services/set_localization_service_spec.rb | 42 +- .../settings/language_update_service_spec.rb | 10 +- .../settings/shared/shared_call_examples.rb | 14 +- .../settings/shared/shared_setup_context.rb | 8 +- spec/services/settings/update_service_spec.rb | 16 +- .../working_days_update_service_spec.rb | 94 +- .../service_context_integration_spec.rb | 26 +- spec/services/shared_type_service.rb | 112 +-- .../update_projects_types_service_spec.rb | 36 +- .../update_query_from_params_service_spec.rb | 80 +- spec/services/update_type_service_spec.rb | 32 +- .../update_service_integration_spec.rb | 14 +- .../user_preferences/update_service_spec.rb | 10 +- .../users/change_password_service_spec.rb | 22 +- spec/services/users/create_service_spec.rb | 24 +- .../users/delete_service_integration_spec.rb | 10 +- spec/services/users/delete_service_spec.rb | 30 +- spec/services/users/login_service_spec.rb | 80 +- spec/services/users/logout_service_spec.rb | 30 +- .../users/register_user_service_spec.rb | 94 +- ...place_mentions_service_integration_spec.rb | 156 +-- ...set_attributes_service_integration_spec.rb | 22 +- .../users/set_attributes_service_spec.rb | 56 +- spec/services/users/update_service_spec.rb | 54 +- .../copy_service_integration_spec.rb | 34 +- .../wiki_pages/set_attributes_service_spec.rb | 34 +- .../create_or_update_service_spec.rb | 10 +- .../create_service_spec.rb | 16 +- .../set_attributes_service_spec.rb | 64 +- .../update_service_spec.rb | 12 +- .../copy_service_integration_spec.rb | 86 +- .../delete_service_integration_spec.rb | 20 +- .../work_packages/delete_service_spec.rb | 32 +- .../schedule_dependency/dependency_spec.rb | 84 +- .../set_schedule_service_working_days_spec.rb | 232 ++--- .../work_packages/shared/all_days_spec.rb | 110 +- .../work_packages/shared/days_spec.rb | 12 +- .../shared/shared_examples_days.rb | 36 +- .../work_packages/shared/working_days_spec.rb | 200 ++-- .../update_ancestors/loader_spec.rb | 114 +-- .../work_packages/update_service_spec.rb | 6 +- .../bulk_update_service_integration_spec.rb | 30 +- spec/spec_helper.rb | 8 +- spec/support/a11y.rb | 2 +- spec/support/angular.rb | 2 +- .../shared_available_principals_examples.rb | 40 +- .../work_package_representer_eager_loading.rb | 2 +- spec/support/authentication_helpers.rb | 14 +- spec/support/browsers/chrome.rb | 52 +- spec/support/browsers/firefox.rb | 34 +- spec/support/capybara.rb | 26 +- .../additional_accessible_selectors.rb | 2 +- spec/support/capybara_browser_screenshots.rb | 18 +- spec/support/carrierwave.rb | 10 +- spec/support/clean_feature_decisions.rb | 2 +- .../admin/type_configuration_form.rb | 46 +- .../components/attachments/attachments.rb | 10 +- spec/support/components/attachments_list.rb | 2 +- .../autocompleter/autocomplete_helpers.rb | 4 +- .../ng_select_autocomplete_helpers.rb | 20 +- spec/support/components/common/sidemenu.rb | 4 +- .../support/components/confirmation_dialog.rb | 2 +- .../components/datepicker/basic_datepicker.rb | 4 +- .../components/datepicker/datepicker.rb | 32 +- .../datepicker/month_range_selection.rb | 12 +- .../components/datepicker/range_datepicker.rb | 2 +- .../datepicker/work_package_datepicker.rb | 56 +- spec/support/components/global_search.rb | 22 +- spec/support/components/grids/grid_area.rb | 30 +- spec/support/components/menu/dropdown.rb | 6 +- .../support/components/menu/quick_add_menu.rb | 10 +- .../password_confirmation_dialog.rb | 10 +- .../components/project_include_component.rb | 8 +- spec/support/components/projects/top_menu.rb | 12 +- spec/support/components/table_pagination.rb | 6 +- .../timelines/configuration_modal.rb | 18 +- .../components/timelines/timeline_row.rb | 8 +- .../components/users/invite_user_modal.rb | 36 +- .../components/work_packages/activities.rb | 2 +- .../components/work_packages/baseline.rb | 18 +- .../work_packages/baseline_modal.rb | 42 +- .../components/work_packages/columns.rb | 34 +- .../components/work_packages/context_menu.rb | 12 +- .../components/work_packages/destroy_modal.rb | 16 +- .../components/work_packages/filters.rb | 56 +- .../components/work_packages/group_by.rb | 14 +- .../components/work_packages/hierarchies.rb | 18 +- .../components/work_packages/query_menu.rb | 8 +- .../components/work_packages/query_title.rb | 16 +- .../components/work_packages/relations.rb | 52 +- .../components/work_packages/settings_menu.rb | 14 +- .../components/work_packages/share_modal.rb | 70 +- .../components/work_packages/sort_by.rb | 26 +- .../table_configuration/filters.rb | 8 +- .../table_configuration/graph_general.rb | 4 +- .../table_configuration/highlighting.rb | 18 +- .../table_configuration_modal.rb | 18 +- .../components/work_packages/timer_button.rb | 8 +- .../components/wysiwyg/wysiwyg_editor.rb | 60 +- spec/support/contracts/shared.rb | 10 +- spec/support/cuprite_setup.rb | 34 +- spec/support/download_list.rb | 4 +- spec/support/edit_fields/date_edit_field.rb | 6 +- spec/support/edit_fields/edit_field.rb | 42 +- .../edit_fields/project_status_field.rb | 8 +- spec/support/edit_fields/select_edit_field.rb | 6 +- .../edit_fields/spent_time_edit_field.rb | 4 +- spec/support/edit_fields/text_area_field.rb | 8 +- spec/support/edit_fields/text_editor_field.rb | 6 +- .../edit_fields/work_package_status_field.rb | 6 +- spec/support/file_helpers.rb | 6 +- spec/support/finders/test_selector.rb | 4 +- spec/support/form_fields/editor_form_field.rb | 2 +- spec/support/form_fields/form_field.rb | 2 +- spec/support/form_fields/input_form_field.rb | 8 +- spec/support/form_fields/select_form_field.rb | 16 +- spec/support/identical_ext.rb | 8 +- spec/support/local_storage_cleanup.rb | 2 +- spec/support/matchers/be_html_eql.rb | 6 +- .../notifications/navigation_helper.rb | 2 +- spec/support/onboarding_helper.rb | 30 +- .../pages/admin/custom_actions/edit.rb | 6 +- .../pages/admin/custom_actions/form.rb | 44 +- .../pages/admin/custom_actions/index.rb | 26 +- .../support/pages/admin/custom_actions/new.rb | 6 +- .../pages/admin/individual_principals/edit.rb | 34 +- .../pages/admin/ldap_auth_sources/index.rb | 2 +- .../pages/admin/placeholder_users/index.rb | 28 +- .../pages/admin/system_settings/general.rb | 2 +- .../pages/admin/system_settings/languages.rb | 2 +- .../pages/admin/system_settings/page.rb | 4 +- spec/support/pages/admin/users/edit.rb | 32 +- spec/support/pages/admin/users/index.rb | 36 +- spec/support/pages/custom_fields.rb | 12 +- spec/support/pages/form_filler.rb | 2 +- spec/support/pages/groups.rb | 42 +- spec/support/pages/home.rb | 2 +- spec/support/pages/messages/base.rb | 2 +- spec/support/pages/messages/create.rb | 8 +- spec/support/pages/messages/index.rb | 14 +- spec/support/pages/messages/show.rb | 32 +- spec/support/pages/my/notifications.rb | 2 +- spec/support/pages/my/password_page.rb | 16 +- spec/support/pages/my/reminders.rb | 2 +- spec/support/pages/new_placeholder_user.rb | 8 +- spec/support/pages/new_user.rb | 18 +- spec/support/pages/notifications/settings.rb | 12 +- .../pages/notifications/split_screen.rb | 6 +- spec/support/pages/page.rb | 8 +- spec/support/pages/projects/destroy.rb | 2 +- spec/support/pages/projects/index.rb | 142 +-- spec/support/pages/projects/settings.rb | 6 +- spec/support/pages/reminders/settings.rb | 16 +- spec/support/pages/types/index.rb | 12 +- spec/support/pages/versions/roadmap.rb | 18 +- .../work_packages/abstract_work_package.rb | 86 +- .../abstract_work_package_create.rb | 10 +- .../work_package_by_button_creator.rb | 12 +- .../embedded_work_packages_table.rb | 10 +- .../pages/work_packages/full_work_package.rb | 16 +- .../work_packages/full_work_package_create.rb | 8 +- .../pages/work_packages/split_work_package.rb | 12 +- .../split_work_package_create.rb | 8 +- .../pages/work_packages/work_package_card.rb | 2 +- .../pages/work_packages/work_package_cards.rb | 22 +- .../work_packages/work_packages_table.rb | 50 +- .../work_packages/work_packages_timeline.rb | 22 +- spec/support/parallel_helper.rb | 4 +- spec/support/permission_specs.rb | 4 +- spec/support/pry.rb | 4 +- spec/support/puffing_billy_proxy.rb | 4 +- .../queries/filters/shared_filter_examples.rb | 308 +++--- .../shared_get_individual_query_examples.rb | 70 +- spec/support/repository_helpers.rb | 10 +- spec/support/request_with_header.rb | 4 +- spec/support/roles.rb | 2 +- spec/support/rspec_cleanup.rb | 2 +- spec/support/rspec_disabled_specs.rb | 4 +- ..._mocks_ruby_3_2_fix_argument_forwarding.rb | 2 +- spec/support/rspec_retry.rb | 6 +- spec/support/schedule_helpers.rb | 2 +- spec/support/schedule_helpers/chart.rb | 12 +- .../support/schedule_helpers/chart_builder.rb | 14 +- spec/support/schedule_helpers/schedule.rb | 2 +- spec/support/schedule_reminder_mails.rb | 2 +- spec/support/scm/countable_repository.rb | 46 +- spec/support/scm/relocate_repository.rb | 30 +- spec/support/seeders.rb | 2 +- spec/support/selector_helpers.rb | 2 +- spec/support/shared/acts_as_attachable.rb | 50 +- spec/support/shared/acts_as_customizable.rb | 50 +- spec/support/shared/acts_as_watchable.rb | 50 +- spec/support/shared/audits.rb | 8 +- spec/support/shared/expect_page_reload.rb | 6 +- spec/support/shared/ferrum_patches.rb | 4 +- spec/support/shared/forms_html.rb | 42 +- .../shared/loading_indicator_saveguard.rb | 2 +- spec/support/shared/permissions.rb | 16 +- spec/support/shared/rake.rb | 4 +- spec/support/shared/require_admin.rb | 12 +- .../shared/with_blank_access_control_state.rb | 2 +- spec/support/shared/with_direct_uploads.rb | 24 +- spec/support/shared/with_ee.rb | 2 +- spec/support/shared/with_mobile_screen.rb | 2 +- spec/support/shared/with_settings.rb | 10 +- spec/support/skip_if_command_unavailable.rb | 4 +- spec/support/support_links.rb | 6 +- spec/support/table_helpers.rb | 2 +- spec/support/table_helpers/column.rb | 4 +- spec/support/table_helpers/identifier.rb | 4 +- spec/support/table_helpers/table.rb | 2 +- spec/support/table_helpers/table_parser.rb | 6 +- spec/support/tempdir.rb | 2 +- spec/support/toasts/expectations.rb | 2 +- spec/support/vcr.rb | 28 +- spec/support/view_components.rb | 4 +- spec/support/wait_for.rb | 4 +- spec/support/webmock.rb | 6 +- spec/support/work_packages/pdf_export.rb | 4 +- .../work_packages/work_package_cards.rb | 2 +- .../mocked_permission_helper_spec.rb | 84 +- .../schedule_helpers/chart_builder_spec.rb | 56 +- .../chart_representer_spec.rb | 44 +- .../schedule_helpers/chart_spec.rb | 126 +-- .../schedule_helpers/example_methods_spec.rb | 34 +- .../schedule_helpers/let_schedule_spec.rb | 16 +- .../support_spec/table_helpers/column_spec.rb | 58 +- .../table_helpers/identifier_spec.rb | 12 +- .../table_helpers/table_data_spec.rb | 24 +- .../table_helpers/table_parser_spec.rb | 36 +- .../table_helpers/table_representer_spec.rb | 28 +- spec/tasks/backup_spec.rb | 54 +- spec/tasks/seed_spec.rb | 32 +- spec/tasks/setting_spec.rb | 54 +- .../secure_context_uri_validator_spec.rb | 26 +- spec/views/account/login.html.erb_spec.rb | 16 +- spec/views/account/register.html.erb_spec.rb | 48 +- .../enterprises/_current.html.erb_spec.rb | 4 +- .../authentication/show.html.erb_spec.rb | 24 +- .../common/validation_error.html.erb_spec.rb | 26 +- .../views/custom_styles/show.html.erb_spec.rb | 16 +- spec/views/layouts/admin.html.erb_spec.rb | 20 +- spec/views/layouts/base.html.erb_spec.rb | 96 +- .../settings/general/show.html.erb_spec.rb | 40 +- .../views/repositories/stats.html.erb_spec.rb | 16 +- spec/views/users/edit.html.erb_spec.rb | 74 +- spec/views/users/index.html.erb_spec.rb | 6 +- spec/views/users/show.html.erb_spec.rb | 10 +- spec/views/wiki/new.html.erb_spec.rb | 24 +- .../work_package/auto_complete/index_spec.rb | 12 +- spec/workers/application_job_spec.rb | 14 +- ...anup_uncontainered_job_integration_spec.rb | 4 +- ...nish_direct_upload_job_integration_spec.rb | 32 +- spec/workers/copy_project_job_spec.rb | 90 +- spec/workers/extract_fulltext_job_spec.rb | 46 +- spec/workers/journals/completed_job_spec.rb | 46 +- spec/workers/ldap/synchronization_job_spec.rb | 4 +- spec/workers/mails/member_created_job_spec.rb | 40 +- spec/workers/mails/member_updated_job_spec.rb | 46 +- spec/workers/mails/reminder_job_spec.rb | 30 +- spec/workers/mails/shared/member_job.rb | 40 +- spec/workers/mails/shared/watcher_job.rb | 50 +- spec/workers/mails/watcher_added_job_spec.rb | 6 +- .../workers/mails/watcher_removed_job_spec.rb | 6 +- .../mails/work_package_shared_job_spec.rb | 12 +- .../alertable_work_packages_spec.rb | 216 ++-- ...eate_date_alerts_notifications_job_spec.rb | 48 +- .../group_member_altered_job_spec.rb | 8 +- .../schedule_reminder_mails_job_spec.rb | 16 +- .../notifications/workflow_job_spec.rb | 16 +- .../principals/delete_job_integration_spec.rb | 148 +-- .../scm/create_local_repository_job_spec.rb | 32 +- spec/workers/user_job_spec.rb | 12 +- .../apply_working_days_change_job_spec.rb | 352 +++---- .../exports/export_job_integration_spec.rb | 20 +- .../work_packages/exports/export_job_spec.rb | 40 +- 4489 files changed, 66378 insertions(+), 66378 deletions(-) diff --git a/Rakefile b/Rakefile index 536d51cd911d..30e586c3e063 100755 --- a/Rakefile +++ b/Rakefile @@ -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" diff --git a/app/components/activities/days_component.rb b/app/components/activities/days_component.rb index 27c7668f5c44..fe76971cb6c8 100644 --- a/app/components/activities/days_component.rb +++ b/app/components/activities/days_component.rb @@ -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 diff --git a/app/components/add_button_component.rb b/app/components/add_button_component.rb index 46dafe74e648..956d16c5fec5 100644 --- a/app/components/add_button_component.rb +++ b/app/components/add_button_component.rb @@ -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 @@ -45,7 +45,7 @@ def id end def li_css_class - 'toolbar-item' + "toolbar-item" end def title @@ -55,7 +55,7 @@ def title def label content_tag(:span, label_text, - class: 'button--text') + class: "button--text") end def aria_label @@ -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 diff --git a/app/components/admin/quarantined_attachments/row_component.rb b/app/components/admin/quarantined_attachments/row_component.rb index 392929a4db1a..0af393a4b4d1 100644 --- a/app/components/admin/quarantined_attachments/row_component.rb +++ b/app/components/admin/quarantined_attachments/row_component.rb @@ -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 @@ -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) } ) diff --git a/app/components/admin/quarantined_attachments/table_component.rb b/app/components/admin/quarantined_attachments/table_component.rb index f2f2d429b814..7ea4e52020fd 100644 --- a/app/components/admin/quarantined_attachments/table_component.rb +++ b/app/components/admin/quarantined_attachments/table_component.rb @@ -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 diff --git a/app/components/custom_actions/row_component.rb b/app/components/custom_actions/row_component.rb index 78aae79668f9..a8f2f3586cec 100644 --- a/app/components/custom_actions/row_component.rb +++ b/app/components/custom_actions/row_component.rb @@ -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 @@ -53,7 +53,7 @@ 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) ) @@ -61,7 +61,7 @@ def edit_link 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) }, diff --git a/app/components/custom_actions/table_component.rb b/app/components/custom_actions/table_component.rb index 5b35e3a3c40e..0c7dfe58fd4f 100644 --- a/app/components/custom_actions/table_component.rb +++ b/app/components/custom_actions/table_component.rb @@ -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 diff --git a/app/components/enumerations/row_component.rb b/app/components/enumerations/row_component.rb index 78c5597f23cc..9c885f3a3752 100644 --- a/app/components/enumerations/row_component.rb +++ b/app/components/enumerations/row_component.rb @@ -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 @@ -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) }, diff --git a/app/components/enumerations/table_component.rb b/app/components/enumerations/table_component.rb index 08b5c1a4286c..bba8eff05e1e 100644 --- a/app/components/enumerations/table_component.rb +++ b/app/components/enumerations/table_component.rb @@ -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 @@ -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 diff --git a/app/components/individual_principal_base_filter_component.rb b/app/components/individual_principal_base_filter_component.rb index 1bff0229a696..b82f9f6bd263 100644 --- a/app/components/individual_principal_base_filter_component.rb +++ b/app/components/individual_principal_base_filter_component.rb @@ -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 diff --git a/app/components/ldap_auth_sources/row_component.rb b/app/components/ldap_auth_sources/row_component.rb index 2e8a9a8ccdf2..975c87e46252 100644 --- a/app/components/ldap_auth_sources/row_component.rb +++ b/app/components/ldap_auth_sources/row_component.rb @@ -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 @@ -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 diff --git a/app/components/ldap_auth_sources/table_component.rb b/app/components/ldap_auth_sources/table_component.rb index f4735796b600..ffbf507c6b39 100644 --- a/app/components/ldap_auth_sources/table_component.rb +++ b/app/components/ldap_auth_sources/table_component.rb @@ -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 diff --git a/app/components/members/index_page_header_component.rb b/app/components/members/index_page_header_component.rb index 689eb40daab8..485aa1e1b6a4 100644 --- a/app/components/members/index_page_header_component.rb +++ b/app/components/members/index_page_header_component.rb @@ -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 diff --git a/app/components/members/role_form_component.rb b/app/components/members/role_form_component.rb index 47eca2ba63d5..c207c31c03df 100644 --- a/app/components/members/role_form_component.rb +++ b/app/components/members/role_form_component.rb @@ -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 diff --git a/app/components/members/user_filter_component.rb b/app/components/members/user_filter_component.rb index 3dc96333fc07..e128e44d99a7 100644 --- a/app/components/members/user_filter_component.rb +++ b/app/components/members/user_filter_component.rb @@ -30,7 +30,7 @@ module Members class UserFilterComponent < ::UserFilterComponent - ALL_SHARED_FILTER_KEY = 'all' + ALL_SHARED_FILTER_KEY = "all" def initially_visible? false @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/app/components/oauth/applications/row_component.rb b/app/components/oauth/applications/row_component.rb index 33bfc1e631db..70b598eac265 100644 --- a/app/components/oauth/applications/row_component.rb +++ b/app/components/oauth/applications/row_component.rb @@ -47,20 +47,20 @@ def owner def confidential if application.confidential? - helpers.op_icon 'icon icon-checkmark' + helpers.op_icon "icon icon-checkmark" end end def redirect_uri urls = application.redirect_uri.split("\n") - safe_join urls, '
'.html_safe + safe_join urls, "
".html_safe end def client_credentials if user_id = application.client_credentials_user_id helpers.link_to_user User.find(user_id) else - '-' + "-" end end diff --git a/app/components/oauth/applications/table_component.rb b/app/components/oauth/applications/table_component.rb index 86b0cd15f099..144742596aa5 100644 --- a/app/components/oauth/applications/table_component.rb +++ b/app/components/oauth/applications/table_component.rb @@ -51,10 +51,10 @@ def columns def inline_create_link link_to new_oauth_application_path, - aria: { label: t('oauth.application.new') }, - class: 'wp-inline-create--add-link', - title: t('oauth.application.new') do - helpers.op_icon('icon icon-add') + aria: { label: t("oauth.application.new") }, + class: "wp-inline-create--add-link", + title: t("oauth.application.new") do + helpers.op_icon("icon icon-add") end end @@ -64,11 +64,11 @@ def empty_row_message def headers [ - ['name', { caption: ::Doorkeeper::Application.human_attribute_name(:name) }], - ['owner', { caption: ::Doorkeeper::Application.human_attribute_name(:owner) }], - ['client_credentials', { caption: I18n.t('oauth.client_credentials') }], - ['redirect_uri', { caption: ::Doorkeeper::Application.human_attribute_name(:redirect_uri) }], - ['confidential', { caption: ::Doorkeeper::Application.human_attribute_name(:confidential) }] + ["name", { caption: ::Doorkeeper::Application.human_attribute_name(:name) }], + ["owner", { caption: ::Doorkeeper::Application.human_attribute_name(:owner) }], + ["client_credentials", { caption: I18n.t("oauth.client_credentials") }], + ["redirect_uri", { caption: ::Doorkeeper::Application.human_attribute_name(:redirect_uri) }], + ["confidential", { caption: ::Doorkeeper::Application.human_attribute_name(:confidential) }] ] end end diff --git a/app/components/open_project/common/duration_component.rb b/app/components/open_project/common/duration_component.rb index f5dd5c34de0e..70639b9dd3a5 100644 --- a/app/components/open_project/common/duration_component.rb +++ b/app/components/open_project/common/duration_component.rb @@ -32,7 +32,7 @@ class DurationComponent < Primer::Component VALID_TYPES = %i[seconds minutes hours days weeks months years].freeze attr_reader :duration, :abbreviated, :separator - def initialize(duration, type = :seconds, separator: ', ', abbreviated: false, **args) + def initialize(duration, type = :seconds, separator: ", ", abbreviated: false, **args) super @duration = parse_duration(duration, type) diff --git a/app/components/placeholder_users/placeholder_user_filter_component.rb b/app/components/placeholder_users/placeholder_user_filter_component.rb index 989b3991a4a0..a9d999197f90 100644 --- a/app/components/placeholder_users/placeholder_user_filter_component.rb +++ b/app/components/placeholder_users/placeholder_user_filter_component.rb @@ -40,7 +40,7 @@ def apply_filters(params, query) # Filter for active placeholders # to skip to-be-deleted users - query.where(:status, '=', :active) + query.where(:status, "=", :active) end end diff --git a/app/components/placeholder_users/row_component.rb b/app/components/placeholder_users/row_component.rb index 3f439b37fb7d..e419ddeb4351 100644 --- a/app/components/placeholder_users/row_component.rb +++ b/app/components/placeholder_users/row_component.rb @@ -47,10 +47,10 @@ def button_links def delete_link if helpers.can_delete_placeholder_user?(placeholder_user, User.current) link_to deletion_info_placeholder_user_path(placeholder_user) do - helpers.tooltip_tag I18n.t('placeholder_users.delete_tooltip'), icon: 'icon-delete' + helpers.tooltip_tag I18n.t("placeholder_users.delete_tooltip"), icon: "icon-delete" end else - helpers.tooltip_tag I18n.t('placeholder_users.right_to_manage_members_missing'), icon: 'icon-help2' + helpers.tooltip_tag I18n.t("placeholder_users.right_to_manage_members_missing"), icon: "icon-help2" end end diff --git a/app/components/placeholder_users/table_component.rb b/app/components/placeholder_users/table_component.rb index 99cd383d0485..cebf3a43a88a 100644 --- a/app/components/placeholder_users/table_component.rb +++ b/app/components/placeholder_users/table_component.rb @@ -43,7 +43,7 @@ def headers def header_options(name) options = { caption: PlaceholderUser.human_attribute_name(name) } - options[:default_order] = 'desc' if desc_by_default.include? name + options[:default_order] = "desc" if desc_by_default.include? name options end diff --git a/app/components/projects/configure_view_modal_component.rb b/app/components/projects/configure_view_modal_component.rb index 173b3bfeaf12..5d1f93d83aae 100644 --- a/app/components/projects/configure_view_modal_component.rb +++ b/app/components/projects/configure_view_modal_component.rb @@ -29,9 +29,9 @@ # ++ class Projects::ConfigureViewModalComponent < ApplicationComponent - MODAL_ID = 'op-project-list-configure-dialog' - COLUMN_FORM_ID = 'op-project-list-configure-columns-form' - COLUMN_HTML_NAME = 'columns' + MODAL_ID = "op-project-list-configure-dialog" + COLUMN_FORM_ID = "op-project-list-configure-columns-form" + COLUMN_HTML_NAME = "columns" options :query diff --git a/app/components/projects/delete_list_modal_component.rb b/app/components/projects/delete_list_modal_component.rb index 70f8c39fdad7..d8ba7523c3a0 100644 --- a/app/components/projects/delete_list_modal_component.rb +++ b/app/components/projects/delete_list_modal_component.rb @@ -29,7 +29,7 @@ # ++ class Projects::DeleteListModalComponent < ApplicationComponent # rubocop:disable OpenProject/AddPreviewForViewComponent - MODAL_ID = 'op-project-list-delete-dialog' + MODAL_ID = "op-project-list-delete-dialog" options :query end diff --git a/app/components/projects/export_list_modal_component.rb b/app/components/projects/export_list_modal_component.rb index 601cc29649a5..e540403fbd98 100644 --- a/app/components/projects/export_list_modal_component.rb +++ b/app/components/projects/export_list_modal_component.rb @@ -29,7 +29,7 @@ # ++ class Projects::ExportListModalComponent < ApplicationComponent # rubocop:disable OpenProject/AddPreviewForViewComponent - MODAL_ID = 'op-project-list-export-dialog' + MODAL_ID = "op-project-list-export-dialog" options :query end diff --git a/app/components/projects/row_component.rb b/app/components/projects/row_component.rb index e6fb6f526ce2..62e6d88d4890 100644 --- a/app/components/projects/row_component.rb +++ b/app/components/projects/row_component.rb @@ -39,7 +39,7 @@ def level # Hierarchy cell is just a placeholder def hierarchy - '' + "" end def column_value(column) @@ -56,10 +56,10 @@ def custom_field_column(column) cf = column.custom_field custom_value = project.formatted_custom_value_for(cf) - if cf.field_format == 'text' && custom_value.present? + if cf.field_format == "text" && custom_value.present? render OpenProject::Common::AttributeComponent.new("dialog-#{project.id}-cf-#{cf.id}", cf.name, custom_value.html_safe) # rubocop:disable Rails/OutputSafety elsif custom_value.is_a?(Array) - safe_join(Array(custom_value).compact_blank, ', ') + safe_join(Array(custom_value).compact_blank, ", ") else custom_value end @@ -74,20 +74,20 @@ def latest_activity_at end def required_disk_space - return '' unless project.required_disk_space.to_i > 0 + return "" unless project.required_disk_space.to_i > 0 number_to_human_size(project.required_disk_space, precision: 2) end def name - content = content_tag(:i, '', class: "projects-table--hierarchy-icon") + content = content_tag(:i, "", class: "projects-table--hierarchy-icon") if project.archived? - content << ' ' - content << content_tag(:span, I18n.t('project.archive.archived'), class: 'archived-label') + content << " " + content << content_tag(:span, I18n.t("project.archive.archived"), class: "archived-label") end - content << ' ' + content << " " content << helpers.link_to_project(project, {}, {}, false) content end @@ -95,13 +95,13 @@ def name def project_status return nil unless user_can_view_project? - content = ''.html_safe + content = "".html_safe status_code = project.status_code if status_code classes = helpers.project_status_css_class(status_code) - content << content_tag(:span, '', class: "project-status--bulb -inline #{classes}") + content << content_tag(:span, "", class: "project-status--bulb -inline #{classes}") content << content_tag(:span, helpers.project_status_name(status_code), class: "project-status--name #{classes}") end @@ -113,7 +113,7 @@ def status_explanation if project.status_explanation.present? && project.status_explanation render OpenProject::Common::AttributeComponent.new("dialog-#{project.id}-status-explanation", - I18n.t('activerecord.attributes.project.status_explanation'), + I18n.t("activerecord.attributes.project.status_explanation"), project.status_explanation) end end @@ -123,7 +123,7 @@ def description if project.description.present? render OpenProject::Common::AttributeComponent.new("dialog-#{project.id}-description", - I18n.t('activerecord.attributes.project.description'), + I18n.t("activerecord.attributes.project.description"), project.description) end end @@ -149,11 +149,11 @@ def row_css_level_classes end def project_css_classes - s = ' project '.html_safe + s = " project ".html_safe - s << ' root' if project.root? - s << ' child' if project.child? - s << (project.leaf? ? ' leaf' : ' parent') + s << " root" if project.root? + s << " child" if project.child? + s << (project.leaf? ? " leaf" : " parent") s end @@ -169,7 +169,7 @@ def additional_css_class(column) "project-long-text-container" elsif custom_field_column?(column) cf = column.custom_field - formattable = cf.field_format == 'text' ? ' project-long-text-container' : '' + formattable = cf.field_format == "text" ? " project-long-text-container" : "" "format-#{cf.field_format}#{formattable}" end end @@ -188,17 +188,17 @@ def more_menu_subproject_item if User.current.allowed_in_project?(:add_subprojects, project) [t(:label_subproject_new), new_project_path(parent_id: project.id), - { class: 'icon-context icon-add', + { class: "icon-context icon-add", title: t(:label_subproject_new) }] end end def more_menu_settings_item - if User.current.allowed_in_project?({ controller: '/projects/settings/general', action: 'show', project_id: project.id }, + if User.current.allowed_in_project?({ controller: "/projects/settings/general", action: "show", project_id: project.id }, project) [t(:label_project_settings), project_settings_general_path(project), - { class: 'icon-context icon-settings', + { class: "icon-context icon-settings", title: t(:label_project_settings) }] end end @@ -207,8 +207,8 @@ def more_menu_activity_item if User.current.allowed_in_project?(:view_project_activity, project) [ t(:label_project_activity), - project_activity_index_path(project, event_types: ['project_attributes']), - { class: 'icon-context icon-checkmark', + project_activity_index_path(project, event_types: ["project_attributes"]), + { class: "icon-context icon-checkmark", title: t(:label_project_activity) } ] end @@ -218,9 +218,9 @@ def more_menu_archive_item if User.current.allowed_in_project?(:archive_project, project) && project.active? [t(:button_archive), project_archive_path(project, status: params[:status]), - { data: { confirm: t('project.archive.are_you_sure', name: project.name) }, + { data: { confirm: t("project.archive.are_you_sure", name: project.name) }, method: :post, - class: 'icon-context icon-locked', + class: "icon-context icon-locked", title: t(:button_archive) }] end end @@ -230,7 +230,7 @@ def more_menu_unarchive_item [t(:button_unarchive), project_archive_path(project, status: params[:status]), { method: :delete, - class: 'icon-context icon-unlocked', + class: "icon-context icon-unlocked", title: t(:button_unarchive) }] end end @@ -239,7 +239,7 @@ def more_menu_copy_item if User.current.allowed_in_project?(:copy_projects, project) && !project.archived? [t(:button_copy), copy_project_path(project), - { class: 'icon-context icon-copy', + { class: "icon-context icon-copy", title: t(:button_copy) }] end end @@ -248,7 +248,7 @@ def more_menu_delete_item if User.current.admin [t(:button_delete), confirm_destroy_project_path(project), - { class: 'icon-context icon-delete', + { class: "icon-context icon-delete", title: t(:button_delete) }] end end diff --git a/app/components/projects/table_component.rb b/app/components/projects/table_component.rb index 2033139373d2..4183827f40f7 100644 --- a/app/components/projects/table_component.rb +++ b/app/components/projects/table_component.rb @@ -48,7 +48,7 @@ def initial_sort end def table_id - 'project-table' + "project-table" end ## @@ -80,13 +80,13 @@ def paginated? def deactivate_class_on_lft_sort if sorted_by_lft? - 'spot-link_inactive' + "spot-link_inactive" end end def href_only_when_not_sort_lft unless sorted_by_lft? - projects_path(sortBy: JSON::dump([['lft', 'asc']])) + projects_path(sortBy: JSON::dump([["lft", "asc"]])) end end @@ -96,9 +96,9 @@ def order_options(select) data: { controller: "params-from-query", - 'application-target': "dynamic", - 'params-from-query-allowed-value': '["query_id"]', - 'params-from-query-all-anchors-value': "true" + "application-target": "dynamic", + "params-from-query-allowed-value": '["query_id"]', + "params-from-query-all-anchors-value": "true" } } end diff --git a/app/components/row_component.rb b/app/components/row_component.rb index 640a26176676..7ed07b4e4af7 100644 --- a/app/components/row_component.rb +++ b/app/components/row_component.rb @@ -70,7 +70,7 @@ def row_css_class def checkmark(condition) if condition - helpers.op_icon 'icon icon-checkmark' + helpers.op_icon "icon icon-checkmark" end end end diff --git a/app/components/settings/time_zone_setting_component.rb b/app/components/settings/time_zone_setting_component.rb index 84b2f964c1b7..7cb43e8120de 100644 --- a/app/components/settings/time_zone_setting_component.rb +++ b/app/components/settings/time_zone_setting_component.rb @@ -79,7 +79,7 @@ def time_zone_entries private def time_zone_option(canonical_zone, zones) - zone_names = zones.map(&:name).join(', ') + zone_names = zones.map(&:name).join(", ") [ "(UTC#{ActiveSupport::TimeZone.seconds_to_utc_offset(canonical_zone.base_utc_offset)}) #{zone_names}", canonical_zone.identifier diff --git a/app/components/statuses/row_component.rb b/app/components/statuses/row_component.rb index 27c24d9b14b2..8c2f1d8d6b6c 100644 --- a/app/components/statuses/row_component.rb +++ b/app/components/statuses/row_component.rb @@ -59,8 +59,8 @@ def done_ratio end def sort - helpers.reorder_links 'status', - { action: 'update', id: status }, + helpers.reorder_links "status", + { action: "update", id: status }, method: :patch end @@ -72,7 +72,7 @@ def button_links def delete_link link_to( - helpers.op_icon('icon icon-delete'), + helpers.op_icon("icon icon-delete"), status_path(status), method: :delete, data: { confirm: I18n.t(:text_are_you_sure) }, diff --git a/app/components/statuses/table_component.rb b/app/components/statuses/table_component.rb index e7792d44ae5b..9bfbaab1d108 100644 --- a/app/components/statuses/table_component.rb +++ b/app/components/statuses/table_component.rb @@ -45,9 +45,9 @@ def columns def inline_create_link link_to new_status_path, aria: { label: t(:label_work_package_status_new) }, - class: 'wp-inline-create--add-link', + class: "wp-inline-create--add-link", title: t(:label_work_package_status_new) do - helpers.op_icon('icon icon-add') + helpers.op_icon("icon icon-add") end end diff --git a/app/components/table_component.rb b/app/components/table_component.rb index 26a88eaa6784..c1c85c05fcc4 100644 --- a/app/components/table_component.rb +++ b/app/components/table_component.rb @@ -174,7 +174,7 @@ def initial_sort end def initial_order - initial_sort_correlation.join(' ') + initial_sort_correlation.join(" ") end def paginated? diff --git a/app/components/user_filter_component.rb b/app/components/user_filter_component.rb index c70909092459..9cd43c565989 100644 --- a/app/components/user_filter_component.rb +++ b/app/components/user_filter_component.rb @@ -35,20 +35,20 @@ class << self # or the default status to be filtered by (all) # if no status is given. def status_param(params) - params[:status].presence || 'all' + params[:status].presence || "all" end def filter_status(query, status) - return unless status && status != 'all' + return unless status && status != "all" case status - when 'blocked' - query.where(:blocked, '=', :blocked) - when 'active' - query.where(:status, '=', status.to_sym) - query.where(:blocked, '!', :blocked) + when "blocked" + query.where(:blocked, "=", :blocked) + when "active" + query.where(:status, "=", status.to_sym) + query.where(:blocked, "!", :blocked) else - query.where(:status, '=', status.to_sym) + query.where(:status, "=", status.to_sym) end end diff --git a/app/components/users/auto_login_tokens/row_component.rb b/app/components/users/auto_login_tokens/row_component.rb index 784205909c99..640415c2af8f 100644 --- a/app/components/users/auto_login_tokens/row_component.rb +++ b/app/components/users/auto_login_tokens/row_component.rb @@ -45,22 +45,22 @@ def current? def is_current # rubocop:disable Naming/PredicateName if current? - helpers.op_icon 'icon-yes' + helpers.op_icon "icon-yes" end end def device - token_data[:platform] || I18n.t('users.sessions.unknown_os') + token_data[:platform] || I18n.t("users.sessions.unknown_os") end def browser - name = token_data[:browser] || 'unknown browser' + name = token_data[:browser] || "unknown browser" version = token_data[:browser_version] "#{name} #{version ? "(Version #{version})" : ''}" end def platform - token_data[:platform] || 'unknown platform' + token_data[:platform] || "unknown platform" end def expires_on @@ -76,9 +76,9 @@ def delete_link return if current? link_to( - helpers.op_icon('icon icon-delete'), - { controller: '/my/auto_login_tokens', action: 'destroy', id: token.id }, - class: 'button--link', + helpers.op_icon("icon icon-delete"), + { controller: "/my/auto_login_tokens", action: "destroy", id: token.id }, + class: "button--link", role: :button, method: :delete, data: { confirm: I18n.t(:text_are_you_sure), disable_with: I18n.t(:label_loading) }, diff --git a/app/components/users/auto_login_tokens/table_component.rb b/app/components/users/auto_login_tokens/table_component.rb index a73c1a959857..eda17cd9ea12 100644 --- a/app/components/users/auto_login_tokens/table_component.rb +++ b/app/components/users/auto_login_tokens/table_component.rb @@ -41,10 +41,10 @@ def sortable? def headers [ - [:is_current, { caption: I18n.t('users.sessions.current') }], - [:browser, { caption: I18n.t('users.sessions.browser') }], - [:device, { caption: I18n.t('users.sessions.device') }], - [:expires_on, { caption: I18n.t('attributes.expires_at') }] + [:is_current, { caption: I18n.t("users.sessions.current") }], + [:browser, { caption: I18n.t("users.sessions.browser") }], + [:device, { caption: I18n.t("users.sessions.device") }], + [:expires_on, { caption: I18n.t("attributes.expires_at") }] ] end end diff --git a/app/components/users/avatar_component.rb b/app/components/users/avatar_component.rb index a95a5f0c3683..df53c25f2394 100644 --- a/app/components/users/avatar_component.rb +++ b/app/components/users/avatar_component.rb @@ -32,7 +32,7 @@ class AvatarComponent < ApplicationComponent include AvatarHelper include OpPrimer::ComponentHelpers - def initialize(user:, show_name: true, link: true, size: 'default', classes: '', title: nil, name_classes: '') + def initialize(user:, show_name: true, link: true, size: "default", classes: "", title: nil, name_classes: "") super @user = user diff --git a/app/components/users/sessions/row_component.rb b/app/components/users/sessions/row_component.rb index 3410ffcda4c2..6888306c7a76 100644 --- a/app/components/users/sessions/row_component.rb +++ b/app/components/users/sessions/row_component.rb @@ -48,27 +48,27 @@ def current? def is_current # rubocop:disable Naming/PredicateName if current? - helpers.op_icon 'icon-yes' + helpers.op_icon "icon-yes" end end def device - session_data[:platform] || I18n.t('users.sessions.unknown_os') + session_data[:platform] || I18n.t("users.sessions.unknown_os") end def browser - name = session_data[:browser] || 'unknown browser' + name = session_data[:browser] || "unknown browser" version = session_data[:browser_version] "#{name} #{version ? "(Version #{version})" : ''}" end def platform - session_data[:platform] || 'unknown platform' + session_data[:platform] || "unknown platform" end def updated_at if current? - I18n.t('users.sessions.current') + I18n.t("users.sessions.current") else helpers.format_time session.updated_at end @@ -82,9 +82,9 @@ def delete_link return if current? link_to( - helpers.op_icon('icon icon-delete'), - { controller: '/my/sessions', action: 'destroy', id: session }, - class: 'button--link', + helpers.op_icon("icon icon-delete"), + { controller: "/my/sessions", action: "destroy", id: session }, + class: "button--link", role: :button, method: :delete, data: { confirm: I18n.t(:text_are_you_sure), disable_with: I18n.t(:label_loading) }, diff --git a/app/components/users/sessions/table_component.rb b/app/components/users/sessions/table_component.rb index 8cff7a6775c2..0abc12875df7 100644 --- a/app/components/users/sessions/table_component.rb +++ b/app/components/users/sessions/table_component.rb @@ -41,10 +41,10 @@ def initial_sort def headers [ - [:is_current, { caption: I18n.t('users.sessions.current') }], - [:browser, { caption: I18n.t('users.sessions.browser') }], - [:device, { caption: I18n.t('users.sessions.device') }], - [:updated_at, { caption: I18n.t('attributes.updated_at') }] + [:is_current, { caption: I18n.t("users.sessions.current") }], + [:browser, { caption: I18n.t("users.sessions.browser") }], + [:device, { caption: I18n.t("users.sessions.device") }], + [:updated_at, { caption: I18n.t("attributes.updated_at") }] ] end end diff --git a/app/components/users/table_component.rb b/app/components/users/table_component.rb index b7f2eea504b3..cd159c89dd0d 100644 --- a/app/components/users/table_component.rb +++ b/app/components/users/table_component.rb @@ -46,7 +46,7 @@ def headers def header_options(name) options = { caption: User.human_attribute_name(name) } - options[:default_order] = 'desc' if desc_by_default.include? name + options[:default_order] = "desc" if desc_by_default.include? name options end diff --git a/app/components/versions/row_component.rb b/app/components/versions/row_component.rb index 0bddbf1bc6cb..d1fb386ecca8 100644 --- a/app/components/versions/row_component.rb +++ b/app/components/versions/row_component.rb @@ -75,11 +75,11 @@ def sharing end def wiki_page - return '' if wiki_page_title.blank? || version.project.wiki.nil? + return "" if wiki_page_title.blank? || version.project.wiki.nil? helpers.link_to_if_authorized(wiki_page_title, - controller: '/wiki', - action: 'show', + controller: "/wiki", + action: "show", project_id: version.project, id: wiki_page_title) || h(wiki_page_title) end @@ -97,20 +97,20 @@ def wiki_page_title def edit_link return unless version.project == table.project - helpers.link_to_if_authorized '', - { controller: '/versions', action: 'edit', id: version }, - class: 'icon icon-edit', + helpers.link_to_if_authorized "", + { controller: "/versions", action: "edit", id: version }, + class: "icon icon-edit", title: t(:button_edit) end def delete_link return unless version.project == table.project - helpers.link_to_if_authorized '', - { controller: '/versions', action: 'destroy', id: version }, + helpers.link_to_if_authorized "", + { controller: "/versions", action: "destroy", id: version }, data: { confirm: t(:text_are_you_sure) }, method: :delete, - class: 'icon icon-delete', + class: "icon icon-delete", title: t(:button_delete) end diff --git a/app/components/versions/table_component.rb b/app/components/versions/table_component.rb index eebc3e41af4f..bede23fbfdcc 100644 --- a/app/components/versions/table_component.rb +++ b/app/components/versions/table_component.rb @@ -49,7 +49,7 @@ def header_options(name) end def wiki_page_header_options - ['wiki_page_title', { caption: WikiPage.model_name.human }] + ["wiki_page_title", { caption: WikiPage.model_name.human }] end end end diff --git a/app/components/work_packages/share/concerns/displayable_roles.rb b/app/components/work_packages/share/concerns/displayable_roles.rb index d02b55255c6d..ff0faa338347 100644 --- a/app/components/work_packages/share/concerns/displayable_roles.rb +++ b/app/components/work_packages/share/concerns/displayable_roles.rb @@ -34,15 +34,15 @@ module Concerns module DisplayableRoles def options [ - { label: I18n.t('work_package.sharing.permissions.edit'), + { label: I18n.t("work_package.sharing.permissions.edit"), value: Role::BUILTIN_WORK_PACKAGE_EDITOR, - description: I18n.t('work_package.sharing.permissions.edit_description') }, - { label: I18n.t('work_package.sharing.permissions.comment'), + description: I18n.t("work_package.sharing.permissions.edit_description") }, + { label: I18n.t("work_package.sharing.permissions.comment"), value: Role::BUILTIN_WORK_PACKAGE_COMMENTER, - description: I18n.t('work_package.sharing.permissions.comment_description') }, - { label: I18n.t('work_package.sharing.permissions.view'), + description: I18n.t("work_package.sharing.permissions.comment_description") }, + { label: I18n.t("work_package.sharing.permissions.view"), value: Role::BUILTIN_WORK_PACKAGE_VIEWER, - description: I18n.t('work_package.sharing.permissions.view_description') } + description: I18n.t("work_package.sharing.permissions.view_description") } ] end end diff --git a/app/components/work_packages/share/modal_body_component.rb b/app/components/work_packages/share/modal_body_component.rb index 2d80e91e9c10..e8a3c661d94a 100644 --- a/app/components/work_packages/share/modal_body_component.rb +++ b/app/components/work_packages/share/modal_body_component.rb @@ -55,39 +55,39 @@ def insert_target_modified? end def insert_target_modifier_id - 'op-share-wp-active-shares' + "op-share-wp-active-shares" end def blankslate_config @blankslate_config ||= {}.tap do |config| if params[:filters].blank? config[:icon] = :people - config[:heading_text] = I18n.t('work_package.sharing.text_empty_state_header') - config[:description_text] = I18n.t('work_package.sharing.text_empty_state_description') + config[:heading_text] = I18n.t("work_package.sharing.text_empty_state_header") + config[:description_text] = I18n.t("work_package.sharing.text_empty_state_description") else config[:icon] = :search - config[:heading_text] = I18n.t('work_package.sharing.text_empty_search_header') - config[:description_text] = I18n.t('work_package.sharing.text_empty_search_description') + config[:heading_text] = I18n.t("work_package.sharing.text_empty_search_header") + config[:description_text] = I18n.t("work_package.sharing.text_empty_search_description") end end end def type_filter_options [ - { label: I18n.t('work_package.sharing.filter.project_member'), - value: { principal_type: 'User', project_member: true } }, - { label: I18n.t('work_package.sharing.filter.not_project_member'), - value: { principal_type: 'User', project_member: false } }, - { label: I18n.t('work_package.sharing.filter.project_group'), - value: { principal_type: 'Group', project_member: true } }, - { label: I18n.t('work_package.sharing.filter.not_project_group'), - value: { principal_type: 'Group', project_member: false } } + { label: I18n.t("work_package.sharing.filter.project_member"), + value: { principal_type: "User", project_member: true } }, + { label: I18n.t("work_package.sharing.filter.not_project_member"), + value: { principal_type: "User", project_member: false } }, + { label: I18n.t("work_package.sharing.filter.project_group"), + value: { principal_type: "Group", project_member: true } }, + { label: I18n.t("work_package.sharing.filter.not_project_group"), + value: { principal_type: "Group", project_member: false } } ] end def type_filter_option_active?(_option) - principal_type_filter_value = current_filter_value(params[:filters], 'principal_type') - project_member_filter_value = current_filter_value(params[:filters], 'also_project_member') + principal_type_filter_value = current_filter_value(params[:filters], "principal_type") + project_member_filter_value = current_filter_value(params[:filters], "also_project_member") return false if principal_type_filter_value.nil? || project_member_filter_value.nil? @@ -100,7 +100,7 @@ def type_filter_option_active?(_option) end def role_filter_option_active?(_option) - role_filter_value = current_filter_value(params[:filters], 'role_id') + role_filter_value = current_filter_value(params[:filters], "role_id") return false if role_filter_value.nil? @@ -122,7 +122,7 @@ def filter_url(type_option: nil, role_option: nil) end def apply_role_filter(_option) - current_role_filter_value = current_filter_value(params[:filters], 'role_id') + current_role_filter_value = current_filter_value(params[:filters], "role_id") filter = [] if _option.nil? && current_role_filter_value.present? @@ -141,8 +141,8 @@ def role_filter_for(_option, builtin_role: true) end def apply_type_filter(_option) - current_type_filter_value = current_filter_value(params[:filters], 'principal_type') - current_member_filter_value = current_filter_value(params[:filters], 'also_project_member') + current_type_filter_value = current_filter_value(params[:filters], "principal_type") + current_member_filter_value = current_filter_value(params[:filters], "also_project_member") filter = [] if _option.nil? && current_type_filter_value.present? && current_member_filter_value.present? @@ -173,7 +173,7 @@ def current_filter_value(filters, filter_key) return nil if filters.nil? given_filters = JSON.parse(filters).find { |key| key.key?(filter_key) } - given_filters ? given_filters[filter_key]['values'].first : nil + given_filters ? given_filters[filter_key]["values"].first : nil end end end diff --git a/app/components/work_packages/share/permission_button_component.rb b/app/components/work_packages/share/permission_button_component.rb index e6e03482a364..9bfee0e573d2 100644 --- a/app/components/work_packages/share/permission_button_component.rb +++ b/app/components/work_packages/share/permission_button_component.rb @@ -54,7 +54,7 @@ def option_active?(option) end def wrapper_uniq_by - share.id || @system_arguments.dig(:data, :'test-selector') + share.id || @system_arguments.dig(:data, :"test-selector") end private @@ -77,8 +77,8 @@ def permission_name(value) def form_inputs(role_id) [].tap do |inputs| - inputs << { name: 'role_ids[]', value: role_id } - inputs << { name: 'filters', value: params[:filters] } if params[:filters] + inputs << { name: "role_ids[]", value: role_id } + inputs << { name: "filters", value: params[:filters] } if params[:filters] end end end diff --git a/app/components/work_packages/share/share_row_component.rb b/app/components/work_packages/share/share_row_component.rb index ef5dbb1fbf7f..16d82a331a09 100644 --- a/app/components/work_packages/share/share_row_component.rb +++ b/app/components/work_packages/share/share_row_component.rb @@ -60,9 +60,9 @@ def share_editable? def grid_css_classes if sharing_manageable? - 'op-share-wp-modal-body--user-row_manageable' + "op-share-wp-modal-body--user-row_manageable" else - 'op-share-wp-modal-body--user-row' + "op-share-wp-modal-body--user-row" end end diff --git a/app/contracts/attachments/validate_replacements.rb b/app/contracts/attachments/validate_replacements.rb index b283805712d0..7bbc91d763bf 100644 --- a/app/contracts/attachments/validate_replacements.rb +++ b/app/contracts/attachments/validate_replacements.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'model_contract' +require "model_contract" module Attachments module ValidateReplacements diff --git a/app/contracts/authentication/omniauth_auth_hash_contract.rb b/app/contracts/authentication/omniauth_auth_hash_contract.rb index 3e89231559a0..ba0b257f1761 100644 --- a/app/contracts/authentication/omniauth_auth_hash_contract.rb +++ b/app/contracts/authentication/omniauth_auth_hash_contract.rb @@ -49,9 +49,9 @@ def validate_auth_hash end def validate_auth_hash_not_expired - return unless auth_hash['timestamp'] + return unless auth_hash["timestamp"] - if auth_hash['timestamp'] < Time.now - 30.minutes + if auth_hash["timestamp"] < Time.now - 30.minutes errors.add(:base, I18n.t(:error_omniauth_registration_timed_out)) end end diff --git a/app/contracts/concerns/assignable_custom_field_values.rb b/app/contracts/concerns/assignable_custom_field_values.rb index 91d7339f9bab..133f1ecbf6f2 100644 --- a/app/contracts/concerns/assignable_custom_field_values.rb +++ b/app/contracts/concerns/assignable_custom_field_values.rb @@ -32,9 +32,9 @@ module AssignableCustomFieldValues included do def assignable_custom_field_values(custom_field) case custom_field.field_format - when 'list' + when "list" custom_field.possible_values - when 'version' + when "version" assignable_versions(only_open: !custom_field.allow_non_open_versions?) end end diff --git a/app/contracts/custom_actions/cu_contract.rb b/app/contracts/custom_actions/cu_contract.rb index 54e7025349d1..e2c2d65abcc4 100644 --- a/app/contracts/custom_actions/cu_contract.rb +++ b/app/contracts/custom_actions/cu_contract.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'model_contract' +require "model_contract" # Contract for create (c) and update (u) module CustomActions diff --git a/app/contracts/groups/create_contract.rb b/app/contracts/groups/create_contract.rb index 8c7d48ed5005..af3eb12b13ad 100644 --- a/app/contracts/groups/create_contract.rb +++ b/app/contracts/groups/create_contract.rb @@ -36,7 +36,7 @@ class CreateContract < BaseContract def type_is_group unless model.type == Group.name - errors.add(:type, 'Type and class mismatch') + errors.add(:type, "Type and class mismatch") end end end diff --git a/app/contracts/model_contract.rb b/app/contracts/model_contract.rb index 4c482f3cbdf1..07ba44ffd920 100644 --- a/app/contracts/model_contract.rb +++ b/app/contracts/model_contract.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require_relative 'base_contract' +require_relative "base_contract" ## # Model contract for AR records that diff --git a/app/contracts/placeholder_users/create_contract.rb b/app/contracts/placeholder_users/create_contract.rb index 7a02a7b15da7..308b7750fd99 100644 --- a/app/contracts/placeholder_users/create_contract.rb +++ b/app/contracts/placeholder_users/create_contract.rb @@ -39,7 +39,7 @@ class CreateContract < BaseContract def type_is_placeholder_user unless model.type == PlaceholderUser.name - errors.add(:type, 'Type and class mismatch') + errors.add(:type, "Type and class mismatch") end end end diff --git a/app/contracts/queries/copy_contract.rb b/app/contracts/queries/copy_contract.rb index b67a0c02dcd5..c184b13b43f2 100644 --- a/app/contracts/queries/copy_contract.rb +++ b/app/contracts/queries/copy_contract.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'queries/base_contract' +require "queries/base_contract" module Queries class CopyContract < BaseContract diff --git a/app/contracts/queries/global_create_contract.rb b/app/contracts/queries/global_create_contract.rb index 586679b96758..ba75246e447a 100644 --- a/app/contracts/queries/global_create_contract.rb +++ b/app/contracts/queries/global_create_contract.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'queries/create_contract' +require "queries/create_contract" module Queries class GlobalCreateContract < CreateContract diff --git a/app/contracts/queries/ical_sharing_contract.rb b/app/contracts/queries/ical_sharing_contract.rb index 64dcc1f8db58..58390a9d0c06 100644 --- a/app/contracts/queries/ical_sharing_contract.rb +++ b/app/contracts/queries/ical_sharing_contract.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'queries/base_contract' +require "queries/base_contract" module Queries class ICalSharingContract < BaseContract diff --git a/app/contracts/queries/update_contract.rb b/app/contracts/queries/update_contract.rb index a2479b775187..867c2559b925 100644 --- a/app/contracts/queries/update_contract.rb +++ b/app/contracts/queries/update_contract.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'queries/base_contract' +require "queries/base_contract" module Queries class UpdateContract < BaseContract diff --git a/app/contracts/queries/update_form_contract.rb b/app/contracts/queries/update_form_contract.rb index ff83d8dad989..8f2805706d78 100644 --- a/app/contracts/queries/update_form_contract.rb +++ b/app/contracts/queries/update_form_contract.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'queries/base_contract' +require "queries/base_contract" module Queries class UpdateFormContract < BaseContract diff --git a/app/contracts/relations/base_contract.rb b/app/contracts/relations/base_contract.rb index 981653ad605c..2a1ddc9d7056 100644 --- a/app/contracts/relations/base_contract.rb +++ b/app/contracts/relations/base_contract.rb @@ -57,7 +57,7 @@ def validate_to_exists def validate_nodes_relatable if (model.from_id_changed? || model.to_id_changed?) && WorkPackage.relatable(model.from, model.relation_type, ignored_relation: model).where(id: model.to_id).empty? - errors.add :base, I18n.t(:'activerecord.errors.messages.circular_dependency') + errors.add :base, I18n.t(:"activerecord.errors.messages.circular_dependency") end end diff --git a/app/contracts/relations/create_contract.rb b/app/contracts/relations/create_contract.rb index 6f6318ceef6d..fe139dfa70bb 100644 --- a/app/contracts/relations/create_contract.rb +++ b/app/contracts/relations/create_contract.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'relations/base_contract' +require "relations/base_contract" module Relations class CreateContract < BaseContract diff --git a/app/contracts/types/base_contract.rb b/app/contracts/types/base_contract.rb index 22202424a38b..59d349d82afa 100644 --- a/app/contracts/types/base_contract.rb +++ b/app/contracts/types/base_contract.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'model_contract' +require "model_contract" module Types class BaseContract < ::ModelContract @@ -93,7 +93,7 @@ def validate_attribute_group(group) if key.is_a?(String) && valid_attributes.exclude?(key) errors.add( :attribute_groups, - I18n.t('activerecord.errors.models.type.attributes.attribute_groups.attribute_unknown_name', + I18n.t("activerecord.errors.models.type.attributes.attribute_groups.attribute_unknown_name", attribute: key) ) end diff --git a/app/contracts/user_preferences/base_contract.rb b/app/contracts/user_preferences/base_contract.rb index c23970bf1e7f..4aa2a4be0757 100644 --- a/app/contracts/user_preferences/base_contract.rb +++ b/app/contracts/user_preferences/base_contract.rb @@ -81,7 +81,7 @@ def namesake_time_zone(time_zones) if time_zones.length == 1 time_zones.first else - time_zones.detect { |tz| tz.tzinfo.name.include?(tz.name.tr(' ', '_')) } + time_zones.detect { |tz| tz.tzinfo.name.include?(tz.name.tr(" ", "_")) } end end end @@ -109,7 +109,7 @@ def user_allowed_to_access end def full_hour_reminder_time - unless model.daily_reminders[:times].all? { |time| time.end_with?('00:00+00:00') } + unless model.daily_reminders[:times].all? { |time| time.end_with?("00:00+00:00") } errors.add :daily_reminders, :full_hour end end diff --git a/app/contracts/users/base_contract.rb b/app/contracts/users/base_contract.rb index a28ddcd0ec13..2dfb83fd0c6f 100644 --- a/app/contracts/users/base_contract.rb +++ b/app/contracts/users/base_contract.rb @@ -64,7 +64,7 @@ def self.model def reduce_writable_attributes(attributes) super.tap do |writable| - writable << 'password' if password_writable? + writable << "password" if password_writable? end end diff --git a/app/contracts/users/create_contract.rb b/app/contracts/users/create_contract.rb index 3055261bf060..2ef001e6446b 100644 --- a/app/contracts/users/create_contract.rb +++ b/app/contracts/users/create_contract.rb @@ -76,7 +76,7 @@ def user_allowed_to_add def type_is_user unless model.type == User.name - errors.add(:type, 'Type and class mismatch') + errors.add(:type, "Type and class mismatch") end end end diff --git a/app/contracts/work_packages/copy_project_contract.rb b/app/contracts/work_packages/copy_project_contract.rb index 178289a5517c..5aa7993f1fdb 100644 --- a/app/contracts/work_packages/copy_project_contract.rb +++ b/app/contracts/work_packages/copy_project_contract.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'work_packages/create_contract' +require "work_packages/create_contract" # Can be used to copy all of a project's work packages. As the # work packages can be old, some of the validations that would diff --git a/app/contracts/work_packages/create_contract.rb b/app/contracts/work_packages/create_contract.rb index 22bf6421b02d..e8086638b262 100644 --- a/app/contracts/work_packages/create_contract.rb +++ b/app/contracts/work_packages/create_contract.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'work_packages/base_contract' +require "work_packages/base_contract" module WorkPackages class CreateContract < BaseContract @@ -64,7 +64,7 @@ def user_allowed_to_manage_file_links def attributes_changed_by_user # lock version is initialized by AR itself - super - ['lock_version'] + super - ["lock_version"] end end end diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 9ff7cc1a4114..700a0c132ed2 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -42,7 +42,7 @@ class AccountController < ApplicationController before_action :check_auth_source_sso_failure, only: :auth_source_sso_failed before_action :check_internal_login_enabled, only: :internal_login - layout 'no_menu' + layout "no_menu" # Login request and validation def login @@ -58,7 +58,7 @@ def login end def internal_login - render 'account/login' + render "account/login" end # Log out current user and redirect to welcome page @@ -88,12 +88,12 @@ def lost_password if call.success? @token.destroy - redirect_to action: 'login' + redirect_to action: "login" return end end - render template: 'account/password_recovery' + render template: "account/password_recovery" elsif request.post? mail = params[:mail] user = User.find_by_mail(mail) if mail.present? @@ -120,7 +120,7 @@ def lost_password if token.save UserMailer.password_lost(token).deliver_later flash[:notice] = I18n.t(:notice_account_lost_email_sent) - redirect_to action: 'login', back_url: home_url + redirect_to action: "login", back_url: home_url nil end end @@ -235,7 +235,7 @@ def activate_user(user) if omniauth_direct_login? direct_login user elsif OpenProject::Configuration.disable_password_login? - flash[:notice] = I18n.t('account.omniauth_login') + flash[:notice] = I18n.t("account.omniauth_login") redirect_to signin_path else @@ -249,7 +249,7 @@ def activate_through_ldap(user) ldap_auth_source_id: user.ldap_auth_source_id } - flash[:notice] = I18n.t('account.auth_source_login', login: user.login).html_safe + flash[:notice] = I18n.t("account.auth_source_login", login: user.login).html_safe redirect_to signin_path(username: user.login) end @@ -283,7 +283,7 @@ def auth_source_sso_failed flash.now[:error] = I18n.t(:error_auth_source_sso_failed, value: failure[:login]) + ": " + String(flash.now[:error]) - render action: 'login', back_url: failure[:back_url] + render action: "login", back_url: failure[:back_url] end private @@ -470,11 +470,11 @@ def pending_omniauth_registration? def onthefly_creation_failed(user, auth_source_options = {}) @user = user session[:auth_source_registration] = auth_source_options unless auth_source_options.empty? - render action: 'register' + render action: "register" end def self_registration_disabled - flash[:error] = I18n.t('account.error_self_registration_disabled') + flash[:error] = I18n.t("account.error_self_registration_disabled") redirect_to signin_url end @@ -489,18 +489,18 @@ def account_inactive(user, flash_now: true) # Log an attempt to log in to an account in "registered" state and show a flash message. def account_not_activated(flash_now: true) - flash_error_message(log_reason: 'NOT ACTIVATED', flash_now:) do + flash_error_message(log_reason: "NOT ACTIVATED", flash_now:) do if Setting::SelfRegistration.by_email? - 'account.error_inactive_activation_by_mail' + "account.error_inactive_activation_by_mail" else - 'account.error_inactive_manual_activation' + "account.error_inactive_manual_activation" end end end def invited_account_not_activated(_user) - flash_error_message(log_reason: 'invited, NOT ACTIVATED', flash_now: false) do - 'account.error_inactive_activation_by_mail' + flash_error_message(log_reason: "invited, NOT ACTIVATED", flash_now: false) do + "account.error_inactive_activation_by_mail" end end diff --git a/app/controllers/activities_controller.rb b/app/controllers/activities_controller.rb index 89aec8fd9052..fee13edbd990 100644 --- a/app/controllers/activities_controller.rb +++ b/app/controllers/activities_controller.rb @@ -75,7 +75,7 @@ def set_activity end def verify_activities_module_activated - render_403 if @project && !@project.module_enabled?('activity') + render_403 if @project && !@project.module_enabled?("activity") end def determine_date_range @@ -101,7 +101,7 @@ def determine_subprojects elsif params[:with_subprojects].nil? session[:activity][:with_subprojects] else - params[:with_subprojects] == '1' + params[:with_subprojects] == "1" end end @@ -136,7 +136,7 @@ def activity_scope end def set_current_activity_page - @activity_page = @project ? "projects/#{@project.identifier}" : 'all' + @activity_page = @project ? "projects/#{@project.identifier}" : "all" end def set_session diff --git a/app/controllers/admin/attachments/quarantined_attachments_controller.rb b/app/controllers/admin/attachments/quarantined_attachments_controller.rb index a931d5576ad8..8856adcce0c9 100644 --- a/app/controllers/admin/attachments/quarantined_attachments_controller.rb +++ b/app/controllers/admin/attachments/quarantined_attachments_controller.rb @@ -29,7 +29,7 @@ module Admin module Attachments class QuarantinedAttachmentsController < ApplicationController - layout 'admin' + layout "admin" before_action :require_admin before_action :find_quarantined_attachments @@ -45,14 +45,14 @@ def destroy create_journal(container, User.system, - I18n.t('antivirus_scan.deleted_by_admin', filename: @attachment.filename)) + I18n.t("antivirus_scan.deleted_by_admin", filename: @attachment.filename)) flash[:notice] = t(:notice_successful_delete) redirect_to action: :index end def default_breadcrumb - t('antivirus_scan.quarantined_attachments.title') + t("antivirus_scan.quarantined_attachments.title") end def show_local_breadcrumb diff --git a/app/controllers/admin/settings/aggregation_settings_controller.rb b/app/controllers/admin/settings/aggregation_settings_controller.rb index a01f5b774a33..56ebfd5880c4 100644 --- a/app/controllers/admin/settings/aggregation_settings_controller.rb +++ b/app/controllers/admin/settings/aggregation_settings_controller.rb @@ -37,7 +37,7 @@ def show end def default_breadcrumb - t(:'menus.admin.aggregation') + t(:"menus.admin.aggregation") end def show_local_breadcrumb diff --git a/app/controllers/admin/settings/attachments_settings_controller.rb b/app/controllers/admin/settings/attachments_settings_controller.rb index 929520884250..5b2440de78b3 100644 --- a/app/controllers/admin/settings/attachments_settings_controller.rb +++ b/app/controllers/admin/settings/attachments_settings_controller.rb @@ -31,7 +31,7 @@ class AttachmentsSettingsController < ::Admin::SettingsController menu_item :attachments_settings def default_breadcrumb - t(:'attributes.attachments') + t(:"attributes.attachments") end def settings_params diff --git a/app/controllers/admin/settings/date_format_settings_controller.rb b/app/controllers/admin/settings/date_format_settings_controller.rb index 27f21858d511..9c14335914fe 100644 --- a/app/controllers/admin/settings/date_format_settings_controller.rb +++ b/app/controllers/admin/settings/date_format_settings_controller.rb @@ -48,7 +48,7 @@ def validate_start_of_week_and_first_week_of_year_combination if start_of_week.present? ^ start_of_year.present? flash[:error] = I18n.t( - 'settings.date_format.first_date_of_week_and_year_set', + "settings.date_format.first_date_of_week_and_year_set", first_week_setting_name: I18n.t(:setting_first_week_of_year), day_of_week_setting_name: I18n.t(:setting_start_of_week) ) diff --git a/app/controllers/admin/settings/mail_notifications_settings_controller.rb b/app/controllers/admin/settings/mail_notifications_settings_controller.rb index 2029d00a2a22..8af36f26c00f 100644 --- a/app/controllers/admin/settings/mail_notifications_settings_controller.rb +++ b/app/controllers/admin/settings/mail_notifications_settings_controller.rb @@ -39,7 +39,7 @@ def show end def default_breadcrumb - t(:'menus.admin.mail_notification') + t(:"menus.admin.mail_notification") end def show_local_breadcrumb diff --git a/app/controllers/admin/settings/users_settings_controller.rb b/app/controllers/admin/settings/users_settings_controller.rb index e41ae5479f27..8fb79712df0a 100644 --- a/app/controllers/admin/settings/users_settings_controller.rb +++ b/app/controllers/admin/settings/users_settings_controller.rb @@ -47,7 +47,7 @@ def show_local_breadcrumb def settings_params super.tap do |settings| - if settings["consent_required"] == '1' && params['toggle_consent_time'] == '1' + if settings["consent_required"] == "1" && params["toggle_consent_time"] == "1" settings["consent_time"] = Time.zone.now.iso8601 end end diff --git a/app/controllers/admin/settings/virus_scanning_settings_controller.rb b/app/controllers/admin/settings/virus_scanning_settings_controller.rb index a15aff0fbc87..842990f4a726 100644 --- a/app/controllers/admin/settings/virus_scanning_settings_controller.rb +++ b/app/controllers/admin/settings/virus_scanning_settings_controller.rb @@ -34,7 +34,7 @@ class VirusScanningSettingsController < ::Admin::SettingsController before_action :check_clamav, only: %i[update], if: -> { scan_enabled? } def default_breadcrumb - t('settings.antivirus.title') + t("settings.antivirus.title") end def av_form @@ -52,7 +52,7 @@ def av_form private def require_ee - render('upsale') unless EnterpriseToken.allows_to?(:virus_scanning) + render("upsale") unless EnterpriseToken.allows_to?(:virus_scanning) end def mark_unscanned_attachments @@ -60,7 +60,7 @@ def mark_unscanned_attachments end def check_clamav - return if params.dig(:settings, :antivirus_scan_mode) == 'disabled' + return if params.dig(:settings, :antivirus_scan_mode) == "disabled" service = ::Attachments::ClamAVService.new(params[:settings][:antivirus_scan_mode].to_sym, params[:settings][:antivirus_scan_target]) @@ -68,12 +68,12 @@ def check_clamav service.ping rescue StandardError => e Rails.logger.error { "Failed to check availability of ClamAV: #{e.message}" } - flash[:error] = t(:'settings.antivirus.clamav_ping_failed') + flash[:error] = t(:"settings.antivirus.clamav_ping_failed") redirect_to action: :show end def scan_enabled? - Setting.antivirus_scan_mode != :disabled || params.dig(:settings, :antivirus_scan_mode) != 'disabled' + Setting.antivirus_scan_mode != :disabled || params.dig(:settings, :antivirus_scan_mode) != "disabled" end def success_callback(_call) @@ -87,7 +87,7 @@ def success_callback(_call) end def rescan_files - flash[:notice] = t('settings.antivirus.remaining_rescanned_files', + flash[:notice] = t("settings.antivirus.remaining_rescanned_files", file_count: t(:label_x_files, count: Attachment.status_uploaded.count)) Attachment.status_uploaded.update_all(status: :rescan) @@ -96,8 +96,8 @@ def rescan_files end def remaining_quarantine_warning - flash[:info] = t('settings.antivirus.remaining_quarantined_files_html', - link: helpers.link_to(t('antivirus_scan.quarantined_attachments.title'), + flash[:info] = t("settings.antivirus.remaining_quarantined_files_html", + link: helpers.link_to(t("antivirus_scan.quarantined_attachments.title"), admin_quarantined_attachments_path), file_count: t(:label_x_files, count: Attachment.status_quarantined.count)) redirect_to action: :show diff --git a/app/controllers/admin/settings/working_days_settings_controller.rb b/app/controllers/admin/settings/working_days_settings_controller.rb index f0c7bdfa89fb..fa0d390f7e49 100644 --- a/app/controllers/admin/settings/working_days_settings_controller.rb +++ b/app/controllers/admin/settings/working_days_settings_controller.rb @@ -37,7 +37,7 @@ def default_breadcrumb def failure_callback(call) @modified_non_working_days = modified_non_working_days_for(call.result) flash[:error] = call.message || I18n.t(:notice_internal_server_error) - render action: 'show' + render action: "show" end protected diff --git a/app/controllers/admin/settings_controller.rb b/app/controllers/admin/settings_controller.rb index 72d222b08e68..8d9823ced5a1 100644 --- a/app/controllers/admin/settings_controller.rb +++ b/app/controllers/admin/settings_controller.rb @@ -28,7 +28,7 @@ module Admin class SettingsController < ApplicationController - layout 'admin' + layout "admin" before_action :require_admin before_action :find_plugin, only: %i[show_plugin update_plugin] @@ -99,12 +99,12 @@ def update_service def success_callback(_call) flash[:notice] = t(:notice_successful_update) - redirect_to action: 'show', tab: params[:tab] + redirect_to action: "show", tab: params[:tab] end def failure_callback(call) flash[:error] = call.message || I18n.t(:notice_internal_server_error) - redirect_to action: 'show', tab: params[:tab] + redirect_to action: "show", tab: params[:tab] end end end diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index d670f34df98c..88eb45a947e4 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -25,10 +25,10 @@ # # See COPYRIGHT and LICENSE files for more details. #++ -require 'open3' +require "open3" class AdminController < ApplicationController - layout 'admin' + layout "admin" before_action :require_admin, except: %i[index] before_action :authorize_global, only: %i[index] @@ -53,7 +53,7 @@ def index end def projects - redirect_to controller: 'projects', action: 'index' + redirect_to controller: "projects", action: "index" end def plugins @@ -91,9 +91,9 @@ def info def default_breadcrumb case params[:action] - when 'plugins' + when "plugins" t(:label_plugins) - when 'info' + when "info" t(:label_information) end end @@ -111,12 +111,12 @@ def hidden_admin_menu_items def plaintext_extraction_checks if OpenProject::Database.allows_tsv? [ - [:'extraction.available.pdftotext', Plaintext::PdfHandler.available?], - [:'extraction.available.unrtf', Plaintext::RtfHandler.available?], - [:'extraction.available.catdoc', Plaintext::DocHandler.available?], - [:'extraction.available.xls2csv', Plaintext::XlsHandler.available?], - [:'extraction.available.catppt', Plaintext::PptHandler.available?], - [:'extraction.available.tesseract', Plaintext::ImageHandler.available?] + [:"extraction.available.pdftotext", Plaintext::PdfHandler.available?], + [:"extraction.available.unrtf", Plaintext::RtfHandler.available?], + [:"extraction.available.catdoc", Plaintext::DocHandler.available?], + [:"extraction.available.xls2csv", Plaintext::XlsHandler.available?], + [:"extraction.available.catppt", Plaintext::PptHandler.available?], + [:"extraction.available.tesseract", Plaintext::ImageHandler.available?] ] else [] @@ -124,11 +124,11 @@ def plaintext_extraction_checks end def image_conversion_checks - [[:'image_conversion.imagemagick', image_conversion_libs_available?]] + [[:"image_conversion.imagemagick", image_conversion_libs_available?]] end def image_conversion_libs_available? - Open3.capture2e('convert', '-version').first.include?('ImageMagick') + Open3.capture2e("convert", "-version").first.include?("ImageMagick") rescue StandardError false end diff --git a/app/controllers/angular_controller.rb b/app/controllers/angular_controller.rb index c92abcda3769..d44fd99127a7 100644 --- a/app/controllers/angular_controller.rb +++ b/app/controllers/angular_controller.rb @@ -32,13 +32,13 @@ class AngularController < ApplicationController def empty_layout # Frontend will handle rendering # but we will need to render with layout - render html: '', layout: 'angular/angular' + render html: "", layout: "angular/angular" end def notifications_layout # Frontend will handle rendering # but we will need to render with notification specific layout - render html: '', layout: 'angular/notifications' + render html: "", layout: "angular/notifications" end def login_back_url_params diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index ec637699c1ea..59591fb70d56 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -1,5 +1,5 @@ class AnnouncementsController < ApplicationController - layout 'admin' + layout "admin" before_action :require_admin @@ -15,7 +15,7 @@ def update flash[:notice] = t(:notice_successful_update) end - redirect_to action: 'edit' + redirect_to action: "edit" end private @@ -29,6 +29,6 @@ def show_local_breadcrumb end def announcement_params - params.require(:announcement).permit('text', 'show_until', 'active') + params.require(:announcement).permit("text", "show_until", "active") end end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 564973057f70..4375d2aa21dc 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -26,10 +26,10 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'uri' -require 'cgi' +require "uri" +require "cgi" -require 'doorkeeper/dashboard_helper' +require "doorkeeper/dashboard_helper" class ApplicationController < ActionController::Base class_attribute :_model_object @@ -51,7 +51,7 @@ class ApplicationController < ActionController::Base include AdditionalUrlHelpers include OpenProjectErrorHelper - layout 'base' + layout "base" protect_from_forgery # CSRF protection prevents two things. It prevents an attacker from using a @@ -74,7 +74,7 @@ class ApplicationController < ActionController::Base # Thus, we show an error message unless the request probably is an API # request. def handle_unverified_request - cookies.delete(OpenProject::Configuration['autologin_cookie_name']) + cookies.delete(OpenProject::Configuration["autologin_cookie_name"]) self.logged_user = nil # Don't render an error message for requests that appear to be API requests. @@ -105,7 +105,7 @@ def handle_unverified_request # Check whether user have cookies enabled, otherwise they'll only be # greeted with the CSRF error upon login. message = I18n.t(:error_token_authenticity) - message << (' ' + I18n.t(:error_cookie_missing)) if openproject_cookie_missing? + message << (" " + I18n.t(:error_cookie_missing)) if openproject_cookie_missing? log_csrf_failure @@ -148,7 +148,7 @@ def handle_unverified_request def default_url_options(_options = {}) { - layout: params['layout'], + layout: params["layout"], protocol: Setting.protocol } end @@ -159,7 +159,7 @@ def default_url_options(_options = {}) # https://websecuritytool.codeplex.com/wikipage?title=Checks#http-cache-control-header-no-store # http://stackoverflow.com/questions/711418/how-to-prevent-browser-page-caching-in-rails def set_cache_buster - if OpenProject::Configuration['disable_browser_cache'] + if OpenProject::Configuration["disable_browser_cache"] response.cache_control.merge!( max_age: 0, public: false, @@ -179,7 +179,7 @@ def reload_mailer_settings! # Checks if the session cookie is missing. # This is useful only on a second request def openproject_cookie_missing? - request.cookies[OpenProject::Configuration['session_cookie_name']].nil? + request.cookies[OpenProject::Configuration["session_cookie_name"]].nil? end helper_method :openproject_cookie_missing? @@ -187,8 +187,8 @@ def openproject_cookie_missing? ## # Create CSRF issue def log_csrf_failure - message = 'CSRF validation error' - message << ' (No session cookie present)' if openproject_cookie_missing? + message = "CSRF validation error" + message << " (No session cookie present)" if openproject_cookie_missing? op_handle_error message, reference: :csrf_validation_failed end @@ -208,7 +208,7 @@ def log_requesting_user # replaces all invalid characters with # def escape_for_logging(string) # only allow numbers, ASCII letters, space and the following characters: @.-"'!?=/ - string.gsub(/[^0-9a-zA-Z@._\-"'!?=\/ ]{1}/, '#') + string.gsub(/[^0-9a-zA-Z@._\-"'!?=\/ ]{1}/, "#") end def reset_i18n_fallbacks @@ -228,7 +228,7 @@ def set_localization user = RequestStore[:current_user] || (session[:authenticated_user_id].present? && User.find_by(id: session[:authenticated_user_id])) || User.anonymous - SetLocalizationService.new(user, request.env['HTTP_ACCEPT_LANGUAGE']).call + SetLocalizationService.new(user, request.env["HTTP_ACCEPT_LANGUAGE"]).call end def deny_access(not_found: false) @@ -413,7 +413,7 @@ def find_object_and_scope associated = find_belongs_to_chained_objects(associations, model_object) associated.each do |a| - instance_variable_set('@' + a.class.to_s.downcase, a) + instance_variable_set("@" + a.class.to_s.downcase, a) end rescue ActiveRecord::RecordNotFound render_404 @@ -452,7 +452,7 @@ def self.model_object(model, options = {}) def find_work_packages @work_packages = WorkPackage.includes(:project) .where(id: params[:work_package_id] || params[:ids]) - .order('id ASC') + .order("id ASC") fail ActiveRecord::RecordNotFound if @work_packages.empty? @projects = @work_packages.filter_map(&:project).uniq @@ -479,7 +479,7 @@ def check_project_privacy end def back_url - params[:back_url] || request.env['HTTP_REFERER'] + params[:back_url] || request.env["HTTP_REFERER"] end def redirect_back_or_default(default, use_escaped = true) @@ -497,7 +497,7 @@ def redirect_back_or_default(default, use_escaped = true) # # @return [boolean, string] name of the layout to use or false for no layout def use_layout - request.xhr? ? false : 'no_menu' + request.xhr? ? false : "no_menu" end def render_feed(items, options = {}) @@ -505,7 +505,7 @@ def render_feed(items, options = {}) @items = @items.sort { |x, y| y.event_datetime <=> x.event_datetime } @items = @items.slice(0, Setting.feeds_limit.to_i) @title = options[:title] || Setting.app_title - render template: 'common/feed', layout: false, content_type: 'application/atom+xml' + render template: "common/feed", layout: false, content_type: "application/atom+xml" end def self.accept_key_auth(*actions) @@ -519,7 +519,7 @@ def accept_key_auth_actions # Returns a string that can be used as filename value in Content-Disposition header def filename_for_content_disposition(name) - %r{(MSIE|Trident)}.match?(request.env['HTTP_USER_AGENT']) ? ERB::Util.url_encode(name) : name + %r{(MSIE|Trident)}.match?(request.env["HTTP_USER_AGENT"]) ? ERB::Util.url_encode(name) : name end def api_request? @@ -534,8 +534,8 @@ def api_request? def api_key_from_request if params[:key].present? params[:key] - elsif request.headers['X-OpenProject-API-Key'].present? - request.headers['X-OpenProject-API-Key'] + elsif request.headers["X-OpenProject-API-Key"].present? + request.headers["X-OpenProject-API-Key"] end end @@ -550,10 +550,10 @@ def object_errors_to_json(object) def render_validation_errors(object) options = { status: :unprocessable_entity, layout: false } errors = case params[:format] - when 'xml' + when "xml" { xml: object.errors } - when 'json' - { json: { 'errors' => object.errors } } # ActiveResource client compliance + when "json" + { json: { "errors" => object.errors } } # ActiveResource client compliance else fail "Unknown format #{params[:format]} in #render_validation_errors" end @@ -566,7 +566,7 @@ def render_validation_errors(object) def default_template(action_name = self.action_name) if api_request? begin - return view_paths.find_template(default_template_name(action_name), 'api') + return view_paths.find_template(default_template_name(action_name), "api") rescue ::ActionView::MissingTemplate # the api template was not found # fallback to the default behaviour @@ -584,7 +584,7 @@ def pick_layout(*args) def default_breadcrumb label = "label_#{controller_name.singularize}" - I18n.t(label + '_plural', + I18n.t(label + "_plural", default: label.to_sym) end @@ -607,8 +607,8 @@ def check_session_lifetime if session_expired? self.logged_user = nil - flash[:warning] = I18n.t('notice_forced_logout', ttl_time: Setting.session_ttl) - redirect_to(controller: '/account', action: 'login', back_url: login_back_url) + flash[:warning] = I18n.t("notice_forced_logout", ttl_time: Setting.session_ttl) + redirect_to(controller: "/account", action: "login", back_url: login_back_url) end session[:updated_at] = Time.now end @@ -623,7 +623,7 @@ def feed_request? def stop_if_feeds_disabled if feed_request? && !Setting.feeds_enabled? - render_404(message: I18n.t('label_disabled')) + render_404(message: I18n.t("label_disabled")) end end @@ -649,7 +649,7 @@ def login_back_url else url_params = params.permit(:action, :id, :project_id, :controller) - unless url_params[:controller].to_s.starts_with?('/') + unless url_params[:controller].to_s.starts_with?("/") url_params[:controller] = "/#{url_params[:controller]}" end diff --git a/app/controllers/attribute_help_texts_controller.rb b/app/controllers/attribute_help_texts_controller.rb index f9a5b2bbdf0b..50e759264db9 100644 --- a/app/controllers/attribute_help_texts_controller.rb +++ b/app/controllers/attribute_help_texts_controller.rb @@ -27,7 +27,7 @@ #++ class AttributeHelpTextsController < ApplicationController - layout 'admin' + layout "admin" menu_item :attribute_help_texts before_action :authorize_global @@ -56,8 +56,8 @@ def create redirect_to attribute_help_texts_path(tab: call.result.attribute_scope) else @attribute_help_text = call.result - flash[:error] = call.message || I18n.t('notice_internal_server_error') - render action: 'new' + flash[:error] = call.message || I18n.t("notice_internal_server_error") + render action: "new" end end @@ -70,8 +70,8 @@ def update flash[:notice] = t(:notice_successful_update) redirect_to attribute_help_texts_path(tab: @attribute_help_text.attribute_scope) else - flash[:error] = call.message || I18n.t('notice_internal_server_error') - render action: 'edit' + flash[:error] = call.message || I18n.t("notice_internal_server_error") + render action: "edit" end end @@ -88,10 +88,10 @@ def destroy protected def default_breadcrumb - if action_name == 'index' - t('attribute_help_texts.label_plural') + if action_name == "index" + t("attribute_help_texts.label_plural") else - ActionController::Base.helpers.link_to(t('attribute_help_texts.label_plural'), attribute_help_texts_path) + ActionController::Base.helpers.link_to(t("attribute_help_texts.label_plural"), attribute_help_texts_path) end end @@ -122,7 +122,7 @@ def find_entry end def find_type_scope - name = params.fetch(:name, 'WorkPackage') + name = params.fetch(:name, "WorkPackage") submodule = AttributeHelpText.available_types.find { |mod| mod == name } if submodule.nil? diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index 1c9755f07c5a..242abdc4b65a 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -70,7 +70,7 @@ def update flash[:notice] = I18n.t(:notice_successful_update) redirect_to project_settings_categories_path(@project) else - render action: 'edit' + render action: "edit" end end @@ -82,7 +82,7 @@ def destroy redirect_to project_settings_categories_path(@project) return elsif params[:todo] - reassign_to = @project.categories.find_by(id: params[:reassign_to_id]) if params[:todo] == 'reassign' + reassign_to = @project.categories.find_by(id: params[:reassign_to_id]) if params[:todo] == "reassign" @category.destroy(reassign_to) redirect_to project_settings_categories_path(@project) return diff --git a/app/controllers/colors_controller.rb b/app/controllers/colors_controller.rb index 5e671dc1ee5e..018c6cbfaac1 100644 --- a/app/controllers/colors_controller.rb +++ b/app/controllers/colors_controller.rb @@ -29,7 +29,7 @@ class ColorsController < ApplicationController before_action :require_admin_unless_readonly_api_request - layout 'admin' + layout "admin" menu_item :colors @@ -68,7 +68,7 @@ def create redirect_to colors_path else flash.now[:error] = I18n.t(:error_color_could_not_be_saved) - render action: 'new' + render action: "new" end end @@ -80,7 +80,7 @@ def update redirect_to colors_path else flash.now[:error] = I18n.t(:error_color_could_not_be_saved) - render action: 'edit' + render action: "edit" end end @@ -102,7 +102,7 @@ def destroy protected def default_breadcrumb - if action_name == 'index' + if action_name == "index" t(:label_color_plural) else ActionController::Base.helpers.link_to(t(:label_color_plural), colors_path) diff --git a/app/controllers/concerns/accounts/authentication_stages.rb b/app/controllers/concerns/accounts/authentication_stages.rb index c2524f58e16d..1d2dbb19b743 100644 --- a/app/controllers/concerns/accounts/authentication_stages.rb +++ b/app/controllers/concerns/accounts/authentication_stages.rb @@ -65,7 +65,7 @@ def stage_success else flash[:error] = I18n.t( :notice_auth_stage_wrong_stage, - expected: stage || '(none)', + expected: stage || "(none)", actual: params[:stage] ) @@ -119,7 +119,7 @@ def init_authentication_stages(after_activation:) session[:back_url] ||= params[:back_url] # Remember the autologin cookie decision - session[:autologin_requested] = params[:autologin] == '1' + session[:autologin_requested] = params[:autologin] == "1" stages end diff --git a/app/controllers/concerns/accounts/omniauth_login.rb b/app/controllers/concerns/accounts/omniauth_login.rb index 3e882cc5d017..efb866c89664 100644 --- a/app/controllers/concerns/accounts/omniauth_login.rb +++ b/app/controllers/concerns/accounts/omniauth_login.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'uri' +require "uri" ## # Intended to be used by the AccountController to handle omniauth logins @@ -47,10 +47,10 @@ module Accounts::OmniauthLogin end def omniauth_login - params[:back_url] = request.env['omniauth.origin'] if remember_back_url? + params[:back_url] = request.env["omniauth.origin"] if remember_back_url? # Extract auth info and perform check / login or activate user - auth_hash = request.env['omniauth.auth'] + auth_hash = request.env["omniauth.auth"] handle_omniauth_authentication(auth_hash) end @@ -75,7 +75,7 @@ def redirect_omniauth_register_modal(user, auth_hash) # Avoid remembering the back_url if we're coming from the login page def remember_back_url? - provided_back_url = request.env['omniauth.origin'] + provided_back_url = request.env["omniauth.origin"] return if provided_back_url.blank? account_routes = /\/(login|account)/ @@ -84,7 +84,7 @@ def remember_back_url? def show_error(error) flash[:error] = error - redirect_to action: 'login' + redirect_to action: "login" end def register_via_omniauth(session, user_attributes) @@ -93,7 +93,7 @@ def register_via_omniauth(session, user_attributes) def handle_omniauth_authentication(auth_hash, user_params: nil) call = ::Authentication::OmniauthService - .new(strategy: request.env['omniauth.strategy'], auth_hash:, controller: self) + .new(strategy: request.env["omniauth.strategy"], auth_hash:, controller: self) .call(user_params) if call.success? diff --git a/app/controllers/concerns/accounts/user_consent.rb b/app/controllers/concerns/accounts/user_consent.rb index a2603dfae3ef..e3beee7a7de0 100644 --- a/app/controllers/concerns/accounts/user_consent.rb +++ b/app/controllers/concerns/accounts/user_consent.rb @@ -34,7 +34,7 @@ module Accounts::UserConsent def consent if user_consent_required? && consenting_user&.consent_expired? - render 'account/consent' + render "account/consent" else consent_finished end @@ -51,12 +51,12 @@ def confirm_consent end def decline_consent - message = I18n.t('consent.decline_warning_message') + "\n" + message = I18n.t("consent.decline_warning_message") + "\n" message << if Setting.consent_decline_mail.present? - I18n.t('consent.contact_this_mail_address', mail_address: Setting.consent_decline_mail) + I18n.t("consent.contact_this_mail_address", mail_address: Setting.consent_decline_mail) else - I18n.t('consent.contact_your_administrator') + I18n.t("consent.contact_your_administrator") end flash[:error] = message @@ -77,7 +77,7 @@ def consent_finished end def reject_consent! - flash[:error] = I18n.t('consent.failure_message') + flash[:error] = I18n.t("consent.failure_message") redirect_to authentication_stage_failure_path :consent end end diff --git a/app/controllers/concerns/accounts/user_password_change.rb b/app/controllers/concerns/accounts/user_password_change.rb index 00ccee1b98bf..1ce7f02cbd4e 100644 --- a/app/controllers/concerns/accounts/user_password_change.rb +++ b/app/controllers/concerns/accounts/user_password_change.rb @@ -70,7 +70,7 @@ def flash_and_log_invalid_credentials(flash_now: true, is_logged_in: false) return end - flash_error_message(log_reason: 'invalid credentials', flash_now:) do + flash_error_message(log_reason: "invalid credentials", flash_now:) do if Setting.brute_force_block_after_failed_logins.to_i > 0 :notice_account_invalid_credentials_or_blocked else @@ -83,7 +83,7 @@ def render_password_change(user, message, show_user_name: false) flash[:error] = message unless message.nil? @user = user @username = user.login - render 'my/password', locals: { show_user_name: } + render "my/password", locals: { show_user_name: } end ## @@ -91,15 +91,15 @@ def render_password_change(user, message, show_user_name: false) def redirect_if_password_change_not_allowed(user) if user and not user.change_password_allowed? logger.warn "Password change for user '#{user}' forced, but user is not allowed " + - 'to change password' + "to change password" flash[:error] = I18n.t(:notice_can_t_change_password) - redirect_to action: 'login' + redirect_to action: "login" return true end false end - def flash_error_message(log_reason: '', flash_now: true) + def flash_error_message(log_reason: "", flash_now: true) flash_hash = flash_now ? flash.now : flash logger.warn "Failed login for '#{params[:username]}' from #{request.remote_ip} " \ diff --git a/app/controllers/concerns/auth_source_sso.rb b/app/controllers/concerns/auth_source_sso.rb index dbfaef94258e..3147ffa84455 100644 --- a/app/controllers/concerns/auth_source_sso.rb +++ b/app/controllers/concerns/auth_source_sso.rb @@ -103,7 +103,7 @@ def get_validated_login!(value) def extract_from_header(value) if header_secret.present? valid_secret = value.end_with?(":#{header_secret}") - login = value.gsub(/:#{Regexp.escape(header_secret)}\z/, '') + login = value.gsub(/:#{Regexp.escape(header_secret)}\z/, "") [login, valid_secret] else diff --git a/app/controllers/concerns/layout.rb b/app/controllers/concerns/layout.rb index c1efaadd2374..47b8057307ca 100644 --- a/app/controllers/concerns/layout.rb +++ b/app/controllers/concerns/layout.rb @@ -36,7 +36,7 @@ def layout_non_or_no_menu elsif @project true else - 'no_menu' + "no_menu" end end diff --git a/app/controllers/concerns/member_helper.rb b/app/controllers/concerns/member_helper.rb index 93f15002b4e7..701b5b237721 100644 --- a/app/controllers/concerns/member_helper.rb +++ b/app/controllers/concerns/member_helper.rb @@ -88,7 +88,7 @@ def transform_array_of_comma_separated_ids(array) return array if array.blank? each_comma_separated(array) do |elem| - elem.to_s.split(',') + elem.to_s.split(",") end end diff --git a/app/controllers/concerns/user_invitation.rb b/app/controllers/concerns/user_invitation.rb index f95192f48ff5..9d33dfaacdf6 100644 --- a/app/controllers/concerns/user_invitation.rb +++ b/app/controllers/concerns/user_invitation.rb @@ -30,11 +30,11 @@ module UserInvitation module Events class << self def user_invited - 'user_invited' + "user_invited" end def user_reinvited - 'user_reinvited' + "user_reinvited" end end end diff --git a/app/controllers/custom_actions_controller.rb b/app/controllers/custom_actions_controller.rb index 50a017ce0247..a676ef0410f9 100644 --- a/app/controllers/custom_actions_controller.rb +++ b/app/controllers/custom_actions_controller.rb @@ -35,7 +35,7 @@ class CustomActionsController < ApplicationController before_action :find_model_object, only: %i(edit update destroy) before_action :pad_params, only: %i(create update) - layout 'admin' + layout "admin" def index @custom_actions = CustomAction.order_by_position @@ -86,12 +86,12 @@ def require_enterprise_token return if EnterpriseToken.allows_to?(:custom_actions) if request.get? - render template: 'common/upsale', + render template: "common/upsale", locals: { - feature_title: I18n.t('custom_actions.upsale.title'), - feature_description: I18n.t('custom_actions.upsale.description'), - feature_reference: 'custom_actions_admin', - feature_video: 'enterprise/custom-actions.mp4' + feature_title: I18n.t("custom_actions.upsale.title"), + feature_description: I18n.t("custom_actions.upsale.description"), + feature_reference: "custom_actions_admin", + feature_video: "enterprise/custom-actions.mp4" } else render_403 @@ -110,10 +110,10 @@ def pad_params end def default_breadcrumb - if action_name == 'index' - t('custom_actions.plural') + if action_name == "index" + t("custom_actions.plural") else - ActionController::Base.helpers.link_to(t('custom_actions.plural'), custom_actions_path) + ActionController::Base.helpers.link_to(t("custom_actions.plural"), custom_actions_path) end end diff --git a/app/controllers/custom_styles_controller.rb b/app/controllers/custom_styles_controller.rb index 236933b16a4d..692a06ec23f1 100644 --- a/app/controllers/custom_styles_controller.rb +++ b/app/controllers/custom_styles_controller.rb @@ -27,7 +27,7 @@ #++ class CustomStylesController < ApplicationController - layout 'admin' + layout "admin" menu_item :custom_style before_action :require_admin, @@ -154,7 +154,7 @@ def show_local_breadcrumb def options_for_theme_select options = OpenProject::CustomStyles::ColorThemes.themes.pluck(:theme) unless @current_theme.present? - options << [t('admin.custom_styles.color_theme_custom'), '', + options << [t("admin.custom_styles.color_theme_custom"), "", { selected: true, disabled: true }] end diff --git a/app/controllers/enterprises_controller.rb b/app/controllers/enterprises_controller.rb index ef36a889c0c6..836b5896ba49 100644 --- a/app/controllers/enterprises_controller.rb +++ b/app/controllers/enterprises_controller.rb @@ -28,7 +28,7 @@ class EnterprisesController < ApplicationController include EnterpriseTrialHelper - layout 'admin' + layout "admin" menu_item :enterprise before_action :chargebee_content_security_policy diff --git a/app/controllers/enumerations_controller.rb b/app/controllers/enumerations_controller.rb index 6dee9f4253fe..8cc2a55280e0 100644 --- a/app/controllers/enumerations_controller.rb +++ b/app/controllers/enumerations_controller.rb @@ -27,7 +27,7 @@ #++ class EnumerationsController < ApplicationController - layout 'admin' + layout "admin" before_action :require_admin before_action :find_enumeration, only: %i[edit update move destroy] @@ -56,9 +56,9 @@ def create if @enumeration.save flash[:notice] = I18n.t(:notice_successful_create) - redirect_to action: 'index', type: @enumeration.type + redirect_to action: "index", type: @enumeration.type else - render action: 'new' + render action: "new" end end @@ -70,7 +70,7 @@ def update flash[:notice] = I18n.t(:notice_successful_update) redirect_to enumerations_path(type: @enumeration.type) else - render action: 'edit' + render action: "edit" end end @@ -78,12 +78,12 @@ def destroy if !@enumeration.in_use? # No associated objects @enumeration.destroy - redirect_to action: 'index' + redirect_to action: "index" return elsif params[:reassign_to_id] if reassign_to = @enumeration.class.find_by(id: params[:reassign_to_id]) @enumeration.destroy(reassign_to) - redirect_to action: 'index' + redirect_to action: "index" return end end @@ -96,14 +96,14 @@ def move redirect_to enumerations_path else flash.now[:error] = I18n.t(:error_type_could_not_be_saved) - render action: 'edit' + render action: "edit" end end protected def default_breadcrumb - if action_name == 'index' + if action_name == "index" t(:label_enumerations) else ActionController::Base.helpers.link_to(t(:label_enumerations), enumerations_path) diff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rb index d67db8c46e18..aa7d59807d0e 100644 --- a/app/controllers/errors_controller.rb +++ b/app/controllers/errors_controller.rb @@ -26,6 +26,6 @@ def error_options end def use_layout - 'only_logo' + "only_logo" end end diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index b7795a503b42..f28372d7d7fb 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -47,26 +47,26 @@ def index end def show - sort_init 'updated_at', 'desc' - sort_update 'created_at' => "#{Message.table_name}.created_at", - 'replies' => "#{Message.table_name}.replies_count", - 'updated_at' => "#{Message.table_name}.updated_at" + sort_init "updated_at", "desc" + sort_update "created_at" => "#{Message.table_name}.created_at", + "replies" => "#{Message.table_name}.replies_count", + "updated_at" => "#{Message.table_name}.updated_at" respond_to do |format| format.html do set_topics @message = Message.new - render action: 'show', layout: !request.xhr? + render action: "show", layout: !request.xhr? end format.json do set_topics - render template: 'messages/index' + render template: "messages/index" end format.atom do @messages = @forum .messages - .order(["#{Message.table_name}.sticked_on ASC", sort_clause].compact.join(', ')) + .order(["#{Message.table_name}.sticked_on ASC", sort_clause].compact.join(", ")) .includes(:author, :forum) .limit(Setting.feeds_limit.to_i) @@ -78,7 +78,7 @@ def show def set_topics @topics = @forum .topics - .order(["#{Message.table_name}.sticked_on ASC", sort_clause].compact.join(', ')) + .order(["#{Message.table_name}.sticked_on ASC", sort_clause].compact.join(", ")) .includes(:author, last_reply: :author) .page(page_param) .per_page(per_page_param) @@ -91,7 +91,7 @@ def edit; end def create if @forum.save flash[:notice] = I18n.t(:notice_successful_create) - redirect_to action: 'index' + redirect_to action: "index" else render :new end @@ -100,7 +100,7 @@ def create def update if @forum.update(permitted_params.forum) flash[:notice] = I18n.t(:notice_successful_update) - redirect_to action: 'index' + redirect_to action: "index" else render :edit end @@ -110,16 +110,16 @@ def move if @forum.update(permitted_params.forum_move) flash[:notice] = t(:notice_successful_update) else - flash.now[:error] = t('forum_could_not_be_saved') - render action: 'edit' + flash.now[:error] = t("forum_could_not_be_saved") + render action: "edit" end - redirect_to action: 'index' + redirect_to action: "index" end def destroy @forum.destroy flash[:notice] = I18n.t(:notice_successful_delete) - redirect_to action: 'index' + redirect_to action: "index" end private diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index ddd33e3cade7..c305bb1c7f78 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -28,19 +28,19 @@ class GroupsController < ApplicationController include GroupsHelper - layout 'admin' + layout "admin" before_action :require_admin, except: %i[show] before_action :find_group, only: %i[destroy update show create_memberships destroy_membership edit_membership add_users] def index - @groups = Group.order(Arel.sql('lastname ASC')) + @groups = Group.order(Arel.sql("lastname ASC")) end def show @group_users = group_members - render layout: 'no_menu' + render layout: "no_menu" end def new @@ -75,7 +75,7 @@ def update flash[:notice] = I18n.t(:notice_successful_update) redirect_to(groups_path) else - render action: 'edit' + render action: "edit" end end @@ -135,7 +135,7 @@ def destroy_membership .call flash[:notice] = I18n.t :notice_successful_delete - redirect_to controller: '/groups', action: 'edit', id: @group, tab: redirected_to_tab(member) + redirect_to controller: "/groups", action: "edit", id: @group, tab: redirected_to_tab(member) end protected @@ -158,10 +158,10 @@ def visible_group_members? end def default_breadcrumb - if action_name == 'index' || !current_user.admin? - t('label_group_plural') + if action_name == "index" || !current_user.admin? + t("label_group_plural") else - ActionController::Base.helpers.link_to(t('label_group_plural'), groups_path) + ActionController::Base.helpers.link_to(t("label_group_plural"), groups_path) end end @@ -176,14 +176,14 @@ def respond_membership_altered(service_call) flash[:error] = service_call.errors.full_messages.join("\n") end - redirect_to controller: '/groups', action: 'edit', id: @group, tab: redirected_to_tab(service_call.result) + redirect_to controller: "/groups", action: "edit", id: @group, tab: redirected_to_tab(service_call.result) end def redirected_to_tab(membership) if membership.project - 'memberships' + "memberships" else - 'global_roles' + "global_roles" end end @@ -194,6 +194,6 @@ def respond_users_altered(service_call) service_call.apply_flash_message!(flash) end - redirect_to controller: '/groups', action: 'edit', id: @group, tab: 'users' + redirect_to controller: "/groups", action: "edit", id: @group, tab: "users" end end diff --git a/app/controllers/highlighting_controller.rb b/app/controllers/highlighting_controller.rb index 4a19f32904e1..6cd953a7f8f6 100644 --- a/app/controllers/highlighting_controller.rb +++ b/app/controllers/highlighting_controller.rb @@ -36,8 +36,8 @@ def styles expires_in 1.year, public: true, must_revalidate: false if stale?(last_modified: Time.zone.parse(@max_updated_at), etag: @highlight_version_tag, public: true) - OpenProject::Cache.fetch('highlighting/styles', @highlight_version_tag) do - render template: 'highlighting/styles', formats: [:css] + OpenProject::Cache.fetch("highlighting/styles", @highlight_version_tag) do + render template: "highlighting/styles", formats: [:css] end end end diff --git a/app/controllers/homescreen_controller.rb b/app/controllers/homescreen_controller.rb index 686c1434e39f..c4a3b1c53e57 100644 --- a/app/controllers/homescreen_controller.rb +++ b/app/controllers/homescreen_controller.rb @@ -29,7 +29,7 @@ class HomescreenController < ApplicationController skip_before_action :check_if_login_required, only: [:robots] - layout 'global' + layout "global" def index @newest_projects = Project.visible.newest.take(3) @@ -46,7 +46,7 @@ def index def robots if Setting.login_required? - render template: 'homescreen/robots-login-required', format: :text + render template: "homescreen/robots-login-required", format: :text else @projects = Project.active.public_projects end diff --git a/app/controllers/journals_controller.rb b/app/controllers/journals_controller.rb index c1725f4bdbc2..391c70863e12 100644 --- a/app/controllers/journals_controller.rb +++ b/app/controllers/journals_controller.rb @@ -40,7 +40,7 @@ class JournalsController < ApplicationController def index @query = retrieve_query(@project) - sort_init 'id', 'desc' + sort_init "id", "desc" sort_update(@query.sortable_key_by_column_name) if @query.valid? @@ -51,7 +51,7 @@ def index respond_to do |format| format.atom do render layout: false, - content_type: 'application/atom+xml', + content_type: "application/atom+xml", locals: { title: journals_index_title, journals: @journals } end @@ -67,13 +67,13 @@ def diff return render_400 message: I18n.t(:error_journal_attribute_not_present, attribute: field_param) end - @activity_page = params['activity_page'] + @activity_page = params["activity_page"] @diff = Redmine::Helpers::Diff.new(to, from) respond_to do |format| format.html format.js do - render partial: 'diff', locals: { diff: @diff } + render partial: "diff", locals: { diff: @diff } end end end @@ -90,8 +90,8 @@ def find_journal def ensure_permitted permission = case @journal.journable_type - when 'WorkPackage' then :view_work_packages - when 'Project' then :view_project + when "WorkPackage" then :view_work_packages + when "Project" then :view_project end do_authorize(permission) diff --git a/app/controllers/ldap_auth_sources_controller.rb b/app/controllers/ldap_auth_sources_controller.rb index 286329269deb..172a358af681 100644 --- a/app/controllers/ldap_auth_sources_controller.rb +++ b/app/controllers/ldap_auth_sources_controller.rb @@ -29,7 +29,7 @@ class LdapAuthSourcesController < ApplicationController menu_item :ldap_authentication include PaginationHelper - layout 'admin' + layout "admin" before_action :require_admin before_action :block_if_password_login_disabled @@ -55,9 +55,9 @@ def create @ldap_auth_source = LdapAuthSource.new permitted_params.ldap_auth_source if @ldap_auth_source.save flash[:notice] = I18n.t(:notice_successful_create) - redirect_to action: 'index' + redirect_to action: "index" else - render 'new' + render "new" end end @@ -68,9 +68,9 @@ def update if @ldap_auth_source.update updated flash[:notice] = I18n.t(:notice_successful_update) - redirect_to action: 'index' + redirect_to action: "index" else - render 'edit' + render "edit" end end @@ -82,7 +82,7 @@ def test_connection rescue StandardError => e flash[:error] = I18n.t(:error_unable_to_connect, value: e.message) end - redirect_to action: 'index' + redirect_to action: "index" end def destroy @@ -94,7 +94,7 @@ def destroy else flash[:warning] = t(:notice_wont_delete_auth_source) end - redirect_to action: 'index' + redirect_to action: "index" end protected @@ -107,7 +107,7 @@ def prevent_editing_when_seeded end def default_breadcrumb - if action_name == 'index' + if action_name == "index" t(:label_ldap_auth_source_plural) else ActionController::Base.helpers.link_to(t(:label_ldap_auth_source_plural), ldap_auth_sources_path) diff --git a/app/controllers/members/menus_controller.rb b/app/controllers/members/menus_controller.rb index 6d0aeca4cc65..ab205fc3aff0 100644 --- a/app/controllers/members/menus_controller.rb +++ b/app/controllers/members/menus_controller.rb @@ -45,13 +45,13 @@ def first_level_menu_items def user_status_options [ - OpenProject::Menu::MenuItem.new(title: I18n.t('members.menu.all'), + OpenProject::Menu::MenuItem.new(title: I18n.t("members.menu.all"), href: project_members_path, selected: active_filter_count == 0), - OpenProject::Menu::MenuItem.new(title: I18n.t('members.menu.locked'), + OpenProject::Menu::MenuItem.new(title: I18n.t("members.menu.locked"), href: project_members_path(status: :locked), selected: selected?(:status, :locked)), - OpenProject::Menu::MenuItem.new(title: I18n.t('members.menu.invited'), + OpenProject::Menu::MenuItem.new(title: I18n.t("members.menu.invited"), href: project_members_path(status: :invited), selected: selected?(:status, :invited)) ] @@ -59,9 +59,9 @@ def user_status_options def nested_menu_items [ - OpenProject::Menu::MenuGroup.new(header: I18n.t('members.menu.project_roles'), children: project_roles_entries), - OpenProject::Menu::MenuGroup.new(header: I18n.t('members.menu.wp_shares'), children: permission_menu_entries), - OpenProject::Menu::MenuGroup.new(header: I18n.t('members.menu.groups'), children: project_group_entries) + OpenProject::Menu::MenuGroup.new(header: I18n.t("members.menu.project_roles"), children: project_roles_entries), + OpenProject::Menu::MenuGroup.new(header: I18n.t("members.menu.wp_shares"), children: permission_menu_entries), + OpenProject::Menu::MenuGroup.new(header: I18n.t("members.menu.groups"), children: project_group_entries) ] end diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 24937ec88998..efe9fcb66f33 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -57,7 +57,7 @@ def show .per_page(per_page_param) @reply = Message.new(subject: "RE: #{@message.subject}", parent: @topic, forum: @topic.forum) - render action: 'show', layout: !request.xhr? + render action: "show", layout: !request.xhr? end # new topic @@ -87,7 +87,7 @@ def create redirect_to topic_path(@message) else - render action: 'new' + render action: "new" end end @@ -116,7 +116,7 @@ def update @message.reload redirect_to topic_path(@message.root, r: @message.parent_id && @message.id) else - render action: 'edit' + render action: "edit" end end @@ -128,9 +128,9 @@ def destroy @message.destroy flash[:notice] = t(:notice_successful_delete) redirect_target = if @message.parent.nil? - { controller: '/forums', action: 'show', project_id: @project, id: @forum } + { controller: "/forums", action: "show", project_id: @project, id: @forum } else - { action: 'show', id: @message.parent, r: @message } + { action: "show", id: @message.parent, r: @message } end redirect_to redirect_target @@ -140,10 +140,10 @@ def quote user = @message.author text = @message.content subject = @message.subject - subject = "RE: #{subject}" unless subject.starts_with?('RE:') + subject = "RE: #{subject}" unless subject.starts_with?("RE:") user_wrote = I18n.t(:text_user_wrote, value: ERB::Util.html_escape(user), locale: Setting.default_language) content = "#{user_wrote}\n> " - content << (text.to_s.strip.gsub(%r{
(.+?)
}m, '[...]').gsub('"', '\"').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n") + content << (text.to_s.strip.gsub(%r{
(.+?)
}m, "[...]").gsub('"', '\"').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n") respond_to do |format| format.json { render json: { subject:, content: } } diff --git a/app/controllers/my/auto_login_tokens_controller.rb b/app/controllers/my/auto_login_tokens_controller.rb index 058012090196..21de9f6f2214 100644 --- a/app/controllers/my/auto_login_tokens_controller.rb +++ b/app/controllers/my/auto_login_tokens_controller.rb @@ -2,7 +2,7 @@ module My class AutoLoginTokensController < ::ApplicationController before_action :find_token, only: %i(destroy) - layout 'my' + layout "my" menu_item :sessions def destroy diff --git a/app/controllers/my/sessions_controller.rb b/app/controllers/my/sessions_controller.rb index 7d244f9549bf..b243be219a6d 100644 --- a/app/controllers/my/sessions_controller.rb +++ b/app/controllers/my/sessions_controller.rb @@ -6,7 +6,7 @@ class SessionsController < ::ApplicationController before_action :find_model_object, only: %i(show destroy) before_action :prevent_current_session_deletion, only: %i(destroy) - layout 'my' + layout "my" menu_item :sessions def index @@ -18,7 +18,7 @@ def index .for_user(current_user) .order(expires_on: :asc) - token = cookies[OpenProject::Configuration['autologin_cookie_name']] + token = cookies[OpenProject::Configuration["autologin_cookie_name"]] if token @current_token = @autologin_tokens.find_by_plaintext_value(token) # rubocop:disable Rails/DynamicFindBy end @@ -37,7 +37,7 @@ def destroy def prevent_current_session_deletion if @session.current?(session) - render_400 message: I18n.t('users.sessions.may_not_delete_current') + render_400 message: I18n.t("users.sessions.may_not_delete_current") end end end diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 56f9b39854ce..92d31cf6c088 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -77,9 +77,9 @@ def create @news.attributes = permitted_params.news if @news.save flash[:notice] = I18n.t(:notice_successful_create) - redirect_to controller: '/news', action: 'index', project_id: @project + redirect_to controller: "/news", action: "index", project_id: @project else - render action: 'new' + render action: "new" end end @@ -87,16 +87,16 @@ def update @news.attributes = permitted_params.news if @news.save flash[:notice] = I18n.t(:notice_successful_update) - redirect_to action: 'show', id: @news + redirect_to action: "show", id: @news else - render action: 'edit' + render action: "edit" end end def destroy @news.destroy flash[:notice] = I18n.t(:notice_successful_delete) - redirect_to action: 'index', project_id: @project + redirect_to action: "index", project_id: @project end private diff --git a/app/controllers/oauth/applications_controller.rb b/app/controllers/oauth/applications_controller.rb index 11610214d967..d77870eb8019 100644 --- a/app/controllers/oauth/applications_controller.rb +++ b/app/controllers/oauth/applications_controller.rb @@ -32,7 +32,7 @@ class ApplicationsController < ::ApplicationController before_action :new_app, only: %i[new create] before_action :find_app, only: %i[edit update show destroy] - layout 'admin' + layout "admin" menu_item :oauth_applications def index @@ -87,10 +87,10 @@ def destroy protected def default_breadcrumb - if action_name == 'index' - t('oauth.application.plural') + if action_name == "index" + t("oauth.application.plural") else - ActionController::Base.helpers.link_to(t('oauth.application.plural'), oauth_applications_path) + ActionController::Base.helpers.link_to(t("oauth.application.plural"), oauth_applications_path) end end diff --git a/app/controllers/oauth/auth_base_controller.rb b/app/controllers/oauth/auth_base_controller.rb index 7da92dbfe624..1428e5230193 100644 --- a/app/controllers/oauth/auth_base_controller.rb +++ b/app/controllers/oauth/auth_base_controller.rb @@ -37,7 +37,7 @@ class AuthBaseController < ::ApplicationController prepend_before_action :extend_content_security_policy skip_before_action :check_if_login_required - layout 'only_logo' + layout "only_logo" def extend_content_security_policy return unless pre_auth&.authorizable? @@ -51,13 +51,13 @@ def extend_content_security_policy def application_http_redirect_uris registered_redirect_uris - .select { |url| url.start_with?('http') } - .map { |url| URI.join(url, '/').to_s } + .select { |url| url.start_with?("http") } + .map { |url| URI.join(url, "/").to_s } end def application_native_redirect_uris registered_redirect_uris - .reject { |url| url.start_with?('http', 'urn') } + .reject { |url| url.start_with?("http", "urn") } .map(&method(:parse_native_redirect_uri)) .compact end diff --git a/app/controllers/oauth/grants_controller.rb b/app/controllers/oauth/grants_controller.rb index de59afa3ab57..e38afe156b12 100644 --- a/app/controllers/oauth/grants_controller.rb +++ b/app/controllers/oauth/grants_controller.rb @@ -30,7 +30,7 @@ module OAuth class GrantsController < ::ApplicationController before_action :require_login - layout 'my' + layout "my" menu_item :access_token def index @@ -49,8 +49,8 @@ def revoke_application current_user ) - flash[:notice] = I18n.t('oauth.grants.successful_application_revocation', application_name: application.name) - redirect_to controller: '/my', action: :access_token + flash[:notice] = I18n.t("oauth.grants.successful_application_revocation", application_name: application.name) + redirect_to controller: "/my", action: :access_token end private diff --git a/app/controllers/placeholder_users/memberships_controller.rb b/app/controllers/placeholder_users/memberships_controller.rb index 346c8d91edbd..b75532b9a878 100644 --- a/app/controllers/placeholder_users/memberships_controller.rb +++ b/app/controllers/placeholder_users/memberships_controller.rb @@ -28,7 +28,7 @@ class PlaceholderUsers::MembershipsController < ApplicationController include IndividualPrincipals::MembershipControllerMethods - layout 'admin' + layout "admin" before_action :authorize_global before_action :find_individual_principal @@ -40,6 +40,6 @@ def find_individual_principal end def redirected_to_tab(_membership) - 'memberships' + "memberships" end end diff --git a/app/controllers/placeholder_users_controller.rb b/app/controllers/placeholder_users_controller.rb index 06ad095d445a..8ec919515c30 100644 --- a/app/controllers/placeholder_users_controller.rb +++ b/app/controllers/placeholder_users_controller.rb @@ -28,7 +28,7 @@ class PlaceholderUsersController < ApplicationController include EnterpriseTrialHelper - layout 'admin' + layout "admin" before_action :authorize_global, except: %i[show] before_action :find_placeholder_user, only: %i[show @@ -60,7 +60,7 @@ def show .where(id: Member.visible(current_user)) respond_to do |format| - format.html { render layout: 'no_menu' } + format.html { render layout: "no_menu" } end end @@ -153,20 +153,20 @@ def find_placeholder_user def authorize_deletion unless helpers.can_delete_placeholder_user?(@placeholder_user, current_user) - render_403 message: I18n.t('placeholder_users.right_to_manage_members_missing') + render_403 message: I18n.t("placeholder_users.right_to_manage_members_missing") end end def default_breadcrumb - if action_name == 'index' - t('label_placeholder_user_plural') + if action_name == "index" + t("label_placeholder_user_plural") else - ActionController::Base.helpers.link_to(t('label_placeholder_user_plural'), + ActionController::Base.helpers.link_to(t("label_placeholder_user_plural"), placeholder_users_path) end end def show_local_breadcrumb - action_name != 'show' + action_name != "show" end end diff --git a/app/controllers/projects/archive_controller.rb b/app/controllers/projects/archive_controller.rb index 5ac441fa9c8d..b18c6f86c44c 100644 --- a/app/controllers/projects/archive_controller.rb +++ b/app/controllers/projects/archive_controller.rb @@ -48,7 +48,7 @@ def change_status_action(status) redirect_to(projects_path) else flash[:error] = t(:"error_can_not_#{status}_project", - errors: service_call.errors.full_messages.join(', ')) + errors: service_call.errors.full_messages.join(", ")) redirect_back fallback_location: projects_path end end diff --git a/app/controllers/projects/identifier_controller.rb b/app/controllers/projects/identifier_controller.rb index 9d640988e907..5178dc0e94bf 100644 --- a/app/controllers/projects/identifier_controller.rb +++ b/app/controllers/projects/identifier_controller.rb @@ -42,7 +42,7 @@ def update flash[:notice] = I18n.t(:notice_successful_update) redirect_to project_settings_general_path(@project) else - render action: 'show' + render action: "show" end end end diff --git a/app/controllers/projects/menus_controller.rb b/app/controllers/projects/menus_controller.rb index 9a99912c0168..78281abee108 100644 --- a/app/controllers/projects/menus_controller.rb +++ b/app/controllers/projects/menus_controller.rb @@ -41,9 +41,9 @@ def first_level_menu_items [ OpenProject::Menu::MenuGroup.new(header: nil, children: static_filters), - OpenProject::Menu::MenuGroup.new(header: I18n.t(:'projects.lists.my_private'), + OpenProject::Menu::MenuGroup.new(header: I18n.t(:"projects.lists.my_private"), children: my_filters), - OpenProject::Menu::MenuGroup.new(header: I18n.t(:'activerecord.attributes.project.status_code'), + OpenProject::Menu::MenuGroup.new(header: I18n.t(:"activerecord.attributes.project.status_code"), children: static_status_filters) ] end diff --git a/app/controllers/projects/queries_controller.rb b/app/controllers/projects/queries_controller.rb index 35d87f7c9225..b1e2d162eb79 100644 --- a/app/controllers/projects/queries_controller.rb +++ b/app/controllers/projects/queries_controller.rb @@ -39,8 +39,8 @@ class Projects::QueriesController < ApplicationController end def new - render template: '/projects/index', - layout: 'global', + render template: "/projects/index", + layout: "global", locals: { query: @query, state: :edit } end @@ -52,8 +52,8 @@ def create if call.success? redirect_to projects_path(query_id: call.result.id) else - render template: '/projects/index', - layout: 'global', + render template: "/projects/index", + layout: "global", locals: { query: call.result, state: :edit } end end diff --git a/app/controllers/projects/settings/custom_fields_controller.rb b/app/controllers/projects/settings/custom_fields_controller.rb index 03f6a1acacaa..25cbac60b795 100644 --- a/app/controllers/projects/settings/custom_fields_controller.rb +++ b/app/controllers/projects/settings/custom_fields_controller.rb @@ -30,7 +30,7 @@ class Projects::Settings::CustomFieldsController < Projects::SettingsController menu_item :settings_custom_fields def show - @wp_custom_fields = WorkPackageCustomField.order('lower(name)') + @wp_custom_fields = WorkPackageCustomField.order("lower(name)") end def update @@ -39,7 +39,7 @@ def update flash[:notice] = t(:notice_successful_update) else flash[:error] = t(:notice_project_cannot_update_custom_fields, - errors: @project.errors.full_messages.join(', ')) + errors: @project.errors.full_messages.join(", ")) raise ActiveRecord::Rollback end end diff --git a/app/controllers/projects/settings/modules_controller.rb b/app/controllers/projects/settings/modules_controller.rb index 1ef457ae26d1..c7f3dc070e10 100644 --- a/app/controllers/projects/settings/modules_controller.rb +++ b/app/controllers/projects/settings/modules_controller.rb @@ -39,7 +39,7 @@ def update redirect_to project_settings_modules_path(@project) else - render 'show' + render "show" end end end diff --git a/app/controllers/projects/templated_controller.rb b/app/controllers/projects/templated_controller.rb index 6f74a5a77cc5..c59e7c033144 100644 --- a/app/controllers/projects/templated_controller.rb +++ b/app/controllers/projects/templated_controller.rb @@ -50,7 +50,7 @@ def change_templated_action(templated) flash[:notice] = t(:notice_successful_update) else messages = [ - t('activerecord.errors.template.header', model: Project.model_name.human, count: service_call.errors.count), + t("activerecord.errors.template.header", model: Project.model_name.human, count: service_call.errors.count), service_call.message ] diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index de4617468a01..94e4281e5aef 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -53,7 +53,7 @@ def index format.html do flash.now[:error] = @query.errors.full_messages if @query.errors.any? - render layout: 'global', locals: { query: @query, state: :show } + render layout: "global", locals: { query: @query, state: :show } end format.any(*supported_export_formats) do @@ -63,7 +63,7 @@ def index end def new - render layout: 'no_menu' + render layout: "no_menu" end def copy @@ -77,9 +77,9 @@ def destroy .call if service_call.success? - flash[:notice] = I18n.t('projects.delete.scheduled') + flash[:notice] = I18n.t("projects.delete.scheduled") else - flash[:error] = I18n.t('projects.delete.schedule_failed', errors: service_call.errors.full_messages.join("\n")) + flash[:error] = I18n.t("projects.delete.schedule_failed", errors: service_call.errors.full_messages.join("\n")) end redirect_to projects_path @@ -118,7 +118,7 @@ def export_list(query, mime_type) query: query.to_hash ) - if request.headers['Accept']&.include?('application/json') + if request.headers["Accept"]&.include?("application/json") render json: { job_id: job.job_id } else redirect_to job_status_path(job.job_id) diff --git a/app/controllers/queries/params_parser.rb b/app/controllers/queries/params_parser.rb index 301d2dd15deb..d93e5747b025 100644 --- a/app/controllers/queries/params_parser.rb +++ b/app/controllers/queries/params_parser.rb @@ -49,7 +49,7 @@ def parse_orders_from_params(params) .to_h .map { |k, v| { attribute: k, direction: v } } rescue JSON::ParserError - [{ attribute: 'invalid', direction: 'asc' }] + [{ attribute: "invalid", direction: "asc" }] end def parse_columns_from_params(params) @@ -86,7 +86,7 @@ def parse_filter def consume_ampersand case @buffer.peek(1) - when '&', /\s/ + when "&", /\s/ @buffer.getch consume_ampersand end @@ -106,9 +106,9 @@ def parse_values parse_doublequoted_value when "'" parse_singlequoted_value - when '[' + when "[" parse_array_value - when '&' + when "&" [] else parse_unguarded_value @@ -128,7 +128,7 @@ def parse_singlequoted_value def parse_unguarded_value value = @buffer .scan_until(/&|\z/) - .delete_suffix('&') + .delete_suffix("&") [value] end @@ -136,8 +136,8 @@ def parse_unguarded_value def parse_array_value @buffer .scan_until(/]|\z/) - .delete_suffix(']') - .delete_prefix('[') + .delete_suffix("]") + .delete_prefix("[") .scan(/(?:'([^']*)')|(?:"([^"]*)")/) .flatten .compact diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 08cb4596df0c..741493d32a1b 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -26,9 +26,9 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'SVG/Graph/Bar' -require 'SVG/Graph/BarHorizontal' -require 'digest/sha1' +require "SVG/Graph/Bar" +require "SVG/Graph/BarHorizontal" +require "digest/sha1" class ChangesetNotFound < StandardError end @@ -63,7 +63,7 @@ def show if request.xhr? if @entries && @repository.valid? - render(partial: 'dir_list_content') + render(partial: "dir_list_content") else render(nothing: true) end @@ -72,7 +72,7 @@ def show else @changesets = @repository.latest_changesets(@path, @rev) @properties = @repository.properties(@path, @rev) - render action: 'show' + render action: "show" end end @@ -80,8 +80,8 @@ def create service = SCM::RepositoryFactoryService.new(@project, params) if service.build_and_save @repository = service.repository - flash[:notice] = I18n.t('repositories.create_successful') - flash[:notice] << (' ' + I18n.t('repositories.create_managed_delay')) if @repository.managed? + flash[:notice] = I18n.t("repositories.create_successful") + flash[:notice] << (" " + I18n.t("repositories.create_managed_delay")) if @repository.managed? else flash[:error] = service.build_error end @@ -111,7 +111,7 @@ def committers h end flash[:notice] = I18n.t(:notice_successful_update) - redirect_to action: 'committers', project_id: @project + redirect_to action: "committers", project_id: @project end end @@ -123,7 +123,7 @@ def destroy_info def destroy repository = @project.repository if repository.destroy - flash[:notice] = I18n.t('repositories.delete_sucessful') + flash[:notice] = I18n.t("repositories.delete_sucessful") else flash[:error] = repository.errors.full_messages end @@ -146,7 +146,7 @@ def changes @properties = @repository.properties(@path, @rev) @changeset = @repository.find_changeset_by_name(@rev) - render 'changes', formats: [:html] + render "changes", formats: [:html] end def revisions @@ -203,7 +203,7 @@ def annotate @annotate = @repository.scm.annotate(@path, @rev) @changeset = @repository.find_changeset_by_name(@rev) - render 'annotate', formats: [:html] + render "annotate", formats: [:html] end def revision @@ -221,7 +221,7 @@ def revision end def diff - if params[:format] == 'diff' + if params[:format] == "diff" @diff = @repository.diff(@path, @rev, @rev_to) unless @diff @@ -233,8 +233,8 @@ def diff filename << "_r#{@rev_to}" if @rev_to send_data @diff.join, filename: "#{filename}.diff", - type: 'text/x-patch', - disposition: 'attachment' + type: "text/x-patch", + disposition: "attachment" else @diff_type = diff_type_persisted @@ -250,7 +250,7 @@ def diff @changeset_to = @rev_to ? @repository.find_changeset_by_name(@rev_to) : nil @diff_format_revisions = @repository.diff_format_revisions(@changeset, @changeset_to) - render 'diff', formats: :html + render "diff", formats: :html end end @@ -264,9 +264,9 @@ def stats def graph data = nil case params[:graph] - when 'commits_per_month' + when "commits_per_month" data = graph_commits_per_month(@repository) - when 'commits_per_author' + when "commits_per_author" unless current_user.allowed_in_project?(:view_commit_author_statistics, @project) return deny_access end @@ -275,8 +275,8 @@ def graph end if data - headers['Content-Type'] = 'image/svg+xml' - send_data(data, type: 'image/svg+xml', disposition: 'inline') + headers["Content-Type"] = "image/svg+xml" + send_data(data, type: "image/svg+xml", disposition: "inline") else render_404 end @@ -290,7 +290,7 @@ def update_repository(repo_params) @repository.attributes = @repository.class.permitted_params(repo_params) if @repository.save - flash[:notice] = I18n.t('repositories.update_settings_successful') + flash[:notice] = I18n.t("repositories.update_settings_successful") else flash[:error] = @repository.errors.full_messages.join('\n') end @@ -306,7 +306,7 @@ def find_repository # Prepare checkout instructions # available on all pages (even empty!) - @path = params[:repo_path] || '' + @path = params[:repo_path] || "" @instructions = ::SCM::CheckoutInstructionsService.new(@repository, path: @path) # Asserts repository availability, or renders an appropriate error @@ -319,7 +319,7 @@ def find_repository raise InvalidRevisionParam end rescue OpenProject::SCM::Exceptions::SCMEmpty - render 'empty' + render "empty" rescue ActiveRecord::RecordNotFound render_404 rescue InvalidRevisionParam @@ -339,7 +339,7 @@ def graph_commits_per_month(repository) @date_from = @date_to << 11 @date_from = Date.civil(@date_from.year, @date_from.month, 1) commits_by_day = Changeset.where( - ['repository_id = ? AND commit_date BETWEEN ? AND ?', repository.id, @date_from, @date_to] + ["repository_id = ? AND commit_date BETWEEN ? AND ?", repository.id, @date_from, @date_to] ).group(:commit_date).size commits_by_month = [0] * 12 commits_by_day.each do |c| @@ -389,7 +389,7 @@ def graph_commits_per_month(repository) end def graph_commits_per_author(repository) - commits_by_author = Changeset.where(['repository_id = ?', repository.id]).group(:committer).size + commits_by_author = Changeset.where(["repository_id = ?", repository.id]).group(:committer).size commits_by_author.to_a.sort_by!(&:last) changes_by_author = Change.includes(:changeset) @@ -406,12 +406,12 @@ def graph_commits_per_author(repository) commits_data = commits_by_author.map(&:last) changes_data = commits_by_author.map { |r| h[r.first] || 0 } - fields = fields + ([''] * (10 - fields.length)) if fields.length < 10 + fields = fields + ([""] * (10 - fields.length)) if fields.length < 10 commits_data = commits_data + ([0] * (10 - commits_data.length)) if commits_data.length < 10 changes_data = changes_data + ([0] * (10 - changes_data.length)) if changes_data.length < 10 # Remove email address in usernames - fields = fields.map { |c| c.gsub(%r{<.+@.+>}, '') } + fields = fields.map { |c| c.gsub(%r{<.+@.+>}, "") } graph = SVG::Graph::BarHorizontal.new( height: 400, @@ -440,14 +440,14 @@ def login_back_url_params end def raw_or_to_large_or_non_text(content, path) - params[:format] == 'raw' || + params[:format] == "raw" || (content.size && content.size > Setting.file_max_size_displayed.to_i.kilobyte) || !entry_text_data?(content, path) end def send_raw(content, path) # Force the download - send_opt = { filename: filename_for_content_disposition(path.split('/').last) } + send_opt = { filename: filename_for_content_disposition(path.split("/").last) } send_type = OpenProject::MimeType.of(path) send_opt[:type] = send_type.to_s if send_type send_data content, send_opt @@ -462,14 +462,14 @@ def render_text_entry # Forcing html format here to avoid # rails looking for e.g text when .txt is asked for - render 'entry', formats: [:html] + render "entry", formats: [:html] end def diff_type_persisted preferences = current_user.pref diff_type = params[:type] || preferences.diff_type - diff_type = 'inline' unless %w(inline sbs).include?(diff_type) + diff_type = "inline" unless %w(inline sbs).include?(diff_type) # Save diff type as user preference if current_user.logged? && diff_type != preferences.diff_type @@ -485,7 +485,7 @@ def entry_text_data?(ent, path) # It is very strict that file contains less than 30% of ascii symbols # in non Western Europe. # TODO: need to handle edge cases of non-binary content that isn't UTF-8 - OpenProject::MimeType.is_type?('text', path) || - ent.dup.force_encoding('UTF-8') == ent.dup.force_encoding('BINARY') + OpenProject::MimeType.is_type?("text", path) || + ent.dup.force_encoding("UTF-8") == ent.dup.force_encoding("BINARY") end end diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index 3fd874957eee..893c26866539 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -29,7 +29,7 @@ class RolesController < ApplicationController include PaginationHelper - layout 'admin' + layout "admin" before_action :require_admin @@ -41,7 +41,7 @@ def index .page(page_param) .per_page(per_page_param) - render action: 'index', layout: false if request.xhr? + render action: "index", layout: false if request.xhr? end def new @@ -52,7 +52,7 @@ def new def edit @role = Role.find(params[:id]) - @call = set_role_attributes(@role, 'update') + @call = set_role_attributes(@role, "update") end def create @@ -61,11 +61,11 @@ def create if @call.success? flash[:notice] = t(:notice_successful_create) - redirect_to action: 'index' + redirect_to action: "index" else @roles = roles_scope - render action: 'new' + render action: "new" end end @@ -75,9 +75,9 @@ def update if @call.success? flash[:notice] = I18n.t(:notice_successful_update) - redirect_to action: 'index' + redirect_to action: "index" else - render action: 'edit' + render action: "edit" end end @@ -92,7 +92,7 @@ def destroy else flash[:error] = I18n.t(:error_can_not_remove_role) end - redirect_to action: 'index' + redirect_to action: "index" end def report @@ -107,11 +107,11 @@ def bulk_update if calls.all?(&:success?) flash[:notice] = I18n.t(:notice_successful_update) - redirect_to action: 'index' + redirect_to action: "index" else @calls = calls @permissions = OpenProject::AccessControl.permissions.reject(&:public?) - render action: 'report' + render action: "report" end end @@ -144,10 +144,10 @@ def roles_scope end def default_breadcrumb - if action_name == 'index' - t('label_role_plural') + if action_name == "index" + t("label_role_plural") else - ActionController::Base.helpers.link_to(t('label_role_plural'), roles_path) + ActionController::Base.helpers.link_to(t("label_role_plural"), roles_path) end end diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index c71ef05ecbd4..dbdf68110eb1 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -53,12 +53,12 @@ def index private def prepare_tokens - @question = search_params[:q] || '' + @question = search_params[:q] || "" @question.strip! @tokens = scan_query_tokens(@question).uniq unless @tokens.any? - @question = '' + @question = "" end end @@ -92,7 +92,7 @@ def limit_results_subsequent_page # extract tokens from the question # eg. hello "bye bye" => ["hello", "bye bye"] def scan_query_tokens(query) - tokens = query.scan(%r{((\s|^)"[\s\w]+"(\s|$)|\S+)}).map { |m| m.first.gsub(%r{(^\s*"\s*|\s*"\s*$)}, '') } + tokens = query.scan(%r{((\s|^)"[\s\w]+"(\s|$)|\S+)}).map { |m| m.first.gsub(%r{(^\s*"\s*|\s*"\s*$)}, "") } # no more than 5 tokens to search for tokens.slice! 5..-1 if tokens.size > 5 @@ -111,9 +111,9 @@ def offset def projects_to_search case search_params[:scope] - when 'all' + when "all" nil - when 'current_project' + when "current_project" @project else @project ? @project.self_and_descendants.active : nil @@ -149,7 +149,7 @@ def search_types if projects_to_search.is_a? Project # don't search projects - types.delete('projects') + types.delete("projects") # only show what the user is allowed to view types = types.select { |o| User.current.allowed_in_project?(:"view_#{o}", projects_to_search) } end @@ -162,7 +162,7 @@ def search_classes scope = if scope.empty? search_types - elsif scope & ['work_packages'] == scope + elsif scope & ["work_packages"] == scope [] else scope @@ -176,7 +176,7 @@ def scope_class(scope) end def provision_gon - available_search_types = search_types.dup.push('all') + available_search_types = search_types.dup.push("all") gon.global_search = { search_term: @question, @@ -187,7 +187,7 @@ def provision_gon name: OpenProject::GlobalSearch.tab_name(search_type) } end, - current_tab: available_search_types.detect { |search_type| search_params[search_type] } || 'all' + current_tab: available_search_types.detect { |search_type| search_params[search_type] } || "all" } end end diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb index 38e24b96c080..a9c83c066ed8 100644 --- a/app/controllers/statuses_controller.rb +++ b/app/controllers/statuses_controller.rb @@ -29,7 +29,7 @@ class StatusesController < ApplicationController include PaginationHelper - layout 'admin' + layout "admin" before_action :require_admin @@ -37,7 +37,7 @@ def index @statuses = Status.page(page_param) .per_page(per_page_param) - render action: 'index', layout: false if request.xhr? + render action: "index", layout: false if request.xhr? end def new @@ -52,9 +52,9 @@ def create @status = Status.new(permitted_params.status) if @status.save flash[:notice] = I18n.t(:notice_successful_create) - redirect_to action: 'index' + redirect_to action: "index" else - render action: 'new' + render action: "new" end end @@ -62,9 +62,9 @@ def update @status = Status.find(params[:id]) if @status.update(permitted_params.status) flash[:notice] = I18n.t(:notice_successful_update) - redirect_to action: 'index' + redirect_to action: "index" else - render action: 'edit' + render action: "edit" end end @@ -76,10 +76,10 @@ def destroy status.destroy flash[:notice] = I18n.t(:notice_successful_delete) end - redirect_to action: 'index' + redirect_to action: "index" rescue StandardError flash[:error] = I18n.t(:error_unable_delete_status) - redirect_to action: 'index' + redirect_to action: "index" end def update_work_package_done_ratio @@ -88,13 +88,13 @@ def update_work_package_done_ratio else flash[:error] = I18n.t(:error_work_package_done_ratios_not_updated) end - redirect_to action: 'index' + redirect_to action: "index" end protected def default_breadcrumb - if action_name == 'index' + if action_name == "index" t(:label_work_package_status_plural) else ActionController::Base.helpers.link_to(t(:label_work_package_status_plural), statuses_path) diff --git a/app/controllers/sys_controller.rb b/app/controllers/sys_controller.rb index a94c13e4ea1f..e709ef3b705f 100644 --- a/app/controllers/sys_controller.rb +++ b/app/controllers/sys_controller.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'open_project/repository_authentication' +require "open_project/repository_authentication" class SysController < ActionController::Base before_action :check_enabled @@ -38,7 +38,7 @@ def projects p = Project.active.has_module(:repository) .includes(:repository) .references(:repositories) - .order(Arel.sql('identifier')) + .order(Arel.sql("identifier")) respond_to do |format| format.json do render json: p.to_json(include: :repository) @@ -50,7 +50,7 @@ def projects end def update_required_storage - result = update_storage_information(@repository, params[:force] == '1') + result = update_storage_information(@repository, params[:force] == "1") render plain: "Updated: #{result}", status: :ok end @@ -75,9 +75,9 @@ def fetch_changesets def repo_auth project = Project.find_by(identifier: params[:repository]) if project && authorized?(project, @authenticated_user) - render plain: 'Access granted' + render plain: "Access granted" else - render plain: 'Not allowed', status: :forbidden # default to deny + render plain: "Not allowed", status: :forbidden # default to deny end end @@ -96,7 +96,7 @@ def authorized?(project, user) def check_enabled User.current = nil unless Setting.sys_api_enabled? && params[:key].to_s == Setting.sys_api_key - render plain: 'Access denied. Repository management WS is disabled or key is invalid.', + render plain: "Access denied. Repository management WS is disabled or key is invalid.", status: :forbidden false end @@ -125,7 +125,7 @@ def find_repository_with_storage else return true if @repository.scm.storage_available? - render plain: 'repositories.storage.not_available', status: :bad_request + render plain: "repositories.storage.not_available", status: :bad_request end false @@ -137,8 +137,8 @@ def require_basic_auth return true if @authenticated_user end - response.headers['WWW-Authenticate'] = 'Basic realm="Repository Authentication"' - render plain: 'Authorization required', status: :unauthorized + response.headers["WWW-Authenticate"] = 'Basic realm="Repository Authentication"' + render plain: "Authorization required", status: :unauthorized false end @@ -155,10 +155,10 @@ def cached_user_login(username, password) user_id = Rails.cache.fetch(OpenProject::RepositoryAuthentication::CACHE_PREFIX + Digest::SHA1.hexdigest("#{username}#{password}"), expires_in: OpenProject::RepositoryAuthentication::CACHE_EXPIRES_AFTER) do user = user_login(username, password) - user ? user.id.to_s : '-1' + user ? user.id.to_s : "-1" end - return nil if user_id.blank? or user_id == '-1' + return nil if user_id.blank? or user_id == "-1" user || User.find_by(id: user_id.to_i) end diff --git a/app/controllers/types_controller.rb b/app/controllers/types_controller.rb index 43be056024b2..224593c207b2 100644 --- a/app/controllers/types_controller.rb +++ b/app/controllers/types_controller.rb @@ -29,7 +29,7 @@ class TypesController < ApplicationController include PaginationHelper - layout 'admin' + layout "admin" before_action :require_admin before_action :find_type, only: %i[update move destroy] @@ -73,7 +73,7 @@ def create call.on_failure do |result| flash[:error] = result.errors.full_messages.join("\n") load_projects_and_types - render action: 'new' + render action: "new" end end end @@ -99,7 +99,7 @@ def move redirect_to types_path else flash.now[:error] = I18n.t(:error_type_could_not_be_saved) - render action: 'edit' + render action: "edit" end end @@ -113,7 +113,7 @@ def destroy else flash[:error] = destroy_error_message end - redirect_to action: 'index' + redirect_to action: "index" end protected @@ -129,7 +129,7 @@ def permitted_type_params end def load_projects_and_types - @types = ::Type.order(Arel.sql('position')) + @types = ::Type.order(Arel.sql("position")) @projects = Project.all end @@ -140,7 +140,7 @@ def redirect_to_type_tab_path(type, notice) end def default_breadcrumb - if action_name == 'index' + if action_name == "index" t(:label_work_package_types) else ActionController::Base.helpers.link_to(t(:label_work_package_types), types_path) @@ -152,7 +152,7 @@ def render_edit_tab(type) @projects = Project.all @type = type - render action: 'edit' + render action: "edit" end def show_local_breadcrumb @@ -173,7 +173,7 @@ def destroy_error_message else error_message = [ ApplicationController.helpers.sanitize( - t(:'error_can_not_delete_type.explanation', url: belonging_wps_url(@type.id)), + t(:"error_can_not_delete_type.explanation", url: belonging_wps_url(@type.id)), attributes: %w(href target) ) ] diff --git a/app/controllers/users/memberships_controller.rb b/app/controllers/users/memberships_controller.rb index 778675af5c07..2e02321d568c 100644 --- a/app/controllers/users/memberships_controller.rb +++ b/app/controllers/users/memberships_controller.rb @@ -28,7 +28,7 @@ class Users::MembershipsController < ApplicationController include IndividualPrincipals::MembershipControllerMethods - layout 'admin' + layout "admin" before_action :authorize_global before_action :find_individual_principal @@ -41,9 +41,9 @@ def find_individual_principal def redirected_to_tab(membership) if membership.project - 'memberships' + "memberships" else - 'global_roles' + "global_roles" end end end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index ffa56f3e5ec9..1a599d96d232 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -27,7 +27,7 @@ #++ class UsersController < ApplicationController - layout 'admin' + layout "admin" before_action :authorize_global, except: %i[show deletion_info destroy] @@ -76,7 +76,7 @@ def show if can_show_user? @events = events - render layout: (can_manage_or_create_users? ? 'admin' : 'no_menu') + render layout: (can_manage_or_create_users? ? "admin" : "no_menu") else render_404 end @@ -102,7 +102,7 @@ def create flash[:notice] = I18n.t(:notice_successful_create) redirect_to(params[:continue] ? new_user_path : helpers.allowed_management_user_profile_path(@user)) else - render action: 'new' + render action: "new" end end @@ -160,14 +160,14 @@ def change_status_info def change_status if @user.id == current_user.id # user is not allowed to change own status - redirect_back_or_default(action: 'edit', id: @user) + redirect_back_or_default(action: "edit", id: @user) return end if (params[:unlock] || params[:activate]) && user_limit_reached? show_user_limit_error! - return redirect_back_or_default(action: 'edit', id: @user) + return redirect_back_or_default(action: "edit", id: @user) end if params[:unlock] @@ -182,7 +182,7 @@ def change_status was_activated = (@user.status_change == %w[registered active]) if params[:activate] && @user.missing_authentication_method? - flash[:error] = I18n.t('user.error_status_change_failed', + flash[:error] = I18n.t("user.error_status_change_failed", errors: I18n.t(:notice_user_missing_authentication_method)) elsif @user.save flash[:notice] = I18n.t(:notice_successful_update) @@ -190,10 +190,10 @@ def change_status UserMailer.account_activated(@user).deliver_later end else - flash[:error] = I18n.t('user.error_status_change_failed', - errors: @user.errors.full_messages.join(', ')) + flash[:error] = I18n.t("user.error_status_change_failed", + errors: @user.errors.full_messages.join(", ")) end - redirect_back_or_default(action: 'edit', id: @user) + redirect_back_or_default(action: "edit", id: @user) end def resend_invitation @@ -218,7 +218,7 @@ def destroy Users::DeleteService.new(model: @user, user: User.current).call - flash[:notice] = I18n.t('account.deletion_pending') + flash[:notice] = I18n.t("account.deletion_pending") respond_to do |format| format.html do @@ -228,7 +228,7 @@ def destroy end def deletion_info - render action: 'deletion_info', layout: my_or_admin_layout + render action: "deletion_info", layout: my_or_admin_layout end private @@ -267,9 +267,9 @@ def authorize_for_user respond_to do |format| format.html { render_403 } - format.xml { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="OpenProject API"' } - format.js { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="OpenProject API"' } - format.json { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="OpenProject API"' } + format.xml { head :unauthorized, "WWW-Authenticate" => 'Basic realm="OpenProject API"' } + format.js { head :unauthorized, "WWW-Authenticate" => 'Basic realm="OpenProject API"' } + format.json { head :unauthorized, "WWW-Authenticate" => 'Basic realm="OpenProject API"' } end false @@ -288,9 +288,9 @@ def my_or_admin_layout # TODO: how can this be done better: # check if the route used to call the action is in the 'my' namespace if url_for(:delete_my_account_info) == request.url - 'my' + "my" else - 'admin' + "admin" end end @@ -301,10 +301,10 @@ def set_password?(params) protected def default_breadcrumb - if action_name == 'index' - t('label_user_plural') + if action_name == "index" + t("label_user_plural") else - ActionController::Base.helpers.link_to(t('label_user_plural'), users_path) + ActionController::Base.helpers.link_to(t("label_user_plural"), users_path) end end diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index 8576812a74a0..9d4d4fd40ae1 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -37,7 +37,7 @@ class VersionsController < ApplicationController before_action :authorize def index - @types = @project.types.order(Arel.sql('position')) + @types = @project.types.order(Arel.sql("position")) retrieve_selected_type_ids(@types, @types.select(&:is_in_roadmap?)) @with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_work_packages? : (params[:with_subprojects].to_i == 1) project_ids = @with_subprojects ? @project.self_and_descendants.includes(:wiki).map(&:id) : [@project.id] @@ -76,7 +76,7 @@ def create .new(user: current_user) .call(attributes) - render_cu(call, :notice_successful_create, 'new') + render_cu(call, :notice_successful_create, "new") end def update @@ -88,7 +88,7 @@ def update model: @version) .call(attributes) - render_cu(call, :notice_successful_update, 'edit') + render_cu(call, :notice_successful_update, "edit") end def close_completed @@ -146,7 +146,7 @@ def retrieve_selected_type_ids(selectable_types, default_types = nil) def selected_type_ids(selectable_types, default_types = nil) if (ids = params[:type_ids]) - ids.is_a?(Array) ? ids.map(&:to_s) : ids.split('/') + ids.is_a?(Array) ? ids.map(&:to_s) : ids.split("/") else (default_types || selectable_types).map { |t| t.id.to_s } end diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 0babd91d5d37..d0b646e7df9b 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'htmldiff' +require "htmldiff" # The WikiController follows the Rails REST controller pattern but with # a few differences @@ -76,10 +76,10 @@ class WikiController < ApplicationController # List of pages, sorted alphabetically and by parent (hierarchy) def index - slug = wiki_page_title.nil? ? 'wiki' : WikiPage.slug(wiki_page_title) + slug = wiki_page_title.nil? ? "wiki" : WikiPage.slug(wiki_page_title) @related_page = WikiPage.find_by(wiki_id: @wiki.id, slug:) - @pages = @wiki.pages.order(Arel.sql('title')).includes(wiki: :project) + @pages = @wiki.pages.order(Arel.sql("title")).includes(wiki: :project) @pages_by_parent_id = @pages.group_by(&:parent_id) end @@ -92,8 +92,8 @@ def show @page = ::WikiPages::AtVersion.new(@page, version) - if params[:format] == 'markdown' && User.current.allowed_in_project?(:export_wiki_pages, @project) - send_data(@page.text, type: 'text/plain', filename: "#{@page.title}.md") + if params[:format] == "markdown" && User.current.allowed_in_project?(:export_wiki_pages, @project) + send_data(@page.text, type: "text/plain", filename: "#{@page.title}.md") return end @@ -111,7 +111,7 @@ def new_child build_wiki_page @page.parent = old_page - render action: 'new' + render action: "new" end def menu @@ -144,7 +144,7 @@ def create flash[:notice] = I18n.t(:notice_successful_create) redirect_to_show else - render action: 'new' + render action: "new" end end @@ -170,12 +170,12 @@ def update flash[:notice] = I18n.t(:notice_successful_update) redirect_to_show else - render action: 'edit' + render action: "edit" end rescue ActiveRecord::StaleObjectError # Optimistic locking exception flash.now[:error] = I18n.t(:notice_locking_conflict) - render action: 'edit' + render action: "edit" end # rename a page @@ -237,7 +237,7 @@ def update_parent_page redirect_to_show else @parent_pages = @wiki.pages.includes(:parent) - @page.self_and_descendants - render 'edit_parent_page' + render "edit_parent_page" end end @@ -252,7 +252,7 @@ def history @versions = @page .journals .select(:id, :user_id, :notes, :created_at, :version) - .order(Arel.sql('version DESC')) + .order(Arel.sql("version DESC")) .page(page_param) .per_page(per_page_param) @@ -286,12 +286,12 @@ def destroy @descendants_count = @page.descendants.size if @descendants_count > 0 case params[:todo] - when 'nullify' + when "nullify" # Nothing to do - when 'destroy' + when "destroy" # Removes all its descendants @page.descendants.each(&:destroy) - when 'reassign' + when "reassign" # Reassign children to another parent page reassign_to = @wiki.pages.find_by(id: params[:reassign_to_id].presence) return unless reassign_to @@ -308,7 +308,7 @@ def destroy if page = @wiki.find_page(@wiki.start_page) || @wiki.pages.first flash[:notice] = I18n.t(:notice_successful_delete) - redirect_to action: 'index', project_id: @project, id: page + redirect_to action: "index", project_id: @project, id: page else flash[:notice] = I18n.t(:notice_successful_delete) redirect_to project_path(@project) @@ -318,11 +318,11 @@ def destroy # Export wiki to a single html file def export if User.current.allowed_in_project?(:export_wiki_pages, @project) - @pages = @wiki.pages.order(Arel.sql('title')) - export = render_to_string action: 'export_multiple', layout: false - send_data(export, type: 'text/html', filename: 'wiki.html') + @pages = @wiki.pages.order(Arel.sql("title")) + export = render_to_string action: "export_multiple", layout: false + send_data(export, type: "text/html", filename: "wiki.html") else - redirect_to action: 'show', project_id: @project, id: nil + redirect_to action: "show", project_id: @project, id: nil end end @@ -360,7 +360,7 @@ def page_for_menu_item(page) end def wiki_page_title - params[:title] || (action_name == 'new_child' ? '' : params[:id].to_s.capitalize.tr('-', ' ')) + params[:title] || (action_name == "new_child" ? "" : params[:id].to_s.capitalize.tr("-", " ")) end def find_wiki @@ -384,8 +384,8 @@ def handle_new_wiki_page if User.current.allowed_in_project?(:edit_wiki_pages, @project) && editable? edit render action: :new - elsif params[:id] == 'wiki' - flash[:info] = I18n.t('wiki.page_not_editable_index') + elsif params[:id] == "wiki" + flash[:info] = I18n.t("wiki.page_not_editable_index") redirect_to action: :index else render_404 diff --git a/app/controllers/wiki_menu_items_controller.rb b/app/controllers/wiki_menu_items_controller.rb index b3dcb8d87351..6ac9c2358cc6 100644 --- a/app/controllers/wiki_menu_items_controller.rb +++ b/app/controllers/wiki_menu_items_controller.rb @@ -68,7 +68,7 @@ def update get_data_from_params(params) - if wiki_menu_setting == 'no_item' + if wiki_menu_setting == "no_item" unless @wiki_menu_item.nil? if @wiki_menu_item.is_only_main_item? if @page.only_wiki_page? @@ -86,9 +86,9 @@ def update @wiki_menu_item.name = @page.slug @wiki_menu_item.title = wiki_menu_item_params[:title] || @page_title - if wiki_menu_setting == 'sub_item' + if wiki_menu_setting == "sub_item" @wiki_menu_item.parent_id = parent_wiki_menu_item - elsif wiki_menu_setting == 'main_item' + elsif wiki_menu_setting == "main_item" @wiki_menu_item.parent_id = nil assign_wiki_menu_item_params @wiki_menu_item end @@ -101,11 +101,11 @@ def update flash[:notice] = t(:notice_successful_update) end - redirect_back_or_default(action: 'edit', id: @page) + redirect_back_or_default(action: "edit", id: @page) else respond_to do |format| format.html do - render action: 'edit', id: @page + render action: "edit", id: @page end end end @@ -163,15 +163,15 @@ def get_data_from_params(params) end def assign_wiki_menu_item_params(menu_item) - if wiki_menu_item_params[:new_wiki_page] == '1' + if wiki_menu_item_params[:new_wiki_page] == "1" menu_item.new_wiki_page = true - elsif wiki_menu_item_params[:new_wiki_page] == '0' + elsif wiki_menu_item_params[:new_wiki_page] == "0" menu_item.new_wiki_page = false end - if wiki_menu_item_params[:index_page] == '1' + if wiki_menu_item_params[:index_page] == "1" menu_item.index_page = true - elsif wiki_menu_item_params[:index_page] == '0' + elsif wiki_menu_item_params[:index_page] == "0" menu_item.index_page = false end end diff --git a/app/controllers/work_packages/auto_completes_controller.rb b/app/controllers/work_packages/auto_completes_controller.rb index 955140e59050..58152a1e5ff0 100644 --- a/app/controllers/work_packages/auto_completes_controller.rb +++ b/app/controllers/work_packages/auto_completes_controller.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'rack/utils' +require "rack/utils" class WorkPackages::AutoCompletesController < ApplicationController def index @@ -41,7 +41,7 @@ def index def work_packages_matching_query_prop Query.new.tap do |query| - query.add_filter(:typeahead, '**', params[:q]) + query.add_filter(:typeahead, "**", params[:q]) query.sort_criteria = [%i[updated_at desc]] query.include_subprojects = true end @@ -52,7 +52,7 @@ def work_packages_matching_query_prop def wp_hashes_with_string(work_packages) work_packages.map do |work_package| - work_package.attributes.merge('to_s' => work_package.to_s) + work_package.attributes.merge("to_s" => work_package.to_s) end end end diff --git a/app/controllers/work_packages/bulk_error_message.rb b/app/controllers/work_packages/bulk_error_message.rb index 05df1e659b17..a0e5a9acf2ad 100644 --- a/app/controllers/work_packages/bulk_error_message.rb +++ b/app/controllers/work_packages/bulk_error_message.rb @@ -33,7 +33,7 @@ module WorkPackages::BulkErrorMessage private def bulk_error_message(selected_work_packages, service_result) - ApplicationController.renderer.render partial: 'work_packages/bulk/errors', + ApplicationController.renderer.render partial: "work_packages/bulk/errors", locals: { service_result:, selected_work_packages: } end diff --git a/app/controllers/work_packages/moves_controller.rb b/app/controllers/work_packages/moves_controller.rb index 3d0cc952d960..42c65161fafa 100644 --- a/app/controllers/work_packages/moves_controller.rb +++ b/app/controllers/work_packages/moves_controller.rb @@ -104,7 +104,7 @@ def default_breadcrumb def check_project_uniqueness unless @project # TODO: let users bulk move/copy work packages from different projects - render_error message: :'work_packages.move.unsupported_for_multiple_projects', status: 400 + render_error message: :"work_packages.move.unsupported_for_multiple_projects", status: 400 false end end @@ -118,7 +118,7 @@ def prepare_for_work_package_move @target_type = @types.find { |t| t.id.to_s == params[:new_type_id].to_s } @available_versions = @target_project.assignable_versions @available_statuses = Workflow.available_statuses(@project) - @notes = params[:notes] || '' + @notes = params[:notes] || "" end def attributes_for_create @@ -126,7 +126,7 @@ def attributes_for_create .move_work_package .compact_blank # 'none' is used in the frontend as a value to unset the property, e.g. the assignee. - .transform_values { |v| v == 'none' ? nil : v } + .transform_values { |v| v == "none" ? nil : v } .to_h end end diff --git a/app/controllers/work_packages/reports_controller.rb b/app/controllers/work_packages/reports_controller.rb index 76be8b1393ac..e1cb28000300 100644 --- a/app/controllers/work_packages/reports_controller.rb +++ b/app/controllers/work_packages/reports_controller.rb @@ -34,16 +34,16 @@ def report reports_service = Reports::ReportsService.new(@project) @reports = [ - reports_service.report_for('type'), - reports_service.report_for('priority'), - reports_service.report_for('assigned_to'), - reports_service.report_for('responsible'), - reports_service.report_for('author'), - reports_service.report_for('version'), - reports_service.report_for('category') + reports_service.report_for("type"), + reports_service.report_for("priority"), + reports_service.report_for("assigned_to"), + reports_service.report_for("responsible"), + reports_service.report_for("author"), + reports_service.report_for("version"), + reports_service.report_for("category") ] - @reports << reports_service.report_for('subproject') if @project.children.any? + @reports << reports_service.report_for("subproject") if @project.children.any? end def report_details diff --git a/app/controllers/work_packages/shares/bulk_controller.rb b/app/controllers/work_packages/shares/bulk_controller.rb index ea553b7657f9..79db00e72854 100644 --- a/app/controllers/work_packages/shares/bulk_controller.rb +++ b/app/controllers/work_packages/shares/bulk_controller.rb @@ -70,7 +70,7 @@ def respond_with_update_permission_buttons @selected_shares.each do |share| replace_via_turbo_stream( component: WorkPackages::Share::PermissionButtonComponent.new(share:, - data: { 'test-selector': 'op-share-wp-update-role' }) + data: { "test-selector": "op-share-wp-update-role" }) ) end diff --git a/app/controllers/work_packages/shares_controller.rb b/app/controllers/work_packages/shares_controller.rb index 8facf685413f..c539a7185685 100644 --- a/app/controllers/work_packages/shares_controller.rb +++ b/app/controllers/work_packages/shares_controller.rb @@ -168,7 +168,7 @@ def respond_with_new_invite_form def respond_with_update_permission_button replace_via_turbo_stream( component: WorkPackages::Share::PermissionButtonComponent.new(share: @share, - data: { 'test-selector': 'op-share-wp-update-role' }) + data: { "test-selector": "op-share-wp-update-role" }) ) respond_with_turbo_streams @@ -223,9 +223,9 @@ def load_query .call(params) # Set default filter on the entity - @query.where('entity_id', '=', @work_package.id) - @query.where('entity_type', '=', WorkPackage.name) - @query.where('project_id', '=', @project.id) + @query.where("entity_id", "=", @work_package.id) + @query.where("entity_type", "=", WorkPackage.name) + @query.where("project_id", "=", @project.id) @query.order(name: :asc) unless params[:sortBy] diff --git a/app/controllers/work_packages_controller.rb b/app/controllers/work_packages_controller.rb index 2b0f2fbfce19..8bbc4624afb4 100644 --- a/app/controllers/work_packages_controller.rb +++ b/app/controllers/work_packages_controller.rb @@ -47,7 +47,7 @@ def index format.html do render :index, locals: { query: @query, project: @project, menu_name: project_or_global_menu }, - layout: 'angular/angular' + layout: "angular/angular" end format.any(*supported_list_formats) do @@ -65,7 +65,7 @@ def show format.html do render :show, locals: { work_package:, menu_name: project_or_global_menu }, - layout: 'angular/angular' + layout: "angular/angular" end format.any(*supported_single_formats) do @@ -90,7 +90,7 @@ def export_list(mime_type) .call(query: @query, mime_type:, params:) .result - if request.headers['Accept']&.include?('application/json') + if request.headers["Accept"]&.include?("application/json") render json: { job_id: } else redirect_to job_status_path(job_id) @@ -110,9 +110,9 @@ def export_single(mime_type) end def atom_journals - render template: 'journals/index', + render template: "journals/index", layout: false, - content_type: 'application/atom+xml', + content_type: "application/atom+xml", locals: { title: "#{Setting.app_title} - #{work_package}", journals: } end @@ -125,7 +125,7 @@ def authorize_on_work_package def per_page_param case params[:format] - when 'atom' + when "atom" Setting.feeds_limit.to_i else super @@ -144,9 +144,9 @@ def journals @journals ||= begin order = if current_user.wants_comments_in_reverse_order? - Journal.arel_table['created_at'].desc + Journal.arel_table["created_at"].desc else - Journal.arel_table['created_at'].asc + Journal.arel_table["created_at"].asc end work_package diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb index 00a7ac3b7b0f..26f94fb71b36 100644 --- a/app/controllers/workflows_controller.rb +++ b/app/controllers/workflows_controller.rb @@ -27,7 +27,7 @@ #++ class WorkflowsController < ApplicationController - layout 'admin' + layout "admin" before_action :require_admin @@ -45,7 +45,7 @@ def show end def edit - @used_statuses_only = params[:used_statuses_only] != '0' + @used_statuses_only = params[:used_statuses_only] != "0" statuses_for_form @@ -57,21 +57,21 @@ def edit def update call = Workflows::BulkUpdateService .new(role: @role, type: @type) - .call(params['status']) + .call(params["status"]) if call.success? flash[:notice] = I18n.t(:notice_successful_update) - redirect_to action: 'edit', role_id: @role, type_id: @type + redirect_to action: "edit", role_id: @role, type_id: @type end end def copy - @source_type = if params[:source_type_id].blank? || params[:source_type_id] == 'any' + @source_type = if params[:source_type_id].blank? || params[:source_type_id] == "any" nil else ::Type.find(params[:source_type_id]) end - @source_role = if params[:source_role_id].blank? || params[:source_role_id] == 'any' + @source_role = if params[:source_role_id].blank? || params[:source_role_id] == "any" nil else eligible_roles.find(params[:source_role_id]) @@ -88,16 +88,16 @@ def copy else Workflow.copy(@source_type, @source_role, @target_types, @target_roles) flash[:notice] = I18n.t(:notice_successful_update) - redirect_to action: 'copy', source_type_id: @source_type, source_role_id: @source_role + redirect_to action: "copy", source_type_id: @source_type, source_role_id: @source_role end end end def default_breadcrumb - if action_name == 'edit' - t('label_workflow') + if action_name == "edit" + t("label_workflow") else - ActionController::Base.helpers.link_to(t('label_workflow'), url_for(controller: '/workflows', action: 'edit')) + ActionController::Base.helpers.link_to(t("label_workflow"), url_for(controller: "/workflows", action: "edit")) end end @@ -118,9 +118,9 @@ def statuses_for_form def workflows_for_form workflows = Workflow.where(role_id: @role.id, type_id: @type.id) @workflows = {} - @workflows['always'] = workflows.select { |w| !w.author && !w.assignee } - @workflows['author'] = workflows.select(&:author) - @workflows['assignee'] = workflows.select(&:assignee) + @workflows["always"] = workflows.select { |w| !w.author && !w.assignee } + @workflows["author"] = workflows.select(&:author) + @workflows["assignee"] = workflows.select(&:assignee) end def find_roles diff --git a/app/forms/queries/projects/create.rb b/app/forms/queries/projects/create.rb index c53f999538f1..f6cc39ce1a29 100644 --- a/app/forms/queries/projects/create.rb +++ b/app/forms/queries/projects/create.rb @@ -35,9 +35,9 @@ class Queries::Projects::Create < ApplicationForm visually_hide_label: true, required: true, autofocus: true, - name: 'name', + name: "name", label: Queries::Projects::ProjectQuery.human_attribute_name(:name), - placeholder: I18n.t(:'projects.lists.new.placeholder') + placeholder: I18n.t(:"projects.lists.new.placeholder") ) group.submit( @@ -51,7 +51,7 @@ class Queries::Projects::Create < ApplicationForm scheme: :secondary, label: I18n.t(:button_cancel), tag: :a, - data: { 'params-from-query-target': 'anchor' }, + data: { "params-from-query-target": "anchor" }, href: OpenProject::StaticRouting::StaticUrlHelpers.new.projects_path ) end diff --git a/app/helpers/accessibility_helper.rb b/app/helpers/accessibility_helper.rb index 3568ac8ddc83..155fd8269faa 100644 --- a/app/helpers/accessibility_helper.rb +++ b/app/helpers/accessibility_helper.rb @@ -33,12 +33,12 @@ def you_are_here_info(condition = true, disabled = nil) elsif condition && disabled "".html_safe else - '' + "" end end def empty_element_tag - @empty_element_tag ||= ApplicationController.new.render_to_string(partial: 'accessibility/empty_element_tag').html_safe + @empty_element_tag ||= ApplicationController.new.render_to_string(partial: "accessibility/empty_element_tag").html_safe end # Returns the locale :en for the given menu item if the user locale is diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb index 4c62e7e928b3..d7578d9c5bb5 100644 --- a/app/helpers/admin_helper.rb +++ b/app/helpers/admin_helper.rb @@ -28,13 +28,13 @@ module AdminHelper def project_status_options_for_select(selected) - options_for_select([[I18n.t(:label_all), ''], + options_for_select([[I18n.t(:label_all), ""], [I18n.t(:status_active), 1]], selected) end def linked_sha_reference(sha, url) if sha && url - link_to sha, url, target: '_blank', rel: 'noopener' + link_to sha, url, target: "_blank", rel: "noopener" else sha end diff --git a/app/helpers/angular_helper.rb b/app/helpers/angular_helper.rb index be0fb75e6146..a287f2b40aa1 100644 --- a/app/helpers/angular_helper.rb +++ b/app/helpers/angular_helper.rb @@ -38,10 +38,10 @@ def angular_component_tag(component, options = {}) .transform_values(&:to_json) options[:data] = options.fetch(:data, {}).merge(inputs) - options[:class] ||= [options[:class], 'op-angular-component'] + options[:class] ||= [options[:class], "op-angular-component"] .compact - .join(' ') + .join(" ") - content_tag(component, '', options) + content_tag(component, "", options) end end diff --git a/app/helpers/announcements_helper.rb b/app/helpers/announcements_helper.rb index ef727a2ddba7..891b354e69b5 100644 --- a/app/helpers/announcements_helper.rb +++ b/app/helpers/announcements_helper.rb @@ -1,9 +1,9 @@ module AnnouncementsHelper def notice_annoucement_active if @announcement.active_and_current? - I18n.t(:'announcements.is_active') + I18n.t(:"announcements.is_active") else - I18n.t(:'announcements.is_inactive') + I18n.t(:"announcements.is_inactive") end end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 86113995dcac..5a1610f8a357 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -26,8 +26,8 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'forwardable' -require 'cgi' +require "forwardable" +require "cgi" module ApplicationHelper include OpenProject::TextFormatting @@ -72,8 +72,8 @@ def link_to_if_authorized(*args, &) end end - def required_field_name(name = '') - safe_join [name, ' ', content_tag('span', '*', class: 'required')] + def required_field_name(name = "") + safe_join [name, " ", content_tag("span", "*", class: "required")] end def li_unless_nil(link, options = {}) @@ -82,12 +82,12 @@ def li_unless_nil(link, options = {}) # Show a sorted linkified (if active) comma-joined list of users def list_users(users, options = {}) - users.sort.map { |u| link_to_user(u, options) }.join(', ') + users.sort.map { |u| link_to_user(u, options) }.join(", ") end # returns a class name based on the user's status def user_status_class(user) - 'status_' + user.status + "status_" + user.status end def user_status_i18n(user) @@ -98,7 +98,7 @@ def delete_link(url, options = {}) options = { method: :delete, data: { confirm: I18n.t(:text_are_you_sure) }, - class: 'icon icon-delete' + class: "icon icon-delete" }.merge(options) link_to I18n.t(:button_delete), url, options @@ -123,7 +123,7 @@ def project_tree(projects, &) end def project_nested_ul(projects, &) - s = '' + s = "" if projects.any? ancestors = [] Project.project_tree(projects) do |project, _level| @@ -131,13 +131,13 @@ def project_nested_ul(projects, &) s << "\n" end end - s << '
  • ' + s << "
  • " s << yield(project).to_s ancestors << project end @@ -154,7 +154,7 @@ def principals_check_box_tags(name, principals) def labeled_check_box_tags(name, collection, options = {}) collection.sort.map do |object| - id = name.gsub(/[\[\]]+/, '_') + object.id.to_s + id = name.gsub(/[\[\]]+/, "_") + object.id.to_s object_options = options.inject({}) do |h, (k, v)| h[k] = v.is_a?(Symbol) ? send(v, object) : v @@ -163,7 +163,7 @@ def labeled_check_box_tags(name, collection, options = {}) object_options[:class] = Array(object_options[:class]) + %w(form--label-with-check-box) - content_tag :div, class: 'form--field' do + content_tag :div, class: "form--field" do label_tag(id, object, object_options) do styled_check_box_tag(name, object.id, false, id:) + object.to_s end @@ -185,7 +185,7 @@ def authoring(created, author, options = {}) def authoring_at(created, author) return if author.nil? - I18n.t(:'js.label_added_time_by', + I18n.t(:"js.label_added_time_by", author: html_escape(author.name), age: created, authorLink: user_path(author)).html_safe @@ -193,16 +193,16 @@ def authoring_at(created, author) def time_tag(time) text = distance_of_time_in_words(Time.now, time) - if @project and @project.module_enabled?('activity') - link_to(text, { controller: '/activities', - action: 'index', + if @project and @project.module_enabled?("activity") + link_to(text, { controller: "/activities", + action: "index", project_id: @project, from: time.to_date }, title: format_time(time)) else datetime = time.acts_like?(:time) ? time.xmlschema : time.iso8601 content_tag(:time, text, datetime:, - title: format_time(time), class: 'timestamp') + title: format_time(time), class: "timestamp") end end @@ -220,7 +220,7 @@ def to_path_param(path) def other_formats_links(&) formats = capture(Redmine::Views::OtherFormatsBuilder.new(self), &) unless formats.nil? || formats.strip.empty? - content_tag 'p', class: 'other-formats' do + content_tag "p", class: "other-formats" do (I18n.t(:label_export_to) + formats).html_safe end end @@ -229,11 +229,11 @@ def other_formats_links(&) # Returns the theme, controller name, and action as css classes for the # HTML body. def body_css_classes - css = ['theme-' + OpenProject::CustomStyles::Design.identifier.to_s] + css = ["theme-" + OpenProject::CustomStyles::Design.identifier.to_s] if params[:controller] && params[:action] - css << ('controller-' + params[:controller]) - css << ('action-' + params[:action]) + css << ("controller-" + params[:controller]) + css << ("action-" + params[:action]) end css << "ee-banners-#{EnterpriseToken.show_banners? ? 'visible' : 'hidden'}" @@ -243,7 +243,7 @@ def body_css_classes # Add browser specific classes to aid css fixes css += browser_specific_classes - css.join(' ') + css.join(" ") end def accesskey(s) @@ -254,14 +254,14 @@ def accesskey(s) def simple_format_without_paragraph(text) text.to_s .gsub(/\r\n?/, "\n") # \r\n and \r -> \n - .gsub(/\n\n+/, '

    ') # 2+ newline -> 2 br + .gsub(/\n\n+/, "

    ") # 2+ newline -> 2 br .gsub(/([^\n]\n)(?=[^\n])/, '\1
    ') # 1 newline -> br .html_safe end def lang_options_for_select(blank = true) auto = if blank && (valid_languages - all_languages) == (all_languages - valid_languages) - [['(auto)', '']] + [["(auto)", ""]] else [] end @@ -279,8 +279,8 @@ def all_lang_options_for_select def theme_options_for_select [ - [t('themes.light'), 'light'], - [t('themes.light_high_contrast'), 'light_high_contrast'] + [t("themes.light"), "light"], + [t("themes.light_high_contrast"), "light_high_contrast"] ] end @@ -292,7 +292,7 @@ def user_theme_data_attributes def highlight_default_language(lang_options) lang_options.map do |(language_name, code)| if code == Setting.default_language - [I18n.t('settings.language_name_being_default', language_name:), code, { disabled: true, checked: true }] + [I18n.t("settings.language_name_being_default", language_name:), code, { disabled: true, checked: true }] else [language_name, code] end @@ -301,14 +301,14 @@ def highlight_default_language(lang_options) def labelled_tabular_form_for(record, options = {}, &) options.reverse_merge!(builder: TabularFormBuilder, html: {}) - options[:html][:class] = 'form' unless options[:html].has_key?(:class) + options[:html][:class] = "form" unless options[:html].has_key?(:class) form_for(record, options, &) end def back_url_hidden_field_tag(use_referer: true) - back_url = params[:back_url] || (use_referer ? request.env['HTTP_REFERER'] : nil) + back_url = params[:back_url] || (use_referer ? request.env["HTTP_REFERER"] : nil) back_url = CGI.unescape(back_url.to_s) - hidden_field_tag('back_url', CGI.escape(back_url), id: nil) if back_url.present? + hidden_field_tag("back_url", CGI.escape(back_url), id: nil) if back_url.present? end def back_url_to_current_page_hidden_field_tag @@ -319,12 +319,12 @@ def back_url_to_current_page_hidden_field_tag back_url = request.url end - hidden_field_tag('back_url', back_url) if back_url.present? + hidden_field_tag("back_url", back_url) if back_url.present? end def check_all_links(form_name) link_to_function(t(:button_check_all), "OpenProject.helpers.checkAll('#{form_name}', true)") + - ' | ' + + " | " + link_to_function(t(:button_uncheck_all), "OpenProject.helpers.checkAll('#{form_name}', false)") end @@ -347,23 +347,23 @@ def progress_bar(pcts, options = {}) pcts = Array(pcts).map(&:round) closed = pcts[0] done = pcts[1] || 0 - width = options[:width] || '100px;' - legend = options[:legend] || '' - total_progress = options[:hide_total_progress] ? '' : t(:total_progress) - percent_sign = options[:hide_percent_sign] ? '' : '%' + width = options[:width] || "100px;" + legend = options[:legend] || "" + total_progress = options[:hide_total_progress] ? "" : t(:total_progress) + percent_sign = options[:hide_percent_sign] ? "" : "%" content_tag :span do - progress = content_tag :span, class: 'progress-bar', style: "width: #{width}" do - concat content_tag(:span, '', class: 'inner-progress closed', style: "width: #{closed}%") - concat content_tag(:span, '', class: 'inner-progress done', style: "width: #{done}%") + progress = content_tag :span, class: "progress-bar", style: "width: #{width}" do + concat content_tag(:span, "", class: "inner-progress closed", style: "width: #{closed}%") + concat content_tag(:span, "", class: "inner-progress done", style: "width: #{done}%") end - progress + content_tag(:span, "#{legend}#{percent_sign} #{total_progress}", class: 'progress-bar-legend') + progress + content_tag(:span, "#{legend}#{percent_sign} #{total_progress}", class: "progress-bar-legend") end end def checked_image(checked = true) if checked - icon_wrapper('icon-context icon-checkmark', t(:label_checked)) + icon_wrapper("icon-context icon-checkmark", t(:label_checked)) end end @@ -375,41 +375,41 @@ def calendar_for(*_args) def locale_first_day_of_week case Setting.start_of_week.to_i when 1 - '1' # Monday + "1" # Monday when 7 - '0' # Sunday + "0" # Sunday when 6 - '6' # Saturday + "6" # Saturday else # use language default (pass a blank string) and moment.js will reuse existing info # /frontend/src/main.ts - '' + "" end end def locale_first_week_of_year case Setting.first_week_of_year.to_i when 1 - '1' # Monday + "1" # Monday when 4 - '4' # Thursday + "4" # Thursday else # use language default (pass a blank string) and moment.js will reuse existing info # /frontend/src/main.ts - '' + "" end end # To avoid the menu flickering, disable it # by default unless we're in test mode def initial_menu_styles(side_displayed) - Rails.env.test? || !side_displayed ? '' : 'display:none' + Rails.env.test? || !side_displayed ? "" : "display:none" end def initial_menu_classes(side_displayed, show_decoration) - classes = 'can-hide-navigation' - classes << ' nosidebar' unless side_displayed - classes << ' nomenus' unless show_decoration + classes = "can-hide-navigation" + classes << " nosidebar" unless side_displayed + classes << " nomenus" unless show_decoration classes end @@ -418,7 +418,7 @@ def initial_menu_classes(side_displayed, show_decoration) # # @param [optional, String] content the content of the ROBOTS tag. # defaults to no index, follow, and no archive - def robot_exclusion_tag(content = 'NOINDEX,FOLLOW,NOARCHIVE') + def robot_exclusion_tag(content = "NOINDEX,FOLLOW,NOARCHIVE") "".html_safe end @@ -437,7 +437,7 @@ def translate_language(lang_code) ::I18n.locale != Redmine::I18n::IN_CONTEXT_TRANSLATION_CODE [Redmine::I18n::IN_CONTEXT_TRANSLATION_NAME, lang_code.to_s] else - [I18n.t('cldr.language_name', locale: lang_code), lang_code.to_s] + [I18n.t("cldr.language_name", locale: lang_code), lang_code.to_s] end end @@ -450,8 +450,8 @@ def password_complexity_requirements # use 0..0, so this doesn't fail if rules is an empty string rules[0] = rules[0..0].upcase - s = raw '' + OpenProject::Passwords::Evaluator.min_length_description + '' - s += raw '
    ' + rules + '' unless rules.empty? + s = raw "" + OpenProject::Passwords::Evaluator.min_length_description + "" + s += raw "
    " + rules + "" unless rules.empty? s end end diff --git a/app/helpers/appsignal_helper.rb b/app/helpers/appsignal_helper.rb index 9203f4878fc9..592f1d7c0e17 100644 --- a/app/helpers/appsignal_helper.rb +++ b/app/helpers/appsignal_helper.rb @@ -1,9 +1,9 @@ module AppsignalHelper def appsignal_frontend_tag - return '' unless OpenProject::Configuration.appsignal_frontend_key + return "" unless OpenProject::Configuration.appsignal_frontend_key tag :meta, - name: 'openproject_appsignal', + name: "openproject_appsignal", data: { push_key: OpenProject::Configuration.appsignal_frontend_key, version: OpenProject::VERSION.to_s diff --git a/app/helpers/archived_projects_helper.rb b/app/helpers/archived_projects_helper.rb index 7246f0f8a2bb..20535782cba4 100644 --- a/app/helpers/archived_projects_helper.rb +++ b/app/helpers/archived_projects_helper.rb @@ -31,19 +31,19 @@ def archived_projects_urls_for(projects) urls = projects.map do |project| link_to project.name, projects_path(filters: archived_project_filters_for(project)), - target: '_blank', - rel: 'noopener' + target: "_blank", + rel: "noopener" end - safe_join(urls, ', ') + safe_join(urls, ", ") end private def archived_project_filters_for(project) [ - { active: { operator: '=', values: ['f'] } }, - { name_and_identifier: { operator: '=', values: [html_escape(project.name)] } } + { active: { operator: "=", values: ["f"] } }, + { name_and_identifier: { operator: "=", values: [html_escape(project.name)] } } ].to_json end end diff --git a/app/helpers/attachments_helper.rb b/app/helpers/attachments_helper.rb index 9d71015f3b6b..368ad7e253a3 100644 --- a/app/helpers/attachments_helper.rb +++ b/app/helpers/attachments_helper.rb @@ -29,10 +29,10 @@ module AttachmentsHelper def to_utf8_for_attachments(str) forced_str = str.dup - forced_str.force_encoding('UTF-8') + forced_str.force_encoding("UTF-8") return forced_str if forced_str.valid_encoding? - str.encode('UTF-8', invalid: :replace, undef: :replace, replace: '') # better replace: '?' + str.encode("UTF-8", invalid: :replace, undef: :replace, replace: "") # better replace: '?' end ## @@ -42,11 +42,11 @@ def to_utf8_for_attachments(str) # Within ckeditor-augmented-textarea-form, this attachment list is added automatically # when a resource is added. def list_attachments(resource, options = {}) - content_tag 'op-attachments', - '', - 'data-resource': resource.to_json, - 'data-allow-uploading': false, - 'data-destroy-immediately': true, + content_tag "op-attachments", + "", + "data-resource": resource.to_json, + "data-allow-uploading": false, + "data-destroy-immediately": true, **options end end diff --git a/app/helpers/augmenting_helper.rb b/app/helpers/augmenting_helper.rb index a86884220676..dd3f5ccf4b03 100644 --- a/app/helpers/augmenting_helper.rb +++ b/app/helpers/augmenting_helper.rb @@ -37,7 +37,7 @@ module AugmentingHelper # @param block [Block] A block that renders the section's body. def augmented_collapsible_section(title:, initiallyExpanded: true, &block) render( - partial: '/augmented/collapsible_section', + partial: "/augmented/collapsible_section", locals: { title:, initiallyExpanded: !!initiallyExpanded, block: } ) end diff --git a/app/helpers/browser_helper.rb b/app/helpers/browser_helper.rb index c3b3190eb06e..73e076d21111 100644 --- a/app/helpers/browser_helper.rb +++ b/app/helpers/browser_helper.rb @@ -32,14 +32,14 @@ def unsupported_browser? # or mobile detection def browser_specific_classes [].tap do |classes| - classes << '-browser-chrome' if browser.chrome? - classes << '-browser-firefox' if browser.firefox? - classes << '-browser-safari' if browser.safari? - classes << '-browser-edge' if browser.edge? - - classes << '-browser-mobile' if browser.device.mobile? - classes << '-browser-windows' if browser.platform.windows? - classes << '-unsupported-browser' if unsupported_browser? + classes << "-browser-chrome" if browser.chrome? + classes << "-browser-firefox" if browser.firefox? + classes << "-browser-safari" if browser.safari? + classes << "-browser-edge" if browser.edge? + + classes << "-browser-mobile" if browser.device.mobile? + classes << "-browser-windows" if browser.platform.windows? + classes << "-unsupported-browser" if unsupported_browser? end end end diff --git a/app/helpers/calendars_helper.rb b/app/helpers/calendars_helper.rb index 4cdf772bb153..8273fc5b3bff 100644 --- a/app/helpers/calendars_helper.rb +++ b/app/helpers/calendars_helper.rb @@ -35,7 +35,7 @@ module CalendarsHelper # @return [String] link to the calendar def link_to_previous_month(year, month, options = {}) target_date = Date.new(year, month, 1) - 1.month - link_to_month(target_date, options.merge(class: 'navigate-left', + link_to_month(target_date, options.merge(class: "navigate-left", display_year: target_date.year != year)) end @@ -46,7 +46,7 @@ def link_to_previous_month(year, month, options = {}) # @return [String] link to the calendar def link_to_next_month(year, month, options = {}) target_date = Date.new(year, month, 1) + 1.month - link_to_month(target_date, options.merge(class: 'navigate-right', + link_to_month(target_date, options.merge(class: "navigate-right", display_year: target_date.year != year)) end @@ -57,7 +57,7 @@ def link_to_next_month(year, month, options = {}) # @return [String] link to the calendar def link_to_month(date_to_show, options = {}) date = date_to_show.to_date - name = ::I18n.l date, format: options.delete(:display_year) ? '%B %Y' : '%B' + name = ::I18n.l date, format: options.delete(:display_year) ? "%B %Y" : "%B" merged_params = permitted_params .calendar_filter diff --git a/app/helpers/colors_helper.rb b/app/helpers/colors_helper.rb index 618eaa53b534..c2dfcd88511b 100644 --- a/app/helpers/colors_helper.rb +++ b/app/helpers/colors_helper.rb @@ -37,7 +37,7 @@ def options_for_colors(colored_thing) color: c.hexcode, bright: c.bright?, dark: c.dark?, - background: c.contrasting_color(light_color: 'transparent') + background: c.contrasting_color(light_color: "transparent") } options[:selected] = true if c.id == colored_thing.color_id @@ -51,9 +51,9 @@ def selected_color(colored_thing) end def colored_text(color) - background = color.contrasting_color(dark_color: '#333', light_color: 'transparent') + background = color.contrasting_color(dark_color: "#333", light_color: "transparent") style = "background-color: #{background}; color: #{color.hexcode}" - content_tag(:span, color.hexcode, class: 'color--text-preview', style:) + content_tag(:span, color.hexcode, class: "color--text-preview", style:) end # @@ -81,16 +81,16 @@ def resource_color_css(name, scope) end styles = color.color_styles - background_style = styles.map { |k, v| "#{k}:#{v} !important" }.join(';') + background_style = styles.map { |k, v| "#{k}:#{v} !important" }.join(";") - if name === 'type' + if name === "type" concat ".__hl_inline_#{name}_#{entry.id} { color: #{color.hexcode} !important;}" concat ".__hl_inline_#{name}_#{entry.id} { -webkit-text-stroke: 0.5px grey;}" if color.super_bright? - border_color = color.super_bright? ? '#555555' : color.hexcode + border_color = color.super_bright? ? "#555555" : color.hexcode concat ".__hl_background_#{name}_#{entry.id} { border-color: #{border_color} !important; }" else - border_color = color.bright? ? '#555555' : color.hexcode + border_color = color.bright? ? "#555555" : color.hexcode concat ".__hl_inline_#{name}_#{entry.id}::before { #{background_style}; border-color: #{border_color}; }\n" end @@ -107,11 +107,11 @@ def resource_color_css(name, scope) def icon_for_color(color, options = {}) return unless color - options.merge! class: 'color--preview ' + options[:class].to_s, + options.merge! class: "color--preview " + options[:class].to_s, title: color.name, style: "background-color: #{color.hexcode};" + options[:style].to_s - content_tag(:span, ' ', options) + content_tag(:span, " ", options) end def color_by_variable(variable) diff --git a/app/helpers/confirmation_dialog_helper.rb b/app/helpers/confirmation_dialog_helper.rb index a7e41f366328..a0f7eed4a362 100644 --- a/app/helpers/confirmation_dialog_helper.rb +++ b/app/helpers/confirmation_dialog_helper.rb @@ -45,7 +45,7 @@ def augmented_confirmation_dialog( passed_data: nil ) { - 'augmented-confirm-dialog': { + "augmented-confirm-dialog": { text: { title:, text:, diff --git a/app/helpers/error_message_helper.rb b/app/helpers/error_message_helper.rb index 6b3205e4f3ac..1c435aafe894 100644 --- a/app/helpers/error_message_helper.rb +++ b/app/helpers/error_message_helper.rb @@ -38,12 +38,12 @@ def error_messages_for(object) end def render_error_messages_partial(errors, object) - return '' if errors.empty? + return "" if errors.empty? base_error_messages = errors.full_messages_for(:base) fields_error_messages = errors.full_messages - base_error_messages - render partial: 'common/validation_error', + render partial: "common/validation_error", locals: { base_error_messages:, fields_error_messages:, object_name: object.class.model_name.human } @@ -52,7 +52,7 @@ def render_error_messages_partial(errors, object) def text_header_invalid_fields(base_error_messages, fields_error_messages) return if fields_error_messages.blank? - i18n_key = base_error_messages.present? ? 'errors.header_additional_invalid_fields' : 'errors.header_invalid_fields' + i18n_key = base_error_messages.present? ? "errors.header_additional_invalid_fields" : "errors.header_invalid_fields" t(i18n_key, count: fields_error_messages.count) end diff --git a/app/helpers/errors_helper.rb b/app/helpers/errors_helper.rb index f1af78315794..a7c389dfe810 100644 --- a/app/helpers/errors_helper.rb +++ b/app/helpers/errors_helper.rb @@ -94,7 +94,7 @@ def render_error(arg) @message_details = arg[:message_details] respond_to do |format| format.html do - render template: 'common/error', layout: use_layout, status: @status + render template: "common/error", layout: use_layout, status: @status end format.any do head @status diff --git a/app/helpers/flash_messages_helper.rb b/app/helpers/flash_messages_helper.rb index edd9139efb7d..0fc868657ed8 100644 --- a/app/helpers/flash_messages_helper.rb +++ b/app/helpers/flash_messages_helper.rb @@ -50,7 +50,7 @@ def render_flash_messages return if render_primer_banner_message? messages = flash - .reject { |k, _| k.start_with? '_' } + .reject { |k, _| k.start_with? "_" } .map do |k, v| if k.to_sym == :modal component = v[:type].constantize @@ -65,31 +65,31 @@ def render_flash_messages def join_flash_messages(messages) if messages.respond_to?(:join) - safe_join(messages, '
    '.html_safe) + safe_join(messages, "
    ".html_safe) else messages end end def render_flash_message(type, message, html_options = {}) # rubocop:disable Metrics/AbcSize - if type.to_s == 'notice' - type = 'success' + if type.to_s == "notice" + type = "success" end toast_css_classes = ["op-toast -#{type}", html_options.delete(:class)] # Add autohide class to notice flashes if configured - if type.to_s == 'success' && User.current.pref.auto_hide_popups? - toast_css_classes << 'autohide-toaster' + if type.to_s == "success" && User.current.pref.auto_hide_popups? + toast_css_classes << "autohide-toaster" end - html_options = { class: toast_css_classes.join(' '), role: 'alert' }.merge(html_options) - close_button = content_tag :a, '', class: 'op-toast--close icon-context icon-close', - title: I18n.t('js.close_popup_title'), - tabindex: '0' - toast = content_tag(:div, join_flash_messages(message), class: 'op-toast--content') - content_tag :div, '', class: 'op-toast--wrapper' do - content_tag :div, '', class: 'op-toast--casing' do + html_options = { class: toast_css_classes.join(" "), role: "alert" }.merge(html_options) + close_button = content_tag :a, "", class: "op-toast--close icon-context icon-close", + title: I18n.t("js.close_popup_title"), + tabindex: "0" + toast = content_tag(:div, join_flash_messages(message), class: "op-toast--content") + content_tag :div, "", class: "op-toast--wrapper" do + content_tag :div, "", class: "op-toast--casing" do content_tag :div, html_options do concat(close_button) concat(toast) diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb index 24a0baddcb97..f64b3ef16da7 100644 --- a/app/helpers/groups_helper.rb +++ b/app/helpers/groups_helper.rb @@ -30,26 +30,26 @@ module GroupsHelper def group_settings_tabs(group) [ { - name: 'general', - partial: 'groups/general', + name: "general", + partial: "groups/general", path: edit_group_path(group), label: :label_general }, { - name: 'users', - partial: 'groups/users', + name: "users", + partial: "groups/users", path: edit_group_path(group, tab: :users), label: :label_user_plural }, { - name: 'memberships', - partial: 'groups/memberships', + name: "memberships", + partial: "groups/memberships", path: edit_group_path(group, tab: :memberships), label: :label_project_plural }, { - name: 'global_roles', - partial: 'principals/global_roles', + name: "global_roles", + partial: "principals/global_roles", path: edit_group_path(group, tab: :global_roles), label: :label_global_roles } @@ -58,8 +58,8 @@ def group_settings_tabs(group) def autocompleter_filters(group) [ - { name: 'status', operator: '=', values: ['active', 'invited'] }, - { name: 'group', operator: '!', values: [group.id] } + { name: "status", operator: "=", values: ["active", "invited"] }, + { name: "group", operator: "!", values: [group.id] } ] end end diff --git a/app/helpers/homescreen_helper.rb b/app/helpers/homescreen_helper.rb index 06bdf8d6452a..e0c624877b78 100644 --- a/app/helpers/homescreen_helper.rb +++ b/app/helpers/homescreen_helper.rb @@ -36,7 +36,7 @@ def organization_name ## # Homescreen organization icon def organization_icon - op_icon('icon-context icon-enterprise') + op_icon("icon-context icon-enterprise") end ## @@ -48,7 +48,7 @@ def static_link_to(key) link_to label, link[:href], title: label, - target: '_blank', rel: 'noopener' + target: "_blank", rel: "noopener" end ## diff --git a/app/helpers/hook_helper.rb b/app/helpers/hook_helper.rb index c4e4a81b86cd..40e10e1e5dab 100644 --- a/app/helpers/hook_helper.rb +++ b/app/helpers/hook_helper.rb @@ -27,7 +27,7 @@ def call_hook(hook, context = {}) default_context = { project: @project, hook_caller: self } default_context[:controller] = controller if respond_to?(:controller) default_context[:request] = request if respond_to?(:request) - OpenProject::Hook.call_hook(hook, default_context.merge(context)).join(' ').html_safe + OpenProject::Hook.call_hook(hook, default_context.merge(context)).join(" ").html_safe end end end diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index 33a794a2285d..b9b6db8386ab 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -43,7 +43,7 @@ def spot_icon(icon_name, title: nil, size: nil, inline: false, classnames: nil) inline ? "spot-icon_inline" : nil, "spot-icon_#{icon_name}", classnames - ].compact.join(' ') + ].compact.join(" ") content_tag(:span, title, class: classes) end @@ -52,7 +52,7 @@ def spot_icon(icon_name, title: nil, size: nil, inline: false, classnames: nil) # Icon wrapper with an invisible label def icon_wrapper(icon_class, label) content = op_icon(icon_class) - content << content_tag(:span, label, class: 'hidden-for-sighted') + content << content_tag(:span, label, class: "hidden-for-sighted") content end end diff --git a/app/helpers/journals_helper.rb b/app/helpers/journals_helper.rb index 1682c1e96edc..1fcd32af5b64 100644 --- a/app/helpers/journals_helper.rb +++ b/app/helpers/journals_helper.rb @@ -30,14 +30,14 @@ module JournalsHelper def back_to_activity_page_url(activity_page) - case activity_page&.split('/') - in ['all'] + case activity_page&.split("/") + in ["all"] activities_url - in ['projects', project_id] + in ["projects", project_id] project_activities_url(project_id) - in ['users', user_id] + in ["users", user_id] user_url(user_id) - in ['work_packages', work_package_id] + in ["work_packages", work_package_id] work_package_url(work_package_id) else nil diff --git a/app/helpers/mail_digest_helper.rb b/app/helpers/mail_digest_helper.rb index a299e59289cc..a449114a15a1 100644 --- a/app/helpers/mail_digest_helper.rb +++ b/app/helpers/mail_digest_helper.rb @@ -28,8 +28,8 @@ module MailDigestHelper def digest_summary_text(notification_count, mentioned_count) - mentioned = mentioned_count > 1 ? 'plural' : 'singular' - notifications = notification_count > 1 ? 'plural' : 'singular' + mentioned = mentioned_count > 1 ? "plural" : "singular" + notifications = notification_count > 1 ? "plural" : "singular" summary = I18n.t(:"mail.digests.unread_notification_#{notifications}", number_unread: notification_count).to_s @@ -63,7 +63,7 @@ def digest_additional_author_text(notifications) number_of_additional_authors = number_of_authors(notifications) - 1 if notifications.length > 1 && number_of_additional_authors > 0 - amount = number_of_additional_authors === 1 ? 'one' : 'other' + amount = number_of_additional_authors === 1 ? "one" : "other" I18n.t(:"js.notifications.center.and_more_users.#{amount}", count: number_of_additional_authors) end end @@ -76,7 +76,7 @@ def timestamp_text(user, journal) I18n.t(:"mail.work_packages.#{value}_at", user:, timestamp: journal.created_at.strftime( - "#{I18n.t(:'date.formats.default')}, #{I18n.t(:'time.formats.time')}" + "#{I18n.t(:"date.formats.default")}, #{I18n.t(:"time.formats.time")}" )) ) end @@ -100,27 +100,27 @@ def text_modifiers_for(notification, value) end def build_property_text(notification, is_overdue, days_diff) - return I18n.t('js.notifications.date_alerts.overdue') if is_overdue && days_diff > 0 - return I18n.t('js.notifications.date_alerts.milestone_date') if notification.resource.milestone? - return I18n.t('js.work_packages.properties.startDate') if notification.reason == "date_alert_start_date" + return I18n.t("js.notifications.date_alerts.overdue") if is_overdue && days_diff > 0 + return I18n.t("js.notifications.date_alerts.milestone_date") if notification.resource.milestone? + return I18n.t("js.work_packages.properties.startDate") if notification.reason == "date_alert_start_date" - I18n.t('js.work_packages.properties.dueDate') + I18n.t("js.work_packages.properties.dueDate") end def build_alert_text(date_value, is_past, is_overdue, days_diff) - return I18n.t('js.notifications.date_alerts.property_is_deleted') unless date_value - return I18n.t('js.notifications.date_alerts.property_today') if days_diff == 0 + return I18n.t("js.notifications.date_alerts.property_is_deleted") unless date_value + return I18n.t("js.notifications.date_alerts.property_today") if days_diff == 0 - days_text = I18n.t('js.units.day', count: days_diff) - return I18n.t('js.notifications.date_alerts.overdue_since', difference_in_days: days_text) if is_overdue - return I18n.t('js.notifications.date_alerts.property_was', difference_in_days: days_text) if is_past + days_text = I18n.t("js.units.day", count: days_diff) + return I18n.t("js.notifications.date_alerts.overdue_since", difference_in_days: days_text) if is_overdue + return I18n.t("js.notifications.date_alerts.property_was", difference_in_days: days_text) if is_past - I18n.t('js.notifications.date_alerts.property_is', difference_in_days: days_text) + I18n.t("js.notifications.date_alerts.property_is", difference_in_days: days_text) end def highlight_overdue(text, is_overdue, html) return text unless html && is_overdue - content_tag :span, text, style: 'color: #C92A2A' + content_tag :span, text, style: "color: #C92A2A" end end diff --git a/app/helpers/mail_layout_helper.rb b/app/helpers/mail_layout_helper.rb index 3ca91ed4817b..911fe514f0d1 100644 --- a/app/helpers/mail_layout_helper.rb +++ b/app/helpers/mail_layout_helper.rb @@ -29,32 +29,32 @@ module MailLayoutHelper def placeholder_table_styles(options = {}) default_options = { - style: 'table-layout:fixed;border-collapse:separate;border-spacing:0;font-family:Helvetica;' << - (options[:style].present? ? options.delete(:style) : ''), + style: "table-layout:fixed;border-collapse:separate;border-spacing:0;font-family:Helvetica;" << + (options[:style].present? ? options.delete(:style) : ""), cellspacing: "0", cellpadding: "0" } - default_options.merge(options).map { |k, v| "#{k}=#{v}" }.join(' ') + default_options.merge(options).map { |k, v| "#{k}=#{v}" }.join(" ") end def placeholder_text_styles(**overwrites) { - color: '#878787', - 'line-height': '24px', - 'font-size': '14px', - 'white-space': 'normal', - overflow: 'hidden', - 'max-width': '100%', - width: '100%' + color: "#878787", + "line-height": "24px", + "font-size": "14px", + "white-space": "normal", + overflow: "hidden", + "max-width": "100%", + width: "100%" }.merge(overwrites) .map { |k, v| "#{k}: #{v}" } - .join('; ') + .join("; ") end def action_button(&block) render( - partial: 'mailer/mailer_button', + partial: "mailer/mailer_button", locals: { block: } ) end @@ -66,15 +66,15 @@ def placeholder_cell(number, vertical:) "line-height:#{number}; max-width:0; min-width:0; height:#{number}; width:0; font-size:#{number}" end - content_tag('td', ' '.html_safe, style:) + content_tag("td", " ".html_safe, style:) end def user_salutation(user) case Setting.emails_salutation when :name - I18n.t(:'mail.salutation', user: user.name) + I18n.t(:"mail.salutation", user: user.name) else - I18n.t(:'mail.salutation', user: user.firstname) + I18n.t(:"mail.salutation", user: user.firstname) end end end diff --git a/app/helpers/mail_notification_helper.rb b/app/helpers/mail_notification_helper.rb index ef987c475f8d..6adcbea006ef 100644 --- a/app/helpers/mail_notification_helper.rb +++ b/app/helpers/mail_notification_helper.rb @@ -36,7 +36,7 @@ def unique_reasons_of_notifications(notifications) end def notifications_path(id) - notifications_center_url(['details', id, 'activity']) + notifications_center_url(["details", id, "activity"]) end def type_color(type, default_fallback) @@ -51,6 +51,6 @@ def type_color(type, default_fallback) def status_colors(status) color_id = selected_color(status) - Color.find(color_id).color_styles.map { |k, v| "#{k}:#{v};" }.join(' ') if color_id + Color.find(color_id).color_styles.map { |k, v| "#{k}:#{v};" }.join(" ") if color_id end end diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb index 16d9998b0ded..464e87e9f315 100644 --- a/app/helpers/members_helper.rb +++ b/app/helpers/members_helper.rb @@ -34,13 +34,13 @@ module MembersHelper # If it is the later, the ids of the non delete roles are appended to the url so that they are kept. def global_member_role_deletion_link(member, role) if member.roles.length == 1 - link_to('', + link_to("", principal_membership_path(member.principal, member), - { method: :delete, class: 'icon icon-delete', title: t(:button_delete) }) + { method: :delete, class: "icon icon-delete", title: t(:button_delete) }) else - link_to('', - principal_membership_path(member.principal, member, 'membership[role_ids]' => member.roles - [role]), - { method: :patch, class: 'icon icon-delete', title: t(:button_delete) }) + link_to("", + principal_membership_path(member.principal, member, "membership[role_ids]" => member.roles - [role]), + { method: :patch, class: "icon icon-delete", title: t(:button_delete) }) end end diff --git a/app/helpers/meta_tags_helper.rb b/app/helpers/meta_tags_helper.rb index 2f8b27616bd6..480d244e13bd 100644 --- a/app/helpers/meta_tags_helper.rb +++ b/app/helpers/meta_tags_helper.rb @@ -32,7 +32,7 @@ module MetaTagsHelper def output_title_and_meta_tags display_meta_tags site: Setting.app_title, title: html_title_parts, - separator: ' | ', # Update the TitleService when changing this! + separator: " | ", # Update the TitleService when changing this! reverse: true end @@ -47,7 +47,7 @@ def initializer_meta_tag firstDayOfWeek: locale_first_day_of_week, environment: Rails.env, edition: OpenProject::Configuration.edition, - 'asset-host': OpenProject::Configuration.rails_asset_host.presence + "asset-host": OpenProject::Configuration.rails_asset_host.presence }.compact end diff --git a/app/helpers/no_results_helper.rb b/app/helpers/no_results_helper.rb index 872690b0b8cd..1e4e7f25a4b1 100644 --- a/app/helpers/no_results_helper.rb +++ b/app/helpers/no_results_helper.rb @@ -53,15 +53,15 @@ def no_results_box(action_url: nil, display_action: false, custom_title: nil, custom_action_text: nil) - title_text = custom_title || t('.no_results_title_text', cascade: true) || '' + title_text = custom_title || t(".no_results_title_text", cascade: true) || "" action_text = if display_action - custom_action_text || t('.no_results_content_text') + custom_action_text || t(".no_results_content_text") else - '' + "" end - action_url = action_url || '' + action_url = action_url || "" - render partial: '/common/no_results', + render partial: "/common/no_results", locals: { title_text:, action_text:, diff --git a/app/helpers/oauth_helper.rb b/app/helpers/oauth_helper.rb index 824be596f1a8..52b85a0a25fe 100644 --- a/app/helpers/oauth_helper.rb +++ b/app/helpers/oauth_helper.rb @@ -35,7 +35,7 @@ def oauth_scope_translations(application) if strings.empty? I18n.t("oauth.scopes.api_v3") else - safe_join(strings.map { |scope| I18n.t("oauth.scopes.#{scope}", default: scope) }, '
    '.html_safe) + safe_join(strings.map { |scope| I18n.t("oauth.scopes.#{scope}", default: scope) }, "
    ".html_safe) end end diff --git a/app/helpers/omniauth_helper.rb b/app/helpers/omniauth_helper.rb index 78904124ec5c..b8507f9b8589 100644 --- a/app/helpers/omniauth_helper.rb +++ b/app/helpers/omniauth_helper.rb @@ -42,6 +42,6 @@ def omniauth_direct_login? # If this option is active /login will lead directly to the configured omniauth provider # and so will a click on 'Sign in' (as opposed to opening the drop down menu). def direct_login_provider - OpenProject::Configuration['omniauth_direct_login_provider'] + OpenProject::Configuration["omniauth_direct_login_provider"] end end diff --git a/app/helpers/pagination_helper.rb b/app/helpers/pagination_helper.rb index 72389977c074..95793c3f7be0 100644 --- a/app/helpers/pagination_helper.rb +++ b/app/helpers/pagination_helper.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -require 'will_paginate' +require "will_paginate" module PaginationHelper def pagination_links_full(paginator, options = {}) @@ -34,10 +34,10 @@ def pagination_links_full(paginator, options = {}) pagination_options = default_options.merge(options) - content_tag(:div, class: 'op-pagination') do + content_tag(:div, class: "op-pagination") do content = content_tag(:nav, pagination_entries(paginator, pagination_options), - class: 'op-pagination--pages') + class: "op-pagination--pages") if pagination_options[:per_page_links] content << pagination_option_links(paginator, pagination_options) @@ -52,7 +52,7 @@ def pagination_option_links(paginator, pagination_options) pagination_options[:params] .merge(safe_query_params(%w{filters sortBy expand}))) - content_tag(:div, option_links, class: 'op-pagination--options') + content_tag(:div, option_links, class: "op-pagination--options") end ## @@ -62,12 +62,12 @@ def pagination_entries(paginator, options) page_last = paginator.offset + paginator.length total = paginator.total_entries - content_tag(:ul, class: 'op-pagination--items op-pagination--items_start') do + content_tag(:ul, class: "op-pagination--items op-pagination--items_start") do # will_paginate will return nil early when no pages available - content = will_paginate(paginator, options) || '' + content = will_paginate(paginator, options) || "" range = "(#{page_first} - #{page_last}/#{total})" - content << content_tag(:li, range, class: 'op-pagination--range', title: range) + content << content_tag(:li, range, class: "op-pagination--range", title: range) content.html_safe end @@ -80,8 +80,8 @@ def pagination_settings(paginator, options) if links.size > 1 label = I18n.t(:label_per_page) - content_tag(:ul, class: 'op-pagination--items op-pagination--items_end') do - content_tag(:li, label + ':', class: 'op-pagination--label', title: label) + links + content_tag(:ul, class: "op-pagination--items op-pagination--items_end") do + content_tag(:li, label + ":", class: "op-pagination--label", title: label) + links end end end @@ -90,12 +90,12 @@ def pagination_settings(paginator, options) # Constructs the 'n items per page' entries # determined from available options in the settings. def per_page_links(paginator, options) - Setting.per_page_options_array.inject('') do |html, n| + Setting.per_page_options_array.inject("") do |html, n| if n == paginator.per_page - html + content_tag(:li, n, class: 'op-pagination--item op-pagination--item_current') + html + content_tag(:li, n, class: "op-pagination--item op-pagination--item_current") else - link = link_to_content_update(n, options.merge(page: 1, per_page: n), { class: 'op-pagination--item-link' }) - html + content_tag(:li, link.html_safe, class: 'op-pagination--item') + link = link_to_content_update(n, options.merge(page: 1, per_page: n), { class: "op-pagination--item-link" }) + html + content_tag(:li, link.html_safe, class: "op-pagination--item") end end.html_safe end @@ -159,7 +159,7 @@ def per_page_param(options = params) class LinkRenderer < ::WillPaginate::ActionView::LinkRenderer def to_html - pagination.inject('') do |html, item| + pagination.inject("") do |html, item| html + (item.is_a?(Integer) ? page_number(item) : send(item)) end.html_safe end @@ -173,33 +173,33 @@ def merge_get_params(url_params) def page_number(page) if page == current_page - tag(:li, page, class: 'op-pagination--item op-pagination--item_current') + tag(:li, page, class: "op-pagination--item op-pagination--item_current") else - tag(:li, link(page, page, { class: 'op-pagination--item-link' }), class: 'op-pagination--item') + tag(:li, link(page, page, { class: "op-pagination--item-link" }), class: "op-pagination--item") end end def gap - tag(:li, '…', class: 'op-pagination--space') + tag(:li, "…", class: "op-pagination--space") end def previous_page num = @collection.current_page > 1 && (@collection.current_page - 1) - previous_or_next_page(num, I18n.t(:label_previous), 'prev') + previous_or_next_page(num, I18n.t(:label_previous), "prev") end def next_page num = @collection.current_page < total_pages && (@collection.current_page + 1) - previous_or_next_page(num, I18n.t(:label_next), 'next') + previous_or_next_page(num, I18n.t(:label_next), "next") end def previous_or_next_page(page, text, class_suffix) if page tag(:li, - link(text, page, { class: 'op-pagination--item-link op-pagination--item-link_' + class_suffix }), - class: 'op-pagination--item op-pagination--item_' + class_suffix) + link(text, page, { class: "op-pagination--item-link op-pagination--item-link_" + class_suffix }), + class: "op-pagination--item op-pagination--item_" + class_suffix) else - '' + "" end end diff --git a/app/helpers/password_helper.rb b/app/helpers/password_helper.rb index c210329a4f31..fb2f3cf47366 100644 --- a/app/helpers/password_helper.rb +++ b/app/helpers/password_helper.rb @@ -56,7 +56,7 @@ def password_confirmation_form_tag(url_for_options = {}, options = {}, &) def password_confirmation_data_attribute(with_data = {}) if password_confirmation_required? - with_data.merge('request-for-confirmation': true) + with_data.merge("request-for-confirmation": true) else with_data end @@ -84,7 +84,7 @@ def password_active_rules # Returns a text describing the active password complexity rules, # the minimum number of rules to adhere to and the total number of rules. def password_rules_description - return '' if OpenProject::Passwords::Evaluator.min_adhered_rules == 0 + return "" if OpenProject::Passwords::Evaluator.min_adhered_rules == 0 OpenProject::Passwords::Evaluator.rules_description_locale(password_active_rules) end diff --git a/app/helpers/project_status_helper.rb b/app/helpers/project_status_helper.rb index 8510e2d43dbb..c919bb61c825 100644 --- a/app/helpers/project_status_helper.rb +++ b/app/helpers/project_status_helper.rb @@ -29,7 +29,7 @@ module ProjectStatusHelper def project_status_css_class(status_code) code = project_status_ensure_default_code(status_code) - '-' + code.tr('_', '-') + "-" + code.tr("_", "-") end def project_status_name(status_code) @@ -38,11 +38,11 @@ def project_status_name(status_code) end def project_status_name_for_code(code) - code ||= 'not_set' - I18n.t('js.grid.widgets.project_status.' + code) + code ||= "not_set" + I18n.t("js.grid.widgets.project_status." + code) end def project_status_ensure_default_code(status_code) - status_code || 'not_set' + status_code || "not_set" end end diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index e69ab162878d..25557a74abec 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -35,7 +35,7 @@ module ProjectsHelper def projects_sort_header_tag(*) former_criteria = @sort_criteria.criteria.dup - @sort_criteria.criteria.reject! { |a, _| a == 'lft' } + @sort_criteria.criteria.reject! { |a, _| a == "lft" } sort_header_tag(*) ensure @@ -44,7 +44,7 @@ def projects_sort_header_tag(*) def short_project_description(project, length = 255) if project.description.blank? - return '' + return "" end project.description.gsub(/\A(.{#{length}}[^\n\r]*).*\z/m, '\1...').strip diff --git a/app/helpers/removed_js_helpers_helper.rb b/app/helpers/removed_js_helpers_helper.rb index 0c29d1809af1..1d0b68095e3a 100644 --- a/app/helpers/removed_js_helpers_helper.rb +++ b/app/helpers/removed_js_helpers_helper.rb @@ -36,7 +36,7 @@ def link_to_function(content, function, html_options = {}) id = html_options.delete(:id) { "link-to-function-#{SecureRandom.uuid}" } csp_onclick(function, "##{id}") - content_tag(:a, content, html_options.merge(id:, href: '')) + content_tag(:a, content, html_options.merge(id:, href: "")) end ## diff --git a/app/helpers/reorder_links_helper.rb b/app/helpers/reorder_links_helper.rb index efa2463f4787..85e48232cbda 100644 --- a/app/helpers/reorder_links_helper.rb +++ b/app/helpers/reorder_links_helper.rb @@ -31,19 +31,19 @@ def reorder_links(name, url, options = {}) method = options[:method] || :post content_tag(:span, - reorder_link(name, url, 'highest', 'icon-sort-up', t(:label_sort_highest), method) + - reorder_link(name, url, 'higher', 'icon-arrow-up2', t(:label_sort_higher), method) + - reorder_link(name, url, 'lower', 'icon-arrow-down2', t(:label_sort_lower), method) + - reorder_link(name, url, 'lowest', 'icon-sort-down', t(:label_sort_lowest), method), - class: 'reorder-icons') + reorder_link(name, url, "highest", "icon-sort-up", t(:label_sort_highest), method) + + reorder_link(name, url, "higher", "icon-arrow-up2", t(:label_sort_higher), method) + + reorder_link(name, url, "lower", "icon-arrow-down2", t(:label_sort_lower), method) + + reorder_link(name, url, "lowest", "icon-sort-down", t(:label_sort_lowest), method), + class: "reorder-icons") end def reorder_link(name, url, direction, icon_class, label, method) text = content_tag(:span, label, - class: 'hidden-for-sighted') + class: "hidden-for-sighted") icon = content_tag(:span, - '', + "", class: "icon-context #{icon_class} icon-small") link_to(text + icon, url.merge("#{name}[move_to]" => direction), diff --git a/app/helpers/reports_helper.rb b/app/helpers/reports_helper.rb index a2896d9f195f..13f30ad0b890 100644 --- a/app/helpers/reports_helper.rb +++ b/app/helpers/reports_helper.rb @@ -32,10 +32,10 @@ module ReportsHelper def aggregate(data, criteria) data&.inject(0) do |sum, row| match = criteria&.all? do |k, v| - row[k].to_s == v.to_s || (k == 'closed' && row[k] == ActiveRecord::Type::Boolean.new.cast(v)) + row[k].to_s == v.to_s || (k == "closed" && row[k] == ActiveRecord::Type::Boolean.new.cast(v)) end - sum += row['total'].to_i if match + sum += row["total"].to_i if match sum end || 0 @@ -43,6 +43,6 @@ def aggregate(data, criteria) def aggregate_link(data, criteria, *) a = aggregate data, criteria - a.positive? ? link_to(h(a), *) : '-' + a.positive? ? link_to(h(a), *) : "-" end end diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 151811a6fad9..0fd7366f5804 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -38,7 +38,7 @@ def format_revision(revision) ## # Format revision commits with plain formatter def format_revision_text(commit_message) - format_text(commit_message, format: 'plain') + format_text(commit_message, format: "plain") end def truncate_at_line_break(text, length = 255) @@ -47,25 +47,25 @@ def truncate_at_line_break(text, length = 255) def render_properties(properties) unless properties.nil? || properties.empty? - content = '' + content = "" properties.keys.sort.each do |property| - content << content_tag('li', raw("#{h property}: #{h properties[property]}")) + content << content_tag("li", raw("#{h property}: #{h properties[property]}")) end - content_tag('ul', content.html_safe, class: 'properties') + content_tag("ul", content.html_safe, class: "properties") end end def render_changeset_changes - changes = @changeset.file_changes.limit(1000).order(Arel.sql('path')).filter_map do |change| + changes = @changeset.file_changes.limit(1000).order(Arel.sql("path")).filter_map do |change| case change.action - when 'A' + when "A" # Detects moved/copied files if change.from_path.present? - action = @changeset.file_changes.detect { |c| c.action == 'D' && c.path == change.from_path } - change.action = action ? 'R' : 'C' + action = @changeset.file_changes.detect { |c| c.action == "D" && c.path == change.from_path } + change.action = action ? "R" : "C" end change - when 'D' + when "D" @changeset.file_changes.detect { |c| c.from_path == change.path } ? nil : change else change @@ -75,8 +75,8 @@ def render_changeset_changes tree = {} changes.each do |change| p = tree - dirs = change.path.to_s.split('/').select { |d| d.present? } - path = '' + dirs = change.path.to_s.split("/").select { |d| d.present? } + path = "" dirs.each do |dir| path += with_leading_slash(dir) p[:s] ||= {} @@ -93,8 +93,8 @@ def render_changeset_changes # Mapping from internal action to (folder|file)-icon type def change_action_mapping { - 'A' => :add, - 'B' => :remove + "A" => :add, + "B" => :remove } end @@ -112,14 +112,14 @@ def calculate_folder_action(tree) end def render_changes_tree(tree) - return '' if tree.nil? + return "" if tree.nil? - output = '
      ' + output = "
        " tree.keys.sort.each do |file| - style = 'change' + style = "change" text = File.basename(file) if s = tree[file][:s] - style << ' folder' + style << " folder" path_param = without_leading_slash(to_path_param(@repository.relative_path(file))) text = link_to(h(text), show_revisions_path_project_repository_path(project_id: @project, @@ -133,7 +133,7 @@ def render_changes_tree(tree) style << " change-#{c.action}" path_param = without_leading_slash(to_path_param(@repository.relative_path(c.path))) - unless c.action == 'D' + unless c.action == "D" title_text = changes_tree_change_title c.action text = link_to(h(text), @@ -145,19 +145,19 @@ def render_changes_tree(tree) text << raw(" - #{h(c.revision)}") if c.revision.present? - if c.action == 'M' - text << raw(' (' + link_to(I18n.t(:label_diff), + if c.action == "M" + text << raw(" (" + link_to(I18n.t(:label_diff), diff_revision_project_repository_path(project_id: @project, repo_path: path_param, - rev: @changeset.identifier)) + ') ') + rev: @changeset.identifier)) + ") ") end - text << raw(' ' + content_tag('span', h(c.from_path), class: 'copied-from')) if c.from_path.present? + text << raw(" " + content_tag("span", h(c.from_path), class: "copied-from")) if c.from_path.present? output << changes_tree_li_element(c.action, text, style) end end - output << '
      ' + output << "
    " output.html_safe end @@ -166,7 +166,7 @@ def to_utf8_for_repositories(str) str = to_utf8_internal(str) if str.respond_to?(:force_encoding) - str.force_encoding('UTF-8') + str.force_encoding("UTF-8") end str end @@ -175,17 +175,17 @@ def to_utf8_internal(str) return str if str.nil? if str.respond_to?(:force_encoding) - str.force_encoding('ASCII-8BIT') + str.force_encoding("ASCII-8BIT") end return str if str.empty? return str if /\A[\r\n\t\x20-\x7e]*\Z/n.match?(str) # for us-ascii if str.respond_to?(:force_encoding) - str.force_encoding('UTF-8') + str.force_encoding("UTF-8") end - @encodings ||= Setting.repositories_encodings.split(',').map(&:strip) + @encodings ||= Setting.repositories_encodings.split(",").map(&:strip) @encodings.each do |encoding| - return str.to_s.encode('UTF-8', encoding) + return str.to_s.encode("UTF-8", encoding) rescue Encoding::InvalidByteSequenceError, Encoding::UndefinedConversionError # do nothing here and try the next encoding end @@ -198,15 +198,15 @@ def replace_invalid_utf8(str) return str if str.nil? if str.respond_to?(:force_encoding) - str.force_encoding('UTF-8') + str.force_encoding("UTF-8") if !str.valid_encoding? str = str.encode("US-ASCII", invalid: :replace, - undef: :replace, replace: '?').encode("UTF-8") + undef: :replace, replace: "?").encode("UTF-8") end else # removes invalid UTF8 sequences begin - (str + ' ').encode('UTF-8', invalid: :replace, undef: :replace, replace: '?')[0..-3] + (str + " ").encode("UTF-8", invalid: :replace, undef: :replace, replace: "?")[0..-3] rescue Encoding::InvalidByteSequenceError, Encoding::UndefinedConversionError end end @@ -234,29 +234,29 @@ def scm_options(repository = nil) def default_selected_option [ "--- #{I18n.t(:actionview_instancetag_blank_option)} ---", - '', + "", { disabled: true, selected: true } ] end def scm_vendor_tag(repository) # rubocop:disable Rails/HelperInstanceVariable - url = url_for(controller: '/projects/settings/repository', action: 'show', id: @project.id) + url = url_for(controller: "/projects/settings/repository", action: "show", id: @project.id) # rubocop:enable Rails/HelperInstanceVariable # - select_tag('scm_vendor', + select_tag("scm_vendor", scm_options(repository), - class: 'form--select', + class: "form--select", data: { url:, - action: 'repository-settings#updateSelectedType', - 'repository-settings-target': 'scmVendor' + action: "repository-settings#updateSelectedType", + "repository-settings-target": "scmVendor" }, disabled: repository && !repository.new_record?) end def git_path_encoding_options(repository) - default = repository.new_record? ? 'UTF-8' : repository.path_encoding + default = repository.new_record? ? "UTF-8" : repository.path_encoding options_for_select(Setting::ENCODINGS, default) end @@ -270,22 +270,22 @@ def show_settings_save_button?(_repository) end def with_leading_slash(path) - path.to_s.starts_with?('/') ? path : "/#{path}" + path.to_s.starts_with?("/") ? path : "/#{path}" end def without_leading_slash(path) - path.gsub(%r{\A/+}, '') + path.gsub(%r{\A/+}, "") end def changes_tree_change_title(action) case action - when 'A' + when "A" I18n.t(:label_added) - when 'D' + when "D" I18n.t(:label_deleted) - when 'C' + when "C" I18n.t(:label_copied) - when 'R' + when "R" I18n.t(:label_renamed) else I18n.t(:label_modified) @@ -294,16 +294,16 @@ def changes_tree_change_title(action) def changes_tree_li_element(action, text, style) icon_name = case action - when 'A' - 'icon-add' - when 'D' - 'icon-delete' - when 'C' - 'icon-copy' - when 'R' - 'icon-rename' + when "A" + "icon-add" + when "D" + "icon-delete" + when "C" + "icon-copy" + when "R" + "icon-rename" else - 'icon-arrow-left-right' + "icon-arrow-left-right" end "