Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
7d1e6f15
Commit
7d1e6f15
authored
Jan 21, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8607 from skburgart/fix-typos
Fix various typos
parents
581b2c5e
5c801602
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
18 additions
and
18 deletions
+18
-18
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+1
-1
app/controllers/github_imports_controller.rb
app/controllers/github_imports_controller.rb
+3
-3
app/helpers/tree_helper.rb
app/helpers/tree_helper.rb
+1
-1
app/mailers/emails/merge_requests.rb
app/mailers/emails/merge_requests.rb
+1
-1
app/mailers/notify.rb
app/mailers/notify.rb
+2
-2
app/models/key.rb
app/models/key.rb
+2
-2
app/models/merge_request.rb
app/models/merge_request.rb
+2
-2
app/models/network/graph.rb
app/models/network/graph.rb
+1
-1
app/models/note.rb
app/models/note.rb
+1
-1
app/services/notification_service.rb
app/services/notification_service.rb
+1
-1
app/services/oauth2/access_token_validation_service.rb
app/services/oauth2/access_token_validation_service.rb
+2
-2
app/services/projects/create_service.rb
app/services/projects/create_service.rb
+1
-1
No files found.
app/controllers/application_controller.rb
View file @
7d1e6f15
...
@@ -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 signe
d
-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
...
...
app/controllers/github_imports_controller.rb
View file @
7d1e6f15
...
@@ -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_gi
t
hub_for_permissions
end
end
end
end
def
go_to_gihub_for_permissions
def
go_to_gi
t
hub_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_gi
t
hub_for_permissions
end
end
end
end
app/helpers/tree_helper.rb
View file @
7d1e6f15
...
@@ -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 descendan
d
# returns the relative path of the first subdir that doesn't have only one directory descendan
t
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?
...
...
app/mailers/emails/merge_requests.rb
View file @
7d1e6f15
...
@@ -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 behav
i
our 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
...
...
app/mailers/notify.rb
View file @
7d1e6f15
...
@@ -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
(
rec
e
pient_email
,
subject
,
body
)
def
test_email
(
rec
i
pient_email
,
subject
,
body
)
mail
(
to:
rec
e
pient_email
,
mail
(
to:
rec
i
pient_email
,
subject:
subject
,
subject:
subject
,
body:
body
.
html_safe
,
body:
body
.
html_safe
,
content_type:
'text/html'
content_type:
'text/html'
...
...
app/models/key.rb
View file @
7d1e6f15
...
@@ -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_fingerp
r
int
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_fingerp
r
int
self
.
fingerprint
=
nil
self
.
fingerprint
=
nil
return
unless
key
.
present?
return
unless
key
.
present?
...
...
app/models/merge_request.rb
View file @
7d1e6f15
...
@@ -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
# depend
e
s 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
# depend
e
s 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?
[]
[]
...
...
app/models/network/graph.rb
View file @
7d1e6f15
...
@@ -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
# Can
t
'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
...
...
app/models/note.rb
View file @
7d1e6f15
...
@@ -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
w
isit http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#label-Polymorphic+Associations
# For more information
v
isit 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
...
...
app/services/notification_service.rb
View file @
7d1e6f15
...
@@ -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 notif
i
cation 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
)
...
...
app/services/oauth2/access_token_validation_service.rb
View file @
7d1e6f15
...
@@ -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
.
suffic
i
ent_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
suffic
i
ent_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
...
...
app/services/projects/create_service.rb
View file @
7d1e6f15
...
@@ -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 leve
t
if is not allowed to set it
# Reset visibility leve
l
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment