Commit 733ae949 authored by George Tsiolis's avatar George Tsiolis 🍉

Fix typos in comments and specs

parent c71c1f03
......@@ -15,7 +15,7 @@ import CommitComponent from '../../vue_shared/components/commit.vue';
import eventHub from '../event_hub';
/**
* Envrionment Item Component
* Environment Item Component
*
* Renders a table row for each environment.
*/
......@@ -60,7 +60,7 @@ export default {
computed: {
/**
* Verifies if `last_deployment` key exists in the current Envrionment.
* Verifies if `last_deployment` key exists in the current Environment.
* This key is required to render most of the html - this method works has
* an helper.
*
......
......@@ -85,7 +85,7 @@ export default class FilteredSearchDropdown {
}
dispatchInputEvent() {
// Propogate input change to FilteredSearchDropdownManager
// Propagate input change to FilteredSearchDropdownManager
// so that it can determine which dropdowns to open
this.input.dispatchEvent(
new CustomEvent('input', {
......
......@@ -28,7 +28,7 @@ export default class GlFieldErrors {
this.form.on('submit', GlFieldErrors.catchInvalidFormSubmit);
}
/* Neccessary to prevent intercept and override invalid form submit
/* Necessary to prevent intercept and override invalid form submit
* because Safari & iOS quietly allow form submission when form is invalid
* and prevents disabling of invalid submit button by application.js */
......
......@@ -110,7 +110,7 @@ export default {
// Get the remaining list to use in `and x more` text.
const remainingAwardList = awardList.slice(TOOLTIP_NAME_COUNT, awardList.length);
// Add myself to the begining of the list so title will start with You.
// Add myself to the beginning of the list so title will start with You.
if (hasReactionByCurrentUser) {
namesToShow.unshift('You');
}
......
......@@ -70,7 +70,7 @@ export const collapseSystemNotes = notes => {
} else if (lastDescriptionSystemNote) {
const timeDifferenceMinutes = getTimeDifferenceMinutes(lastDescriptionSystemNote, note);
// are they less than 10 minutes appart?
// are they less than 10 minutes apart?
if (timeDifferenceMinutes > 10) {
// reset counter
descriptionChangedTimes = 1;
......
......@@ -13,7 +13,7 @@ export default {
},
props: {
/**
* Indicates the existance of a tag.
* Indicates the existence of a tag.
* Used to render the correct icon, if true will render `fa-tag` icon,
* if false will render a svg sprite fork icon
*/
......
......@@ -158,7 +158,7 @@
color: $gl-text-color;
outline: 0;
// make sure the text color is not overriden
// make sure the text color is not overridden
&.text-danger {
color: $brand-danger;
}
......@@ -184,7 +184,7 @@
text-align: left;
width: 100%;
// make sure the text color is not overriden
// make sure the text color is not overridden
&.text-danger {
color: $brand-danger;
}
......
......@@ -33,21 +33,21 @@ class Admin::AppearancesController < Admin::ApplicationController
@appearance.save
redirect_to admin_appearances_path, notice: 'Logo was succesfully removed.'
redirect_to admin_appearances_path, notice: 'Logo was successfully removed.'
end
def header_logos
@appearance.remove_header_logo!
@appearance.save
redirect_to admin_appearances_path, notice: 'Header logo was succesfully removed.'
redirect_to admin_appearances_path, notice: 'Header logo was successfully removed.'
end
def favicon
@appearance.remove_favicon!
@appearance.save
redirect_to admin_appearances_path, notice: 'Favicon was succesfully removed.'
redirect_to admin_appearances_path, notice: 'Favicon was successfully removed.'
end
private
......
......@@ -23,7 +23,7 @@ class Import::GiteaController < Import::GithubController
:"#{provider}_host_url"
end
# Overriden methods
# Overridden methods
def provider
:gitea
end
......
......@@ -103,7 +103,7 @@ class Import::GithubController < Import::BaseController
{ github_access_token: session[access_token_key] }
end
# The following methods are overriden in subclasses
# The following methods are overridden in subclasses
def provider
:github
end
......
......@@ -3,7 +3,7 @@
class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController
layout 'profile'
# Overriden from Doorkeeper::AuthorizationsController to
# Overridden from Doorkeeper::AuthorizationsController to
# include the call to session.delete
def new
if pre_auth.authorizable?
......
......@@ -276,7 +276,7 @@ class ProjectsController < Projects::ApplicationController
# rubocop: enable CodeReuse/ActiveRecord
# Render project landing depending of which features are available
# So if page is not availble in the list it renders the next page
# So if page is not available in the list it renders the next page
#
# pages list order: repository readme, wiki home, issues list, customize workflow
def render_landing_page
......
......@@ -10,7 +10,7 @@ module PageLayoutHelper
@breadcrumb_title = @page_title.last
end
# Segments are seperated by middot
# Segments are separated by middot
@page_title.join(" · ")
end
......
......@@ -167,12 +167,12 @@ class CommitStatus < ActiveRecord::Base
false
end
# To be overriden when inherrited from
# To be overridden when inherrited from
def retryable?
false
end
# To be overriden when inherrited from
# To be overridden when inherrited from
def cancelable?
false
end
......
......@@ -12,12 +12,12 @@ module CacheableAttributes
"#{name}:#{Gitlab::VERSION}:#{Rails.version}".freeze
end
# Can be overriden
# Can be overridden
def current_without_cache
last
end
# Can be overriden
# Can be overridden
def defaults
{}
end
......
......@@ -7,7 +7,7 @@
# `delete_all` is efficient as it deletes all rows with a single `DELETE` query.
#
# It's better to use `delete_all` as our best practice, however,
# if external data (e.g. ObjectStorage, FileStorage or Redis) are assosiated with database records,
# if external data (e.g. ObjectStorage, FileStorage or Redis) are associated with database records,
# it is difficult to accomplish it.
#
# This module defines a format to use `delete_all` and delete associated external data.
......
......@@ -363,7 +363,7 @@ module Issuable
end
##
# Overriden in MergeRequest
# Overridden in MergeRequest
#
def wipless_title_changed(old_title)
old_title != title
......
......@@ -94,7 +94,7 @@ module Storage
if gitlab_shell.mv_namespace(repository_storage, full_path, new_path)
Gitlab::AppLogger.info %Q(Namespace directory "#{full_path}" moved to "#{new_path}")
# Remove namespace directroy async with delay so
# Remove namespace directory async with delay so
# GitLab has time to remove all projects first
run_after_commit do
GitlabShellWorker.perform_in(5.minutes, :rm_namespace, repository_storage, new_path)
......
......@@ -2,7 +2,7 @@
# Mounted uploaders are destroyed by carrierwave's after_commit
# hook. This hook fetches upload location (local vs remote) from
# Upload model. So it's neccessary to make sure that during that
# Upload model. So it's necessary to make sure that during that
# after_commit hook model's associated uploads are not deleted yet.
# IOW we can not use dependent: :destroy :
# has_many :uploads, as: :model, dependent: :destroy
......
......@@ -83,7 +83,7 @@ class Namespace < ActiveRecord::Base
find_by('lower(path) = :value', value: path.downcase)
end
# Case insensetive search for namespace by path or name
# Case insensitive search for namespace by path or name
def find_by_path_or_name(path)
find_by("lower(path) = :path OR lower(name) = :path", path: path.downcase)
end
......
......@@ -665,7 +665,7 @@ class Project < ActiveRecord::Base
remove_import_data
end
# This method is overriden in EE::Project model
# This method is overridden in EE::Project model
def remove_import_data
import_data&.destroy
end
......
......@@ -9,7 +9,7 @@ class IssueTrackerService < Service
# Override this method on services that uses different patterns
# This pattern does not support cross-project references
# The other code assumes that this pattern is a superset of all
# overriden patterns. See ReferenceRegexes::EXTERNAL_PATTERN
# overridden patterns. See ReferenceRegexes::EXTERNAL_PATTERN
def self.reference_pattern(only_long: false)
if only_long
/(\b[A-Z][A-Z0-9_]+-)(?<issue>\d+)/
......
......@@ -99,7 +99,7 @@ module Auth
##
# Because we do not have two way communication with registry yet,
# we create a container repository image resource when push to the
# registry is successfuly authorized.
# registry is successfully authorized.
#
def ensure_container_repository!(path, actions)
return if path.has_repository?
......
......@@ -6,7 +6,7 @@ module Keys
key.destroy if destroy_possible?(key)
end
# overriden in EE::Keys::DestroyService
# overridden in EE::Keys::DestroyService
def destroy_possible?(key)
true
end
......
......@@ -10,7 +10,7 @@ module Members
end
def after_execute(args)
# overriden in EE::Members modules
# overridden in EE::Members modules
end
private
......
......@@ -3,7 +3,7 @@
# NOTE: This service cannot be used directly because it is part of a
# a bigger process. Instead, use the service MoveAccessService which moves
# project memberships, project group links, authorizations and refreshes
# the authorizations if neccessary
# the authorizations if necessary
module Projects
class MoveProjectAuthorizationsService < BaseMoveRelationsService
def execute(source_project, remove_remaining_elements: true)
......
......@@ -3,7 +3,7 @@
# NOTE: This service cannot be used directly because it is part of a
# a bigger process. Instead, use the service MoveAccessService which moves
# project memberships, project group links, authorizations and refreshes
# the authorizations if neccessary
# the authorizations if necessary
module Projects
class MoveProjectGroupLinksService < BaseMoveRelationsService
def execute(source_project, remove_remaining_elements: true)
......
......@@ -3,7 +3,7 @@
# NOTE: This service cannot be used directly because it is part of a
# a bigger process. Instead, use the service MoveAccessService which moves
# project memberships, project group links, authorizations and refreshes
# the authorizations if neccessary
# the authorizations if necessary
module Projects
class MoveProjectMembersService < BaseMoveRelationsService
def execute(source_project, remove_remaining_elements: true)
......
......@@ -433,14 +433,14 @@ module QuickActions
end
end
desc 'Add or substract spent time'
desc 'Add or subtract spent time'
explanation do |time_spent, time_spent_date|
if time_spent
if time_spent > 0
verb = 'Adds'
value = time_spent
else
verb = 'Substracts'
verb = 'Subtracts'
value = -time_spent
end
......
......@@ -148,7 +148,7 @@
= link_to 'Archive project', archive_project_path(@project),
data: { confirm: "Are you sure that you want to archive this project?" },
method: :post, class: "btn btn-warning"
.sub-section.rename-respository
.sub-section.rename-repository
%h4.warning-title
Rename repository
= render 'projects/errors'
......
......@@ -14,7 +14,7 @@ module Gitlab
INTERVAL = 30.seconds.to_i
# The number of seconds to wait (while blocking the thread) before
# continueing to the next waiter.
# continuing to the next waiter.
BLOCKING_WAIT_TIME = 5
# The known importer stages and their corresponding Sidekiq workers.
......
......@@ -587,7 +587,7 @@ production: &base
gitaly:
# Path to the directory containing Gitaly client executables.
client_path: /home/git/gitaly/bin
# Default Gitaly authentication token. Can be overriden per storage. Can
# Default Gitaly authentication token. Can be overridden per storage. Can
# be left blank when Gitaly is running locally on a Unix socket, which
# is the normal way to deploy Gitaly.
token:
......
......@@ -13,7 +13,7 @@ class CleanupMoveSystemUploadFolderSymlink < ActiveRecord::Migration
say "Removing #{old_directory} -> #{new_directory} symlink"
FileUtils.rm(old_directory)
else
say "Symlink #{old_directory} non existant, nothing to do."
say "Symlink #{old_directory} non existent, nothing to do."
end
end
......
......@@ -379,7 +379,7 @@ let(:mutation) do
)
end
it 'returns a successfull response' do
it 'returns a successful response' do
post_graphql_mutation(mutation, current_user: user)
expect(response).to have_gitlab_http_status(:success)
......
......@@ -153,7 +153,7 @@ module ExtractsPath
private
# overriden in subclasses, do not remove
# overridden in subclasses, do not remove
def get_id
id = [params[:id] || params[:ref]]
id << "/" + params[:path] unless params[:path].blank?
......
......@@ -80,7 +80,7 @@ module Gitlab
end
# Get the first part of the email address (before @)
# In addtion in removes illegal characters
# In addition in removes illegal characters
def generate_username(email)
email.match(/^[^@]*/)[0].mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/, '').to_s
end
......
......@@ -3,8 +3,8 @@
module Gitlab
module BackgroundMigration
# Ensures services which previously recieved all notes events continue
# to recieve confidential ones.
# Ensures services which previously received all notes events continue
# to receive confidential ones.
class SetConfidentialNoteEventsOnServices
class Service < ActiveRecord::Base
self.table_name = 'services'
......
......@@ -3,8 +3,8 @@
module Gitlab
module BackgroundMigration
# Ensures hooks which previously recieved all notes events continue
# to recieve confidential ones.
# Ensures hooks which previously received all notes events continue
# to receive confidential ones.
class SetConfidentialNoteEventsOnWebhooks
class WebHook < ActiveRecord::Base
self.table_name = 'web_hooks'
......
......@@ -15,7 +15,7 @@
# * Publishes the documentation for `master` branch.
variables:
# This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
# This will suppress any download for dependencies and plugins or upload messages which would clutter the console log.
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
# As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used
......
......@@ -879,7 +879,7 @@ module Gitlab
columns(table).find { |column| column.name == name }
end
# This will replace the first occurance of a string in a column with
# This will replace the first occurrence of a string in a column with
# the replacement
# On postgresql we can use `regexp_replace` for that.
# On mysql we find the location of the pattern, and overwrite it
......
......@@ -24,7 +24,7 @@ module Gitlab
# head of `feature` was commit B, resulting in the original diff A->B.
# Since creation, `master` was updated to C.
# Now `feature` is being updated to D, and the newly generated MR diff is C->D.
# It is possible that C and D are direct decendants of A and B respectively,
# It is possible that C and D are direct descendants of A and B respectively,
# but this isn't necessarily the case as rebases and merges come into play.
#
# Suppose we have a diff note on the original diff A->B. Now that the MR
......
......@@ -349,7 +349,7 @@ module Gitlab
f.write(message.data)
end
end
# If the file is empty means that we recieved an empty stream, we delete the file
# If the file is empty means that we received an empty stream, we delete the file
FileUtils.rm(save_path) if File.zero?(save_path)
end
......
......@@ -154,7 +154,7 @@ module Gitlab
Project.transaction do
process_sub_relation(relation, relation_item)
# For every subrelation that hangs from Project, save the associated records alltogether
# For every subrelation that hangs from Project, save the associated records altogether
# This effectively batches all records per subrelation item, only keeping those in memory
# We have to keep in mind that more batch granularity << Memory, but >> Slowness
if save
......
......@@ -236,7 +236,7 @@ module Gitlab
def single_line_regexp(regex)
# Turns a multiline extended regexp into a single line one,
# beacuse `rake routes` breaks on multiline regexes.
# because `rake routes` breaks on multiline regexes.
Regexp.new(regex.source.gsub(/\(\?#.+?\)/, '').gsub(/\s*/, ''), regex.options ^ Regexp::EXTENDED).freeze
end
end
......
......@@ -4,7 +4,7 @@
# of the global setting allow_local_requests_from_hooks_and_services this adapter
# will allow/block connection to internal IPs and/or urls.
#
# This functionality can be overriden by providing the setting the option
# This functionality can be overridden by providing the setting the option
# allow_local_requests = true in the request. For example:
# Gitlab::HTTP.get('http://www.gitlab.com', allow_local_requests: true)
#
......
......@@ -3,7 +3,7 @@ module Gitlab
class IssueNew < IssueCommand
def self.match(text)
# we can not match \n with the dot by passing the m modifier as than
# the title and description are not seperated
# the title and description are not separated
/\Aissue\s+(new|create)\s+(?<title>[^\n]*)\n*(?<description>(.|\n)*)/.match(text)
end
......
# frozen_string_literal: true
# This class extracts all users found in a piece of text by the username or the
# email adress
# email address
module Gitlab
class UserExtractor
......
......@@ -16,7 +16,7 @@ module GoogleApi
client.auth_code.authorize_url(
redirect_uri: redirect_uri,
scope: scope,
state: state # This is used for arbitary redirection
state: state # This is used for arbitrary redirection
)
end
......
......@@ -32,32 +32,32 @@ module Trigger
private
# Must be overriden
# Must be overridden
def downstream_project_path
raise NotImplementedError
end
# Must be overriden
# Must be overridden
def ref
raise NotImplementedError
end
# Must be overriden
# Must be overridden
def trigger_token
raise NotImplementedError
end
# Must be overriden
# Must be overridden
def access_token
raise NotImplementedError
end
# Can be overriden
# Can be overridden
def extra_variables
{}
end
# Can be overriden
# Can be overridden
def version_param_value(version_file)
File.read(version_file).strip
end
......
......@@ -63,7 +63,7 @@ describe Groups::MilestonesController do
let(:group_milestone) { create(:milestone, group: group) }
context 'when there is a title parameter' do
it 'searchs for a legacy group milestone' do
it 'searches for a legacy group milestone' do
expect(GlobalMilestone).to receive(:build)
expect(Milestone).not_to receive(:find_by_iid)
......@@ -72,7 +72,7 @@ describe Groups::MilestonesController do
end
context 'when there is not a title parameter' do
it 'searchs for a group milestone' do
it 'searches for a group milestone' do
expect(GlobalMilestone).not_to receive(:build)
expect(Milestone).to receive(:find_by_iid)
......
......@@ -529,7 +529,7 @@ describe GroupsController do
sign_in(user)
end
context 'when transfering to a subgroup goes right' do
context 'when transferring to a subgroup goes right' do
let(:new_parent_group) { create(:group, :public) }
let!(:group_member) { create(:group_member, :owner, group: group, user: user) }
let!(:new_parent_group_member) { create(:group_member, :owner, group: new_parent_group, user: user) }
......
......@@ -4,7 +4,7 @@ describe Profiles::KeysController do
let(:user) { create(:user) }
describe "#get_keys" do
describe "non existant user" do
describe "non existent user" do
it "does not generally work" do
get :get_keys, username: 'not-existent'
......
......@@ -216,7 +216,7 @@ describe Projects::EnvironmentsController do
expect(response).to have_gitlab_http_status(200)
end
it 'loads the terminals for the enviroment' do
it 'loads the terminals for the environment' do
expect_any_instance_of(Environment).to receive(:terminals)
get :terminal, environment_params
......
......@@ -786,7 +786,7 @@ describe Projects::MergeRequestsController do
merge_request.mark_as_merged!
end
it 'returns the enviroment on the source project' do
it 'returns the environment on the source project' do
get_ci_environments_status(environment_target: 'merge_commit')
expect(response).to have_gitlab_http_status(:ok)
......
......@@ -33,7 +33,7 @@ RSpec.describe 'Dashboard Archived Project' do
expect(page).not_to have_content(project.name)
end
it 'searchs archived projects', :js do
it 'searches archived projects', :js do
click_button 'Last updated'
click_link 'Show archived projects'
......
......@@ -22,7 +22,7 @@ describe 'Import multiple repositories by uploading a manifest file', :js, :post
expect(page).to have_content('https://android-review.googlesource.com/platform/build/blueprint')
end
it 'imports succesfully imports a project' do
it 'imports successfully imports a project' do
visit new_import_manifest_path
attach_file('manifest', Rails.root.join('spec/fixtures/aosp_manifest.xml'))
......
......@@ -15,7 +15,7 @@ describe 'GFM autocomplete', :js do
wait_for_requests
end
it 'updates issue descripton with GFM reference' do
it 'updates issue description with GFM reference' do
find('.js-issuable-edit').click
simulate_input('#issue-description', "@#{user.name[0...3]}")
......
......@@ -19,7 +19,7 @@ describe 'Pipeline Badge' do
let!(:pipeline) { create(:ci_empty_pipeline, project: project, ref: ref, sha: project.commit(ref).sha) }
let!(:job) { create(:ci_build, pipeline: pipeline) }
context 'when the pipeline was successfull' do
context 'when the pipeline was successful' do
it 'displays so on the badge' do
job.success
......
......@@ -40,7 +40,7 @@ describe 'Clusters', :js do
expect(page).to have_selector('.js-project-feature-toggle')
end
context 'with sucessfull request' do
context 'with successful request' do
it 'user sees updated cluster' do
expect do
page.find('.js-project-feature-toggle').click
......
......@@ -16,7 +16,7 @@ describe 'Projects > Files > User creates files' do
sign_in(user)
end