mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
d79366b4c9
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. |
||
---|---|---|
.. | ||
actions_test.rb | ||
api_app_generator_test.rb | ||
app_generator_test.rb | ||
application_record_generator_test.rb | ||
argv_scrubber_test.rb | ||
assets_generator_test.rb | ||
channel_generator_test.rb | ||
controller_generator_test.rb | ||
create_migration_test.rb | ||
generated_attribute_test.rb | ||
generator_generator_test.rb | ||
generator_test.rb | ||
generators_test_helper.rb | ||
helper_generator_test.rb | ||
integration_test_generator_test.rb | ||
job_generator_test.rb | ||
mailer_generator_test.rb | ||
migration_generator_test.rb | ||
model_generator_test.rb | ||
named_base_test.rb | ||
namespaced_generators_test.rb | ||
orm_test.rb | ||
plugin_generator_test.rb | ||
plugin_test_helper.rb | ||
plugin_test_runner_test.rb | ||
resource_generator_test.rb | ||
scaffold_controller_generator_test.rb | ||
scaffold_generator_test.rb | ||
shared_generator_tests.rb | ||
system_test_generator_test.rb | ||
task_generator_test.rb | ||
test_runner_in_engine_test.rb |