Commit 5c801602 authored by Steven Burgart's avatar Steven Burgart

Fix various typos

signe-in -> signed-in
go_to_gihub_for_permissions -> go_to_github_for_permissions
descendand -> descendant
behavour -> behaviour
recepient_email -> recipient_email
generate_fingerpint -> generate_fingerprint
dependes -> depends
Cant't -> Can't
wisit -> visit
notifcation -> notification
sufficent_scope -> sufficient_scope?
levet -> level
parent 7d5d5e53
......@@ -49,7 +49,7 @@ class ApplicationController < ActionController::Base
end
def authenticate_user!(*args)
# If user is not signe-in and tries to access root_path - redirect him to landing page
# If user is not signed-in and tries to access root_path - redirect him to landing page
if current_application_settings.home_page_url.present?
if current_user.nil? && controller_name == 'dashboard' && action_name == 'show'
redirect_to current_application_settings.home_page_url and return
......
......@@ -58,11 +58,11 @@ class GithubImportsController < ApplicationController
def github_auth
if current_user.github_access_token.blank?
go_to_gihub_for_permissions
go_to_github_for_permissions
end
end
def go_to_gihub_for_permissions
def go_to_github_for_permissions
redirect_to client.auth_code.authorize_url({
redirect_uri: callback_github_import_url,
scope: "repo, user, user:email"
......@@ -70,6 +70,6 @@ class GithubImportsController < ApplicationController
end
def github_unauthorized
go_to_gihub_for_permissions
go_to_github_for_permissions
end
end
......@@ -113,7 +113,7 @@ module TreeHelper
tree_join(@ref, file)
end
# returns the relative path of the first subdir that doesn't have only one directory descendand
# returns the relative path of the first subdir that doesn't have only one directory descendant
def flatten_tree(tree)
subtree = Gitlab::Git::Tree.where(@repository, @commit.id, tree.path)
if subtree.count == 1 && subtree.first.dir?
......
......@@ -56,7 +56,7 @@ module Emails
end
end
# Over rides default behavour to show source/target
# Over rides default behaviour to show source/target
# Formats arguments into a String suitable for use as an email subject
#
# extra - Extra Strings to be inserted into the subject
......
......@@ -26,8 +26,8 @@ class Notify < ActionMailer::Base
delay_for(2.seconds)
end
def test_email(recepient_email, subject, body)
mail(to: recepient_email,
def test_email(recipient_email, subject, body)
mail(to: recipient_email,
subject: subject,
body: body.html_safe,
content_type: 'text/html'
......
......@@ -19,7 +19,7 @@ class Key < ActiveRecord::Base
belongs_to :user
before_validation :strip_white_space, :generate_fingerpint
before_validation :strip_white_space, :generate_fingerprint
validates :title, presence: true, length: { within: 0..255 }
validates :key, presence: true, length: { within: 0..5000 }, format: { with: /\A(ssh|ecdsa)-.*\Z/ }, uniqueness: true
......@@ -76,7 +76,7 @@ class Key < ActiveRecord::Base
private
def generate_fingerpint
def generate_fingerprint
self.fingerprint = nil
return unless key.present?
......
......@@ -330,7 +330,7 @@ class MergeRequest < ActiveRecord::Base
end
# Return array of possible target branches
# dependes on target project of MR
# depends on target project of MR
def target_branches
if target_project.nil?
[]
......@@ -340,7 +340,7 @@ class MergeRequest < ActiveRecord::Base
end
# Return array of possible source branches
# dependes on source project of MR
# depends on source project of MR
def source_branches
if source_project.nil?
[]
......
......@@ -84,7 +84,7 @@ module Network
skip += self.class.max_count
end
else
# Cant't find the target commit in the repo.
# Can't find the target commit in the repo.
offset = 0
end
end
......
......@@ -480,7 +480,7 @@ class Note < ActiveRecord::Base
end
# FIXME: Hack for polymorphic associations with STI
# For more information wisit http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#label-Polymorphic+Associations
# For more information visit http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#label-Polymorphic+Associations
def noteable_type=(sType)
super(sType.to_s.classify.constantize.base_class.to_s)
end
......
......@@ -242,7 +242,7 @@ class NotificationService
users
end
# Build a list of users based on group notifcation settings
# Build a list of users based on group notification settings
def select_users_group_setting(project, project_members, global_setting, users_global_level_watch)
uids = users_group_notification(project, Notification::N_WATCH)
......
......@@ -13,7 +13,7 @@ module Oauth2::AccessTokenValidationService
elsif token.revoked?
return REVOKED
elsif !self.sufficent_scope?(token, scopes)
elsif !self.sufficient_scope?(token, scopes)
return INSUFFICIENT_SCOPE
else
......@@ -24,7 +24,7 @@ module Oauth2::AccessTokenValidationService
protected
# True if the token's scope is a superset of required scopes,
# or the required scopes is empty.
def sufficent_scope?(token, scopes)
def sufficient_scope?(token, scopes)
if scopes.blank?
# if no any scopes required, the scopes of token is sufficient.
return true
......
......@@ -7,7 +7,7 @@ module Projects
def execute
@project = Project.new(params)
# Reset visibility levet if is not allowed to set it
# Reset visibility level if is not allowed to set it
unless Gitlab::VisibilityLevel.allowed_for?(current_user, params[:visibility_level])
@project.visibility_level = default_features.visibility_level
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment