chore: Enable the new Rubocop rules (#7122)
fixes: https://linear.app/chatwoot/issue/CW-1574/renable-the-disabled-rubocop-rules
This commit is contained in:
@@ -7,7 +7,7 @@ if defined?(ActiveRecord)
|
||||
require 'active_record/fixtures'
|
||||
|
||||
fixtures_dir ||= ActiveRecord::Tasks::DatabaseTasks.fixtures_path
|
||||
fixture_files ||= Dir["#{fixtures_dir}/**/*.yml"].map { |f| f[(fixtures_dir.size + 1)..-5] }
|
||||
fixture_files ||= Dir["#{fixtures_dir}/**/*.yml"].pluck((fixtures_dir.size + 1)..-5)
|
||||
|
||||
logger.debug "loading fixtures: { dir: #{fixtures_dir}, files: #{fixture_files} }"
|
||||
ActiveRecord::FixtureSet.reset_cache
|
||||
|
||||
@@ -18,6 +18,6 @@ if defined?(ActiveRecord::Base)
|
||||
end
|
||||
|
||||
filename = command_options.fetch('runnable_full_title', 'no title').gsub(/[^[:print:]]/, '')
|
||||
File.open(Rails.root.join("log/#{filename}.json"), 'w+') do |file|
|
||||
Rails.root.join("log/#{filename}.json").open('w+') do |file|
|
||||
file << JSON.pretty_generate(json_result)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user