diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-03 07:36:54 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-03 07:36:54 +0300 |
commit | e89058268118e3b2be4ebaf5d7bf2c684b590437 (patch) | |
tree | 94f7b8986ebc3ae2a7c75ed9457628371f97a14b /config | |
parent | 84a5a548a5e1377f34b7989fc546eaedf86c3510 (diff) |
Rubocop enabled for: Use spaces inside hash literal braces
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/1_settings.rb | 2 | ||||
-rw-r--r-- | config/initializers/carrierwave.rb | 2 | ||||
-rw-r--r-- | config/routes.rb | 48 |
3 files changed, 26 insertions, 26 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 1ec842761ff..4296e755370 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -148,7 +148,7 @@ Settings.gitlab_shell['ssh_path_prefix'] ||= Settings.send(:build_gitlab_shell_s Settings['backup'] ||= Settingslogic.new({}) Settings.backup['keep_time'] ||= 0 Settings.backup['path'] = File.expand_path(Settings.backup['path'] || "tmp/backups/", Rails.root) -Settings.backup['upload'] ||= Settingslogic.new({'remote_directory' => nil, 'connection' => nil}) +Settings.backup['upload'] ||= Settingslogic.new({ 'remote_directory' => nil, 'connection' => nil }) # Convert upload connection settings to use symbol keys, to make Fog happy if Settings.backup['upload']['connection'] Settings.backup['upload']['connection'] = Hash[Settings.backup['upload']['connection'].map { |k, v| [k.to_sym, v] }] diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb index 10dfc30a0c5..667f198667c 100644 --- a/config/initializers/carrierwave.rb +++ b/config/initializers/carrierwave.rb @@ -14,7 +14,7 @@ if File.exists?(aws_file) } config.fog_directory = AWS_CONFIG['bucket'] # required config.fog_public = false # optional, defaults to true - config.fog_attributes = {'Cache-Control'=>'max-age=315576000'} # optional, defaults to {} + config.fog_attributes = { 'Cache-Control'=>'max-age=315576000' } # optional, defaults to {} config.fog_authenticated_url_expiration = 1 << 29 # optional time (in seconds) that authenticated urls will be valid. # when fog_public is false and provider is AWS or Google, defaults to 600 end diff --git a/config/routes.rb b/config/routes.rb index 30df1ba0dfe..a83c112a882 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -177,7 +177,7 @@ Gitlab::Application.routes.draw do # # Groups Area # - resources :groups, constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/} do + resources :groups, constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ } do member do get :issues get :merge_requests @@ -215,40 +215,40 @@ Gitlab::Application.routes.draw do scope module: :projects do # Blob routes: - get '/new/:id', to: 'blob#new', constraints: {id: /.+/}, as: 'new_blob' - post '/create/:id', to: 'blob#create', constraints: {id: /.+/}, as: 'create_blob' - get '/edit/:id', to: 'blob#edit', constraints: {id: /.+/}, as: 'edit_blob' - put '/update/:id', to: 'blob#update', constraints: {id: /.+/}, as: 'update_blob' - post '/preview/:id', to: 'blob#preview', constraints: {id: /.+/}, as: 'preview_blob' + get '/new/:id', to: 'blob#new', constraints: { id: /.+/ }, as: 'new_blob' + post '/create/:id', to: 'blob#create', constraints: { id: /.+/ }, as: 'create_blob' + get '/edit/:id', to: 'blob#edit', constraints: { id: /.+/ }, as: 'edit_blob' + put '/update/:id', to: 'blob#update', constraints: { id: /.+/ }, as: 'update_blob' + post '/preview/:id', to: 'blob#preview', constraints: { id: /.+/ }, as: 'preview_blob' resources :blob, only: [:show, :destroy], constraints: { id: /.+/, format: false } do get :diff, on: :member end - resources :raw, only: [:show], constraints: {id: /.+/} - resources :tree, only: [:show], constraints: {id: /.+/, format: /(html|js)/ } + resources :raw, only: [:show], constraints: { id: /.+/ } + resources :tree, only: [:show], constraints: { id: /.+/, format: /(html|js)/ } resource :avatar, only: [:show, :destroy] - resources :commit, only: [:show], constraints: {id: /[[:alnum:]]{6,40}/} - resources :commits, only: [:show], constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/} + resources :commit, only: [:show], constraints: { id: /[[:alnum:]]{6,40}/ } + resources :commits, only: [:show], constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ } resources :compare, only: [:index, :create] - resources :blame, only: [:show], constraints: {id: /.+/} - resources :network, only: [:show], constraints: {id: /(?:[^.]|\.(?!json$))+/, format: /json/} - resources :graphs, only: [:show], constraints: {id: /(?:[^.]|\.(?!json$))+/, format: /json/} do + resources :blame, only: [:show], constraints: { id: /.+/ } + resources :network, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ } + resources :graphs, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ } do member do get :commits end end get '/compare/:from...:to' => 'compare#show', :as => 'compare', - :constraints => {from: /.+/, to: /.+/} + :constraints => { from: /.+/, to: /.+/ } - resources :snippets, constraints: {id: /\d+/} do + resources :snippets, constraints: { id: /\d+/ } do member do get 'raw' end end - resources :wikis, only: [:show, :edit, :destroy, :create], constraints: {id: /[a-zA-Z.0-9_\-\/]+/} do + resources :wikis, only: [:show, :edit, :destroy, :create], constraints: { id: /[a-zA-Z.0-9_\-\/]+/ } do collection do get :pages put ':id' => 'wikis#update' @@ -275,7 +275,7 @@ Gitlab::Application.routes.draw do end end - resources :deploy_keys, constraints: {id: /\d+/} do + resources :deploy_keys, constraints: { id: /\d+/ } do member do put :enable put :disable @@ -303,7 +303,7 @@ Gitlab::Application.routes.draw do end end - resources :merge_requests, constraints: {id: /\d+/}, except: [:destroy] do + resources :merge_requests, constraints: { id: /\d+/ }, except: [:destroy] do member do get :diffs post :automerge @@ -318,27 +318,27 @@ Gitlab::Application.routes.draw do end end - resources :hooks, only: [:index, :create, :destroy], constraints: {id: /\d+/} do + resources :hooks, only: [:index, :create, :destroy], constraints: { id: /\d+/ } do member do get :test end end resources :team, controller: 'team_members', only: [:index] - resources :milestones, except: [:destroy], constraints: {id: /\d+/} do + resources :milestones, except: [:destroy], constraints: { id: /\d+/ } do member do put :sort_issues put :sort_merge_requests end end - resources :labels, constraints: {id: /\d+/} do + resources :labels, constraints: { id: /\d+/ } do collection do post :generate end end - resources :issues, constraints: {id: /\d+/}, except: [:destroy] do + resources :issues, constraints: { id: /\d+/ }, except: [:destroy] do collection do post :bulk_update end @@ -355,7 +355,7 @@ Gitlab::Application.routes.draw do end end - resources :notes, only: [:index, :create, :destroy, :update], constraints: {id: /\d+/} do + resources :notes, only: [:index, :create, :destroy, :update], constraints: { id: /\d+/ } do member do delete :delete_attachment end @@ -364,7 +364,7 @@ Gitlab::Application.routes.draw do end end - get ':id' => 'namespaces#show', constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/} + get ':id' => 'namespaces#show', constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ } root to: 'dashboard#show' end |