1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #23932 from arthurnn/arthurnn/remove_load_paths

Remove load_paths file
This commit is contained in:
Arthur Nogueira Neves 2016-03-01 16:10:09 -05:00
commit 15c308582f
15 changed files with 5 additions and 43 deletions

View file

@ -1,9 +1,6 @@
require File.expand_path('../../../load_paths', __FILE__)
require 'action_cable'
require 'active_support/testing/autorun'
require 'puma'
require 'mocha/setup'

View file

@ -1,4 +1,3 @@
require File.expand_path('../../../load_paths', __FILE__)
require 'active_support/core_ext/kernel/reporting'
# These are the normal settings that will be set up by Railties

View file

@ -1,5 +1,3 @@
require File.expand_path('../../../load_paths', __FILE__)
$:.unshift(File.dirname(__FILE__) + '/lib')
$:.unshift(File.dirname(__FILE__) + '/fixtures/helpers')
$:.unshift(File.dirname(__FILE__) + '/fixtures/alternate_helpers')

View file

@ -1,5 +1,3 @@
require File.expand_path('../../../load_paths', __FILE__)
$:.unshift(File.dirname(__FILE__) + '/lib')
$:.unshift(File.dirname(__FILE__) + '/fixtures/helpers')
$:.unshift(File.dirname(__FILE__) + '/fixtures/alternate_helpers')

View file

@ -1,5 +1,3 @@
require File.expand_path('../../../load_paths', __FILE__)
require 'active_job'
require 'support/job_buffer'

View file

@ -1,5 +1,3 @@
require File.expand_path('../../../../load_paths', __FILE__)
require 'active_model'
require 'active_support/core_ext/string/access'

View file

@ -1,4 +1,3 @@
require File.expand_path('../../../load_paths', __FILE__)
require "active_record"
require 'benchmark/ips'

View file

@ -1,4 +1,3 @@
require File.expand_path('../../../load_paths', __FILE__)
require 'active_record'
class Person < ActiveRecord::Base

View file

@ -1,5 +1,3 @@
require File.expand_path('../../../../load_paths', __FILE__)
require 'config'
require 'active_support/testing/autorun'

View file

@ -1,12 +1,5 @@
ORIG_ARGV = ARGV.dup
begin
old, $VERBOSE = $VERBOSE, nil
require File.expand_path('../../../load_paths', __FILE__)
ensure
$VERBOSE = old
end
require 'active_support/core_ext/kernel/reporting'
silence_warnings do

View file

@ -1,3 +0,0 @@
# bust gem prelude
require 'bundler'
Bundler.setup

View file

@ -1,7 +1,5 @@
ENV["RAILS_ENV"] ||= "test"
require File.expand_path("../../../load_paths", __FILE__)
require 'stringio'
require 'active_support/testing/autorun'
require 'active_support/testing/stream'

View file

@ -311,10 +311,6 @@ module TestHelpers
end
def boot_rails
# FIXME: shush Sass warning spam, not relevant to testing Railties
Kernel.silence_warnings do
require File.expand_path('../../../../load_paths', __FILE__)
end
end
end
end
@ -336,12 +332,8 @@ Module.new do
FileUtils.rm_rf(app_template_path)
FileUtils.mkdir(app_template_path)
environment = File.expand_path('../../../../load_paths', __FILE__)
require_environment = "-r #{environment}"
`#{Gem.ruby} #{require_environment} #{RAILS_FRAMEWORK_ROOT}/railties/exe/rails new #{app_template_path} --skip-gemfile --skip-listen --no-rc`
`#{Gem.ruby} #{RAILS_FRAMEWORK_ROOT}/railties/exe/rails new #{app_template_path} --skip-gemfile --skip-listen --no-rc`
File.open("#{app_template_path}/config/boot.rb", 'w') do |f|
f.puts "require '#{environment}'"
f.puts "require 'rails/all'"
end
end unless defined?(RAILS_ISOLATED_ENGINE)

View file

@ -26,11 +26,7 @@ module RailtiesTests
end
def rails(cmd)
environment = File.expand_path('../../../../load_paths', __FILE__)
if File.exist?("#{environment}.rb")
require_environment = "-r #{environment}"
end
`#{Gem.ruby} #{require_environment} #{RAILS_FRAMEWORK_ROOT}/railties/exe/rails #{cmd}`
`#{Gem.ruby} #{RAILS_FRAMEWORK_ROOT}/railties/exe/rails #{cmd}`
end
def build_engine(is_mountable=false)

View file

@ -1,5 +1,7 @@
#!/usr/bin/env ruby
require File.expand_path('../../load_paths', __FILE__)
require 'bundler'
Bundler.setup
require 'rails/all'
require 'active_support/all'
require 'irb'