From fb5deeffc916763b47f6bd332474668bae062d7c Mon Sep 17 00:00:00 2001 From: The Bundler Bot Date: Sat, 21 Jan 2017 06:12:18 +0000 Subject: Auto merge of #5338 - bundler:seg-doc-settings, r=indirect Document all Bundler settings Closes #5288 (cherry picked from commit 990f05e86593c0a821c538ae9cae535c298eee7a) --- lib/bundler/settings.rb | 1 + man/bundle-config.ronn | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ spec/quality_spec.rb | 24 ++---------------------- 3 files changed, 53 insertions(+), 22 deletions(-) diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb index 4c14f6369a..0aa9082352 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -10,6 +10,7 @@ module Bundler allow_offline_install auto_install cache_all + cache_all_platforms disable_checksum_validation disable_exec_load disable_local_branch_check diff --git a/man/bundle-config.ronn b/man/bundle-config.ronn index fd15a24288..a77ee331d4 100644 --- a/man/bundle-config.ronn +++ b/man/bundle-config.ronn @@ -169,6 +169,56 @@ learn more about their operation in [bundle install(1)][bundle-install]. * `disable_checksum_validation` (`BUNDLE_DISABLE_CHECKSUM_VALIDATION`): Allow installing gems even if they do not match the checksum provided by RubyGems. +* `disable_version_check` (`BUNDLE_DISABLE_VERSION_CHECK`): + Stop Bundler from checking if a newer Bundler version is available on + rubygems.org. +* `allow_offline_install` (`BUNDLE_ALLOW_OFFLINE_INSTALL`): + Allow Bundler to use cached data when installing without network access. +* `auto_install` (`BUNDLE_AUTO_INSTALL`): + Automatically run `bundle install` when gems are missing. +* `cache_all_platforms` (`BUNDLE_CACHE_ALL_PLATFORMS`): + Cache gems for all platforms. +* `cache_all` (`BUNDLE_CACHE_ALL`): + Cache all gems, including path and git gems. +* `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`. +* `disable_exec_load` (`BUNDLE_DISABLE_EXEC_LOAD`): + Stop Bundler from using `load` to launch an executable in-process in + `bundle exec`. +* `disable_local_branch_check` (`BUNDLE_DISABLE_LOCAL_BRANCH_CHECK`): + Allow Bundler to use a local git override without a branch specified in the + Gemfile. +* `disable_shared_gems` (`BUNDLE_DISABLE_SHARED_GEMS`): + Stop Bundler from accessing gems installed to RubyGems' normal location. +* `jobs` (`BUNDLE_JOBS`): + The number of gems Bundler can install in parallel. Defaults to 1. +* `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`): + During `bundle update`, only resolve to newer versions of the gems in the + lockfile. +* `plugins` (`BUNDLE_PLUGINS`): + Enable Bundler's experimental plugin system. +* `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_root_warning` (`BUNDLE_SILENCE_ROOT_WARNING`): + Silence the warning Bundler prints when installing gems as root. +* `ssl_verify_mode` (`BUNDLE_SSL_VERIFY_MODE`): + The SSL verification mode Bundler uses when making HTTPS requests. + Defaults to verify peer. +* `system_bindir` (`BUNDLE_SYSTEM_BINDIR`): + The location where RubyGems installs binstubs. Defaults to `Gem.bindir`. +* `user_agent` (`BUNDLE_USER_AGENT`): + The custom user agent fragment Bundler includes in API requests. In general, you should set these settings per-application by using the applicable flag to the [bundle install(1)][bundle-install] or [bundle package(1)][bundle-package] command. diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb index 9148bf512f..1c72202102 100644 --- a/spec/quality_spec.rb +++ b/spec/quality_spec.rb @@ -193,28 +193,8 @@ describe "The library itself" do it "documents all used settings" do exemptions = %w( - allow_offline_install - auto_install - cache_all - cache_all_platforms - clean - console - disable_exec_load - disable_local_branch_check - disable_shared_gems gem.coc gem.mit - jobs - major_deprecations - no_install - no_prune - only_update_to_newer_versions - plugins - shebang - silence_root_warning - ssl_verify_mode - system_bindir - user_agent warned_version ) @@ -228,7 +208,7 @@ describe "The library itself" do key_pattern = /([a-z\._-]+)/i `git ls-files -z`.split("\x0").each do |filename| File.readlines(filename).each_with_index do |line, number| - line.scan(/Bundler\.settings\[:#{key_pattern}\]/).flatten.each {|s| all_settings[s] << "referenced at `lib/#{filename}:#{number}`" } + line.scan(/Bundler\.settings\[:#{key_pattern}\]/).flatten.each {|s| all_settings[s] << "referenced at `lib/#{filename}:#{number.succ}`" } end end documented_settings = File.read("../man/bundle-config.ronn").scan(/^\* `#{key_pattern}`/).flatten @@ -237,7 +217,7 @@ describe "The library itself" do documented_settings.each {|s| all_settings.delete(s) } exemptions.each {|s| all_settings.delete(s) } error_messages = all_settings.map do |setting, refs| - "The `#{setting}` setting is undocumented\n\t- #{refs.join("\n\t- ")}" + "The `#{setting}` setting is undocumented\n\t- #{refs.join("\n\t- ")}\n" end expect(error_messages.sort).to be_well_formed -- cgit v1.2.1 From 3494d01e2464b12ce47b40a8d83920ee02dc26ec Mon Sep 17 00:00:00 2001 From: The Bundler Bot Date: Sat, 21 Jan 2017 18:41:03 +0000 Subject: Auto merge of #5342 - bundler:seg-ruby-2-2-2-bug, r=segiddins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [SharedHelpers] Use block.call instead of yield to avoid a stack cons… …istency error on Ruby 2.2.2 Using `yield` would cause a crash in the ruby VM due to calls sharing state and leading to a count mismatch. Using block.call avoids that issue Fixes https://github.com/bundler/bundler/issues/5341 Manually tested on Ruby 2.2.2 and 2.2.3, since they're not in the test matrix (only the latest 2.2.x is) (cherry picked from commit e60c73554ddc6d5bd58b1967c0c4c4acf3a5c253) --- lib/bundler/shared_helpers.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index 613609f25f..44b9136c0b 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -102,8 +102,10 @@ module Bundler # end # # @see {Bundler::PermissionError} - def filesystem_access(path, action = :write) - yield path.dup.untaint + def filesystem_access(path, action = :write, &block) + # Use block.call instead of yield because of a bug in Ruby 2.2.2 + # See https://github.com/bundler/bundler/issues/5341 for details + block.call(path.dup.untaint) rescue Errno::EACCES raise PermissionError.new(path, action) rescue Errno::EAGAIN -- cgit v1.2.1 From bdef06e5d7f981e48ee83c3a0959f70f08493ca2 Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Sat, 21 Jan 2017 14:51:45 -0600 Subject: Version 1.14.1 with changelog --- CHANGELOG.md | 6 ++++++ lib/bundler/version.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 091979f5e2..eb7d07850e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.14.1 (2017-01-21) + +Bugfixes: + + - work around a ruby 2.2.2 bug that caused a stack consistency error during installation (#5342, @segiddins) + ## 1.14.0 (2017-01-20) Bugfixes: diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb index a55df76934..ebd878e0ff 100644 --- a/lib/bundler/version.rb +++ b/lib/bundler/version.rb @@ -7,5 +7,5 @@ module Bundler # We're doing this because we might write tests that deal # with other versions of bundler and we are unsure how to # handle this better. - VERSION = "1.14.0" unless defined?(::Bundler::VERSION) + VERSION = "1.14.1" unless defined?(::Bundler::VERSION) end -- cgit v1.2.1