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:
Style/RedundantReturn
:
Description
:
"
Don't
use
return
where
it's
not
required."
StyleGuide
:
'
https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
Enabled
:
fals
e
Enabled
:
tru
e
Style/RedundantSelf
:
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
def
file_exists?
(
path
)
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
# Check if the path is pointing to a directory(tree) or a file(blob)
...
...
@@ -190,7 +190,7 @@ module GitlabMarkdownHelper
def
local_path
(
path
)
return
"tree"
if
@repository
.
tree
(
current_sha
,
path
).
entries
.
any?
return
"raw"
if
@repository
.
blob_at
(
current_sha
,
path
).
image?
return
"blob"
"blob"
end
def
current_sha
...
...
app/helpers/merge_requests_helper.rb
View file @
69454e36
...
...
@@ -17,7 +17,7 @@ module MergeRequestsHelper
end
def
new_mr_from_push_event
(
event
,
target_project
)
return
{
{
merge_request:
{
source_project_id:
event
.
project
.
id
,
target_project_id:
target_project
.
id
,
...
...
app/helpers/submodule_helper.rb
View file @
69454e36
...
...
@@ -49,7 +49,7 @@ module SubmoduleHelper
def
standard_links
(
host
,
namespace
,
project
,
commit
)
base
=
[
'https://'
,
host
,
'/'
,
namespace
,
'/'
,
project
].
join
(
''
)
return
base
,
[
base
,
'/tree/'
,
commit
].
join
(
''
)
[
base
,
[
base
,
'/tree/'
,
commit
].
join
(
''
)]
end
def
relative_self_links
(
url
,
commit
)
...
...
@@ -58,7 +58,10 @@ module SubmoduleHelper
else
base
=
[
@project
.
group
.
path
,
'/'
,
url
[
/([^\/]*)\.git/
,
1
]
].
join
(
''
)
end
return
namespace_project_path
(
base
.
namespace
,
base
),
[
namespace_project_path
(
base
.
namespace
,
base
),
namespace_project_tree_path
(
base
.
namespace
,
base
,
commit
)
]
end
end
lib/gitlab/git_access.rb
View file @
69454e36
...
...
@@ -83,7 +83,7 @@ module Gitlab
end
end
return
build_status_object
(
true
)
build_status_object
(
true
)
end
def
change_access_check
(
user
,
project
,
change
)
...
...
lib/gitlab/popen.rb
View file @
69454e36
...
...
@@ -29,7 +29,7 @@ module Gitlab
@cmd_status
=
wait_thr
.
value
.
exitstatus
end
return
@cmd_output
,
@cmd_status
[
@cmd_output
,
@cmd_status
]
end
end
end
lib/gitlab/theme.rb
View file @
69454e36
...
...
@@ -19,7 +19,7 @@ module Gitlab
id
||=
Gitlab
.
config
.
gitlab
.
default_theme
return
themes
[
id
]
themes
[
id
]
end
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