diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-02 20:36:54 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-02 20:36:54 -0800 |
commit | e89058268118e3b2be4ebaf5d7bf2c684b590437 (patch) | |
tree | 94f7b8986ebc3ae2a7c75ed9457628371f97a14b /app | |
parent | 84a5a548a5e1377f34b7989fc546eaedf86c3510 (diff) | |
download | gitlab-ce-e89058268118e3b2be4ebaf5d7bf2c684b590437.tar.gz |
Rubocop enabled for: Use spaces inside hash literal braces
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/snippets_controller.rb | 2 | ||||
-rw-r--r-- | app/helpers/compare_helper.rb | 4 | ||||
-rw-r--r-- | app/helpers/projects_helper.rb | 2 | ||||
-rw-r--r-- | app/models/hooks/web_hook.rb | 2 | ||||
-rw-r--r-- | app/models/identity.rb | 2 | ||||
-rw-r--r-- | app/models/project_services/custom_issue_tracker_service.rb | 4 | ||||
-rw-r--r-- | app/models/project_services/gitlab_ci_service.rb | 2 | ||||
-rw-r--r-- | app/models/project_services/issue_tracker_service.rb | 4 | ||||
-rw-r--r-- | app/models/project_wiki.rb | 2 | ||||
-rw-r--r-- | app/models/user.rb | 4 |
10 files changed, 14 insertions, 14 deletions
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index 312e561b522..1ed3bc388fb 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -27,7 +27,7 @@ class SnippetsController < ApplicationController @snippets = SnippetsFinder.new.execute(current_user, { filter: :by_user, user: @user, - scope: params[:scope]}). + scope: params[:scope] }). page(params[:page]).per(20) if @user == current_user diff --git a/app/helpers/compare_helper.rb b/app/helpers/compare_helper.rb index 5ff19b88293..dd2e713a54e 100644 --- a/app/helpers/compare_helper.rb +++ b/app/helpers/compare_helper.rb @@ -1,7 +1,7 @@ module CompareHelper def compare_to_mr_button? @project.merge_requests_enabled && - params[:from].present? && + params[:from].present? && params[:to].present? && @repository.branch_names.include?(params[:from]) && @repository.branch_names.include?(params[:to]) && @@ -10,6 +10,6 @@ module CompareHelper end def compare_mr_path - new_project_merge_request_path(@project, merge_request: {source_branch: params[:to], target_branch: params[:from]}) + new_project_merge_request_path(@project, merge_request: { source_branch: params[:to], target_branch: params[:from] }) end end diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 0b01be79623..687b087e683 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -95,7 +95,7 @@ module ProjectsHelper class: cls, method: :post, remote: true, - data: {type: 'json'} + data: { type: 'json' } } diff --git a/app/models/hooks/web_hook.rb b/app/models/hooks/web_hook.rb index d1d522be194..327cb585ffa 100644 --- a/app/models/hooks/web_hook.rb +++ b/app/models/hooks/web_hook.rb @@ -44,7 +44,7 @@ class WebHook < ActiveRecord::Base } WebHook.post(post_url, body: data.to_json, - headers: {"Content-Type" => "application/json"}, + headers: { "Content-Type" => "application/json" }, verify: false, basic_auth: auth) end diff --git a/app/models/identity.rb b/app/models/identity.rb index c7cdb63e3d2..80e0e3a8a23 100644 --- a/app/models/identity.rb +++ b/app/models/identity.rb @@ -11,5 +11,5 @@ class Identity < ActiveRecord::Base belongs_to :user - validates :extern_uid, allow_blank: true, uniqueness: {scope: :provider} + validates :extern_uid, allow_blank: true, uniqueness: { scope: :provider } end diff --git a/app/models/project_services/custom_issue_tracker_service.rb b/app/models/project_services/custom_issue_tracker_service.rb index b6b79589f1d..5845e2d3525 100644 --- a/app/models/project_services/custom_issue_tracker_service.rb +++ b/app/models/project_services/custom_issue_tracker_service.rb @@ -41,8 +41,8 @@ class CustomIssueTrackerService < IssueTrackerService { type: 'text', name: 'title', placeholder: title }, { type: 'text', name: 'description', placeholder: description }, { type: 'text', name: 'project_url', placeholder: 'Project url' }, - { type: 'text', name: 'issues_url', placeholder: 'Issue url'}, - { type: 'text', name: 'new_issue_url', placeholder: 'New Issue url'} + { type: 'text', name: 'issues_url', placeholder: 'Issue url' }, + { type: 'text', name: 'new_issue_url', placeholder: 'New Issue url' } ] end diff --git a/app/models/project_services/gitlab_ci_service.rb b/app/models/project_services/gitlab_ci_service.rb index fadebf968bc..248f749b310 100644 --- a/app/models/project_services/gitlab_ci_service.rb +++ b/app/models/project_services/gitlab_ci_service.rb @@ -81,7 +81,7 @@ class GitlabCiService < CiService def fields [ { type: 'text', name: 'token', placeholder: 'GitLab CI project specific token' }, - { type: 'text', name: 'project_url', placeholder: 'http://ci.gitlabhq.com/projects/3'} + { type: 'text', name: 'project_url', placeholder: 'http://ci.gitlabhq.com/projects/3' } ] end end diff --git a/app/models/project_services/issue_tracker_service.rb b/app/models/project_services/issue_tracker_service.rb index acc8b33178c..b19c02bab44 100644 --- a/app/models/project_services/issue_tracker_service.rb +++ b/app/models/project_services/issue_tracker_service.rb @@ -44,8 +44,8 @@ class IssueTrackerService < Service [ { type: 'text', name: 'description', placeholder: description }, { type: 'text', name: 'project_url', placeholder: 'Project url' }, - { type: 'text', name: 'issues_url', placeholder: 'Issue url'}, - { type: 'text', name: 'new_issue_url', placeholder: 'New Issue url'} + { type: 'text', name: 'issues_url', placeholder: 'Issue url' }, + { type: 'text', name: 'new_issue_url', placeholder: 'New Issue url' } ] end diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb index f8a28ca9866..55438bee245 100644 --- a/app/models/project_wiki.rb +++ b/app/models/project_wiki.rb @@ -136,7 +136,7 @@ class ProjectWiki def commit_details(action, message = nil, title = nil) commit_message = message || default_message(action, title) - {email: @user.email, name: @user.name, message: commit_message} + { email: @user.email, name: @user.name, message: commit_message } end def default_message(action, title) diff --git a/app/models/user.rb b/app/models/user.rb index 69fe674df83..27724b3ccba 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -113,9 +113,9 @@ class User < ActiveRecord::Base # Validations # validates :name, presence: true - validates :email, presence: true, email: {strict_mode: true}, uniqueness: true + validates :email, presence: true, email: { strict_mode: true }, uniqueness: true validates :bio, length: { maximum: 255 }, allow_blank: true - validates :projects_limit, presence: true, numericality: {greater_than_or_equal_to: 0} + validates :projects_limit, presence: true, numericality: { greater_than_or_equal_to: 0 } validates :username, presence: true, uniqueness: { case_sensitive: false }, exclusion: { in: Gitlab::Blacklist.path }, format: { with: Gitlab::Regex.username_regex, |