Merge pull request #349 from openSUSE/review_140721_basic_rubocop_rules
[Review] Request from 'KalabiYau' @ 'openSUSE/osem/review_140721_basic_rubocop_rules'
This commit is contained in:
commit
d9d72eae07
103 changed files with 686 additions and 260 deletions
|
|
@ -5,7 +5,7 @@ include ActionView::Helpers::NumberHelper
|
|||
|
||||
if defined?(Bundler)
|
||||
# If you precompile assets before deploying to production, use this line
|
||||
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
||||
Bundler.require(*Rails.groups(assets: %w(development test)))
|
||||
# If you want your assets lazily compiled in production, use this line
|
||||
# Bundler.require(:default, :assets, Rails.env)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ require 'rubygems'
|
|||
# Set up gems listed in the Gemfile.
|
||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
||||
|
||||
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
||||
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ set :repository, 'https://github.com/openSUSE/osem.git'
|
|||
# They will be linked in the 'deploy:link_shared_paths' step.
|
||||
set :shared_paths, %w{ config/database.yml log public/system config/secrets.yml config/config.yml tmp}
|
||||
|
||||
task :setup => :environment do
|
||||
task setup: :environment do
|
||||
queue! %[mkdir -p "#{deploy_to}/shared/log"]
|
||||
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/log"]
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ task :setup => :environment do
|
|||
end
|
||||
|
||||
desc 'Deploys the current version to the server.'
|
||||
task :deploy => :environment do
|
||||
task deploy: :environment do
|
||||
deploy do
|
||||
invoke :'git:clone'
|
||||
invoke :'deploy:link_shared_paths'
|
||||
|
|
@ -43,7 +43,7 @@ task :deploy => :environment do
|
|||
end
|
||||
|
||||
desc 'Notifies the exception handler of the deploy.'
|
||||
task :notify_errbit => :environment do
|
||||
task notify_errbit: :environment do
|
||||
revision = `git rev-parse HEAD`.strip
|
||||
user = ENV['USER']
|
||||
queue "bundle exec rake hoptoad:deploy TO=#{rails_env} REVISION=#{revision} REPO=#{repository} USER=#{user}"
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ require File.expand_path('../application', __FILE__)
|
|||
path = Rails.root.join("config", "config.yml")
|
||||
begin
|
||||
CONFIG = YAML.load_file(path)[Rails.env]
|
||||
rescue Exception
|
||||
rescue
|
||||
puts "Error while parsing config file #{path}"
|
||||
CONFIG = Hash.new
|
||||
CONFIG = {}
|
||||
end
|
||||
|
||||
# Initialize the rails application
|
||||
|
|
|
|||
|
|
@ -35,6 +35,6 @@ Osem::Application.configure do
|
|||
config.eager_load = false
|
||||
|
||||
# Set the detault url for action mailer
|
||||
config.action_mailer.default_url_options = { :host => CONFIG['url_for_emails'] }
|
||||
config.action_mailer.default_url_options = { host: CONFIG['url_for_emails'] }
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -67,5 +67,5 @@ Osem::Application.configure do
|
|||
config.active_support.deprecation = :notify
|
||||
|
||||
# Set the detault url for action mailer
|
||||
config.action_mailer.default_url_options = { :host => CONFIG['url_for_emails'] }
|
||||
config.action_mailer.default_url_options = { host: CONFIG['url_for_emails'] }
|
||||
end
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ Osem::Application.routes.draw do
|
|||
patch :restart
|
||||
get :vote
|
||||
end
|
||||
resource :speaker, :only => [:edit, :update]
|
||||
resource :speaker, only: [:edit, :update]
|
||||
end
|
||||
|
||||
resources :supporters
|
||||
|
|
@ -79,11 +79,11 @@ Osem::Application.routes.draw do
|
|||
|
||||
resources :conference, only: [:show] do
|
||||
resources :proposal do
|
||||
resources :event_attachment, :controller => "event_attachments"
|
||||
resources :event_attachment, controller: "event_attachments"
|
||||
patch '/confirm' => 'proposal#confirm'
|
||||
patch '/restart' => 'proposal#restart'
|
||||
end
|
||||
resource :schedule, :only => [] do
|
||||
resource :schedule, only: [] do
|
||||
get "/" => "schedule#index"
|
||||
end
|
||||
member do
|
||||
|
|
@ -96,17 +96,17 @@ Osem::Application.routes.draw do
|
|||
|
||||
namespace :api, defaults: {format: 'json'} do
|
||||
namespace :v1 do
|
||||
resources :conferences, :only => :index do
|
||||
resources :conferences, :only => :index
|
||||
resources :rooms, :only => :index
|
||||
resources :tracks, :only => :index
|
||||
resources :speakers, :only => :index
|
||||
resources :events, :only => :index
|
||||
resources :conferences, only: :index do
|
||||
resources :conferences, only: :index
|
||||
resources :rooms, only: :index
|
||||
resources :tracks, only: :index
|
||||
resources :speakers, only: :index
|
||||
resources :events, only: :index
|
||||
end
|
||||
resources :rooms, :only => :index
|
||||
resources :tracks, :only => :index
|
||||
resources :speakers, :only => :index
|
||||
resources :events, :only => :index
|
||||
resources :rooms, only: :index
|
||||
resources :tracks, only: :index
|
||||
resources :speakers, only: :index
|
||||
resources :events, only: :index
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue