Merge pull request #19731 from wazery/rename_bin_to_exe

Rename railties/bin to railties/exe to match the new Bundler convention
This commit is contained in:
Matthew Draper 2015-04-12 04:38:40 +09:30
commit cab53734e8
6 changed files with 10 additions and 6 deletions

@ -34,7 +34,7 @@ Launch!
Let's start to boot and initialize the app. A Rails application is usually
started by running `rails console` or `rails server`.
### `railties/bin/rails`
### `railties/exe/rails`
The `rails` in the command `rails server` is a ruby executable in your load
path. This executable contains the following lines:
@ -45,7 +45,7 @@ load Gem.bin_path('railties', 'rails', version)
```
If you try out this command in a Rails console, you would see that this loads
`railties/bin/rails`. A part of the file `railties/bin/rails.rb` has the
`railties/exe/rails`. A part of the file `railties/exe/rails.rb` has the
following code:
```ruby

@ -1,3 +1,7 @@
* Rename `railties/bin` to `railties/exe` to match the new Bundler executables convention.
*Islam Wazery*
* Print `bundle install` output in `rails new` as soon as it's available
Running `rails new` will now print the output of `bundle install` as

@ -15,10 +15,10 @@
s.email = 'david@loudthinking.com'
s.homepage = 'http://www.rubyonrails.org'
s.files = Dir['CHANGELOG.md', 'README.rdoc', 'RDOC_MAIN.rdoc', 'bin/**/*', 'lib/**/{*,.[a-z]*}']
s.files = Dir['CHANGELOG.md', 'README.rdoc', 'RDOC_MAIN.rdoc', 'exe/**/*', 'lib/**/{*,.[a-z]*}']
s.require_path = 'lib'
s.bindir = 'bin'
s.bindir = 'exe'
s.executables = ['rails']
s.rdoc_options << '--exclude' << '.'

@ -322,7 +322,7 @@ class ActiveSupport::TestCase
environment = File.expand_path('../../../../load_paths', __FILE__)
require_environment = "-r #{environment}"
`#{Gem.ruby} #{require_environment} #{RAILS_FRAMEWORK_ROOT}/railties/bin/rails new #{app_template_path} --skip-gemfile --no-rc`
`#{Gem.ruby} #{require_environment} #{RAILS_FRAMEWORK_ROOT}/railties/exe/rails new #{app_template_path} --skip-gemfile --no-rc`
File.open("#{app_template_path}/config/boot.rb", 'w') do |f|
f.puts "require '#{environment}'"
f.puts "require 'rails/all'"

@ -30,7 +30,7 @@ def rails(cmd)
if File.exist?("#{environment}.rb")
require_environment = "-r #{environment}"
end
`#{Gem.ruby} #{require_environment} #{RAILS_FRAMEWORK_ROOT}/railties/bin/rails #{cmd}`
`#{Gem.ruby} #{require_environment} #{RAILS_FRAMEWORK_ROOT}/railties/exe/rails #{cmd}`
end
def build_engine(is_mountable=false)