Skip to content

Commit 706f0f6

Browse files
committed
[DATALAD RUNCMD] run codespell throughout fixing few left typos automagically
=== Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^
1 parent a197035 commit 706f0f6

File tree

68 files changed

+88
-88
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+88
-88
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Metrics/MethodLength:
131131
Max: 20
132132

133133
# mnicholson Oct. 6th 2021
134-
# Default lenght for block is 25 lines, which it would be very restrictive for
134+
# Default length for block is 25 lines, which it would be very restrictive for
135135
# the Rspec views methods. So I'll just exclude some files.
136136
Metrics/BlockLength:
137137
Exclude:

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ As Webpacker is no longer maintained by the Rails community, we have replaced it
233233
- Removed `font-awesome-sass` gem and used `@fortawesome/fontawesome-free` npm package
234234
- 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.
235235

236-
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.
236+
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.
237237

238238
#### SASS update : removal of the `@import` keyword
239239

@@ -287,7 +287,7 @@ For more detailed explanation, please refer to this video : https://www.youtube.
287287
- Froze mail gem version [#3254](https://github.com/DMPRoadmap/roadmap/issues/3254)
288288
- Updated the CSV export so that it now includes research outputs
289289
- Updated sans-serif font used in PDF downloads to Roboto since Google API no longer offers Helvetica
290-
- Fixed discrepencies with default/max per_page values for API and UI pagination
290+
- Fixed discrepancies with default/max per_page values for API and UI pagination
291291
- Updated JS that used to call the TinyMCE `setMode()` function so that it now calls `mode.set()` because the former is now deprecated.
292292
- Patched an issue that was causing a template's visibility to change to 'organizationally_visible' when saving on the template details page.
293293
- Fixed an issue with the Rails 6 keyword arguments change that was causing the `paginable_sort_link` to fail

app/assets/stylesheets/blocks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CSS Blocks
22

3-
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.
3+
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.
44

55
Example:
66

app/assets/stylesheets/blocks/_cards.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
color: $color-secondary-text;
3434
}
3535

