Rubocop: indentation fixes Yay!!!

This commit is contained in:
Dmitriy Zaporozhets 2015-02-02 21:59:28 -08:00
parent d04344373b
commit 61cc6a9244
8 changed files with 33 additions and 33 deletions

View file

@ -283,12 +283,12 @@ Style/IfWithSemicolon:
Style/IndentationConsistency:
Description: 'Keep indentation straight.'
Enabled: false
Enabled: true
Style/IndentationWidth:
Description: 'Use 2 spaces for indentation.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
Enabled: false
Enabled: true
Style/IndentArray:
Description: >-

View file

@ -16,16 +16,16 @@ class Projects::WikisController < Projects::ApplicationController
if @page
render 'show'
elsif file = @project_wiki.find_file(params[:id], params[:version_id])
if file.on_disk?
send_file file.on_disk_path, disposition: 'inline'
else
send_data(
file.raw_data,
type: file.mime_type,
disposition: 'inline',
filename: file.name
)
end
if file.on_disk?
send_file file.on_disk_path, disposition: 'inline'
else
send_data(
file.raw_data,
type: file.mime_type,
disposition: 'inline',
filename: file.name
)
end
else
return render('empty') unless can?(current_user, :write_wiki, @project)
@page = WikiPage.new(@project_wiki)

View file

@ -40,7 +40,7 @@ class SnippetsFinder
when 'are_public' then
snippets.are_public
else
snippets
snippets
end
else
snippets.public_and_internal

View file

@ -78,7 +78,7 @@ module ApplicationHelper
style = "background-color: ##{ allowed_colors.values[bg_key] }; color: #555"
content_tag(:div, class: options[:class], style: style) do
project.name[0, 1].upcase
project.name[0, 1].upcase
end
end

View file

@ -90,7 +90,7 @@ module TabHelper
return "active" if current_page?(controller: "/projects", action: :edit, id: @project)
if ['services', 'hooks', 'deploy_keys', 'team_members', 'protected_branches'].include? controller.controller_name
"active"
"active"
end
end

View file

@ -69,12 +69,12 @@ module ActsAsTaggableOn::Taggable
select_clause = "DISTINCT #{table_name}.*" unless context and tag_types.one?
if owned_by
tagging_join << " AND " +
sanitize_sql([
"#{taggings_alias}.tagger_id = ? AND #{taggings_alias}.tagger_type = ?",
owned_by.id,
owned_by.class.base_class.to_s
])
tagging_join << " AND " +
sanitize_sql([
"#{taggings_alias}.tagger_id = ? AND #{taggings_alias}.tagger_type = ?",
owned_by.id,
owned_by.class.base_class.to_s
])
end
joins << tagging_join
@ -93,12 +93,12 @@ module ActsAsTaggableOn::Taggable
tagging_join << " AND " + sanitize_sql(["#{taggings_alias}.context = ?", context.to_s]) if context
if owned_by
tagging_join << " AND " +
sanitize_sql([
"#{taggings_alias}.tagger_id = ? AND #{taggings_alias}.tagger_type = ?",
owned_by.id,
owned_by.class.base_class.to_s
])
tagging_join << " AND " +
sanitize_sql([
"#{taggings_alias}.tagger_id = ? AND #{taggings_alias}.tagger_type = ?",
owned_by.id,
owned_by.class.base_class.to_s
])
end
joins << tagging_join

View file

@ -74,7 +74,7 @@ module Gitlab
def html_escape(str)
replacements = { '&' => '&amp;', '>' => '&gt;', '<' => '&lt;', '"' => '&quot;', "'" => '&#39;' }
str.gsub(/[&"'><]/, replacements)
str.gsub(/[&"'><]/, replacements)
end
end
end

View file

@ -112,14 +112,14 @@ module Gitlab
def protected_branch_action(project, oldrev, newrev, branch_name)
# we dont allow force push to protected branch
if forced_push?(project, oldrev, newrev)
:force_push_code_to_protected_branches
:force_push_code_to_protected_branches
elsif newrev == Gitlab::Git::BLANK_SHA
# and we dont allow remove of protected branch
:remove_protected_branches
# and we dont allow remove of protected branch
:remove_protected_branches
elsif project.developers_can_push_to_protected_branch?(branch_name)
:push_code
:push_code
else
:push_code_to_protected_branches
:push_code_to_protected_branches
end
end