|
1 | 1 | #!/usr/bin/env ruby |
2 | | -# frozen_string_literal: true |
| 2 | +# This command will automatically be run when you run "rails" with Rails gems |
| 3 | +# installed from the root of your application. |
3 | 4 |
|
4 | | -# |
5 | | -# This file was generated by Bundler. |
6 | | -# |
7 | | -# The application 'rails' is installed as part of a gem, and |
8 | | -# this file is here to facilitate running it. |
9 | | -# |
| 5 | +ENV['RAILS_ENV'] ||= 'test' |
10 | 6 |
|
11 | | -require "pathname" |
12 | | -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", |
13 | | - Pathname.new(__FILE__).realpath) |
| 7 | +ENGINE_ROOT = File.expand_path('..', __dir__) |
| 8 | +ENGINE_PATH = File.expand_path('../lib/activeadmin_blaze_theme', __dir__) |
| 9 | +APP_PATH = File.expand_path('../spec/dummy/config/application', __dir__) |
14 | 10 |
|
15 | | -bundle_binstub = File.expand_path("../bundle", __FILE__) |
| 11 | +# Set up gems listed in the Gemfile. |
| 12 | +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) |
| 13 | +require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) |
16 | 14 |
|
17 | | -if File.file?(bundle_binstub) |
18 | | - if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ |
19 | | - load(bundle_binstub) |
20 | | - else |
21 | | - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. |
22 | | -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") |
23 | | - end |
24 | | -end |
25 | | - |
26 | | -require "rubygems" |
27 | | -require "bundler/setup" |
28 | | - |
29 | | -load Gem.bin_path("railties", "rails") |
| 15 | +require 'rails/all' |
| 16 | +require 'rails/engine/commands' |
0 commit comments