Rubocop update #2751

This commit is contained in:
Priit Tark 2015-07-03 15:40:29 +03:00
parent 8946a476c2
commit 7ac6d6b362
5 changed files with 11 additions and 8 deletions

View file

@ -5,6 +5,7 @@ AllCops:
- 'Guardfile' - 'Guardfile'
# stuff generated by AR and rails # stuff generated by AR and rails
- 'db/schema.rb' - 'db/schema.rb'
- 'db/schema-read-only.rb'
- 'db/whois_schema.rb' - 'db/whois_schema.rb'
- 'db/api_log_schema.rb' - 'db/api_log_schema.rb'
- 'db/migrate/*' - 'db/migrate/*'

View file

@ -3,7 +3,7 @@ class BankTransaction < ActiveRecord::Base
belongs_to :bank_statement belongs_to :bank_statement
has_one :account_activity has_one :account_activity
scope :unbinded, -> { scope :unbinded, lambda {
where('id NOT IN (SELECT bank_transaction_id FROM account_activities where bank_transaction_id IS NOT NULL)') where('id NOT IN (SELECT bank_transaction_id FROM account_activities where bank_transaction_id IS NOT NULL)')
} }

View file

@ -3,15 +3,16 @@
ENV["RAILS_ENV"] ||= "production" ENV["RAILS_ENV"] ||= "production"
root = File.expand_path(File.dirname(__FILE__)) root = File.expand_path(File.dirname(__FILE__))
root = File.dirname(root) until File.exists?(File.join(root, 'config')) root = File.dirname(root) until File.exist?(File.join(root, 'config'))
Dir.chdir(root) Dir.chdir(root)
require File.join(root, "config", "environment") require File.join(root, "config", "environment")
$running = true @running = true
Signal.trap("TERM") do Signal.trap("TERM") do
$running = false @running = false
end end
while($running) do # rubocop: disable Style/WhileUntilDo
while @running do
end end

View file

@ -22,7 +22,8 @@ end
namespace :db do namespace :db do
namespace :schema do namespace :schema do
task load: [:environment, :load_config] do task load: [:environment, :load_config] do
puts 'Only rake db:structure:load is supported and invoked now. Otherwise zonefile generation does not work nor que.' puts 'Only rake db:structure:load is supported and invoked. ' \
'Otherwise zonefile generation does not work nor que.'
Rake::Task["db:structure:load"].invoke Rake::Task["db:structure:load"].invoke
end end
end end