diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000000..4791fb4a8a --- /dev/null +++ b/.codespellrc @@ -0,0 +1,6 @@ +[codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = .git*,*.pdf,*.svg,locale,vendor,*.lock,*.css,*.min.*,.codespellrc,locales,language_presenter.rb +check-hidden = true +# ignore-regex = +ignore-words-list = ans,rememberable,requestor,reord diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000000..c59e047376 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,25 @@ +# Codespell configuration is within .codespellrc +--- +name: Codespell + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Annotate locations with typos + uses: codespell-project/codespell-problem-matcher@v1 + - name: Codespell + uses: codespell-project/actions-codespell@v2 diff --git a/.rubocop.yml b/.rubocop.yml index 86266fead8..ee9648f86c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -131,7 +131,7 @@ Metrics/MethodLength: Max: 20 # mnicholson Oct. 6th 2021 -# Default lenght for block is 25 lines, which it would be very restrictive for +# Default length for block is 25 lines, which it would be very restrictive for # the Rspec views methods. So I'll just exclude some files. Metrics/BlockLength: Exclude: diff --git a/CHANGELOG.md b/CHANGELOG.md index f5ff8b632c..2e8bb2a9a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -233,7 +233,7 @@ As Webpacker is no longer maintained by the Rails community, we have replaced it - Removed `font-awesome-sass` gem and used `@fortawesome/fontawesome-free` npm package - Issue with `@import 'font-awesome-sprockets';` line in `app/assets/stylesheets/application.scss`. Removed that line after referring to the latest font-awesome install/setup guide which no longer includes it. -With the removal of Webpacker, the Javascript/SASS code is no longer automaticaly compiled when using the `rails server` command. It has been replaced by the `bin/dev` command that launch the rails server and the processes that watch for changes in the SASS and Javascript code. +With the removal of Webpacker, the Javascript/SASS code is no longer automatically compiled when using the `rails server` command. It has been replaced by the `bin/dev` command that launch the rails server and the processes that watch for changes in the SASS and Javascript code. #### SASS update : removal of the `@import` keyword @@ -287,7 +287,7 @@ For more detailed explanation, please refer to this video : https://www.youtube. - Froze mail gem version [#3254](https://github.com/DMPRoadmap/roadmap/issues/3254) - Updated the CSV export so that it now includes research outputs - Updated sans-serif font used in PDF downloads to Roboto since Google API no longer offers Helvetica -- Fixed discrepencies with default/max per_page values for API and UI pagination +- Fixed discrepancies with default/max per_page values for API and UI pagination - Updated JS that used to call the TinyMCE `setMode()` function so that it now calls `mode.set()` because the former is now deprecated. - Patched an issue that was causing a template's visibility to change to 'organizationally_visible' when saving on the template details page. - Fixed an issue with the Rails 6 keyword arguments change that was causing the `paginable_sort_link` to fail diff --git a/app/assets/stylesheets/blocks/README.md b/app/assets/stylesheets/blocks/README.md index 295713a06d..1d7d7be716 100644 --- a/app/assets/stylesheets/blocks/README.md +++ b/app/assets/stylesheets/blocks/README.md @@ -1,6 +1,6 @@ # CSS Blocks -Blocks refer to reusable units within the CSS files. Where practicable, we should always try to define a general block or UX concept, rather than styling indivudual elements. +Blocks refer to reusable units within the CSS files. Where practicable, we should always try to define a general block or UX concept, rather than styling individual elements. Example: diff --git a/app/assets/stylesheets/blocks/_cards.scss b/app/assets/stylesheets/blocks/_cards.scss index edb25d6e1f..52bff403e5 100644 --- a/app/assets/stylesheets/blocks/_cards.scss +++ b/app/assets/stylesheets/blocks/_cards.scss @@ -33,7 +33,7 @@ color: $color-secondary-text; } -// Classes from Boostrap 3 panels (renamed card) - interim solution +// Classes from Bootstrap 3 panels (renamed card) - interim solution .card-default { border-color: #ddd; border-radius: 0rem; diff --git a/app/assets/stylesheets/blocks/_labels.scss b/app/assets/stylesheets/blocks/_labels.scss index 0830ac244a..72780c468d 100644 --- a/app/assets/stylesheets/blocks/_labels.scss +++ b/app/assets/stylesheets/blocks/_labels.scss @@ -1,7 +1,7 @@ @import "../../../../node_modules/bootstrap/scss/functions"; @import "../../../../node_modules/bootstrap/scss/variables"; -/* label stlying */ +/* label styling */ label { font-weight: 700; } diff --git a/app/controllers/api/v1/base_api_controller.rb b/app/controllers/api/v1/base_api_controller.rb index c1ddc36547..999404964a 100644 --- a/app/controllers/api/v1/base_api_controller.rb +++ b/app/controllers/api/v1/base_api_controller.rb @@ -109,7 +109,7 @@ def paginate_response(results:) end # ========================= - # PERMIITTED PARAMS HEPERS + # PERMIITTED PARAMS HELPERS # ========================= def plan_permitted_params %i[created title description language ethical_issues_exist diff --git a/app/controllers/concerns/conditional_user_mailer.rb b/app/controllers/concerns/conditional_user_mailer.rb index e7eddc58fe..bb664f1084 100644 --- a/app/controllers/concerns/conditional_user_mailer.rb +++ b/app/controllers/concerns/conditional_user_mailer.rb @@ -8,7 +8,7 @@ module ConditionalUserMailer # # recipients - User or Enumerable object or any object that includes Enumerable class # key - A key (dot notation) whose value is true/false and belongs to - # prefences.email (see dmproadmap.rb initializer) + # preferences.email (see dmproadmap.rb initializer) # # Returns Boolean def deliver_if(key:, recipients: [], &block) diff --git a/app/controllers/concerns/paginable.rb b/app/controllers/concerns/paginable.rb index 7d558e3db4..412d90d012 100644 --- a/app/controllers/concerns/paginable.rb +++ b/app/controllers/concerns/paginable.rb @@ -137,7 +137,7 @@ def refine_query(scope) # Can raise ActiveRecord::StatementInvalid (e.g. column does not # exist, ambiguity on column, etc) - # how we contruct scope depends on whether sort field is in the + # how we construct scope depends on whether sort field is in the # main table or in a related table scope_table = scope.klass.name.underscore parts = @args[:sort_field].partition('.') diff --git a/app/controllers/concerns/versionable.rb b/app/controllers/concerns/versionable.rb index 0a98723907..0b5092c958 100644 --- a/app/controllers/concerns/versionable.rb +++ b/app/controllers/concerns/versionable.rb @@ -4,7 +4,7 @@ module Versionable private - # Takes in a Template, phase, Section, Question, or Annotaion + # Takes in a Template, phase, Section, Question, or Annotation # IF the template is published, generates a new template # finds the passed object in the new template # diff --git a/app/controllers/org_admin/template_customization_transfers_controller.rb b/app/controllers/org_admin/template_customization_transfers_controller.rb index f0b98e28b7..32574cce50 100644 --- a/app/controllers/org_admin/template_customization_transfers_controller.rb +++ b/app/controllers/org_admin/template_customization_transfers_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module OrgAdmin - # Controller that handles transfering parent template changes to a customized template + # Controller that handles transferring parent template changes to a customized template class TemplateCustomizationTransfersController < ApplicationController include Versionable diff --git a/app/controllers/plans_controller.rb b/app/controllers/plans_controller.rb index 8f7c44393a..f9c371eb2d 100644 --- a/app/controllers/plans_controller.rb +++ b/app/controllers/plans_controller.rb @@ -398,7 +398,7 @@ def duplicate end # rubocop:enable Metrics/AbcSize - # TODO: This should probablly just be merged with the update route + # TODO: This should probably just be merged with the update route # POST /plans/:id/visibility # rubocop:disable Metrics/AbcSize, Metrics/MethodLength def visibility @@ -433,7 +433,7 @@ def visibility end # rubocop:enable Metrics/AbcSize, Metrics/MethodLength - # TODO: This should probablly just be merged with the update route + # TODO: This should probably just be merged with the update route # POST /plans/:id/set_test def set_test plan = Plan.find(params[:id]) diff --git a/app/controllers/public_pages_controller.rb b/app/controllers/public_pages_controller.rb index 1b5d9cff93..62d8fb5f42 100644 --- a/app/controllers/public_pages_controller.rb +++ b/app/controllers/public_pages_controller.rb @@ -29,7 +29,7 @@ def template_export # only export live templates, id passed is family_id @template = Template.live(params[:id]) # covers authorization for this action. - # Pundit dosent support passing objects into scoped policies + # Pundit doesn't support passing objects into scoped policies unless PublicPagePolicy.new(current_user, @template).template_export? msg = 'You are not authorized to export that template' redirect_to public_templates_path, notice: msg and return diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 53492a3f9e..09d60c6c84 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -269,7 +269,7 @@ def do_update_password(current_user, args) elsif args[:password_confirmation].blank? message = _('Please enter a password confirmation') elsif args[:password] != args[:password_confirmation] - message = _('Password and comfirmation must match') + message = _('Password and confirmation must match') else successfully_updated = current_user.update_with_password(args) end diff --git a/app/javascript/src/answers/edit.js b/app/javascript/src/answers/edit.js index 9dbbdd6b7b..d9fad88824 100644 --- a/app/javascript/src/answers/edit.js +++ b/app/javascript/src/answers/edit.js @@ -34,7 +34,7 @@ $(() => { * form with class form-answer. The key represents a question id and the value holds * the debounced function for a given input, textarea or select. Note, this map is * populated on demand, i.e. the first time a change is made at a given input, textarea - * or select within the form, a new key-value should be created. Succesive times, the + * or select within the form, a new key-value should be created. Successive times, the * debounced function should be retrieved instead. */ const debounceMap = {}; diff --git a/app/javascript/src/answers/rdaMetadata.js b/app/javascript/src/answers/rdaMetadata.js index 0cb96bc10c..c1a904edc1 100644 --- a/app/javascript/src/answers/rdaMetadata.js +++ b/app/javascript/src/answers/rdaMetadata.js @@ -139,7 +139,7 @@ $(() => { function waitAndUpdate() { if (noWaiting > 0) { - // if we are waiting on api responces, call this function in 1 seccond + // if we are waiting on api responses, call this function in 1 second setTimeout(waitAndUpdate, 1000); } else { // update all the dropdowns/ standards explore box (calling on subject @@ -183,7 +183,7 @@ $(() => { // update the standards display selector $('.rda_metadata .sub-subject select').change(); } else { - // show the sub-subject incase it was previously hidden + // show the sub-subject in case it was previously hidden subSubject.closest('div').show(); // update the sub-subject display selector subSubject.find('option').remove(); diff --git a/app/javascript/src/orgAdmin/conditions/updateConditions.js b/app/javascript/src/orgAdmin/conditions/updateConditions.js index 7daa01eff5..7b630b7881 100644 --- a/app/javascript/src/orgAdmin/conditions/updateConditions.js +++ b/app/javascript/src/orgAdmin/conditions/updateConditions.js @@ -22,7 +22,7 @@ export default function updateConditions(id) { if (webhook === false) { if ($(selectObject).val() === 'add_webhook') { // condition type is webhook - // Retreive 'data-bs-target' for modal and create Jquery element + // Retrieve 'data-bs-target' for modal and create Jquery element const associatedModal = $(condition.find('.pseudo-webhook-btn').attr('data-bs-target')); associatedModal.modal('show'); condition.find('.display-if-action-remove').hide(); @@ -60,7 +60,7 @@ export default function updateConditions(id) { condition.find('.webhook-replacement').show(); $(condition.find('.webhook-replacement')).on('click', (event) => { event.preventDefault(); - // Retreive 'data-bs-target' for modal and create Jquery element + // Retrieve 'data-bs-target' for modal and create Jquery element const associatedModal1 = $(condition.find('.pseudo-webhook-btn').attr('data-bs-target')); associatedModal1.modal('show'); }); diff --git a/app/javascript/src/usage/index.js b/app/javascript/src/usage/index.js index 9c32cde92f..182b900610 100644 --- a/app/javascript/src/usage/index.js +++ b/app/javascript/src/usage/index.js @@ -19,7 +19,7 @@ $(() => { }; // attach listener to separator select menu - // on change look for "stat" elements and chnage their query param + // on change look for "stat" elements and change their query param const fieldSep = document.getElementById('csv-field-sep'); if (fieldSep !== null) { fieldSep.addEventListener('click', (e) => { diff --git a/app/javascript/src/utils/accordion.js b/app/javascript/src/utils/accordion.js index fdb7da12d1..b4e03b8ef7 100644 --- a/app/javascript/src/utils/accordion.js +++ b/app/javascript/src/utils/accordion.js @@ -9,7 +9,7 @@ * <%= _('collapse all') %> * * - * Your accordion should follow the Boostrap 5.x layout: + * Your accordion should follow the Bootstrap 5.x layout: * ------------------------------------------------------------ n* *
diff --git a/app/javascript/src/utils/sectionUpdate.js b/app/javascript/src/utils/sectionUpdate.js index a6bec9c0df..6da37bdae2 100644 --- a/app/javascript/src/utils/sectionUpdate.js +++ b/app/javascript/src/utils/sectionUpdate.js @@ -23,5 +23,5 @@ export const updateSectionProgress = (id, numSecAnswers, numSecQuestions) => { }; // given a question id find the containing div -// used inconditional questions +// used unconditional questions export const getQuestionDiv = (id) => $(`#answer-form-${id}`).closest('.question-body'); diff --git a/app/javascript/src/utils/tinymce.js b/app/javascript/src/utils/tinymce.js index c1112b1a35..3d6ab3d78f 100644 --- a/app/javascript/src/utils/tinymce.js +++ b/app/javascript/src/utils/tinymce.js @@ -157,7 +157,7 @@ export const Tinymce = { }, /* Destroy an editor instance whose target element/textarea has HTML id passed. This method - executes tinymce.Editor.destroy (e.g. https://www.tinymce.com/docs/api/tinymce/tinymce.editor/#destroy) for a successfull id found. + executes tinymce.Editor.destroy (e.g. https://www.tinymce.com/docs/api/tinymce/tinymce.editor/#destroy) for a successful id found. @return undefined */ destroyEditorById(id) { diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 56267ee547..52bcc595fa 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -70,12 +70,12 @@ def permissions_change_notification(role, user) @role = role @plan_title = @role.plan.title @user = user - @recepient = @role.user + @recipient = @role.user @messaging = role_text(@role) @helpdesk_email = helpdesk_email(org: @user.org) I18n.with_locale I18n.default_locale do - mail(to: @recepient.email, + mail(to: @recipient.email, subject: format(_('Changed permissions on a Data Management Plan in %{tool_name}'), tool_name: tool_name)) end diff --git a/app/models/plan.rb b/app/models/plan.rb index 83fac933e9..f9baf7944e 100644 --- a/app/models/plan.rb +++ b/app/models/plan.rb @@ -291,7 +291,7 @@ def settings(key) # none exists. # # qid - The id for the question to find the answer for - # create_if_missing - If true, will genereate a default answer + # create_if_missing - If true, will generate a default answer # to the question (defaults: true). # # Returns Answer diff --git a/app/models/role.rb b/app/models/role.rb index d062c15f3a..009a14990e 100644 --- a/app/models/role.rb +++ b/app/models/role.rb @@ -71,7 +71,7 @@ class Role < ApplicationRecord # Return ActiveRecord::Relation scope :with_access_flags, lambda { |*flags| bad_flag = flags.detect { |flag| !flag.in?(flag_mapping['access'].keys) } - raise ArgumentError, "Unkown access flag '#{bad_flag}'" if bad_flag + raise ArgumentError, "Unknown access flag '#{bad_flag}'" if bad_flag access_values = flags.map { |flag| sql_in_for_flag(flag.to_sym, 'access') } .flatten @@ -124,7 +124,7 @@ def deactivate! # 03 - creator + administrator # 04 - editor # 05 - creator + editor -# 06 - administraor + editor +# 06 - administrator + editor # 07 - creator + editor + administrator # 08 - commenter # 09 - creator + commenter @@ -140,7 +140,7 @@ def deactivate! # 19 - creator + administrator + reviewer # 20 - editor + reviewer # 21 - creator + editor + reviewer -# 22 - administraor + editor + reviewer +# 22 - administrator + editor + reviewer # 23 - creator + editor + administrator + reviewer # 24 - commenter + reviewer # 25 - creator + commenter + reviewer diff --git a/app/models/section.rb b/app/models/section.rb index 372a0913b8..8ce72d8798 100644 --- a/app/models/section.rb +++ b/app/models/section.rb @@ -128,7 +128,7 @@ def deep_copy(**options) copy end - # Can't be modified as it was duplicatd over from another Phase. + # Can't be modified as it was duplicated over from another Phase. def unmodifiable? !modifiable? end diff --git a/app/models/template.rb b/app/models/template.rb index 9975a79b12..218515af97 100644 --- a/app/models/template.rb +++ b/app/models/template.rb @@ -450,17 +450,17 @@ def publishability unless latest? error += _('You can not publish a historical version of this template. ') publishable = false - # all templates have atleast one phase + # all templates have at least one phase end if phases.count <= 0 error += _('You can not publish a template without phases. ') publishable = false - # all phases must have atleast 1 section + # all phases must have at least 1 section end unless phases.map { |p| p.sections.count.positive? }.reduce(true) { |fin, val| fin && val } error += _('You can not publish a template without sections in a phase. ') publishable = false - # all sections must have atleast one question + # all sections must have at least one question end unless sections.map { |s| s.questions.count.positive? }.reduce(true) { |fin, val| fin && val } error += _('You can not publish a template without questions in a section. ') diff --git a/app/models/user.rb b/app/models/user.rb index e3ecccf039..99d119915b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -233,7 +233,7 @@ def identifier_for(scheme) identifiers.by_scheme_name(scheme, 'User')&.first end - # Checks if the user is a super admin. If the user has any privelege which requires + # Checks if the user is a super admin. If the user has any privilege which requires # them to see the super admin page then they are a super admin. # # Returns Boolean @@ -241,7 +241,7 @@ def can_super_admin? can_add_orgs? || can_grant_api_to_orgs? || can_change_org? end - # Checks if the user is an organisation admin if the user has any privlege which + # Checks if the user is an organisation admin if the user has any privilege which # requires them to see the org-admin pages then they are an org admin. # # Returns Boolean diff --git a/app/policies/api/v1/plans_policy.rb b/app/policies/api/v1/plans_policy.rb index 96d1cfc4b5..bf5008e9a7 100644 --- a/app/policies/api/v1/plans_policy.rb +++ b/app/policies/api/v1/plans_policy.rb @@ -7,7 +7,7 @@ class PlansPolicy < ApplicationPolicy # NOTE: @user is either a User or an ApiClient # A helper method that takes the current client and returns the plans they - # have acess to + # have access to class Scope ## return the visible plans (via the API) to a given client # ALL can view: public diff --git a/app/policies/template_policy.rb b/app/policies/template_policy.rb index edceac110f..6bd23ff825 100644 --- a/app/policies/template_policy.rb +++ b/app/policies/template_policy.rb @@ -76,7 +76,7 @@ def unpublish? # - The template which they are modifying belongs to their org ## - # Anyone with an account should be able to get templates for the sepecified research_org + funder + # Anyone with an account should be able to get templates for the specified research_org + funder # This policy is applicable to the Create Plan page def template_options? @user.present? diff --git a/app/presenters/contributor_presenter.rb b/app/presenters/contributor_presenter.rb index e0ea57ee7e..0e476207ff 100644 --- a/app/presenters/contributor_presenter.rb +++ b/app/presenters/contributor_presenter.rb @@ -53,7 +53,7 @@ def role_symbol_to_string(symbol:) def role_tooltip(symbol:) case symbol when :data_curation - _('Management activities to annotate (produce metadata), scrub data and maintain research data (including software code, where it is necessary for interpreting the data itself) for initial use and later re-use.') + _('Management activities to annotate (produce metadata), scrub data and maintain research data (including software code, where it is necessary for interpreting the data itself) for initial use and later reuse.') when :investigation _('Conducting a research and investigation process, specifically performing the experiments, or data/evidence collection.') when :project_administration diff --git a/app/services/api/v1/auth/jwt/json_web_token.rb b/app/services/api/v1/auth/jwt/json_web_token.rb index d788ad0d77..0cd1f85102 100644 --- a/app/services/api/v1/auth/jwt/json_web_token.rb +++ b/app/services/api/v1/auth/jwt/json_web_token.rb @@ -4,7 +4,7 @@ module Api module V1 module Auth module Jwt - # Class to handle encryption/descryption of the JWT + # Class to handle encryption/decryption of the JWT class JsonWebToken class << self def encode(payload:, exp: 24.hours.from_now) diff --git a/app/services/api/v1/conversion_service.rb b/app/services/api/v1/conversion_service.rb index d024ccc926..d6ef2c4b6a 100644 --- a/app/services/api/v1/conversion_service.rb +++ b/app/services/api/v1/conversion_service.rb @@ -23,7 +23,7 @@ def yes_no_unknown_to_boolean(value) false end - # Converts the context and value into an Identifier with a psuedo + # Converts the context and value into an Identifier with a pseudo # IdentifierScheme for display in JSON partials. Which will result in: # { type: 'context', identifier: 'value' } def to_identifier(context:, value:) diff --git a/app/services/api/v1/deserialization/funding.rb b/app/services/api/v1/deserialization/funding.rb index 563690e562..f669f849df 100644 --- a/app/services/api/v1/deserialization/funding.rb +++ b/app/services/api/v1/deserialization/funding.rb @@ -3,7 +3,7 @@ module Api module V1 module Deserialization - # Logic to deserialize RDA common standard to a Plan funder and grant infor + # Logic to deserialize RDA common standard to a Plan funder and grant info class Funding class << self # Convert the funding information and attach to the Plan diff --git a/app/services/api/v1/deserialization/plan.rb b/app/services/api/v1/deserialization/plan.rb index 13a118754a..23b648c746 100644 --- a/app/services/api/v1/deserialization/plan.rb +++ b/app/services/api/v1/deserialization/plan.rb @@ -64,7 +64,7 @@ def deserialize(json: {}) # TODO: Handle ethical issues when the Question is in place - # Process Project, Contributors and Data Contact and Datsets + # Process Project, Contributors and Data Contact and Datasets plan = deserialize_project(plan: plan, json: json) plan = deserialize_contact(plan: plan, json: json) plan = deserialize_contributors(plan: plan, json: json) diff --git a/app/services/api/v1/deserialization_service.rb b/app/services/api/v1/deserialization_service.rb index 1fe53510e0..e88d081d7c 100644 --- a/app/services/api/v1/deserialization_service.rb +++ b/app/services/api/v1/deserialization_service.rb @@ -50,7 +50,7 @@ def translate_role(role:) url = ::Contributor::ONTOLOGY_BASE_URL role = role.gsub("#{url}/", '').downcase if role.include?(url) - # Return the role if its a valid one otherwise defualt + # Return the role if its a valid one otherwise default return role if ::Contributor.new.all_roles.include?(role.downcase.to_sym) default diff --git a/app/services/external_apis/base_service.rb b/app/services/external_apis/base_service.rb index 86cbbca566..6048ffe729 100644 --- a/app/services/external_apis/base_service.rb +++ b/app/services/external_apis/base_service.rb @@ -40,7 +40,7 @@ def active? end # The standard headers to be used when communicating with an external API. - # These headers can be overriden or added to when calling an external API + # These headers can be overridden or added to when calling an external API # by sending your changes in the `additional_headers` attribute of # `http_get` def headers diff --git a/app/services/external_apis/ror_service.rb b/app/services/external_apis/ror_service.rb index e639bf2b94..75c8191492 100644 --- a/app/services/external_apis/ror_service.rb +++ b/app/services/external_apis/ror_service.rb @@ -77,7 +77,7 @@ def search(term:, filters: []) private - # Queries the ROR API for the sepcified name and page + # Queries the ROR API for the specified name and page def query_ror(term:, page: 1, filters: []) return [] unless term.present? diff --git a/app/services/org/create_created_plan_service.rb b/app/services/org/create_created_plan_service.rb index 2f88950305..13ddff0dcb 100644 --- a/app/services/org/create_created_plan_service.rb +++ b/app/services/org/create_created_plan_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# statements fix Circular dependancy errors due to threading +# statements fix Circular dependency errors due to threading # see: https://github.com/grosser/parallel#nameerror-uninitialized-constant OrgDateRangeable.class StatCreatedPlan.class diff --git a/app/services/org/create_exported_plan_service.rb b/app/services/org/create_exported_plan_service.rb index 7fe475b98b..5b4b543114 100644 --- a/app/services/org/create_exported_plan_service.rb +++ b/app/services/org/create_exported_plan_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# statements fix Circular dependancy errors due to threading +# statements fix Circular dependency errors due to threading # see: https://github.com/grosser/parallel#nameerror-uninitialized-constant OrgDateRangeable.class StatExportedPlan.class diff --git a/app/services/org/create_joined_user_service.rb b/app/services/org/create_joined_user_service.rb index cc8707467f..a30d949ea5 100644 --- a/app/services/org/create_joined_user_service.rb +++ b/app/services/org/create_joined_user_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# statements fix Circular dependancy errors due to threading +# statements fix Circular dependency errors due to threading # see: https://github.com/grosser/parallel#nameerror-uninitialized-constant OrgDateRangeable.class StatJoinedUser.class diff --git a/app/services/org/create_last_month_created_plan_service.rb b/app/services/org/create_last_month_created_plan_service.rb index 6176b4bd30..822415b5dd 100644 --- a/app/services/org/create_last_month_created_plan_service.rb +++ b/app/services/org/create_last_month_created_plan_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# statements fix Circular dependancy errors due to threading +# statements fix Circular dependency errors due to threading # see: https://github.com/grosser/parallel#nameerror-uninitialized-constant OrgDateRangeable.class StatCreatedPlan.class diff --git a/app/services/org/create_last_month_exported_plan_service.rb b/app/services/org/create_last_month_exported_plan_service.rb index 39b474df10..38ac1789b2 100644 --- a/app/services/org/create_last_month_exported_plan_service.rb +++ b/app/services/org/create_last_month_exported_plan_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# statements fix Circular dependancy errors due to threading +# statements fix Circular dependency errors due to threading # see: https://github.com/grosser/parallel#nameerror-uninitialized-constant OrgDateRangeable.class StatExportedPlan.class diff --git a/app/services/org/create_last_month_joined_user_service.rb b/app/services/org/create_last_month_joined_user_service.rb index db45dd6f6d..78c0c025db 100644 --- a/app/services/org/create_last_month_joined_user_service.rb +++ b/app/services/org/create_last_month_joined_user_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# statements fix Circular dependancy errors due to threading +# statements fix Circular dependency errors due to threading # see: https://github.com/grosser/parallel#nameerror-uninitialized-constant OrgDateRangeable.class StatJoinedUser.class diff --git a/app/services/org/create_last_month_shared_plan_service.rb b/app/services/org/create_last_month_shared_plan_service.rb index ca6305ea2b..ff7972240e 100644 --- a/app/services/org/create_last_month_shared_plan_service.rb +++ b/app/services/org/create_last_month_shared_plan_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# statements fix Circular dependancy errors due to threading +# statements fix Circular dependency errors due to threading # see: https://github.com/grosser/parallel#nameerror-uninitialized-constant OrgDateRangeable.class StatSharedPlan.class diff --git a/app/services/org/create_shared_plan_service.rb b/app/services/org/create_shared_plan_service.rb index 7a914816ee..ad64986ed8 100644 --- a/app/services/org/create_shared_plan_service.rb +++ b/app/services/org/create_shared_plan_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# statements fix Circular dependancy errors due to threading +# statements fix Circular dependency errors due to threading # see: https://github.com/grosser/parallel#nameerror-uninitialized-constant OrgDateRangeable.class StatSharedPlan.class diff --git a/app/services/org_selection/search_service.rb b/app/services/org_selection/search_service.rb index 67aa023c5d..3db5dc4aa3 100644 --- a/app/services/org_selection/search_service.rb +++ b/app/services/org_selection/search_service.rb @@ -117,7 +117,7 @@ def deduplicate(records:) # - Example College # - Example University # - University of Example - # - Universidade de Examplar + # - Universidade de Exemplar # - Another College that ROR has a matching alias for # def sort(array:) diff --git a/app/views/plans/_project_details.html.erb b/app/views/plans/_project_details.html.erb index a147190a43..077730f1ce 100644 --- a/app/views/plans/_project_details.html.erb +++ b/app/views/plans/_project_details.html.erb @@ -6,7 +6,7 @@ project_abstract_tooltip = _("Briefly summarise your research project to help ot id_tooltip = _('A pertinent ID as determined by the funder and/or organisation.') ethics_tooltip = _("Whether there are any potential ethical issues related to data that this DMP describes") ethics_description_tooltip = _("Description of the ethical issues") -ethics_report_tooltip = _("Link to a protocol from a meeting with an ethics commitee") +ethics_report_tooltip = _("Link to a protocol from a meeting with an ethics committee") %>
diff --git a/app/views/plans/_share_form.html.erb b/app/views/plans/_share_form.html.erb index 3f0f53fa5c..1d51a0b705 100644 --- a/app/views/plans/_share_form.html.erb +++ b/app/views/plans/_share_form.html.erb @@ -2,7 +2,7 @@ <% editor = Role.new(editor: true, commenter: true) %> <% commenter = Role.new(commenter: true) %> <% administerable = @plan.administerable_by?(current_user.id) %> -<% email_tooltip = _("Enter the email address of your collaborator: If they are already using #{ApplicationService.application_name}, they will see this plan on their dashboard, and recieve an email. If they are not currently using #{ApplicationService.application_name}, they will recieve an email inviting them to the tool so they can collaborate on your plan.") %> +<% email_tooltip = _("Enter the email address of your collaborator: If they are already using #{ApplicationService.application_name}, they will see this plan on their dashboard, and receive an email. If they are not currently using #{ApplicationService.application_name}, they will receive an email inviting them to the tool so they can collaborate on your plan.") %> <% permissions_tooltip = _('Co-owner: Has admin-rights to the plan (can invite other users, view the plan, answer questions, or comment). Editor: Has edit-rights to the plan (can view the plan, answer questions, or comment). Read Only: Has read-rights to the plan (can view the plan or comment)') %>

<%= _('Set plan visibility') %>

diff --git a/app/views/shared/export/_plan_txt.erb b/app/views/shared/export/_plan_txt.erb index ff8570c785..5547cf3aaa 100644 --- a/app/views/shared/export/_plan_txt.erb +++ b/app/views/shared/export/_plan_txt.erb @@ -49,7 +49,7 @@ <% if remove_list(@plan).include?(question[:id]) %> <% next %> <% end %> - <%# text in this case is an array to accomodate for option_based %> + <%# text in this case is an array to accommodate for option_based %> <% if @show_sections_questions %> <% answer = @plan.answer(question[:id], false) %> <% if @show_unanswered %> diff --git a/app/views/user_mailer/permissions_change_notification.html.erb b/app/views/user_mailer/permissions_change_notification.html.erb index 5a66cd22a3..cad38193e5 100644 --- a/app/views/user_mailer/permissions_change_notification.html.erb +++ b/app/views/user_mailer/permissions_change_notification.html.erb @@ -1,5 +1,5 @@

- <%= _('Hello %{recepientname}') %{ recepientname: @recepient.name } %> + <%= _('Hello %{recepientname}') %{ recepientname: @recipient.name } %>

<%= _('Your permissions relating to %{plan_title} have changed. You now have %{type} access. This means you can %{placeholder1} %{placeholder2}') % { diff --git a/config/initializers/_dmproadmap.rb b/config/initializers/_dmproadmap.rb index 200b7ddac5..46e3b208d0 100644 --- a/config/initializers/_dmproadmap.rb +++ b/config/initializers/_dmproadmap.rb @@ -21,7 +21,7 @@ class Application < Rails::Application # ORGANISATION SETTINGS # # --------------------- # - # Your organisation name, used in various places throught the application + # Your organisation name, used in various places throughout the application config.x.organisation.name = 'Curation Center' # Your organisation's abbreviation config.x.organisation.abbreviation = 'CC' diff --git a/config/initializers/dmproadmap_schema_dumper.rb b/config/initializers/dmproadmap_schema_dumper.rb index 1305d80189..6a53dcac5b 100644 --- a/config/initializers/dmproadmap_schema_dumper.rb +++ b/config/initializers/dmproadmap_schema_dumper.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module ActiveRecord - # The Rails 5.x SchemaDumper includes an `options:` arrgument on table definitions + # The Rails 5.x SchemaDumper includes an `options:` argument on table definitions # that is not DB agnostic. This Monkey Patch comments out the `options:` section. # # TODO: Determine if this is still necessary in Rails 6.x+ diff --git a/config/initializers/htmlto_word_xslt_helper.rb b/config/initializers/htmlto_word_xslt_helper.rb index 5eda752980..cca06a1256 100644 --- a/config/initializers/htmlto_word_xslt_helper.rb +++ b/config/initializers/htmlto_word_xslt_helper.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # This helper method xslt_path prepends the htmltoword method, -# to allow us to overide the numbering.xslt styleheet with one +# to allow us to override the numbering.xslt styleheet with one # with fix in https://github.com/karnov/htmltoword/issues/73 # We applied this gem gem htmltoword-1.1.0. diff --git a/config/initializers/locale.rb b/config/initializers/locale.rb index bfebb7b682..92a33a3d33 100644 --- a/config/initializers/locale.rb +++ b/config/initializers/locale.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# This initilializer should not be removed unless all internationalisation is handled by +# This initializer should not be removed unless all internationalisation is handled by # gettext_rails DMPRoadmap::Application.config.i18n.load_path += Dir[ Rails.root.join('config', 'locales', '**', '*.yml').to_s diff --git a/config/initializers/translation.rb b/config/initializers/translation.rb index ba2ecc31df..ea8ca93fc0 100644 --- a/config/initializers/translation.rb +++ b/config/initializers/translation.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # New with Rails 6+, we need to define the list of locales outside the context of -# the Database since thiss runs during startup. Trying to access the DB causes +# the Database since this runs during startup. Trying to access the DB causes # issues with autoloading; 'DEPRECATION WARNING: Initialization autoloaded the constants ... Language' # # Note that the entries here must have a corresponding directory in config/locale, a diff --git a/config/storage.yml b/config/storage.yml index d32f76e8fb..25faa9eebd 100644 --- a/config/storage.yml +++ b/config/storage.yml @@ -14,7 +14,7 @@ local: # region: us-east-1 # bucket: your_own_bucket -# Remember not to checkin your GCS keyfile to a repository +# Remember not to check in your GCS keyfile to a repository # google: # service: GCS # project: your_project diff --git a/db/migrate/20161122152339_new_plan_template_structure.rb b/db/migrate/20161122152339_new_plan_template_structure.rb index 0f3aa398bb..ad8a1fa495 100644 --- a/db/migrate/20161122152339_new_plan_template_structure.rb +++ b/db/migrate/20161122152339_new_plan_template_structure.rb @@ -147,7 +147,7 @@ def up puts "" puts "beginning number #{proj_number}" proj_number +=1 - if project.dmptemplate.nil? # one of the templates dosent exist + if project.dmptemplate.nil? # one of the templates doesn't exist next end new_plan = initNewPlan(project) # copy data from project to NewPlan object @@ -230,7 +230,7 @@ def up # template/phases/sections/questions/question_options/question_themes # now need to init answers, notes, answers_options #new_plan.template.new_phases.each do |new_phase| - puts "transfering plan data" + puts "transferring plan data" project.project_groups.each do |group| role = initRole(group, new_plan) role.save! diff --git a/db/migrate/20161206122926_add_foreign_keys.rb b/db/migrate/20161206122926_add_foreign_keys.rb index bb0e1a9f68..4e702a9c07 100644 --- a/db/migrate/20161206122926_add_foreign_keys.rb +++ b/db/migrate/20161206122926_add_foreign_keys.rb @@ -1,6 +1,6 @@ class AddForeignKeys < ActiveRecord::Migration[4.2] # this migraiton modifies data in tables, and thus depends on being at a specific - # point in the history of the codebase. Specificly the models must reflect the + # point in the history of the codebase. Specifically the models must reflect the # relationships expected within this code def change # remove broken references diff --git a/lib/data_cleanup/README.md b/lib/data_cleanup/README.md index 0574bf30da..939c5f5bf1 100644 --- a/lib/data_cleanup/README.md +++ b/lib/data_cleanup/README.md @@ -65,7 +65,7 @@ These are defined in `lib/data_cleanup/rules`. ### Creating a new rule -You can create a new rule by running the following genrator: +You can create a new rule by running the following generator: ``` bash $ rails g data_cleanup_rule user/fix_missing_emails @@ -73,7 +73,7 @@ $ rails g data_cleanup_rule user/fix_missing_emails This will create a file `lib/data_cleanup/rules/user/fix_missing_emails.rb` which contains the rules for updating users with missing emails. -Feel free to add your own rules where neccesary to fix your own data. +Feel free to add your own rules where necessary to fix your own data. ## Logging output diff --git a/lib/global_helpers.rb b/lib/global_helpers.rb index 7d52c0c4df..02b0935a86 100644 --- a/lib/global_helpers.rb +++ b/lib/global_helpers.rb @@ -3,10 +3,10 @@ # Helpers for GetText strings module GlobalHelpers # overloading the method - # came across a wierd issue where the function would refused to be called from + # came across a weird issue where the function would refused to be called from # class functions of other classes... but it will work if this is a class function # easiest way to give this functionality is to overload the function - # if you have a better solution, please impliment it as this is ugly + # if you have a better solution, please implement it as this is ugly def self.constant(str) I18n.t("magic_strings.#{str}", locale: I18n.default_locale) end @@ -16,7 +16,7 @@ def self.constant(str) ## # Takes in a string which is meant to be constant, and looks it up in the default # (en_GB) locale. This should ensure that the back-end remains constant and - # consistantly called + # consistently called # # str - The String which will be looked up in the localisation # diff --git a/lib/tasks/data_cleanup.rake b/lib/tasks/data_cleanup.rake index 11e4108f5c..9f54e8ae72 100644 --- a/lib/tasks/data_cleanup.rake +++ b/lib/tasks/data_cleanup.rake @@ -209,7 +209,7 @@ namespace :data_cleanup do ids = [] if filter.options[:with].present? filter.attributes.each do |attr| - # skip password validaton since the field is encrypted through Devise + # skip password validation since the field is encrypted through Devise unless attr == :password # If this is the users.email field send it to the EmailValidator. Devise has its own Regex # but running a Regex query gets messy between different DB types diff --git a/lib/tasks/upgrade.rake b/lib/tasks/upgrade.rake index 39c83aacf9..c9818b91ec 100644 --- a/lib/tasks/upgrade.rake +++ b/lib/tasks/upgrade.rake @@ -847,7 +847,7 @@ namespace :upgrade do end count = Identifier.where(identifiable_type: 'User').length - p "Transfer complete. Orginal user_identifier count #{identifiers.length}, new identifiers count #{count}" + p "Transfer complete. Original user_identifier count #{identifiers.length}, new identifiers count #{count}" if identifiers.length > count p '' p "#{identifiers.length - count} records could not be transferred." @@ -884,7 +884,7 @@ namespace :upgrade do identifiable: oi.org, value: oi.identifier) end count = Identifier.where(identifiable_type: 'Org').length - p "Transfer complete. Orginal org_identifier count #{identifiers.length}, new identifiers count #{count}" + p "Transfer complete. Original org_identifier count #{identifiers.length}, new identifiers count #{count}" # rubocop:disable Layout/LineLength if identifiers.length > count p '' @@ -1203,7 +1203,7 @@ namespace :upgrade do p '' p " Assigned #{number_with_delimiter(rors_added)} ROR identifiers to your Orgs" p " Assigned #{number_with_delimiter(fundrefs_added)} Crossref Funder identifiers to your Orgs" - p ' NOTE: Please refer to the tmp/ror_fundref_ids.csv file to see how the assigment worked.' + p ' NOTE: Please refer to the tmp/ror_fundref_ids.csv file to see how the assignment worked.' p ' You should make any adjustments BEFORE running part 2 of the upgrade scripts!' p ' For example ROR sometimes incorrectly matches Orgs. For example:' p " 'University of Somewhere' may match to 'Univerity of Somewhere - Medical Center'" diff --git a/lib/tasks/utils/templates.rake b/lib/tasks/utils/templates.rake index da9c5bdef6..075061b453 100644 --- a/lib/tasks/utils/templates.rake +++ b/lib/tasks/utils/templates.rake @@ -30,7 +30,7 @@ namespace :templates do funder_template.phases.select { |phase| phase.versionable_id.nil? }.each do |phase| p "Processing Template: #{funder_template.id} - #{funder_template.title}" - # Run all of this within a transation so that it rolls back if there is an issue! + # Run all of this within a transaction so that it rolls back if there is an issue! phase.transaction do phase_version = SecureRandom.uuid p " Updating versionable_id for Phase: #{phase.id} to #{phase_version}" @@ -53,7 +53,7 @@ namespace :templates do versionable_id: section_version ) - section.questions.select { |ques| ques.versionable_id.nil? }.each do |question| + section.questions.select { |ques| ques.versionable_id.nil? }.each do |question| # codespell:ignore question_version = SecureRandom.uuid p " Updating versionable_id for Question: #{question.id} to #{question_version}" question.update_columns(versionable_id: question_version) diff --git a/public/i18n.js b/public/i18n.js index 9797f5b2c9..9031caa370 100644 --- a/public/i18n.js +++ b/public/i18n.js @@ -38,7 +38,7 @@ return ("0" + number.toString()).substr(-2); }; - // Improved toFixed number rounding function with support for unprecise floating points + // Improved toFixed number rounding function with support for imprecise floating points // JavaScript's standard toFixed function does not round certain numbers correctly (for example 0.105 with precision 2). var toFixed = function(number, precision) { return decimalAdjust('round', number, -precision).toFixed(precision); @@ -364,7 +364,7 @@ } }; - // Merge serveral hash options, checking if value is set before + // Merge several hash options, checking if value is set before // overwriting any value. The precedence is from left to right. // // I18n.prepareOptions({name: "John Doe"}, {name: "Mary Doe", role: "user"}); diff --git a/spec/controllers/contributors_controller_spec.rb b/spec/controllers/contributors_controller_spec.rb index 1545c6a901..b6356b89ee 100644 --- a/spec/controllers/contributors_controller_spec.rb +++ b/spec/controllers/contributors_controller_spec.rb @@ -73,7 +73,7 @@ expect(contrib.email).to eql(params[:email]) expect(contrib.phone).to eql(params[:phone].to_s) - # Verify that the corrrect roles were assigned + # Verify that the correct roles were assigned contrib.all_roles.each do |role| expect(contrib.send(:"#{role}?")).to eql(params[:"#{role}"] == '1') end @@ -99,7 +99,7 @@ expect(@contributor.email).to eql(params[:email]) expect(@contributor.phone).to eql(params[:phone].to_s) - # Verify that the corrrect roles were assigned + # Verify that the correct roles were assigned @contributor.all_roles.each do |role| expect(@contributor.send(:"#{role}?")).to eql(params[:"#{role}"] == '1') end diff --git a/spec/features/annotations/annotations_editing_spec.rb b/spec/features/annotations/annotations_editing_spec.rb index 0edfc4a25e..9662d7c109 100644 --- a/spec/features/annotations/annotations_editing_spec.rb +++ b/spec/features/annotations/annotations_editing_spec.rb @@ -47,7 +47,7 @@ within("fieldset#fields_annotation_#{template.annotation_ids.last}") do id = "question_annotations_attributes_annotation_#{template.annotation_ids.last}_text" - tinymce_fill_in(id, with: 'Noo bar') + tinymce_fill_in(id, with: 'Noo bar') # codespell:ignore end # NOTE: This is question 2, since Annotation was copied upon clicking "Customise" @@ -56,7 +56,7 @@ expect { click_button 'Save' }.not_to change { Annotation.count } end expect(annotation.text).to eql('Foo bar') - expect(Annotation.order('created_at').last.text).to eql('

Noo bar

') + expect(Annotation.order('created_at').last.text).to eql('

Noo bar

') # codespell:ignore expect(page).not_to have_errors end diff --git a/spec/features/registrations_spec.rb b/spec/features/registrations_spec.rb index 50ef4d60ab..119b315727 100644 --- a/spec/features/registrations_spec.rb +++ b/spec/features/registrations_spec.rb @@ -31,7 +31,7 @@ expect(page).to have_text(user_attributes[:surname]) end - scenario 'User attempts to create a new acccount with invalid atts', :js do + scenario 'User attempts to create a new account with invalid atts', :js do # Setup visit root_path diff --git a/spec/models/language_spec.rb b/spec/models/language_spec.rb index 7735f210b3..d00f151c9e 100644 --- a/spec/models/language_spec.rb +++ b/spec/models/language_spec.rb @@ -54,7 +54,7 @@ describe '.default' do subject { Language.default } - context 'when langauge is default_language' do + context 'when language is default_language' do let!(:language) { create(:language, abbreviation: 'foo', default_language: true) } it { is_expected.to eql(language) } diff --git a/spec/models/plan_spec.rb b/spec/models/plan_spec.rb index bbddb5b76e..17c550fabb 100644 --- a/spec/models/plan_spec.rb +++ b/spec/models/plan_spec.rb @@ -398,7 +398,7 @@ expect(subject.title).to include(plan.title) end - it "copies the new plan's id to its identifer" do + it "copies the new plan's id to its identifier" do expect(subject.identifier).to eql(subject.id.to_s) end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 63ffc73a06..e7f4d91f8c 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -6,7 +6,7 @@ context 'validations' do it { is_expected.to validate_presence_of(:email) } - it 'should validate that email addres is unqique' do + it 'should validate that email address is unqique' do subject.email = 'text-email@example.com' is_expected.to validate_uniqueness_of(:email) .case_insensitive @@ -464,7 +464,7 @@ end end - # Test creationg a User from an omniauth callback like Shibboleth + # Test creating a User from an omniauth callback like Shibboleth describe '.from_omniauth' do let!(:user) { create(:user) } let!(:auth) do @@ -502,7 +502,7 @@ subject { user.get_preferences(key) } - context "when the User doesn't have thier own Pref" do + context "when the User doesn't have their own Pref" do it 'returns the default value' do Pref.expects(:default_settings) .returns(email: { foo: { 'bar' => 'baz' } }) @@ -510,7 +510,7 @@ end end - context 'when the User has thier own Pref' do + context 'when the User has their own Pref' do before do create(:pref, user: user, settings: { email: { foo: { bar: 'bam' } } }) diff --git a/spec/presenters/identifier_presenter_spec.rb b/spec/presenters/identifier_presenter_spec.rb index ab7b5282e1..232c1014b5 100644 --- a/spec/presenters/identifier_presenter_spec.rb +++ b/spec/presenters/identifier_presenter_spec.rb @@ -11,7 +11,7 @@ end describe '#identifiers' do - it "returns the identiable object's identifiers" do + it "returns the identifiable object's identifiers" do id = build(:identifier) @user.identifiers << id @user.org.identifiers << build(:identifier) diff --git a/spec/presenters/org_selection_presenter_spec.rb b/spec/presenters/org_selection_presenter_spec.rb index 6487061ab2..90b71d9f67 100644 --- a/spec/presenters/org_selection_presenter_spec.rb +++ b/spec/presenters/org_selection_presenter_spec.rb @@ -41,7 +41,7 @@ it 'return an empty hash if the value does not have a match in crosswalk' do expect(@presenter.crosswalk_entry_from_org_id(value: '999')).to eql('{}') end - it 'return ther correct crosswalk entry' do + it 'return the correct crosswalk entry' do rslt = @presenter.crosswalk_entry_from_org_id(value: @org.id.to_s) expected = OrgSelection::OrgToHashService.to_hash(org: @org).to_json expect(rslt).to eql(expected) diff --git a/spec/services/api/v1/conversion_service_spec.rb b/spec/services/api/v1/conversion_service_spec.rb index e8845b84bd..0b21e6bd4b 100644 --- a/spec/services/api/v1/conversion_service_spec.rb +++ b/spec/services/api/v1/conversion_service_spec.rb @@ -50,7 +50,7 @@ value: Faker::Lorem.word) expect(expected.identifier_scheme.name).to eql(context) end - it "returns an Identifier asssociated with the 'grant' scheme" do + it "returns an Identifier associated with the 'grant' scheme" do value = Faker::Lorem.word expected = described_class.to_identifier(context: Faker::Lorem.word, value: value) diff --git a/spec/services/external_apis/base_service_spec.rb b/spec/services/external_apis/base_service_spec.rb index 3823cf0c23..3360dfddf2 100644 --- a/spec/services/external_apis/base_service_spec.rb +++ b/spec/services/external_apis/base_service_spec.rb @@ -104,7 +104,7 @@ result = described_class.send(:options) expect(result[:headers][:Accept]).to eql('*/*') end - it 'merges additonal headers into the :headers option' do + it 'merges additional headers into the :headers option' do result = described_class.send(:options, additional_headers: { foo: 'bar' }) expect(result[:headers][:Accept]).to eql('*/*') expect(result[:headers][:foo]).to eql('bar') diff --git a/spec/services/external_apis/spdx_service_spec.rb b/spec/services/external_apis/spdx_service_spec.rb index 7cb3fa4e5b..a7229566b7 100644 --- a/spec/services/external_apis/spdx_service_spec.rb +++ b/spec/services/external_apis/spdx_service_spec.rb @@ -48,7 +48,7 @@ described_class.expects(:log_error) expect(described_class.send(:query_spdx)).to eql([]) end - it 'returns an empty array if the response conatins no license' do + it 'returns an empty array if the response contains no license' do JSON.expects(:parse).returns({}) expect(described_class.send(:query_spdx)).to eql([]) end diff --git a/spec/services/org/create_created_plan_service_spec.rb b/spec/services/org/create_created_plan_service_spec.rb index a3bc78e653..26e05ed48d 100644 --- a/spec/services/org/create_created_plan_service_spec.rb +++ b/spec/services/org/create_created_plan_service_spec.rb @@ -151,7 +151,7 @@ def find_by_dates(dates:, org_id:) expect(counts).to eq([2, 1, 2, 0]) end - it 'generates montly counts by template for each org since their creation' do + it 'generates monthly counts by template for each org since their creation' do Org.stubs(:all).returns([org]) described_class.call diff --git a/spec/support/helpers/autocomplete_helper.rb b/spec/support/helpers/autocomplete_helper.rb index 61b26f1dbc..b8b5be793d 100644 --- a/spec/support/helpers/autocomplete_helper.rb +++ b/spec/support/helpers/autocomplete_helper.rb @@ -23,7 +23,7 @@ def choose_suggestion(typeahead_id, org) # Some unfortunate hacks to deal with naming inconsistencies on the create plan page # and the Super Admin merge orgs tab id = id.gsub('org_org_', 'org_').gsub('funder_org_', 'funder_') - # Excape any single quotes so it doesn't blow up our JS + # Escape any single quotes so it doesn't blow up our JS hash = { id: org.id, name: org.name.delete("'") } # Capybara/Selenium can't interact with a hidden field because the user can't, # so use some JS to set the value