From 2ae53bd2523f725e7b6458a8a5ca2e1beda8c12f Mon Sep 17 00:00:00 2001 From: luzpaz Date: Wed, 21 Jul 2021 11:26:31 -0400 Subject: [PATCH] Fix typos in user facing and non-user facing code (#9497) * Fix typos in user facing and non-user facing code Found via `codespell -q 3 -S ./config/locales -L ba,nd,parms,sur,varius` * Fix strings in specs --- app/models/user_password.rb | 2 +- .../development/concepts/hal-resources/README.md | 2 +- extra/Apache/OpenProjectRepoman.pm | 2 +- extra/mail_handler/rdm-mailhandler.rb | 3 ++- lib/api/root_api.rb | 4 ++-- lib/api/utilities/property_name_converter.rb | 4 ++-- .../attachments/attachments_by_container_api.rb | 2 +- .../work_package_collection_representer.rb | 4 ++-- lib/instance_finder.rb | 2 +- lib/open_project/scm/adapters/base.rb | 2 +- lib/open_project/scm/adapters/local_client.rb | 2 +- .../formats/markdown/textile_converter.rb | 4 ++-- lib/open_project/version.rb | 2 +- lib/redmine/menu_manager/tree_node.rb | 2 +- lib/redmine/unified_diff.rb | 2 +- lib/tasks/assets.rake | 2 +- lib/tasks/parallel_testing.rake | 2 +- .../lib/omni_auth/flexible_strategy.rb | 2 +- modules/bim/config/locales/en.seeders.bim.yml | 16 ++++++++-------- .../bim/lib/api/bim/bcf_xml/v1/bcf_xml_api.rb | 2 +- .../bcf/viewpoints/create_contract_spec.rb | 2 +- .../bim/spec/factories/bcf_viewpoint_factory.rb | 2 +- .../bim/spec/factories/xml_viewpoint_factory.rb | 2 +- modules/bim/spec/features/bim_navigation_spec.rb | 2 +- .../bim/spec/features/model_management_spec.rb | 2 +- .../bcf_json/viewpoint_reader_shared_examples.rb | 2 +- modules/costs/app/models/default_hourly_rate.rb | 2 +- .../app/models/work_package/abstract_costs.rb | 6 +++--- .../spec/controllers/costlog_controller_spec.rb | 2 +- .../v3/costs_api_user_permission_check_spec.rb | 2 +- .../work_package_representer_spec.rb | 2 +- modules/costs/spec/models/cost_entry_spec.rb | 2 +- modules/costs/spec/models/time_entry_spec.rb | 2 +- .../spec/features/my/assigned_to_me_spec.rb | 2 +- modules/my_page/spec/features/my/my_page_spec.rb | 2 +- modules/pdf_export/README.md | 2 +- modules/pdf_export/config/locales/en.yml | 4 ++-- .../export_card_configurations_admin_spec.rb | 4 ++-- .../spec/services/token_service_spec.rb | 2 +- .../xls_export/spreadsheet_builder.rb | 2 +- .../exporter/xls_integration_spec.rb | 2 +- .../controllers/work_packages_controller_spec.rb | 2 +- spec/models/query_spec.rb | 4 ++-- spec_legacy/unit/version_spec.rb | 4 ++-- 44 files changed, 62 insertions(+), 61 deletions(-) diff --git a/app/models/user_password.rb b/app/models/user_password.rb index 266da02e5d1..3f099bbc0fc 100644 --- a/app/models/user_password.rb +++ b/app/models/user_password.rb @@ -94,7 +94,7 @@ class UserPassword < ApplicationRecord protected # Save hashed_password from the initially passed plain password - # if it is is set. + # if it's set. def salt_and_hash_password! return if plain_password.nil? diff --git a/docs/development/concepts/hal-resources/README.md b/docs/development/concepts/hal-resources/README.md index f96c7adfc5b..0d992dd7bdd 100644 --- a/docs/development/concepts/hal-resources/README.md +++ b/docs/development/concepts/hal-resources/README.md @@ -230,7 +230,7 @@ In order to turn the JSON properties from `_embedded` and `_links` into writable ## 🔗 Code references -- [`HALResourceService`](https://github.com/opf/openproject/tree/dev/frontend/src/app/modules/hal/services/hal-resource.service.ts) for loading and and turning JSON responses into HAL resource classes +- [`HALResourceService`](https://github.com/opf/openproject/tree/dev/frontend/src/app/modules/hal/services/hal-resource.service.ts) for loading and turning JSON responses into HAL resource classes - [`halResource.config.ts`](https://github.com/opf/openproject/tree/dev/frontend/src/app/modules/hal/services/hal-resource.config.ts) for identifying what types in the JSON response and its members/links are being turned into which classes. - [`HalResource`](https://github.com/opf/openproject/tree/dev/frontend/src/app/modules/hal/resources/hal-resource.ts) the base HAL resource class - [`HAL resource builder`](https://github.com/opf/openproject/tree/dev/frontend/src/app/modules/hal/helpers/hal-resource-builder.ts) used for wiring up the links and embedded JSON properties into members of the HAL resource classes diff --git a/extra/Apache/OpenProjectRepoman.pm b/extra/Apache/OpenProjectRepoman.pm index dd59b234009..7a6d9a14490 100644 --- a/extra/Apache/OpenProjectRepoman.pm +++ b/extra/Apache/OpenProjectRepoman.pm @@ -166,7 +166,7 @@ sub _handle_request { return { success => JSON::true, - message => "The action has completed sucessfully.", + message => "The action has completed successfully.", repository => $target, path => $target, # This is only useful in the packager context diff --git a/extra/mail_handler/rdm-mailhandler.rb b/extra/mail_handler/rdm-mailhandler.rb index 0d809c21066..06c3d17db81 100644 --- a/extra/mail_handler/rdm-mailhandler.rb +++ b/extra/mail_handler/rdm-mailhandler.rb @@ -165,6 +165,7 @@ class RedmineMailHandler debug "Response received: #{response.code}" case response.code.to_i + debug "Processed successfully" when 403 warn "Request was denied by your Redmine server. " + "Make sure that 'WS for incoming emails' is enabled in application settings and that you provided the correct API key." @@ -180,7 +181,7 @@ class RedmineMailHandler warn "Failed to contact your Redmine server (#{response.code})." 75 when 201 - debug "Proccessed successfully" + debug "Processed successfully" 0 else 1 diff --git a/lib/api/root_api.rb b/lib/api/root_api.rb index 1d71cf492a6..e9a8bbf9d2a 100644 --- a/lib/api/root_api.rb +++ b/lib/api/root_api.rb @@ -30,7 +30,7 @@ # Root class of the API # This is the place for all API wide configuration, helper methods, exceptions -# rescuing, mounting of differnet API versions etc. +# rescuing, mounting of different API versions etc. require 'open_project/authentication' @@ -78,7 +78,7 @@ module API end # Global helper to set allowed content_types - # This may be overriden when multipart is allowed (file uploads) + # This may be overridden when multipart is allowed (file uploads) def allowed_content_types %w(application/json application/hal+json) end diff --git a/lib/api/utilities/property_name_converter.rb b/lib/api/utilities/property_name_converter.rb index e303f2e64b3..bef3cf04bff 100644 --- a/lib/api/utilities/property_name_converter.rb +++ b/lib/api/utilities/property_name_converter.rb @@ -32,7 +32,7 @@ module API module Utilities # Since APIv3 uses different names for some properties, there is sometimes the need to convert # names between the "old" Rails/ActiveRecord world of names and the "new" APIv3 world of names. - # This class provides methods to cope with the neccessary name conversions + # This class provides methods to cope with the necessary name conversions # There are multiple reasons for naming differences: # - APIv3 is using camelCase as opposed to snake_case # - APIv3 defines some properties as a different type, which requires a name change @@ -87,7 +87,7 @@ module API private - # Unifies different attributes refering to the same thing via a foreign key + # Unifies different attributes referring to the same thing via a foreign key # e.g. status_id -> status def normalize_foreign_key_name(attribute) attribute.to_s.sub(/(.+)_id\z/, '\1') diff --git a/lib/api/v3/attachments/attachments_by_container_api.rb b/lib/api/v3/attachments/attachments_by_container_api.rb index bb506529d96..a49aeeedd73 100644 --- a/lib/api/v3/attachments/attachments_by_container_api.rb +++ b/lib/api/v3/attachments/attachments_by_container_api.rb @@ -34,7 +34,7 @@ module API module AttachmentsByContainerAPI module Helpers # Global helper to set allowed content_types - # This may be overriden when multipart is allowed (file uploads) + # This may be overridden when multipart is allowed (file uploads) def allowed_content_types if post_request? %w(multipart/form-data) diff --git a/lib/api/v3/work_packages/work_package_collection_representer.rb b/lib/api/v3/work_packages/work_package_collection_representer.rb index 42494714974..c9bf0074dd0 100644 --- a/lib/api/v3/work_packages/work_package_collection_representer.rb +++ b/lib/api/v3/work_packages/work_package_collection_representer.rb @@ -54,12 +54,12 @@ module API # In order to optimize performance we # * override paged_models so that only the id is fetched from the # scope (typically a query with a couple of includes for e.g. - # filtering), circumventing AR instantiation alltogether + # filtering), circumventing AR instantiation altogether # * use the ids to fetch the actual work packages with all the fields # necessary for rendering the work packages in _elements # # This results in the weird flow where the scope is passed to super (models variable), - # which calls the overriden paged_models method fetching the ids. In order to have + # which calls the overridden paged_models method fetching the ids. In order to have # real AR objects again, we finally get the work packages we actually want to have # and set those to be the represented collection. # A potential ordering is reapplied to the work package collection in ruby. diff --git a/lib/instance_finder.rb b/lib/instance_finder.rb index f77f470af2d..84831ed6784 100644 --- a/lib/instance_finder.rb +++ b/lib/instance_finder.rb @@ -35,7 +35,7 @@ class InstanceFinder def self.find(model, identifier) if @model_method_map[model].nil? - raise "#{model} is not registerd with InstanceFinder" + raise "#{model} is not registered with InstanceFinder" end @model_method_map[model].call(identifier) diff --git a/lib/open_project/scm/adapters/base.rb b/lib/open_project/scm/adapters/base.rb index dfdcd287987..1ed065994bd 100644 --- a/lib/open_project/scm/adapters/base.rb +++ b/lib/open_project/scm/adapters/base.rb @@ -53,7 +53,7 @@ module OpenProject end ## - # Overriden by descendants when + # Overridden by descendants when # they are able to retrieve current # storage usage. def storage_available? diff --git a/lib/open_project/scm/adapters/local_client.rb b/lib/open_project/scm/adapters/local_client.rb index c2e93f71906..3d08d543e89 100644 --- a/lib/open_project/scm/adapters/local_client.rb +++ b/lib/open_project/scm/adapters/local_client.rb @@ -77,7 +77,7 @@ module OpenProject # Retrieve the local FS path # of this repository. # - # Overriden by some vendors, as not + # Overridden by some vendors, as not # all vendors have a path root_url. # (e.g., subversion uses file:// URLs) def local_repository_path diff --git a/lib/open_project/text_formatting/formats/markdown/textile_converter.rb b/lib/open_project/text_formatting/formats/markdown/textile_converter.rb index 50103868f2d..7cf29bdfe24 100644 --- a/lib/open_project/text_formatting/formats/markdown/textile_converter.rb +++ b/lib/open_project/text_formatting/formats/markdown/textile_converter.rb @@ -176,7 +176,7 @@ module OpenProject::TextFormatting::Formats end if markdowns_in_groups.length != orig_values.length - # Error handling: Some textile seems to be misformed e.g.
something
). + # Error handling: Some textile seems to be malformed e.g.
something
). # In such cases, handle texts individually to avoid the error affecting other texts progress = ProgressBar.create(title: "Converting items individually due to pandoc mismatch", total: orig_values.length) markdowns = old_values.each_with_index.map do |old_value, index| @@ -344,7 +344,7 @@ module OpenProject::TextFormatting::Formats end def cleanup_after_pandoc(markdown) - # Remove the \ pandoc puts before * and > at begining of lines + # Remove the \ pandoc puts before * and > at beginning of lines markdown.gsub!(/^((\\[*>])+)/) { $1.gsub("\\", "") } # Add a blank line before lists diff --git a/lib/open_project/version.rb b/lib/open_project/version.rb index 1f4d00a379b..f5ef8b267f5 100644 --- a/lib/open_project/version.rb +++ b/lib/open_project/version.rb @@ -40,7 +40,7 @@ module OpenProject class << self # Used by semver to define the special version (if any). - # A special version "satify but have a lower precedence than the associated + # A special version "satisfy but have a lower precedence than the associated # normal version". So 2.0.0RC1 would be part of the 2.0.0 series but # be considered to be an older version. # diff --git a/lib/redmine/menu_manager/tree_node.rb b/lib/redmine/menu_manager/tree_node.rb index ad9ca89fe6f..f053587bb92 100644 --- a/lib/redmine/menu_manager/tree_node.rb +++ b/lib/redmine/menu_manager/tree_node.rb @@ -85,7 +85,7 @@ class Redmine::MenuManager::TreeNode < Tree::TreeNode child end - # Wrapp remove! making sure to decrement the last_items counter if + # Wrap remove! making sure to decrement the last_items counter if # the removed child was a last item def remove!(child) @last_items_count -= +1 if child && child.last diff --git a/lib/redmine/unified_diff.rb b/lib/redmine/unified_diff.rb index 431c3c10791..70145e9cd0e 100644 --- a/lib/redmine/unified_diff.rb +++ b/lib/redmine/unified_diff.rb @@ -45,7 +45,7 @@ module Redmine if line.respond_to?(:force_encoding) line_encoding = line.encoding # TODO: UTF-16 and Japanese CP932 which is incompatible with ASCII - # In Japan, diffrence between file path encoding + # In Japan, difference between file path encoding # and file contents encoding is popular. line.force_encoding('ASCII-8BIT') end diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index 286e5b0a021..fb32467a42d 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -39,7 +39,7 @@ Rake::Task['assets:precompile'] namespace :assets do # In this task, set prerequisites for the assets:precompile task task compile_environment: :prepare_op do - # Turn the yarn:install taks into a noop. + # Turn the yarn:install task into a noop. Rake::Task['yarn:install'] .clear diff --git a/lib/tasks/parallel_testing.rake b/lib/tasks/parallel_testing.rake index b5d7964ce77..90b438f1abd 100644 --- a/lib/tasks/parallel_testing.rake +++ b/lib/tasks/parallel_testing.rake @@ -40,7 +40,7 @@ end require 'parallel_tests/tasks' # Remove task added by parallel_tests as it conflicts with our own. -# Having both will lead to both being executred. +# Having both will lead to both being executed. Rake::Task["parallel:features"].clear if Rake::Task.task_defined?("parallel:features") def check_for_pending_migrations diff --git a/modules/auth_plugins/lib/omni_auth/flexible_strategy.rb b/modules/auth_plugins/lib/omni_auth/flexible_strategy.rb index 306c5f6b734..2794ae34c1f 100644 --- a/modules/auth_plugins/lib/omni_auth/flexible_strategy.rb +++ b/modules/auth_plugins/lib/omni_auth/flexible_strategy.rb @@ -38,7 +38,7 @@ module OmniAuth ## # Tries to match the request path of the current request with one of the registered providers. - # If a match is found the strategy is intialised with that provider to handle the request. + # If a match is found the strategy is initialised with that provider to handle the request. def match_provider! return false unless providers diff --git a/modules/bim/config/locales/en.seeders.bim.yml b/modules/bim/config/locales/en.seeders.bim.yml index caded1139e3..4f650062c09 100644 --- a/modules/bim/config/locales/en.seeders.bim.yml +++ b/modules/bim/config/locales/en.seeders.bim.yml @@ -679,23 +679,23 @@ en: - :to: Project preperation :type: follows - :start: 54 - :subject: Creating inital BIM model + :subject: Creating initial BIM model :description: This type is hierarchicaly a parent of the types "Clash" and "Request", thus represents a general note. :status: default_status_new :type: default_type_phase :children: - :start: 54 - :subject: Modelling inital BIM model + :subject: Modelling initial BIM model :description: |- # Goal - * Modelling the inital BIM model + * Modelling the initial BIM model * Creating a BIM model for the whole project team # Description - * According to the gathered data from the customer, the inital model will be modelled + * According to the gathered data from the customer, the initial model will be modelled * The model shall be modelled according to the LOD Matrices and contain the information needed * ... :status: default_status_new @@ -721,10 +721,10 @@ en: :assigned_to: Lead BIM Coordinators :duration: 2 :relations: - - :to: Modelling inital BIM model + - :to: Modelling initial BIM model :type: follows - :start: 65 - :subject: Submitting inital BIM model + :subject: Submitting initial BIM model :description: This type is hierarchicaly a parent of the types "Clash" and "Request", thus represents a general note. :status: default_status_new @@ -763,7 +763,7 @@ en: :assigned_to: BIM Modellers :duration: 0 :relations: - - :to: Submitting inital BIM model + - :to: Submitting initial BIM model :type: follows - :start: 67 :subject: Modelling the BIM model @@ -816,7 +816,7 @@ en: :assigned_to: BIM Coordinators :duration: 10 :relations: - - :to: Submitting inital BIM model + - :to: Submitting initial BIM model :type: follows - :start: 77 :subject: Coordination, first cycle diff --git a/modules/bim/lib/api/bim/bcf_xml/v1/bcf_xml_api.rb b/modules/bim/lib/api/bim/bcf_xml/v1/bcf_xml_api.rb index 5e3d97207b4..962b0c326c8 100644 --- a/modules/bim/lib/api/bim/bcf_xml/v1/bcf_xml_api.rb +++ b/modules/bim/lib/api/bim/bcf_xml/v1/bcf_xml_api.rb @@ -38,7 +38,7 @@ module API namespace 'bcf_xml' do helpers do # Global helper to set allowed content_types - # This may be overriden when multipart is allowed (file uploads) + # This may be overridden when multipart is allowed (file uploads) def allowed_content_types if post_request? %w(multipart/form-data) diff --git a/modules/bim/spec/contracts/bcf/viewpoints/create_contract_spec.rb b/modules/bim/spec/contracts/bcf/viewpoints/create_contract_spec.rb index e171917956c..2658ede88b1 100644 --- a/modules/bim/spec/contracts/bcf/viewpoints/create_contract_spec.rb +++ b/modules/bim/spec/contracts/bcf/viewpoints/create_contract_spec.rb @@ -728,7 +728,7 @@ describe Bim::Bcf::Viewpoints::CreateContract do end end - context 'with a component of the selection property having an unkonwn property' do + context 'with a component of the selection property having an unknown property' do let(:viewpoint_json_viewpoint) do valid_json['components'][:selection][1]['superfluous'] = "sdsdsf" valid_json diff --git a/modules/bim/spec/factories/bcf_viewpoint_factory.rb b/modules/bim/spec/factories/bcf_viewpoint_factory.rb index a1d5b15517a..08e3074fd32 100644 --- a/modules/bim/spec/factories/bcf_viewpoint_factory.rb +++ b/modules/bim/spec/factories/bcf_viewpoint_factory.rb @@ -36,7 +36,7 @@ FactoryBot.define do if file.readable? JSON.parse(file.read) else - warn "Viewpoint name #{viewpoint_name} doesnt map to a viewpoint fixture" + warn "Viewpoint name #{viewpoint_name} doesn't map to a viewpoint fixture" end end diff --git a/modules/bim/spec/factories/xml_viewpoint_factory.rb b/modules/bim/spec/factories/xml_viewpoint_factory.rb index 2d2fb2d2aa5..e1756b3aa06 100644 --- a/modules/bim/spec/factories/xml_viewpoint_factory.rb +++ b/modules/bim/spec/factories/xml_viewpoint_factory.rb @@ -35,7 +35,7 @@ FactoryBot.define do if file.readable? file.read else - warn "Viewpoint name #{viewpoint_name} doesnt map to a viewpoint fixture" + warn "Viewpoint name #{viewpoint_name} doesn't map to a viewpoint fixture" end end end diff --git a/modules/bim/spec/features/bim_navigation_spec.rb b/modules/bim/spec/features/bim_navigation_spec.rb index cae47ece149..716df3dec0e 100644 --- a/modules/bim/spec/features/bim_navigation_spec.rb +++ b/modules/bim/spec/features/bim_navigation_spec.rb @@ -146,7 +146,7 @@ describe 'BIM navigation spec', end it 'after going to the full view with a selected tab, - the same tab shoud be opened in full screen view and after going back to details view(see #33747)' do + the same tab should be opened in full screen view and after going back to details view(see #33747)' do card_view.open_full_screen_by_details(work_package) details_view.ensure_page_loaded diff --git a/modules/bim/spec/features/model_management_spec.rb b/modules/bim/spec/features/model_management_spec.rb index e45344f7570..0628f879158 100644 --- a/modules/bim/spec/features/model_management_spec.rb +++ b/modules/bim/spec/features/model_management_spec.rb @@ -65,7 +65,7 @@ describe 'model management', index_page.visit! end - it 'I can perfom all actions on the models' do + it 'I can perform all actions on the models' do index_page.model_listed true, model.title index_page.add_model_allowed true index_page.edit_model_allowed model.title, true diff --git a/modules/bim/spec/lib/open_project/bcf/bcf_json/viewpoint_reader_shared_examples.rb b/modules/bim/spec/lib/open_project/bcf/bcf_json/viewpoint_reader_shared_examples.rb index 892830270c9..d18fdd75826 100644 --- a/modules/bim/spec/lib/open_project/bcf/bcf_json/viewpoint_reader_shared_examples.rb +++ b/modules/bim/spec/lib/open_project/bcf/bcf_json/viewpoint_reader_shared_examples.rb @@ -170,7 +170,7 @@ end shared_examples 'matches the JSON counterpart' do it 'matches the JSON viewpoint counterpart' do path = OpenProject::Bim::Engine.root.join("spec/fixtures/viewpoints/#{xml_viewpoint.viewpoint_name}.json") - raise "Expected #{path} to be readable for JSON comparsion" unless path.readable? + raise "Expected #{path} to be readable for JSON comparison" unless path.readable? json = path.read diff --git a/modules/costs/app/models/default_hourly_rate.rb b/modules/costs/app/models/default_hourly_rate.rb index 24e6dca6c44..1d91ebb4bbe 100644 --- a/modules/costs/app/models/default_hourly_rate.rb +++ b/modules/costs/app/models/default_hourly_rate.rb @@ -76,7 +76,7 @@ class DefaultHourlyRate < Rate end def rate_updated - # FIXME: This might be extremly slow. Consider using an implementation like in HourlyRateObserver + # FIXME: This might be extremely slow. Consider using an implementation like in HourlyRateObserver unless valid_from_changed? # We have not moved a rate, maybe just changed the rate value diff --git a/modules/costs/app/models/work_package/abstract_costs.rb b/modules/costs/app/models/work_package/abstract_costs.rb index 7b4954c088b..2aeec7cc7d8 100644 --- a/modules/costs/app/models/work_package/abstract_costs.rb +++ b/modules/costs/app/models/work_package/abstract_costs.rb @@ -48,15 +48,15 @@ class WorkPackage # # @return [Class] Class of the model the costs are based on, e.g. CostEntry or TimeEntry. def costs_model - raise NotImplementedError, "subclass responsiblity" + raise NotImplementedError, "subclass responsibility" end def costs_sum_alias - raise NotImplementedError, "subclass responsiblity" + raise NotImplementedError, "subclass responsibility" end def subselect_alias - raise NotImplementedError, "subclass responsiblity" + raise NotImplementedError, "subclass responsibility" end private diff --git a/modules/costs/spec/controllers/costlog_controller_spec.rb b/modules/costs/spec/controllers/costlog_controller_spec.rb index 999e4dc379b..77239e2562d 100644 --- a/modules/costs/spec/controllers/costlog_controller_spec.rb +++ b/modules/costs/spec/controllers/costlog_controller_spec.rb @@ -688,7 +688,7 @@ describe CostlogController, type: :controller do describe "WHEN the user is allowed to update own cost_entries and not all WHEN updating foreign cost_entry - WHEN updating someting" do + WHEN updating something" do let(:user3) { FactoryBot.create(:user) } before do diff --git a/modules/costs/spec/lib/api/v3/costs_api_user_permission_check_spec.rb b/modules/costs/spec/lib/api/v3/costs_api_user_permission_check_spec.rb index 6eccb9802e3..1fd2c301a7a 100644 --- a/modules/costs/spec/lib/api/v3/costs_api_user_permission_check_spec.rb +++ b/modules/costs/spec/lib/api/v3/costs_api_user_permission_check_spec.rb @@ -30,7 +30,7 @@ require 'spec_helper' describe API::V3::CostsApiUserPermissionCheck do class CostsApiUserPermissionCheckTestClass - # mimick representer + # mimic representer def view_time_entries_allowed? current_user_allowed_to(:view_time_entries, context: represented.project) || current_user_allowed_to(:view_own_time_entries, context: represented.project) diff --git a/modules/costs/spec/lib/api/v3/work_packages/work_package_representer_spec.rb b/modules/costs/spec/lib/api/v3/work_packages/work_package_representer_spec.rb index 4ff51f5464b..ef81ed3ee4b 100644 --- a/modules/costs/spec/lib/api/v3/work_packages/work_package_representer_spec.rb +++ b/modules/costs/spec/lib/api/v3/work_packages/work_package_representer_spec.rb @@ -86,7 +86,7 @@ describe ::API::V3::WorkPackages::WorkPackageRepresenter do end describe 'work_package' do - # specifiying as it used to be different + # specifying as it used to be different it { is_expected.to have_json_path('spentTime') } it { is_expected.not_to have_json_path('spentHours') } diff --git a/modules/costs/spec/models/cost_entry_spec.rb b/modules/costs/spec/models/cost_entry_spec.rb index d8250ec5cce..354f12df347 100644 --- a/modules/costs/spec/models/cost_entry_spec.rb +++ b/modules/costs/spec/models/cost_entry_spec.rb @@ -257,7 +257,7 @@ describe CostEntry, type: :model do end describe '#real_costs' do - describe 'WHEN overrridden cost are set' do + describe 'WHEN overridden cost are set' do let(:value) { rand(500) } before do diff --git a/modules/costs/spec/models/time_entry_spec.rb b/modules/costs/spec/models/time_entry_spec.rb index 21e6330da46..9de2bb8ad72 100644 --- a/modules/costs/spec/models/time_entry_spec.rb +++ b/modules/costs/spec/models/time_entry_spec.rb @@ -269,7 +269,7 @@ describe TimeEntry, type: :model do expect(@default_example.costs).to eq(default_hourly_five.rate) end - it 'shoud be able to switch between default hourly rate and hourly rate' do + it 'should be able to switch between default hourly rate and hourly rate' do @default_example.user = user2 @default_example.rate = default_hourly_one @default_example.save! diff --git a/modules/my_page/spec/features/my/assigned_to_me_spec.rb b/modules/my_page/spec/features/my/assigned_to_me_spec.rb index 0056ad30e3a..4c5cbd9ff46 100644 --- a/modules/my_page/spec/features/my/assigned_to_me_spec.rb +++ b/modules/my_page/spec/features/my/assigned_to_me_spec.rb @@ -54,7 +54,7 @@ describe 'Assigned to me embedded query on my page', type: :feature, js: true do let!(:assigned_to_other_work_package) do FactoryBot.create :work_package, project: project, - subject: 'Not assigend to me', + subject: 'Not assigned to me', type: type, author: user, assigned_to: other_user diff --git a/modules/my_page/spec/features/my/my_page_spec.rb b/modules/my_page/spec/features/my/my_page_spec.rb index d7af475f3a0..541610f007a 100644 --- a/modules/my_page/spec/features/my/my_page_spec.rb +++ b/modules/my_page/spec/features/my/my_page_spec.rb @@ -140,7 +140,7 @@ describe 'My page', type: :feature, js: true do sleep(0.3) - # Resizing leads to the calender area now spanning a larger area + # Resizing leads to the calendar area now spanning a larger area calendar_area.expect_to_span(1, 1, 3, 2) # Because of the added row, and the resizing the other widgets (assigned and created) have moved down assigned_area.expect_to_span(3, 1, 4, 2) diff --git a/modules/pdf_export/README.md b/modules/pdf_export/README.md index 540c6fd286d..eaafc213cfc 100644 --- a/modules/pdf_export/README.md +++ b/modules/pdf_export/README.md @@ -96,4 +96,4 @@ The config is divided into groups. A group can have a height property which will Any number of rows can be defined. The font_size and minimum_lines properties define how much height on the card is given to the row. The plugin will attempt to assign enough space to each of the rows, however space will be assigned based on the priorities of the the rows, with rows with lower priority (higher numbers) being reduced and removed first if there is not enough for all the data. The row height can be forced by giving a value, in pixels, for the row height property. This will override the assigned row height. -The name of the column informs the plugin which data should be read from the model (status, due_date, id, etc.). There can be any number of columns per row. Custom field names can also be used. Columns are given an equal share of the row width unless a specific width % is given. If there is more text in the column than can fit into its assinged space on the card then the text will be truncated. +The name of the column informs the plugin which data should be read from the model (status, due_date, id, etc.). There can be any number of columns per row. Custom field names can also be used. Columns are given an equal share of the row width unless a specific width % is given. If there is more text in the column than can fit into its assigned space on the card then the text will be truncated. diff --git a/modules/pdf_export/config/locales/en.yml b/modules/pdf_export/config/locales/en.yml index 97263517bf3..718aa66cb48 100644 --- a/modules/pdf_export/config/locales/en.yml +++ b/modules/pdf_export/config/locales/en.yml @@ -37,8 +37,8 @@ en: label_export_card_configuration_plural: "Export Card Configs" label_export_card_activate: "Activate" label_export_card_deactivate: "De-activate" - notice_export_card_configuration_activated: "Config succesfully activated" - notice_export_card_configuration_deactivated: "Config succesfully de-activated" + notice_export_card_configuration_activated: "Config successfully activated" + notice_export_card_configuration_deactivated: "Config successfully de-activated" error_can_not_activate_export_card_configuration: "This config cannot be activated" error_can_not_deactivate_export_card_configuration: "This config cannot be de-activated" validation_error_required_keys_not_present: "Required key(s) not present:" diff --git a/modules/pdf_export/spec/features/export_card_configurations_admin_spec.rb b/modules/pdf_export/spec/features/export_card_configurations_admin_spec.rb index 27fa8d81403..aa949db86f2 100644 --- a/modules/pdf_export/spec/features/export_card_configurations_admin_spec.rb +++ b/modules/pdf_export/spec/features/export_card_configurations_admin_spec.rb @@ -73,11 +73,11 @@ describe "export card configurations Admin", type: :feature, js: true do # DEACTIVATE SeleniumHubWaiter.wait page.first('a', text: 'De-activate').click - expect(page).to have_text 'Config succesfully de-activated' + expect(page).to have_text 'Config successfully de-activated' # ACTIVATE SeleniumHubWaiter.wait page.first('a', text: 'Activate').click - expect(page).to have_text 'Config succesfully activated' + expect(page).to have_text 'Config successfully activated' end end diff --git a/modules/two_factor_authentication/spec/services/token_service_spec.rb b/modules/two_factor_authentication/spec/services/token_service_spec.rb index 9f90b5f8985..a9137b2b27b 100644 --- a/modules/two_factor_authentication/spec/services/token_service_spec.rb +++ b/modules/two_factor_authentication/spec/services/token_service_spec.rb @@ -112,7 +112,7 @@ describe ::TwoFactorAuthentication::TokenService, with_2fa_ee: true do end end - context 'with overriden device' do + context 'with overridden device' do let(:use_device) { sms_device } it 'uses the overridden device' do expect(subject.requires_token?).to be_truthy diff --git a/modules/xls_export/lib/open_project/xls_export/spreadsheet_builder.rb b/modules/xls_export/lib/open_project/xls_export/spreadsheet_builder.rb index 308d5858967..b81edbb2654 100644 --- a/modules/xls_export/lib/open_project/xls_export/spreadsheet_builder.rb +++ b/modules/xls_export/lib/open_project/xls_export/spreadsheet_builder.rb @@ -40,7 +40,7 @@ module OpenProject::XlsExport end end - # Update column widths and wrap text if neccessary + # Update column widths and wrap text if necessary def update_sheet_widths @column_widths.count.times do |idx| if @column_widths[idx] > 60 diff --git a/modules/xls_export/spec/models/xls_export/work_package/exporter/xls_integration_spec.rb b/modules/xls_export/spec/models/xls_export/work_package/exporter/xls_integration_spec.rb index 7a12318ed24..ecb19f2cbe2 100644 --- a/modules/xls_export/spec/models/xls_export/work_package/exporter/xls_integration_spec.rb +++ b/modules/xls_export/spec/models/xls_export/work_package/exporter/xls_integration_spec.rb @@ -100,7 +100,7 @@ describe XlsExport::WorkPackage::Exporter::XLS do it 'produces the correct result' do expect(query.columns.map(&:name)).to eq %i[type id subject status assigned_to priority] - # the first header row devides the sheet into work packages and relation columns + # the first header row divides the sheet into work packages and relation columns expect(sheet.rows.first.take(8)).to eq ['Work packages', nil, nil, nil, nil, nil, nil, 'Relations'] # the second header row includes the column names for work packages and relations and the related work package diff --git a/spec/controllers/work_packages_controller_spec.rb b/spec/controllers/work_packages_controller_spec.rb index e092298afd7..c4189b8a20f 100644 --- a/spec/controllers/work_packages_controller_spec.rb +++ b/spec/controllers/work_packages_controller_spec.rb @@ -239,7 +239,7 @@ describe WorkPackagesController, type: :controller do let(:call_action) { get('index', params: params.merge(format: 'pdf')) } let(:params) { { query_id: 'hokusbogus' } } - context 'when a non-existant query has been previously selected' do + context 'when a non-existent query has been previously selected' do before do allow(User.current).to receive(:allowed_to?).and_return(true) diff --git a/spec/models/query_spec.rb b/spec/models/query_spec.rb index 70a59a6ccbc..ca2b6844f22 100644 --- a/spec/models/query_spec.rb +++ b/spec/models/query_spec.rb @@ -91,12 +91,12 @@ describe Query, type: :model do describe 'highlighting' do context 'with EE' do - it '#hightlighted_attrirbutes accepts valid values' do + it '#highlighted_attributes accepts valid values' do query.highlighted_attributes = %w(status priority due_date) expect(query).to be_valid end - it '#hightlighted_attributes rejects invalid values' do + it '#highlighted_attributes rejects invalid values' do query.highlighted_attributes = %w(status bogus) expect(query).not_to be_valid end diff --git a/spec_legacy/unit/version_spec.rb b/spec_legacy/unit/version_spec.rb index addcb1c44bf..aecc238d3a6 100644 --- a/spec_legacy/unit/version_spec.rb +++ b/spec_legacy/unit/version_spec.rb @@ -121,7 +121,7 @@ describe Version, type: :model do assert_progress_equal 100.0 / 3, v.closed_percent end - it 'should progress should consider estimated hours to weigth issues' do + it 'should progress should consider estimated hours to weight issues' do project = Project.find(1) (v = Version.new.tap do |v| v.attributes = { project: project, name: 'Progress' } @@ -134,7 +134,7 @@ describe Version, type: :model do assert_progress_equal 25.0 / 95.0 * 100, v.closed_percent end - it 'should progress should consider average estimated hours to weigth unestimated issues' do + it 'should progress should consider average estimated hours to weight unestimated issues' do project = Project.find(1) (v = Version.new.tap do |v| v.attributes = { project: project, name: 'Progress' }