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
69454e36
Commit
69454e36
authored
Mar 24, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Style/RedundantReturn enabled
parent
6ec8ff06
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
10 deletions
+13
-10
.rubocop.yml
.rubocop.yml
+1
-1
app/helpers/gitlab_markdown_helper.rb
app/helpers/gitlab_markdown_helper.rb
+2
-2
app/helpers/merge_requests_helper.rb
app/helpers/merge_requests_helper.rb
+1
-1
app/helpers/submodule_helper.rb
app/helpers/submodule_helper.rb
+5
-2
lib/gitlab/git_access.rb
lib/gitlab/git_access.rb
+2
-2
lib/gitlab/popen.rb
lib/gitlab/popen.rb
+1
-1
lib/gitlab/theme.rb
lib/gitlab/theme.rb
+1
-1
No files found.
.rubocop.yml
View file @
69454e36
...
@@ -480,7 +480,7 @@ Style/RedundantException:
...
@@ -480,7 +480,7 @@ Style/RedundantException:
Style/RedundantReturn
:
Style/RedundantReturn
:
Description
:
"
Don't
use
return
where
it's
not
required."
Description
:
"
Don't
use
return
where
it's
not
required."
StyleGuide
:
'
https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
StyleGuide
:
'
https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
Enabled
:
fals
e
Enabled
:
tru
e
Style/RedundantSelf
:
Style/RedundantSelf
:
Description
:
"
Don't
use
self
where
it's
not
needed."
Description
:
"
Don't
use
self
where
it's
not
needed."
...
...
app/helpers/gitlab_markdown_helper.rb
View file @
69454e36
...
@@ -182,7 +182,7 @@ module GitlabMarkdownHelper
...
@@ -182,7 +182,7 @@ module GitlabMarkdownHelper
def
file_exists?
(
path
)
def
file_exists?
(
path
)
return
false
if
path
.
nil?
return
false
if
path
.
nil?
return
@repository
.
blob_at
(
current_sha
,
path
).
present?
||
@repository
.
tree
(
current_sha
,
path
).
entries
.
any?
@repository
.
blob_at
(
current_sha
,
path
).
present?
||
@repository
.
tree
(
current_sha
,
path
).
entries
.
any?
end
end
# Check if the path is pointing to a directory(tree) or a file(blob)
# Check if the path is pointing to a directory(tree) or a file(blob)
...
@@ -190,7 +190,7 @@ module GitlabMarkdownHelper
...
@@ -190,7 +190,7 @@ module GitlabMarkdownHelper
def
local_path
(
path
)
def
local_path
(
path
)
return
"tree"
if
@repository
.
tree
(
current_sha
,
path
).
entries
.
any?
return
"tree"
if
@repository
.
tree
(
current_sha
,
path
).
entries
.
any?
return
"raw"
if
@repository
.
blob_at
(
current_sha
,
path
).
image?
return
"raw"
if
@repository
.
blob_at
(
current_sha
,
path
).
image?
return
"blob"
"blob"
end
end
def
current_sha
def
current_sha
...
...
app/helpers/merge_requests_helper.rb
View file @
69454e36
...
@@ -17,7 +17,7 @@ module MergeRequestsHelper
...
@@ -17,7 +17,7 @@ module MergeRequestsHelper
end
end
def
new_mr_from_push_event
(
event
,
target_project
)
def
new_mr_from_push_event
(
event
,
target_project
)
return
{
{
merge_request:
{
merge_request:
{
source_project_id:
event
.
project
.
id
,
source_project_id:
event
.
project
.
id
,
target_project_id:
target_project
.
id
,
target_project_id:
target_project
.
id
,
...
...
app/helpers/submodule_helper.rb
View file @
69454e36
...
@@ -49,7 +49,7 @@ module SubmoduleHelper
...
@@ -49,7 +49,7 @@ module SubmoduleHelper
def
standard_links
(
host
,
namespace
,
project
,
commit
)
def
standard_links
(
host
,
namespace
,
project
,
commit
)
base
=
[
'https://'
,
host
,
'/'
,
namespace
,
'/'
,
project
].
join
(
''
)
base
=
[
'https://'
,
host
,
'/'
,
namespace
,
'/'
,
project
].
join
(
''
)
return
base
,
[
base
,
'/tree/'
,
commit
].
join
(
''
)
[
base
,
[
base
,
'/tree/'
,
commit
].
join
(
''
)]
end
end
def
relative_self_links
(
url
,
commit
)
def
relative_self_links
(
url
,
commit
)
...
@@ -58,7 +58,10 @@ module SubmoduleHelper
...
@@ -58,7 +58,10 @@ module SubmoduleHelper
else
else
base
=
[
@project
.
group
.
path
,
'/'
,
url
[
/([^\/]*)\.git/
,
1
]
].
join
(
''
)
base
=
[
@project
.
group
.
path
,
'/'
,
url
[
/([^\/]*)\.git/
,
1
]
].
join
(
''
)
end
end
return
namespace_project_path
(
base
.
namespace
,
base
),
[
namespace_project_path
(
base
.
namespace
,
base
),
namespace_project_tree_path
(
base
.
namespace
,
base
,
commit
)
namespace_project_tree_path
(
base
.
namespace
,
base
,
commit
)
]
end
end
end
end
lib/gitlab/git_access.rb
View file @
69454e36
...
@@ -83,7 +83,7 @@ module Gitlab
...
@@ -83,7 +83,7 @@ module Gitlab
end
end
end
end
return
build_status_object
(
true
)
build_status_object
(
true
)
end
end
def
change_access_check
(
user
,
project
,
change
)
def
change_access_check
(
user
,
project
,
change
)
...
...
lib/gitlab/popen.rb
View file @
69454e36
...
@@ -29,7 +29,7 @@ module Gitlab
...
@@ -29,7 +29,7 @@ module Gitlab
@cmd_status
=
wait_thr
.
value
.
exitstatus
@cmd_status
=
wait_thr
.
value
.
exitstatus
end
end
return
@cmd_output
,
@cmd_status
[
@cmd_output
,
@cmd_status
]
end
end
end
end
end
end
lib/gitlab/theme.rb
View file @
69454e36
...
@@ -19,7 +19,7 @@ module Gitlab
...
@@ -19,7 +19,7 @@ module Gitlab
id
||=
Gitlab
.
config
.
gitlab
.
default_theme
id
||=
Gitlab
.
config
.
gitlab
.
default_theme
return
themes
[
id
]
themes
[
id
]
end
end
def
self
.
type_css_class_by_id
(
id
)
def
self
.
type_css_class_by_id
(
id
)
...
...
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