man/bundle-config.ronn in bundler-2.0.2 vs man/bundle-config.ronn in bundler-2.1.0.pre.1

- old
+ new

@@ -1,11 +1,11 @@ bundle-config(1) -- Set bundler configuration options ===================================================== ## SYNOPSIS -`bundle config` [<name> [<value>]] +`bundle config` [list|get|set|unset] [<name> [<value>]] ## DESCRIPTION This command allows you to interact with Bundler's configuration system. @@ -14,44 +14,53 @@ 1. Local config (`app/.bundle/config`) 2. Environmental variables (`ENV`) 3. Global config (`~/.bundle/config`) 4. Bundler default config -Executing `bundle config` with no parameters will print a list of all -bundler configuration for the current bundle, and where that configuration +Executing `bundle config list` with will print a list of all bundler +configuration for the current bundle, and where that configuration was set. -Executing `bundle config <name>` will print the value of that configuration +Executing `bundle config get <name>` will print the value of that configuration setting, and where it was set. -Executing `bundle config <name> <value>` will set that configuration to the +Executing `bundle config set <name> <value>` will set that configuration to the value specified for all bundles executed as the current user. The configuration will be stored in `~/.bundle/config`. If <name> already is set, <name> will be overridden and user will be warned. -Executing `bundle config --global <name> <value>` works the same as above. +Executing `bundle config set --global <name> <value>` works the same as above. -Executing `bundle config --local <name> <value>` will set that configuration to +Executing `bundle config set --local <name> <value>` will set that configuration to the local application. The configuration will be stored in `app/.bundle/config`. -Executing `bundle config --delete <name>` will delete the configuration in both -local and global sources. Not compatible with --global or --local flag. +Executing `bundle config unset <name>` will delete the configuration in both +local and global sources. +Executing `bundle config unset --global <name>` will delete the configuration +only from the user configuration. + +Executing `bundle config unset --local <name> <value>` will delete the +configuration only from the local application. + Executing bundle with the `BUNDLE_IGNORE_CONFIG` environment variable set will cause it to ignore all configuration. -Executing `bundle config disable_multisource true` upgrades the warning about +Executing `bundle config set disable_multisource true` upgrades the warning about the Gemfile containing multiple primary sources to an error. Executing `bundle -config --delete disable_multisource` downgrades this error to a warning. +config unset disable_multisource` downgrades this error to a warning. ## REMEMBERING OPTIONS -Flags passed to `bundle install` or the Bundler runtime, -such as `--path foo` or `--without production`, are not remembered between commands. -If these options must be remembered,they must be set using `bundle config` -(e.g., `bundle config path foo`). +Flags passed to `bundle install` or the Bundler runtime, such as `--path foo` or +`--without production`, are remembered between commands and saved to your local +application's configuration (normally, `./.bundle/config`). +However, this will be changed in bundler 3, so it's better not to rely on this +behavior. If these options must be remembered, it's better to set them using +`bundle config` (e.g., `bundle config set path foo`). + The options that can be configured are: * `bin`: Creates a directory (defaults to `~/bin`) and place any executables from the gem there. These executables run in Bundler's context. If used, you might add @@ -90,11 +99,11 @@ gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config Since the specific location of that executable can change from machine to machine, you can specify these flags on a per-machine basis. - bundle config build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config + bundle config set build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config After running this command, every time bundler needs to install the `mysql` gem, it will pass along the flags you specified. ## CONFIGURATION KEYS @@ -143,11 +152,11 @@ * `cache_all_platforms` (`BUNDLE_CACHE_ALL_PLATFORMS`): Cache gems for all platforms. * `cache_path` (`BUNDLE_CACHE_PATH`): The directory that bundler will place cached gems in when running <code>bundle package</code>, and that bundler will look in when installing gems. - Defaults to `vendor/bundle`. + Defaults to `vendor/cache`. * `clean` (`BUNDLE_CLEAN`): Whether Bundler should run `bundle clean` automatically after `bundle install`. * `console` (`BUNDLE_CONSOLE`): The console that `bundle console` starts. Defaults to `irb`. @@ -167,20 +176,18 @@ Allow Bundler to use a local git override without a branch specified in the Gemfile. * `disable_multisource` (`BUNDLE_DISABLE_MULTISOURCE`): When set, Gemfiles containing multiple sources will produce errors instead of warnings. - Use `bundle config --delete disable_multisource` to unset. + Use `bundle config unset disable_multisource` to unset. * `disable_platform_warnings` (`BUNDLE_DISABLE_PLATFORM_WARNINGS`): Disable warnings during bundle install when a dependency is unused on the current platform. * `disable_shared_gems` (`BUNDLE_DISABLE_SHARED_GEMS`): Stop Bundler from accessing gems installed to RubyGems' normal location. * `disable_version_check` (`BUNDLE_DISABLE_VERSION_CHECK`): Stop Bundler from checking if a newer Bundler version is available on rubygems.org. -* `error_on_stderr` (`BUNDLE_ERROR_ON_STDERR`): - Print Bundler errors to stderr. * `force_ruby_platform` (`BUNDLE_FORCE_RUBY_PLATFORM`): Ignore the current machine's platform and install only `ruby` platform gems. As a result, gems with native extensions will be compiled from source. * `frozen` (`BUNDLE_FROZEN`): Disallow changes to the `Gemfile`. When the `Gemfile` is changed and the @@ -196,25 +203,17 @@ will search up from the current working directory until it finds a `Gemfile`. * `global_gem_cache` (`BUNDLE_GLOBAL_GEM_CACHE`): Whether Bundler should cache all gems globally, rather than locally to the installing Ruby installation. -* `global_path_appends_ruby_scope` (`BUNDLE_GLOBAL_PATH_APPENDS_RUBY_SCOPE`): - Whether Bundler should append the Ruby scope (e.g. engine and ABI version) - to a globally-configured path. * `ignore_messages` (`BUNDLE_IGNORE_MESSAGES`): When set, no post install messages will be printed. To silence a single gem, use dot notation like `ignore_messages.httparty true`. * `init_gems_rb` (`BUNDLE_INIT_GEMS_RB`) Generate a `gems.rb` instead of a `Gemfile` when running `bundle init`. * `jobs` (`BUNDLE_JOBS`): The number of gems Bundler can install in parallel. Defaults to 1. -* `list_command` (`BUNDLE_LIST_COMMAND`) - Enable new list command feature -* `major_deprecations` (`BUNDLE_MAJOR_DEPRECATIONS`): - Whether Bundler should print deprecation warnings for behavior that will - be changed in the next major version. * `no_install` (`BUNDLE_NO_INSTALL`): Whether `bundle package` should skip installing gems. * `no_prune` (`BUNDLE_NO_PRUNE`): Whether Bundler should leave outdated gems unpruned when caching. * `only_update_to_newer_versions` (`BUNDLE_ONLY_UPDATE_TO_NEWER_VERSIONS`): @@ -229,12 +228,12 @@ Whether Bundler will install gems into the default system path (`Gem.dir`). * `path_relative_to_cwd` (`BUNDLE_PATH_RELATIVE_TO_CWD`) Makes `--path` relative to the CWD instead of the `Gemfile`. * `plugins` (`BUNDLE_PLUGINS`): Enable Bundler's experimental plugin system. -* `prefer_gems_rb` (`BUNDLE_PREFER_GEMS_RB`) - Prefer `gems.rb` to `Gemfile` when Bundler is searching for a Gemfile. +* `prefer_patch` (BUNDLE_PREFER_PATCH): + Prefer updating only to next patch version during updates. Makes `bundle update` calls equivalent to `bundler update --patch`. * `print_only_version_number` (`BUNDLE_PRINT_ONLY_VERSION_NUMBER`) Print only version number from `bundler --version`. * `redirect` (`BUNDLE_REDIRECT`): The number of redirects allowed for network requests. Defaults to `5`. * `retry` (`BUNDLE_RETRY`): @@ -243,10 +242,13 @@ Have `Bundler.setup` make the `Kernel#gem` method public, even though RubyGems declares it as private. * `shebang` (`BUNDLE_SHEBANG`): The program name that should be invoked for generated binstubs. Defaults to the ruby install name used to generate the binstub. +* `silence_deprecations` (`BUNDLE_SILENCE_DEPRECATIONS`): + Whether Bundler should silence deprecation warnings for behavior that will + be changed in the next major version. * `silence_root_warning` (`BUNDLE_SILENCE_ROOT_WARNING`): Silence the warning Bundler prints when installing gems as root. * `skip_default_git_sources` (`BUNDLE_SKIP_DEFAULT_GIT_SOURCES`): Whether Bundler should skip adding default git source shortcuts to the Gemfile DSL. @@ -298,15 +300,15 @@ Bundler also allows you to work against a git repository locally instead of using the remote version. This can be achieved by setting up a local override: - bundle config local.GEM_NAME /path/to/local/git/repository + bundle config set local.GEM_NAME /path/to/local/git/repository For example, in order to use a local Rack repository, a developer could call: - bundle config local.rack ~/Work/git/rack + bundle config set local.rack ~/Work/git/rack Now instead of checking out the remote git repository, the local override will be used. Similar to a path source, every time the local git repository change, changes will be automatically picked up by Bundler. This means a commit in the local git repo will update the @@ -332,47 +334,47 @@ Bundler supports overriding gem sources with mirrors. This allows you to configure rubygems.org as the gem source in your Gemfile while still using your mirror to fetch gems. - bundle config mirror.SOURCE_URL MIRROR_URL + bundle config set mirror.SOURCE_URL MIRROR_URL For example, to use a mirror of rubygems.org hosted at rubygems-mirror.org: - bundle config mirror.http://rubygems.org http://rubygems-mirror.org + bundle config set mirror.http://rubygems.org http://rubygems-mirror.org Each mirror also provides a fallback timeout setting. If the mirror does not respond within the fallback timeout, Bundler will try to use the original server instead of the mirror. - bundle config mirror.SOURCE_URL.fallback_timeout TIMEOUT + bundle config set mirror.SOURCE_URL.fallback_timeout TIMEOUT For example, to fall back to rubygems.org after 3 seconds: - bundle config mirror.https://rubygems.org.fallback_timeout 3 + bundle config set mirror.https://rubygems.org.fallback_timeout 3 The default fallback timeout is 0.1 seconds, but the setting can currently only accept whole seconds (for example, 1, 15, or 30). ## CREDENTIALS FOR GEM SOURCES Bundler allows you to configure credentials for any gem source, which allows you to avoid putting secrets into your Gemfile. - bundle config SOURCE_HOSTNAME USERNAME:PASSWORD + bundle config set SOURCE_HOSTNAME USERNAME:PASSWORD For example, to save the credentials of user `claudette` for the gem source at `gems.longerous.com`, you would run: - bundle config gems.longerous.com claudette:s00pers3krit + bundle config set gems.longerous.com claudette:s00pers3krit Or you can set the credentials as an environment variable like this: export BUNDLE_GEMS__LONGEROUS__COM="claudette:s00pers3krit" For gems with a git source with HTTP(S) URL you can specify credentials like so: - bundle config https://github.com/bundler/bundler.git username:password + bundle config set https://github.com/bundler/bundler.git username:password Or you can set the credentials as an environment variable like so: export BUNDLE_GITHUB__COM=username:password