summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-24 18:35:57 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-24 18:35:57 -0700
commit69454e36f77db6f6e1c45c04c39acf670fe443e4 (patch)
tree7ff7294f398c2d299f103bfe820f91173b4d4bc6 /app
parent6ec8ff069ceaa7bb914cbbd97ac248d926ef7e4e (diff)
downloadgitlab-ce-69454e36f77db6f6e1c45c04c39acf670fe443e4.tar.gz
Style/RedundantReturn enabledmore-rubocop-styles
Diffstat (limited to 'app')
-rw-r--r--app/helpers/gitlab_markdown_helper.rb4
-rw-r--r--app/helpers/merge_requests_helper.rb2
-rw-r--r--app/helpers/submodule_helper.rb7
3 files changed, 8 insertions, 5 deletions
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb
index 985def4ad66..08221aaa2f8 100644
--- a/app/helpers/gitlab_markdown_helper.rb
+++ b/app/helpers/gitlab_markdown_helper.rb
@@ -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
diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb
index 51b60770e0b..54462fd00e3 100644
--- a/app/helpers/merge_requests_helper.rb
+++ b/app/helpers/merge_requests_helper.rb
@@ -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,
diff --git a/app/helpers/submodule_helper.rb b/app/helpers/submodule_helper.rb
index 525266fb3b5..241462e5e4c 100644
--- a/app/helpers/submodule_helper.rb
+++ b/app/helpers/submodule_helper.rb
@@ -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