From f47805a7673b2ad0bea05288a81e9f20632491f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Erik=20=C3=95unapuu?= Date: Fri, 29 May 2020 16:28:57 +0300 Subject: [PATCH] Use require_relative where possible --- Rakefile | 2 +- config.ru | 2 +- config/boot.rb | 1 + test/test_helper.rb | 5 ++++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index ba6b733dd..e85f91391 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,6 @@ # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. -require File.expand_path('../config/application', __FILE__) +require_relative 'config/application' Rails.application.load_tasks diff --git a/config.ru b/config.ru index 4fa72a37f..ec46ca9f1 100644 --- a/config.ru +++ b/config.ru @@ -1,6 +1,6 @@ # This file is used by Rack-based servers to start the application. -require ::File.expand_path('../config/environment', __FILE__) +require_relative 'config/environment' run Rails.application # turn automatic que temp off diff --git a/config/boot.rb b/config/boot.rb index 30f5120df..da8896b7b 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,3 +1,4 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require 'bundler/setup' # Set up gems listed in the Gemfile. +require 'bootsnap/setup' diff --git a/test/test_helper.rb b/test/test_helper.rb index efdbc288f..3ab1e721d 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -10,7 +10,7 @@ if ENV['COVERAGE'] end ENV['RAILS_ENV'] ||= 'test' -require File.expand_path('../../config/environment', __FILE__) +require_relative '../config/environment' require 'rails/test_help' require 'minitest/mock' require 'capybara/rails' @@ -42,6 +42,9 @@ CompanyRegister::Client = CompanyRegisterClientStub EInvoice.provider = EInvoice::Providers::TestProvider.new class ActiveSupport::TestCase + # Run tests in parallel with specified workers + parallelize(workers: :number_of_processors) + ActiveRecord::Migration.check_pending! fixtures :all