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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
28bafd53
Commit
28bafd53
authored
Jun 29, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Style/SpaceAfterComma Rubocop cop
parent
9798ac77
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
20 additions
and
20 deletions
+20
-20
.rubocop.yml
.rubocop.yml
+1
-1
app/helpers/page_layout_helper.rb
app/helpers/page_layout_helper.rb
+1
-1
app/models/network/graph.rb
app/models/network/graph.rb
+2
-2
app/models/project_services/hipchat_service.rb
app/models/project_services/hipchat_service.rb
+1
-1
app/models/project_services/jira_service.rb
app/models/project_services/jira_service.rb
+1
-1
app/models/user.rb
app/models/user.rb
+1
-1
app/uploaders/lfs_object_uploader.rb
app/uploaders/lfs_object_uploader.rb
+1
-1
config/initializers/devise.rb
config/initializers/devise.rb
+1
-1
config/initializers/sidekiq.rb
config/initializers/sidekiq.rb
+1
-1
features/steps/project/forked_merge_requests.rb
features/steps/project/forked_merge_requests.rb
+1
-1
lib/api/group_members.rb
lib/api/group_members.rb
+1
-1
lib/gitlab/backend/grack_auth.rb
lib/gitlab/backend/grack_auth.rb
+1
-1
lib/gitlab/o_auth/auth_hash.rb
lib/gitlab/o_auth/auth_hash.rb
+1
-1
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+1
-1
spec/lib/gitlab/o_auth/user_spec.rb
spec/lib/gitlab/o_auth/user_spec.rb
+2
-2
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+3
-3
No files found.
.rubocop.yml
View file @
28bafd53
...
...
@@ -536,7 +536,7 @@ Style/SpaceAfterColon:
# Use spaces after commas.
Style/SpaceAfterComma
:
Enabled
:
fals
e
Enabled
:
tru
e
# Do not put a space between a method name and the opening parenthesis in a
# method definition.
...
...
app/helpers/page_layout_helper.rb
View file @
28bafd53
...
...
@@ -52,7 +52,7 @@ module PageLayoutHelper
raise
ArgumentError
,
'cannot provide more than two attributes'
if
map
.
length
>
2
@page_card_attributes
||=
{}
@page_card_attributes
=
map
.
reject
{
|
_
,
v
|
v
.
blank?
}
if
map
.
present?
@page_card_attributes
=
map
.
reject
{
|
_
,
v
|
v
.
blank?
}
if
map
.
present?
@page_card_attributes
end
...
...
app/models/network/graph.rb
View file @
28bafd53
...
...
@@ -54,7 +54,7 @@ module Network
@map
=
{}
@reserved
=
{}
@commits
.
each_with_index
do
|
c
,
i
|
@commits
.
each_with_index
do
|
c
,
i
|
c
.
time
=
i
days
[
i
]
=
c
.
committed_date
@map
[
c
.
id
]
=
c
...
...
@@ -116,7 +116,7 @@ module Network
end
def
commits_sort_by_ref
@commits
.
sort
do
|
a
,
b
|
@commits
.
sort
do
|
a
,
b
|
if
include_ref?
(
a
)
-
1
elsif
include_ref?
(
b
)
...
...
app/models/project_services/hipchat_service.rb
View file @
28bafd53
...
...
@@ -106,7 +106,7 @@ class HipchatService < Service
else
message
<<
"pushed to
#{
ref_type
}
<a href=
\"
"
\
"
#{
project
.
web_url
}
/commits/
#{
CGI
.
escape
(
ref
)
}
\"
>
#{
ref
}
</a> "
message
<<
"of <a href=
\"
#{
project
.
web_url
}
\"
>
#{
project
.
name_with_namespace
.
gsub!
(
/\s/
,
''
)
}
</a> "
message
<<
"of <a href=
\"
#{
project
.
web_url
}
\"
>
#{
project
.
name_with_namespace
.
gsub!
(
/\s/
,
''
)
}
</a> "
message
<<
"(<a href=
\"
#{
project
.
web_url
}
/compare/
#{
before
}
...
#{
after
}
\"
>Compare changes</a>)"
push
[
:commits
].
take
(
MAX_COMMITS
).
each
do
|
commit
|
...
...
app/models/project_services/jira_service.rb
View file @
28bafd53
...
...
@@ -124,7 +124,7 @@ class JiraService < IssueTrackerService
def
build_api_url_from_project_url
server
=
URI
(
project_url
)
default_ports
=
[[
"http"
,
80
],[
"https"
,
443
]].
include?
([
server
.
scheme
,
server
.
port
])
default_ports
=
[[
"http"
,
80
],
[
"https"
,
443
]].
include?
([
server
.
scheme
,
server
.
port
])
server_url
=
"
#{
server
.
scheme
}
://
#{
server
.
host
}
"
server_url
.
concat
(
":
#{
server
.
port
}
"
)
unless
default_ports
"
#{
server_url
}
/rest/api/
#{
DEFAULT_API_VERSION
}
"
...
...
app/models/user.rb
View file @
28bafd53
...
...
@@ -764,7 +764,7 @@ class User < ActiveRecord::Base
unless
email_domains
.
blank?
match_found
=
email_domains
.
any?
do
|
domain
|
escaped
=
Regexp
.
escape
(
domain
).
gsub
(
'\*'
,
'.*?'
)
escaped
=
Regexp
.
escape
(
domain
).
gsub
(
'\*'
,
'.*?'
)
regexp
=
Regexp
.
new
"^
#{
escaped
}
$"
,
Regexp
::
IGNORECASE
email_domain
=
Mail
::
Address
.
new
(
self
.
email
).
domain
email_domain
=~
regexp
...
...
app/uploaders/lfs_object_uploader.rb
View file @
28bafd53
...
...
@@ -4,7 +4,7 @@ class LfsObjectUploader < CarrierWave::Uploader::Base
storage
:file
def
store_dir
"
#{
Gitlab
.
config
.
lfs
.
storage_path
}
/
#{
model
.
oid
[
0
,
2
]
}
/
#{
model
.
oid
[
2
,
2
]
}
"
"
#{
Gitlab
.
config
.
lfs
.
storage_path
}
/
#{
model
.
oid
[
0
,
2
]
}
/
#{
model
.
oid
[
2
,
2
]
}
"
end
def
cache_dir
...
...
config/initializers/devise.rb
View file @
28bafd53
...
...
@@ -212,7 +212,7 @@ Devise.setup do |config|
if
Gitlab
::
LDAP
::
Config
.
enabled?
Gitlab
.
config
.
ldap
.
servers
.
values
.
each
do
|
server
|
if
server
[
'allow_username_or_email_login'
]
email_stripping_proc
=
->
(
name
)
{
name
.
gsub
(
/@.*\z/
,
''
)}
email_stripping_proc
=
->
(
name
)
{
name
.
gsub
(
/@.*\z/
,
''
)}
else
email_stripping_proc
=
->
(
name
)
{
name
}
end
...
...
config/initializers/sidekiq.rb
View file @
28bafd53
...
...
@@ -13,7 +13,7 @@ Sidekiq.configure_server do |config|
# UGLY Hack to get nested hash from settingslogic
cron_jobs
=
JSON
.
parse
(
Gitlab
.
config
.
cron_jobs
.
to_json
)
# UGLY hack: Settingslogic doesn't allow 'class' key
cron_jobs
.
each
{
|
k
,
v
|
cron_jobs
[
k
][
'class'
]
=
cron_jobs
[
k
].
delete
(
'job_class'
)
}
cron_jobs
.
each
{
|
k
,
v
|
cron_jobs
[
k
][
'class'
]
=
cron_jobs
[
k
].
delete
(
'job_class'
)
}
Sidekiq
::
Cron
::
Job
.
load_from_hash!
cron_jobs
# Database pool should be at least `sidekiq_concurrency` + 2
...
...
features/steps/project/forked_merge_requests.rb
View file @
28bafd53
...
...
@@ -153,6 +153,6 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
# Verify a link is generated against the correct project
def
verify_commit_link
(
container_div
,
container_project
)
# This should force a wait for the javascript to execute
expect
(
find
(
:div
,
container_div
).
find
(
".commit_short_id"
)[
'href'
]).
to
have_content
"
#{
container_project
.
path_with_namespace
}
/commit"
expect
(
find
(
:div
,
container_div
).
find
(
".commit_short_id"
)[
'href'
]).
to
have_content
"
#{
container_project
.
path_with_namespace
}
/commit"
end
end
lib/api/group_members.rb
View file @
28bafd53
...
...
@@ -77,7 +77,7 @@ module API
member
=
group
.
group_members
.
find_by
(
user_id:
params
[
:user_id
])
if
member
.
nil?
render_api_error!
(
"404 Not Found - user_id:
#{
params
[
:user_id
]
}
not a member of group
#{
group
.
name
}
"
,
404
)
render_api_error!
(
"404 Not Found - user_id:
#{
params
[
:user_id
]
}
not a member of group
#{
group
.
name
}
"
,
404
)
else
member
.
destroy
end
...
...
lib/gitlab/backend/grack_auth.rb
View file @
28bafd53
...
...
@@ -22,7 +22,7 @@ module Grack
# Need this if under RELATIVE_URL_ROOT
unless
Gitlab
.
config
.
gitlab
.
relative_url_root
.
empty?
# If website is mounted using relative_url_root need to remove it first
@env
[
'PATH_INFO'
]
=
@request
.
path
.
sub
(
Gitlab
.
config
.
gitlab
.
relative_url_root
,
''
)
@env
[
'PATH_INFO'
]
=
@request
.
path
.
sub
(
Gitlab
.
config
.
gitlab
.
relative_url_root
,
''
)
else
@env
[
'PATH_INFO'
]
=
@request
.
path
end
...
...
lib/gitlab/o_auth/auth_hash.rb
View file @
28bafd53
...
...
@@ -66,7 +66,7 @@ module Gitlab
# Get the first part of the email address (before @)
# In addtion in removes illegal characters
def
generate_username
(
email
)
email
.
match
(
/^[^@]*/
)[
0
].
mb_chars
.
normalize
(
:kd
).
gsub
(
/[^\x00-\x7F]/
,
''
).
to_s
email
.
match
(
/^[^@]*/
)[
0
].
mb_chars
.
normalize
(
:kd
).
gsub
(
/[^\x00-\x7F]/
,
''
).
to_s
end
def
generate_temporarily_email
(
username
)
...
...
spec/features/issues_spec.rb
View file @
28bafd53
...
...
@@ -92,7 +92,7 @@ describe 'Issues', feature: true do
end
context
'on edit form'
do
let
(
:issue
)
{
create
(
:issue
,
author:
@user
,
project:
project
,
due_date:
Date
.
today
.
at_beginning_of_month
.
to_s
)
}
let
(
:issue
)
{
create
(
:issue
,
author:
@user
,
project:
project
,
due_date:
Date
.
today
.
at_beginning_of_month
.
to_s
)
}
before
do
visit
edit_namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
...
...
spec/lib/gitlab/o_auth/user_spec.rb
View file @
28bafd53
...
...
@@ -122,7 +122,7 @@ describe Gitlab::OAuth::User, lib: true do
before
do
allow
(
ldap_user
).
to
receive
(
:uid
)
{
uid
}
allow
(
ldap_user
).
to
receive
(
:username
)
{
uid
}
allow
(
ldap_user
).
to
receive
(
:email
)
{
[
'johndoe@example.com'
,
'john2@example.com'
]
}
allow
(
ldap_user
).
to
receive
(
:email
)
{
[
'johndoe@example.com'
,
'john2@example.com'
]
}
allow
(
ldap_user
).
to
receive
(
:dn
)
{
'uid=user1,ou=People,dc=example'
}
allow
(
Gitlab
::
LDAP
::
Person
).
to
receive
(
:find_by_uid
).
and_return
(
ldap_user
)
end
...
...
@@ -203,7 +203,7 @@ describe Gitlab::OAuth::User, lib: true do
stub_omniauth_config
(
auto_link_ldap_user:
true
)
allow
(
ldap_user
).
to
receive
(
:uid
)
{
uid
}
allow
(
ldap_user
).
to
receive
(
:username
)
{
uid
}
allow
(
ldap_user
).
to
receive
(
:email
)
{
[
'johndoe@example.com'
,
'john2@example.com'
]
}
allow
(
ldap_user
).
to
receive
(
:email
)
{
[
'johndoe@example.com'
,
'john2@example.com'
]
}
allow
(
ldap_user
).
to
receive
(
:dn
)
{
'uid=user1,ou=People,dc=example'
}
allow
(
oauth_user
).
to
receive
(
:ldap_person
).
and_return
(
ldap_user
)
end
...
...
spec/requests/api/projects_spec.rb
View file @
28bafd53
...
...
@@ -217,7 +217,7 @@ describe API::API, api: true do
post
api
(
'/projects'
,
user
),
project
project
.
each_pair
do
|
k
,
v
|
project
.
each_pair
do
|
k
,
v
|
expect
(
json_response
[
k
.
to_s
]).
to
eq
(
v
)
end
end
...
...
@@ -325,7 +325,7 @@ describe API::API, api: true do
post
api
(
"/projects/user/
#{
user
.
id
}
"
,
admin
),
project
project
.
each_pair
do
|
k
,
v
|
project
.
each_pair
do
|
k
,
v
|
next
if
k
==
:path
expect
(
json_response
[
k
.
to_s
]).
to
eq
(
v
)
end
...
...
@@ -805,7 +805,7 @@ describe API::API, api: true do
context
'when authenticated'
do
it
'should return an array of projects'
do
get
api
(
"/projects/search/
#{
query
}
"
,
user
)
get
api
(
"/projects/search/
#{
query
}
"
,
user
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
).
to
be_an
Array
expect
(
json_response
.
size
).
to
eq
(
6
)
...
...
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