36-
// Classes from Boostrap 3 panels (renamed card) - interim solution
36+
// Classes from Bootstrap 3 panels (renamed card) - interim solution
3737
.card-default {
3838
border-color: #ddd;
3939
border-radius: 0rem;

app/assets/stylesheets/blocks/_labels.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@import "../../../../node_modules/bootstrap/scss/functions";
22
@import "../../../../node_modules/bootstrap/scss/variables";
33

4-
/* label stlying */
4+
/* label styling */
55
label {
66
font-weight: 700;
77
}

app/controllers/api/v1/base_api_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def paginate_response(results:)
109109
end
110110

111111
# =========================
112-
# PERMIITTED PARAMS HEPERS
112+
# PERMIITTED PARAMS HELPERS
113113
# =========================
114114
def plan_permitted_params
115115
%i[created title description language ethical_issues_exist

app/controllers/concerns/conditional_user_mailer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module ConditionalUserMailer
88
#
99
# recipients - User or Enumerable object or any object that includes Enumerable class
1010
# key - A key (dot notation) whose value is true/false and belongs to
11-
# prefences.email (see dmproadmap.rb initializer)
11+
# preferences.email (see dmproadmap.rb initializer)
1212
#
1313
# Returns Boolean
1414
def deliver_if(key:, recipients: [], &block)

app/controllers/concerns/paginable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def refine_query(scope)
137137

138138
# Can raise ActiveRecord::StatementInvalid (e.g. column does not
139139
# exist, ambiguity on column, etc)
140-
# how we contruct scope depends on whether sort field is in the
140+
# how we construct scope depends on whether sort field is in the
141141
# main table or in a related table
142142
scope_table = scope.klass.name.underscore
143143
parts = @args[:sort_field].partition('.')

app/controllers/concerns/versionable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
module Versionable
55
private
66

7-
# Takes in a Template, phase, Section, Question, or Annotaion
7+
# Takes in a Template, phase, Section, Question, or Annotation
88
# IF the template is published, generates a new template
99
# finds the passed object in the new template
1010
#

app/controllers/org_admin/template_customization_transfers_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
module OrgAdmin
4-
# Controller that handles transfering parent template changes to a customized template
4+
# Controller that handles transferring parent template changes to a customized template
55
class TemplateCustomizationTransfersController < ApplicationController
66
include Versionable
77

app/controllers/plans_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def duplicate
398398
end
399399
# rubocop:enable Metrics/AbcSize
400400

401-
# TODO: This should probablly just be merged with the update route
401+
# TODO: This should probably just be merged with the update route
402402
# POST /plans/:id/visibility
403403
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
404404
def visibility
@@ -433,7 +433,7 @@ def visibility
433433
end
434434
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
435435

436-
# TODO: This should probablly just be merged with the update route
436+
# TODO: This should probably just be merged with the update route
437437
# POST /plans/:id/set_test
438438
def set_test
439439
plan = Plan.find(params[:id])

app/controllers/public_pages_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def template_export
2929
# only export live templates, id passed is family_id
3030
@template = Template.live(params[:id])
3131
# covers authorization for this action.
32-
# Pundit dosent support passing objects into scoped policies
32+
# Pundit doesn't support passing objects into scoped policies
3333
unless PublicPagePolicy.new(current_user, @template).template_export?
3434
msg = 'You are not authorized to export that template'
3535
redirect_to public_templates_path, notice: msg and return

app/controllers/registrations_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def do_update_password(current_user, args)
269269
elsif args[:password_confirmation].blank?
270270
message = _('Please enter a password confirmation')
271271
elsif args[:password] != args[:password_confirmation]
272-
message = _('Password and comfirmation must match')
272+
message = _('Password and confirmation must match')
273273
else
274274
successfully_updated = current_user.update_with_password(args)
275275
end

app/javascript/src/answers/edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ $(() => {
3434
* form with class form-answer. The key represents a question id and the value holds
3535
* the debounced function for a given input, textarea or select. Note, this map is
3636
* populated on demand, i.e. the first time a change is made at a given input, textarea
37-
* or select within the form, a new key-value should be created. Succesive times, the
37+
* or select within the form, a new key-value should be created. Successive times, the
3838
* debounced function should be retrieved instead.
3939
*/
4040
const debounceMap = {};

app/javascript/src/answers/rdaMetadata.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ $(() => {
139139

140140
function waitAndUpdate() {
141141
if (noWaiting > 0) {
142-
// if we are waiting on api responces, call this function in 1 seccond
142+
// if we are waiting on api responses, call this function in 1 second
143143
setTimeout(waitAndUpdate, 1000);
144144
} else {
145145
// update all the dropdowns/ standards explore box (calling on subject
@@ -183,7 +183,7 @@ $(() => {
183183
// update the standards display selector
184184
$('.rda_metadata .sub-subject select').change();
185185
} else {
186-
// show the sub-subject incase it was previously hidden
186+
// show the sub-subject in case it was previously hidden
187187
subSubject.closest('div').show();
188188
// update the sub-subject display selector
189189
subSubject.find('option').remove();

app/javascript/src/orgAdmin/conditions/updateConditions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function updateConditions(id) {
2222

2323
if (webhook === false) {
2424
if ($(selectObject).val() === 'add_webhook') { // condition type is webhook
25-
// Retreive 'data-bs-target' for modal and create Jquery element
25+
// Retrieve 'data-bs-target' for modal and create Jquery element
2626
const associatedModal = $(condition.find('.pseudo-webhook-btn').attr('data-bs-target'));
2727
associatedModal.modal('show');
2828
condition.find('.display-if-action-remove').hide();
@@ -60,7 +60,7 @@ export default function updateConditions(id) {
6060
condition.find('.webhook-replacement').show();
6161
$(condition.find('.webhook-replacement')).on('click', (event) => {
6262
event.preventDefault();
63-
// Retreive 'data-bs-target' for modal and create Jquery element
63+
// Retrieve 'data-bs-target' for modal and create Jquery element
6464
const associatedModal1 = $(condition.find('.pseudo-webhook-btn').attr('data-bs-target'));
6565
associatedModal1.modal('show');
6666
});

app/javascript/src/usage/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $(() => {
1919
};
2020

2121
// attach listener to separator select menu
22-
// on change look for "stat" elements and chnage their query param
22+
// on change look for "stat" elements and change their query param
2323
const fieldSep = document.getElementById('csv-field-sep');
2424
if (fieldSep !== null) {
2525
fieldSep.addEventListener('click', (e) => {

app/javascript/src/utils/accordion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* <a href="#" data-toggle-direction="hide"><%= _('collapse all') %></a>
1010
* </div>
1111
*
12-
* Your accordion should follow the Boostrap 5.x layout:
12+
* Your accordion should follow the Bootstrap 5.x layout:
1313
* ------------------------------------------------------------
1414
n*
1515
* <div class="accordion" id="accordionDefault">

app/javascript/src/utils/sectionUpdate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ export const updateSectionProgress = (id, numSecAnswers, numSecQuestions) => {
2323
};
2424

2525
// given a question id find the containing div
26-
// used inconditional questions
26+
// used unconditional questions
2727
export const getQuestionDiv = (id) => $(`#answer-form-${id}`).closest('.question-body');

app/javascript/src/utils/tinymce.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export const Tinymce = {
157157
},
158158
/*
159159
Destroy an editor instance whose target element/textarea has HTML id passed. This method
160-
executes tinymce.Editor.destroy (e.g. https://www.tinymce.com/docs/api/tinymce/tinymce.editor/#destroy) for a successfull id found.
160+
executes tinymce.Editor.destroy (e.g. https://www.tinymce.com/docs/api/tinymce/tinymce.editor/#destroy) for a successful id found.
161161
@return undefined
162162
*/
163163
destroyEditorById(id) {

app/mailers/user_mailer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ def permissions_change_notification(role, user)
7070
@role = role
7171
@plan_title = @role.plan.title
7272
@user = user
73-
@recepient = @role.user
73+
@recipient = @role.user
7474
@messaging = role_text(@role)
7575
@helpdesk_email = helpdesk_email(org: @user.org)
7676

7777
I18n.with_locale I18n.default_locale do
78-
mail(to: @recepient.email,
78+
mail(to: @recipient.email,
7979
subject: format(_('Changed permissions on a Data Management Plan in %{tool_name}'),
8080
tool_name: tool_name))
8181
end

app/models/plan.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def settings(key)
291291
# none exists.
292292
#
293293
# qid - The id for the question to find the answer for
294-
# create_if_missing - If true, will genereate a default answer
294+
# create_if_missing - If true, will generate a default answer
295295
# to the question (defaults: true).
296296
#
297297
# Returns Answer

app/models/role.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Role < ApplicationRecord
7171
# Return ActiveRecord::Relation
7272
scope :with_access_flags, lambda { |*flags|
7373
bad_flag = flags.detect { |flag| !flag.in?(flag_mapping['access'].keys) }
74-
raise ArgumentError, "Unkown access flag '#{bad_flag}'" if bad_flag
74+
raise ArgumentError, "Unknown access flag '#{bad_flag}'" if bad_flag
7575

7676
access_values = flags.map { |flag| sql_in_for_flag(flag.to_sym, 'access') }
7777
.flatten
@@ -124,7 +124,7 @@ def deactivate!
124124
# 03 - creator + administrator
125125
# 04 - editor
126126
# 05 - creator + editor
127-
# 06 - administraor + editor
127+
# 06 - administrator + editor
128128
# 07 - creator + editor + administrator
129129
# 08 - commenter
130130
# 09 - creator + commenter
@@ -140,7 +140,7 @@ def deactivate!
140140
# 19 - creator + administrator + reviewer
141141
# 20 - editor + reviewer
142142
# 21 - creator + editor + reviewer
143-
# 22 - administraor + editor + reviewer
143+
# 22 - administrator + editor + reviewer
144144
# 23 - creator + editor + administrator + reviewer
145145
# 24 - commenter + reviewer
146146
# 25 - creator + commenter + reviewer

app/models/section.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def deep_copy(**options)
128128
copy
129129
end
130130

131-
# Can't be modified as it was duplicatd over from another Phase.
131+
# Can't be modified as it was duplicated over from another Phase.
132132
def unmodifiable?
133133
!modifiable?
134134
end

app/models/template.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,17 +450,17 @@ def publishability
450450
unless latest?
451451
error += _('You can not publish a historical version of this template. ')
452452
publishable = false
453-
# all templates have atleast one phase
453+
# all templates have at least one phase
454454
end
455455
if phases.count <= 0
456456
error += _('You can not publish a template without phases. ')
457457
publishable = false
458-
# all phases must have atleast 1 section
458+
# all phases must have at least 1 section
459459
end
460460
unless phases.map { |p| p.sections.count.positive? }.reduce(true) { |fin, val| fin && val }
461461
error += _('You can not publish a template without sections in a phase. ')
462462
publishable = false
463-
# all sections must have atleast one question
463+
# all sections must have at least one question
464464
end
465465
unless sections.map { |s| s.questions.count.positive? }.reduce(true) { |fin, val| fin && val }
466466
error += _('You can not publish a template without questions in a section. ')

app/models/user.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,15 @@ def identifier_for(scheme)
233233
identifiers.by_scheme_name(scheme, 'User')&.first
234234
end
235235

236-
# Checks if the user is a super admin. If the user has any privelege which requires
236+
# Checks if the user is a super admin. If the user has any privilege which requires
237237
# them to see the super admin page then they are a super admin.
238238
#
239239
# Returns Boolean
240240
def can_super_admin?
241241
can_add_orgs? || can_grant_api_to_orgs? || can_change_org?
242242
end
243243

244-
# Checks if the user is an organisation admin if the user has any privlege which
244+
# Checks if the user is an organisation admin if the user has any privilege which
245245
# requires them to see the org-admin pages then they are an org admin.
246246
#
247247
# Returns Boolean

app/policies/api/v1/plans_policy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class PlansPolicy < ApplicationPolicy
77
# NOTE: @user is either a User or an ApiClient
88

99
# A helper method that takes the current client and returns the plans they
10-
# have acess to
10+
# have access to
1111
class Scope
1212
## return the visible plans (via the API) to a given client
1313
# ALL can view: public

app/policies/template_policy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def unpublish?
7676
# - The template which they are modifying belongs to their org
7777
##
7878

79-
# Anyone with an account should be able to get templates for the sepecified research_org + funder
79+
# Anyone with an account should be able to get templates for the specified research_org + funder
8080
# This policy is applicable to the Create Plan page
8181
def template_options?
8282
@user.present?

app/presenters/contributor_presenter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def role_symbol_to_string(symbol:)
5353
def role_tooltip(symbol:)
5454
case symbol
5555
when :data_curation
56-
_('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.')
56+
_('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.')
5757
when :investigation
5858
_('Conducting a research and investigation process, specifically performing the experiments, or data/evidence collection.')
5959
when :project_administration

app/services/api/v1/conversion_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def yes_no_unknown_to_boolean(value)
2323
false
2424
end
2525

26-
# Converts the context and value into an Identifier with a psuedo
26+
# Converts the context and value into an Identifier with a pseudo
2727
# IdentifierScheme for display in JSON partials. Which will result in:
2828
# { type: 'context', identifier: 'value' }
2929
def to_identifier(context:, value:)

app/services/api/v1/deserialization/plan.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def deserialize(json: {})
6464

6565
# TODO: Handle ethical issues when the Question is in place
6666

67-
# Process Project, Contributors and Data Contact and Datsets
67+
# Process Project, Contributors and Data Contact and Datasets
6868
plan = deserialize_project(plan: plan, json: json)
6969
plan = deserialize_contact(plan: plan, json: json)
7070
plan = deserialize_contributors(plan: plan, json: json)

app/services/api/v1/deserialization_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def translate_role(role:)
5050
url = ::Contributor::ONTOLOGY_BASE_URL
5151
role = role.gsub("#{url}/", '').downcase if role.include?(url)
5252

53-
# Return the role if its a valid one otherwise defualt
53+
# Return the role if its a valid one otherwise default
5454
return role if ::Contributor.new.all_roles.include?(role.downcase.to_sym)
5555

5656
default

app/services/external_apis/base_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def active?
4040
end
4141

4242
# The standard headers to be used when communicating with an external API.
43-
# These headers can be overriden or added to when calling an external API
43+
# These headers can be overridden or added to when calling an external API
4444
# by sending your changes in the `additional_headers` attribute of
4545
# `http_get`
4646
def headers

app/services/external_apis/ror_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def search(term:, filters: [])
7777

7878
private
7979

80-
# Queries the ROR API for the sepcified name and page
80+
# Queries the ROR API for the specified name and page
8181
def query_ror(term:, page: 1, filters: [])
8282
return [] unless term.present?
8383

app/services/org/create_created_plan_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
# statements fix Circular dependancy errors due to threading
3+
# statements fix Circular dependency errors due to threading
44
# see: https://github.com/grosser/parallel#nameerror-uninitialized-constant
55
OrgDateRangeable.class
66
StatCreatedPlan.class

app/services/org/create_exported_plan_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
# statements fix Circular dependancy errors due to threading
3+
# statements fix Circular dependency errors due to threading
44
# see: https://github.com/grosser/parallel#nameerror-uninitialized-constant
55
OrgDateRangeable.class
66
StatExportedPlan.class

0 commit comments

Comments
 (0)