rails--rails/railties
Marco Costa d79366b4c9 Preserve Bundle configuration during app generation (#34755)
When generating a new rails application (rails new) using a custom template that
includes gems from an authenticated source, the user has to provide credentials to
bundler.

One way to do this is by exporting environment variables, for example:

export BUNDLE_GITHUB__COM=user:pass: provides credentials for bundler to fetch
gems from github.com.

The problem this PR addresses is that we are currently scrubs all /BUNDLE_.*/
environment variables by wrapping our system calls in Bundler.with_clean_env.

We do this because we don't want our commands executed against the generated project
to use the generator's bundler environment (e.g. our gems): the generated project should
use it's own configuration.

The problem with Bundler.with_clean_env is that, on top of restoring environment
variables to their original state, it also scrubs any /BUNDLE_.*/ variables, which is harmful for authenticated gem sources.

This PR replaces Bundler.with_clean_env with Bundler.with_original_env, which only
restores environment variables to their initial state, without additional scrubbing.
2019-01-09 07:52:06 +09:00
..
bin Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
exe Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
lib Preserve Bundle configuration during app generation (#34755) 2019-01-09 07:52:06 +09:00
test Preserve Bundle configuration during app generation (#34755) 2019-01-09 07:52:06 +09:00
.gitignore Clean up and consolidate .gitignores 2018-02-17 14:26:19 -08:00
CHANGELOG.md Preserve Bundle configuration during app generation (#34755) 2019-01-09 07:52:06 +09:00
MIT-LICENSE Bump license years for 2019 2018-12-31 10:24:38 +07:00
RDOC_MAIN.rdoc Rails guides are now served over https 2018-07-24 11:29:31 +09:00
README.rdoc Update MIT licenses link [ci skip] 2017-08-22 08:46:02 +09:00
Rakefile Make Webpacker the default JavaScript compiler for Rails 6 (#33079) 2018-09-30 22:31:21 -07:00
railties.gemspec Revert "Revert "Merge pull request #34387 from yhirano55/rails_info_properties_json"" 2019-01-08 22:19:22 +01:00

README.rdoc

= Railties -- Gluing the Engine to the Rails

Railties is responsible for gluing all frameworks together. Overall, it:

* handles the bootstrapping process for a Rails application;

* manages the +rails+ command line interface;

* and provides the Rails generators core.


== Download

The latest version of Railties can be installed with RubyGems:

* gem install railties

Source code can be downloaded as part of the Rails project on GitHub

* https://github.com/rails/rails/tree/master/railties

== License

Railties is released under the MIT license:

* https://opensource.org/licenses/MIT

== Support

API documentation is at

* http://api.rubyonrails.org

Bug reports can be filed for the Ruby on Rails project here:

* https://github.com/rails/rails/issues

Feature requests should be discussed on the rails-core mailing list here:

* https://groups.google.com/forum/?fromgroups#!forum/rubyonrails-core