mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #12733 from robin850/fix-railties-build
Fix railties build
This commit is contained in:
commit
9616a7ee1a
5 changed files with 6 additions and 6 deletions
|
@ -1,6 +1,8 @@
|
||||||
activesupport_path = File.expand_path('../../../../activesupport/lib', __FILE__)
|
activesupport_path = File.expand_path('../../../../activesupport/lib', __FILE__)
|
||||||
$:.unshift(activesupport_path) if File.directory?(activesupport_path) && !$:.include?(activesupport_path)
|
$:.unshift(activesupport_path) if File.directory?(activesupport_path) && !$:.include?(activesupport_path)
|
||||||
|
|
||||||
|
require 'thor/group'
|
||||||
|
|
||||||
require 'active_support'
|
require 'active_support'
|
||||||
require 'active_support/core_ext/object/blank'
|
require 'active_support/core_ext/object/blank'
|
||||||
require 'active_support/core_ext/kernel/singleton_class'
|
require 'active_support/core_ext/kernel/singleton_class'
|
||||||
|
@ -9,8 +11,6 @@ require 'active_support/core_ext/hash/deep_merge'
|
||||||
require 'active_support/core_ext/module/attribute_accessors'
|
require 'active_support/core_ext/module/attribute_accessors'
|
||||||
require 'active_support/core_ext/string/inflections'
|
require 'active_support/core_ext/string/inflections'
|
||||||
|
|
||||||
require 'rails/generators/base'
|
|
||||||
|
|
||||||
module Rails
|
module Rails
|
||||||
module Generators
|
module Generators
|
||||||
autoload :Actions, 'rails/generators/actions'
|
autoload :Actions, 'rails/generators/actions'
|
||||||
|
|
|
@ -8,7 +8,6 @@ rescue LoadError
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'rails/generators'
|
require 'rails/generators'
|
||||||
require 'rails/generators/actions'
|
|
||||||
|
|
||||||
module Rails
|
module Rails
|
||||||
module Generators
|
module Generators
|
||||||
|
|
|
@ -184,6 +184,7 @@ task default: :test
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
public_task :set_default_accessors!
|
||||||
public_task :create_root
|
public_task :create_root
|
||||||
|
|
||||||
def create_root_files
|
def create_root_files
|
||||||
|
|
|
@ -22,8 +22,8 @@ class AppRailsLoaderTest < ActiveSupport::TestCase
|
||||||
exe = "#{script_dir}/rails"
|
exe = "#{script_dir}/rails"
|
||||||
|
|
||||||
test "is not in a Rails application if #{exe} is not found in the current or parent directories" do
|
test "is not in a Rails application if #{exe} is not found in the current or parent directories" do
|
||||||
File.stubs(:exists?).with('bin/rails').returns(false)
|
File.stubs(:exist?).with('bin/rails').returns(false)
|
||||||
File.stubs(:exists?).with('script/rails').returns(false)
|
File.stubs(:exist?).with('script/rails').returns(false)
|
||||||
|
|
||||||
assert !Rails::AppRailsLoader.exec_app_rails
|
assert !Rails::AppRailsLoader.exec_app_rails
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,7 @@ require 'rails/paths'
|
||||||
|
|
||||||
class PathsTest < ActiveSupport::TestCase
|
class PathsTest < ActiveSupport::TestCase
|
||||||
def setup
|
def setup
|
||||||
File.stubs(:exists?).returns(true)
|
File.stubs(:exist?).returns(true)
|
||||||
@root = Rails::Paths::Root.new("/foo/bar")
|
@root = Rails::Paths::Root.new("/foo/bar")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue