mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 09:46:09 +02:00
Rubocop update #2751
This commit is contained in:
parent
8946a476c2
commit
7ac6d6b362
5 changed files with 11 additions and 8 deletions
|
@ -5,6 +5,7 @@ AllCops:
|
|||
- 'Guardfile'
|
||||
# stuff generated by AR and rails
|
||||
- 'db/schema.rb'
|
||||
- 'db/schema-read-only.rb'
|
||||
- 'db/whois_schema.rb'
|
||||
- 'db/api_log_schema.rb'
|
||||
- 'db/migrate/*'
|
||||
|
|
|
@ -3,7 +3,7 @@ class BankTransaction < ActiveRecord::Base
|
|||
belongs_to :bank_statement
|
||||
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)')
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env ruby
|
||||
results = []
|
||||
Dir[File.dirname(__FILE__) + "/*_ctl"].each {|f| results << `ruby #{f} #{ARGV.first}`}
|
||||
Dir[File.dirname(__FILE__) + "/*_ctl"].each { |f| results << `ruby #{f} #{ARGV.first}` }
|
||||
results.delete_if { |result| result.nil? || result.empty? }
|
||||
puts results.join unless results.empty?
|
||||
puts results.join unless results.empty?
|
||||
|
|
|
@ -3,15 +3,16 @@
|
|||
ENV["RAILS_ENV"] ||= "production"
|
||||
|
||||
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)
|
||||
|
||||
require File.join(root, "config", "environment")
|
||||
|
||||
$running = true
|
||||
@running = true
|
||||
Signal.trap("TERM") do
|
||||
$running = false
|
||||
@running = false
|
||||
end
|
||||
|
||||
while($running) do
|
||||
# rubocop: disable Style/WhileUntilDo
|
||||
while @running do
|
||||
end
|
||||
|
|
|
@ -22,7 +22,8 @@ end
|
|||
namespace :db do
|
||||
namespace :schema 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
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue