Commit 7d1e6f15 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #8607 from skburgart/fix-typos

Fix various typos
parents 581b2c5e 5c801602
...@@ -49,7 +49,7 @@ class ApplicationController < ActionController::Base ...@@ -49,7 +49,7 @@ class ApplicationController < ActionController::Base
end end
def authenticate_user!(*args) 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_application_settings.home_page_url.present?
if current_user.nil? && controller_name == 'dashboard' && action_name == 'show' if current_user.nil? && controller_name == 'dashboard' && action_name == 'show'
redirect_to current_application_settings.home_page_url and return redirect_to current_application_settings.home_page_url and return
......
...@@ -63,11 +63,11 @@ class GithubImportsController < ApplicationController ...@@ -63,11 +63,11 @@ class GithubImportsController < ApplicationController
def github_auth def github_auth
if current_user.github_access_token.blank? if current_user.github_access_token.blank?
go_to_gihub_for_permissions go_to_github_for_permissions
end end
end end
def go_to_gihub_for_permissions def go_to_github_for_permissions
redirect_to client.auth_code.authorize_url({ redirect_to client.auth_code.authorize_url({
redirect_uri: callback_github_import_url, redirect_uri: callback_github_import_url,
scope: "repo, user, user:email" scope: "repo, user, user:email"
...@@ -75,6 +75,6 @@ class GithubImportsController < ApplicationController ...@@ -75,6 +75,6 @@ class GithubImportsController < ApplicationController
end end
def github_unauthorized def github_unauthorized
go_to_gihub_for_permissions go_to_github_for_permissions
end end
end end
...@@ -109,7 +109,7 @@ module TreeHelper ...@@ -109,7 +109,7 @@ module TreeHelper
tree_join(@ref, file) tree_join(@ref, file)
end 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) def flatten_tree(tree)
subtree = Gitlab::Git::Tree.where(@repository, @commit.id, tree.path) subtree = Gitlab::Git::Tree.where(@repository, @commit.id, tree.path)
if subtree.count == 1 && subtree.first.dir? if subtree.count == 1 && subtree.first.dir?
......
...@@ -56,7 +56,7 @@ module Emails ...@@ -56,7 +56,7 @@ module Emails
end end
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 # Formats arguments into a String suitable for use as an email subject
# #
# extra - Extra Strings to be inserted into the subject # extra - Extra Strings to be inserted into the subject
......
...@@ -26,8 +26,8 @@ class Notify < ActionMailer::Base ...@@ -26,8 +26,8 @@ class Notify < ActionMailer::Base
delay_for(2.seconds) delay_for(2.seconds)
end end
def test_email(recepient_email, subject, body) def test_email(recipient_email, subject, body)
mail(to: recepient_email, mail(to: recipient_email,
subject: subject, subject: subject,
body: body.html_safe, body: body.html_safe,
content_type: 'text/html' content_type: 'text/html'
......
...@@ -19,7 +19,7 @@ class Key < ActiveRecord::Base ...@@ -19,7 +19,7 @@ class Key < ActiveRecord::Base
belongs_to :user 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 :title, presence: true, length: { within: 0..255 }
validates :key, presence: true, length: { within: 0..5000 }, format: { with: /\A(ssh|ecdsa)-.*\Z/ }, uniqueness: true validates :key, presence: true, length: { within: 0..5000 }, format: { with: /\A(ssh|ecdsa)-.*\Z/ }, uniqueness: true
...@@ -76,7 +76,7 @@ class Key < ActiveRecord::Base ...@@ -76,7 +76,7 @@ class Key < ActiveRecord::Base
private private
def generate_fingerpint def generate_fingerprint
self.fingerprint = nil self.fingerprint = nil
return unless key.present? return unless key.present?
......
...@@ -330,7 +330,7 @@ class MergeRequest < ActiveRecord::Base ...@@ -330,7 +330,7 @@ class MergeRequest < ActiveRecord::Base
end end
# Return array of possible target branches # Return array of possible target branches
# dependes on target project of MR # depends on target project of MR
def target_branches def target_branches
if target_project.nil? if target_project.nil?
[] []
...@@ -340,7 +340,7 @@ class MergeRequest < ActiveRecord::Base ...@@ -340,7 +340,7 @@ class MergeRequest < ActiveRecord::Base
end end
# Return array of possible source branches # Return array of possible source branches
# dependes on source project of MR # depends on source project of MR
def source_branches def source_branches
if source_project.nil? if source_project.nil?
[] []
......
...@@ -84,7 +84,7 @@ module Network ...@@ -84,7 +84,7 @@ module Network
skip += self.class.max_count skip += self.class.max_count
end end
else else
# Cant't find the target commit in the repo. # Can't find the target commit in the repo.
offset = 0 offset = 0
end end
end end
......
...@@ -497,7 +497,7 @@ class Note < ActiveRecord::Base ...@@ -497,7 +497,7 @@ class Note < ActiveRecord::Base
end end
# FIXME: Hack for polymorphic associations with STI # 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) def noteable_type=(sType)
super(sType.to_s.classify.constantize.base_class.to_s) super(sType.to_s.classify.constantize.base_class.to_s)
end end
......
...@@ -242,7 +242,7 @@ class NotificationService ...@@ -242,7 +242,7 @@ class NotificationService
users users
end 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) def select_users_group_setting(project, project_members, global_setting, users_global_level_watch)
uids = users_group_notification(project, Notification::N_WATCH) uids = users_group_notification(project, Notification::N_WATCH)
......
...@@ -13,7 +13,7 @@ module Oauth2::AccessTokenValidationService ...@@ -13,7 +13,7 @@ module Oauth2::AccessTokenValidationService
elsif token.revoked? elsif token.revoked?
return REVOKED return REVOKED
elsif !self.sufficent_scope?(token, scopes) elsif !self.sufficient_scope?(token, scopes)
return INSUFFICIENT_SCOPE return INSUFFICIENT_SCOPE
else else
...@@ -24,7 +24,7 @@ module Oauth2::AccessTokenValidationService ...@@ -24,7 +24,7 @@ module Oauth2::AccessTokenValidationService
protected protected
# True if the token's scope is a superset of required scopes, # True if the token's scope is a superset of required scopes,
# or the required scopes is empty. # or the required scopes is empty.
def sufficent_scope?(token, scopes) def sufficient_scope?(token, scopes)
if scopes.blank? if scopes.blank?
# if no any scopes required, the scopes of token is sufficient. # if no any scopes required, the scopes of token is sufficient.
return true return true
......
...@@ -7,7 +7,7 @@ module Projects ...@@ -7,7 +7,7 @@ module Projects
def execute def execute
@project = Project.new(params) @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]) unless Gitlab::VisibilityLevel.allowed_for?(current_user, params[:visibility_level])
@project.visibility_level = default_features.visibility_level @project.visibility_level = default_features.visibility_level
end 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