summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* update tested rubygems in travisindirect/rubygems-requirementColby Swandale2019-01-041-0/+15
|
* Lower required RubyGems to 2.5 or greaterAndre Arko2019-01-031-1/+1
| | | | | | | | | | | It turns out that every existing version of RubyGems will ignore the required RubyGems version and try to install the newest version of Bundler... until the middle of the install, when it will raise an exception and fail. There are some bugfixes in RubyGems 3 that improve the quality of life for Bundler 2 users, but they are less bad than RubyGems simply exploding anytime you try to run `gem install bundler`.
* Bundler 2.0 with changelogv2.0.0Colby Swandale2019-01-032-1/+5
|
* update CHANGELOG with new changes and releasev2.0.0.pre.3Colby Swandale2018-12-301-1/+4
|
* Merge #6856Bundlerbot2018-12-3011-21/+49
| | | | | | | | | | 6856: Test against Ruby 2.6 and RubyGems 3 r=colby-swandale a=segiddins The problem was we weren't testing our compatibility with the latest and greatest. Co-authored-by: Samuel Giddins <segiddins@segiddins.me> Co-authored-by: Colby Swandale <me@colby.fyi> (cherry picked from commit a63a39d738865665f714f179fe42dd10006da26d)
* add RubyGems v3.0.1 to rg clone taskColby Swandale2018-12-281-1/+1
|
* Version 2.0.0.pre.3 wih changelogColby Swandale2018-12-282-1/+11
|
* update tested versions of RubyGems in travisColby Swandale2018-12-281-10/+3
|
* update gemspec to require RubyGems 3.0.0Colby Swandale2018-12-281-1/+1
|
* Merge #6849Bundlerbot2018-12-281-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6849: revert commit b490e73 r=colby-swandale a=colby-swandale ### What was the end-user problem that led to this PR? There is a *really* obscure bug in Bundler that is causing deploys in Heroku to fail for certain environments. The environment in this case being Ruby 1.9.3 and RubyGems 1.8 I also think that this is the same bug causing https://github.com/bundler/bundler/issues/6829 ### What was your diagnosis of the problem? See https://gist.github.com/schneems/0247e3d5c3e079ecffd7cd10887c3cc9 ### What is your fix for the problem, implemented in this PR? Revert the commit that was causing this bug. The original PR can be found at https://github.com/bundler/bundler/pull/6687 I can confirm the fix by being able to deploy to Heroku succesfully using Bundler 1.17.2 + the commit to revert the change being applied on top. ``` $ git push heroku master Enumerating objects: 87, done. Counting objects: 100% (87/87), done. Delta compression using up to 4 threads Compressing objects: 100% (72/72), done. Writing objects: 100% (87/87), 28.14 KiB | 1.48 MiB/s, done. Total 87 (delta 13), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Ruby app detected remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-1.9.3 remote: -----> Installing dependencies using bundler 1.17.2 remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment remote: Fetching gem metadata from https://rubygems.org/.......... remote: RubyGems 1.8.23.2 is not threadsafe, so your gems will be installed one at a time. Upgrade to RubyGems 2.1.0 or higher to enable parallel gem installation. remote: Fetching rake 10.0.3 remote: Installing rake 10.0.3 remote: Fetching i18n 0.6.1 remote: Installing i18n 0.6.1 remote: Fetching multi_json 1.5.0 remote: Installing multi_json 1.5.0 remote: Fetching activesupport 3.2.11 remote: Installing activesupport 3.2.11 remote: Fetching builder 3.0.4 remote: Installing builder 3.0.4 remote: Fetching activemodel 3.2.11 remote: Installing activemodel 3.2.11 remote: Fetching erubis 2.7.0 remote: Installing erubis 2.7.0 remote: Fetching journey 1.0.4 remote: Installing journey 1.0.4 remote: Fetching rack 1.4.4 remote: Installing rack 1.4.4 remote: Fetching rack-cache 1.2 remote: Installing rack-cache 1.2 remote: Fetching rack-test 0.6.2 remote: Installing rack-test 0.6.2 remote: Fetching hike 1.2.1 remote: Installing hike 1.2.1 remote: Fetching tilt 1.3.3 remote: Installing tilt 1.3.3 remote: Fetching sprockets 2.2.2 remote: Installing sprockets 2.2.2 remote: Fetching actionpack 3.2.11 remote: Installing actionpack 3.2.11 remote: Fetching mime-types 1.19 remote: Installing mime-types 1.19 remote: Fetching polyglot 0.3.3 remote: Installing polyglot 0.3.3 remote: Fetching treetop 1.4.12 remote: Installing treetop 1.4.12 remote: Fetching mail 2.4.4 remote: Installing mail 2.4.4 remote: Fetching actionmailer 3.2.11 remote: Installing actionmailer 3.2.11 remote: Fetching arel 3.0.2 remote: Installing arel 3.0.2 remote: Fetching tzinfo 0.3.35 remote: Installing tzinfo 0.3.35 remote: Fetching activerecord 3.2.11 remote: Installing activerecord 3.2.11 remote: Fetching activeresource 3.2.11 remote: Installing activeresource 3.2.11 remote: Using bundler 1.17.2 remote: Fetching coffee-script-source 1.4.0 remote: Installing coffee-script-source 1.4.0 remote: Fetching execjs 1.4.0 remote: Installing execjs 1.4.0 remote: Fetching coffee-script 2.2.0 remote: Installing coffee-script 2.2.0 remote: Fetching rack-ssl 1.3.2 remote: Installing rack-ssl 1.3.2 remote: Fetching json 1.7.6 remote: Installing json 1.7.6 with native extensions remote: Fetching rdoc 3.12 remote: Installing rdoc 3.12 remote: Fetching thor 0.16.0 remote: Installing thor 0.16.0 remote: Fetching railties 3.2.11 remote: Installing railties 3.2.11 remote: Fetching coffee-rails 3.2.2 remote: Installing coffee-rails 3.2.2 remote: Fetching jquery-rails 2.2.0 remote: Installing jquery-rails 2.2.0 remote: Fetching pg 0.14.1 remote: Installing pg 0.14.1 with native extensions remote: Fetching rails 3.2.11 remote: Installing rails 3.2.11 remote: Fetching sass 3.2.5 remote: Installing sass 3.2.5 remote: Fetching sass-rails 3.2.6 remote: Installing sass-rails 3.2.6 remote: Fetching uglifier 1.3.0 remote: Installing uglifier 1.3.0 remote: Bundle complete! 6 Gemfile dependencies, 40 gems now installed. remote: Gems in the groups development and test were not installed. remote: Bundled gems are installed into `./vendor/bundle` remote: Post-install message from rdoc: remote: Depending on your version of ruby, you may need to install ruby rdoc/ri data: remote: remote: <= 1.8.6 : unsupported remote: = 1.8.7 : gem install rdoc-data; rdoc-data --install remote: = 1.9.1 : gem install rdoc-data; rdoc-data --install remote: >= 1.9.2 : nothing to do! Yay! remote: Bundle completed (14.08s) remote: Cleaning up the bundler cache. remote: -----> Writing config/database.yml to read from DATABASE_URL remote: -----> Installing node-v8.10.0-linux-x64 remote: -----> Detecting rake tasks remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7) remote: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7) remote: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7) remote: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7) remote: Asset precompilation completed (6.29s) remote: -----> Detecting rails configuration remote: remote: ###### WARNING: remote: remote: Injecting plugin 'rails_log_stdout' remote: remote: ###### WARNING: remote: remote: Injecting plugin 'rails3_serve_static_assets' remote: remote: ###### WARNING: remote: remote: Add 'rails_12factor' gem to your Gemfile to skip plugin injection remote: remote: ###### WARNING: remote: remote: No Procfile detected, using the default web server. remote: We recommend explicitly declaring how to boot your server process via a Procfile. remote: https://devcenter.heroku.com/articles/ruby-default-web-server remote: remote: remote: -----> Discovering process types remote: Procfile declares types -> (none) remote: Default types for buildpack -> console, rake, web remote: remote: -----> Compressing... remote: Done: 31.9M remote: -----> Launching... remote: Released v6 remote: https://glacial-ravine-68630.herokuapp.com/ deployed to Heroku remote: remote: ! Warning: You are running on a deprecated stack. remote: ! Please upgrade to the latest stack by following the instructions on: remote: ! https://devcenter.heroku.com/articles/upgrading-to-the-latest-stack remote: remote: Verifying deploy... done. To https://git.heroku.com/glacial-ravine-68630.git * [new branch] master -> master ``` Co-authored-by: Colby Swandale <me@colby.fyi> (cherry picked from commit c3ba633b749484490a38c661b79fbbfa7a62d633)
* Merge #6853Bundlerbot2018-12-281-0/+3
| | | | | | | | | | | | | | | | | 6853: add bundle-remove entry to bundler man page r=colby-swandale a=colby-swandale ### What was the end-user problem that led to this PR? The manual entry for `bundle remove` was missing in `bundle.ronn` ### What was your diagnosis of the problem? See #6846 Fixes #6846 Co-authored-by: Colby Swandale <me@colby.fyi> (cherry picked from commit 02cde1cd331615d09d96e0078982a820d5e6771e)
* Revert "Version 2.0.0 with changelog"Colby Swandale2018-12-282-5/+1
| | | | This reverts commit 04e16585e63aefeac56b026563db228a57bb2871.
* Version 2.0.0 with changelogColby Swandale2018-12-052-1/+5
|
* fix breaking edge case specColby Swandale2018-12-051-1/+1
|
* Merge #6818Bundlerbot2018-12-042-1/+13
| | | | | | | | | | | | | | | | | | | | 6818: Following up ruby core changes. r=hsbt a=hsbt ### What is your fix for the problem, implemented in this PR? These changes enabled to use the same configuration of executables in ruby core repository. * To use libexec instead of bin directory. * Restore exe direcotry for bundler.gemspec while running test suite. ### Why did you choose this fix out of the possible options? The ruby core repository uses `exe` directory for other usage. I chose `libexec` instead of `exe` in ruby core. And, The location of `bundler.gemspec` is not the root of the repository on ruby core. We should restore `libexec` to `exe` under the `lib` dir. see. https://github.com/ruby/ruby/blob/trunk/lib/bundler.gemspec Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org> (cherry picked from commit a578c4ee390fadb746252b4bd496f8ee6d90add4)
* bump bundler_2_mode in inject specColby Swandale2018-12-041-1/+1
|
* Version 2.0.0.pre.2 with Changelogv2.0.0.pre.2Colby Swandale2018-11-272-1/+13
|
* fix failing major deprecation error specColby Swandale2018-11-271-4/+4
|
* remove :github source declaration from new gem templateColby Swandale2018-11-271-2/+0
|
* Merge #6798Bundlerbot2018-11-272-0/+18
| | | | | | | | | | | | | 6798: Use https in the Github shortcut by default in Bundler 2 r=colby-swandale a=colby-swandale This PR is setting Git gems to be fetched over https by default. Note: This PR is successing #6791 Closes #6785 Co-authored-by: Colby Swandale <me@colby.fyi> (cherry picked from commit cf45792213fadf97f7aa6464de8ebd79f09725d2)
* Merge pull request #6752 from bundler/indirect/backport-6737André Arko2018-11-211-4/+11
| | | | | | backport #6737 to 1-16-stable (cherry picked from commit 8a789f00bf5ce93928f0d03ac324387c7d58db46)
* set warning message flag to show in bundler 3Colby Swandale2018-11-171-2/+2
|
* Merge #6786Bundlerbot2018-11-172-4/+4
| | | | | | | | | 6786: Followed up #6743 r=hsbt a=hsbt I fixed them. Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org> (cherry picked from commit 9cfe9bd9be4b44bde1fd71e6faab494509ceb7b6)
* Merge #6743Bundlerbot2018-11-1630-64/+130
| | | | | | | | | | | 6743: Support file structure of ruby core repository. r=hsbt a=hsbt In the ruby core repository, I put bundler executable and bundler libraries under the `bin` and `lib` directories. It breaks the current behavior. Support the structure of ruby core repository. Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org> (cherry picked from commit 172ec59db53ec05a91c0d9eb72e2d715ae82f3c0)
* Merge #6742Bundlerbot2018-11-104-5/+9
| | | | | | | | | | | | | | | | | 6742: Use helper method instead of hard-code path. r=colby-swandale a=hsbt ### What was the end-user problem that led to this PR? In ruby core repository, We need to replace executable file like `ruby`, `rake`, `gem`. ### What is your fix for the problem, implemented in this PR? This pull request makes hard-coded executable file to the helper methods. Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org> (cherry picked from commit 3cc783b9495f85b8c3fea480d888c4f032942e89)
* Merge #6741Bundlerbot2018-11-101-1/+1
| | | | | | | | | | | | | 6741: Support Windows platform with ruby core repository. r=hsbt a=hsbt In Windows environment, ':' is always contained path variable. See our original commit and its message https://github.com/ruby/ruby/commit/f35fb6d36c3218988b17dbeb4412922c23745f0e Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org> (cherry picked from commit 3a69ee35ef3e536ca616770906a4099d40b73c70)
* Merge #6740Bundlerbot2018-11-102-11/+2
| | | | | | | | | | | | | | | | | 6740: Removed win32-open3 workaround. r=colby-swandale a=hsbt ### What was the end-user problem that led to this PR? `win32-open3` gem was required Ruby 1.8 with Windows environment. Because RubyInstaller2 only provides the version of Ruby 2.1+. ### What is your fix for the problem, implemented in this PR? Removed needless workaround. Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org> (cherry picked from commit 6063718bc6c77b6a16621741f94866d6555f4cee)
* Version 2.0.0.pre.1 with changelogColby Swandale2018-11-092-1/+11
|
* fix breaking specsColby Swandale2018-11-0815-62/+55
|
* bump features/flags in spec helpers to bundler 3Colby Swandale2018-11-084-5/+5
|
* puts major upgrade warning under a feature flagColby Swandale2018-11-083-1/+3
|
* adjust major_deprecation version for relevent featuresColby Swandale2018-11-0413-23/+23
|
* move all bundler 2, < 2 spec scopes to bundler 3, < 3Colby Swandale2018-11-0348-146/+146
|
* remove 1.X mode, add 3.X mode and update versions of rubyColby Swandale2018-11-031-6/+6
|
* resolve rubocop errorColby Swandale2018-11-031-3/+4
|
* Merge #6763bundlerbot[bot]2018-11-031-81/+13
| | | | | | | | | 6763: Removed jobs with old ruby versions from Travis CI. r=colby-swandale a=hsbt I removed the ruby versions under the Ruby 2.2. We need to fix gemspec and other parameters of .travis.yml. But this is the first step of Bundler-2.0.0 reboot. Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org> (cherry picked from commit 67771c05de5d27dff4701b39707a78119cf2b55d)
* run rubocop with --auto-gen-configColby Swandale2018-11-032-42/+56
|
* bump all bundler 2 features (except stderr) to bundler 3Colby Swandale2018-11-031-29/+29
|
* Version 1.17.1 with changelogv1.17.1Andre Arko2018-10-252-1/+5
|
* Merge #6761Bundlerbot2018-10-252-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6761: fix error with path objects in array r=greysteil a=alexggordon Thanks so much for the contribution! To make reviewing this PR a bit easier, please fill out answers to the following questions. The problem was that `Pathname` instances in an array can not be sorted when there are string instances in the array also. Because of this, calling `.sort` before `.to_s` resulted in the error ``` [!] There was an error parsing `Gemfile`: comparison of Pathname with String failed. Bundler cannot continue. ``` you can easily see this issue doing ``` > require 'rails' => true > [Pathname.new("/tmp/bundle")] => [#<Pathname:/tmp/bundle>] > [Pathname.new("/tmp/bundle"), "test"] => [#<Pathname:/tmp/bundle>, "test"] > [Pathname.new("/tmp/bundle"), "test"].sort ArgumentError: comparison of Pathname with String failed ``` `sort` was called before `map` in the warn message. We should call `map(&:to_s)` before calling sort, and add a test case for this scenario. Because it broke our production deploys. Co-authored-by: Alex Gordon <agordon@sessionm.com>
* Version 1.17.0 with changelogv1.17.0Colby Swandale2018-10-252-1/+5
|
* Merge #6754Bundlerbot2018-10-241-0/+14
| | | | | | | | | | | 6754: Add docs for configuring bundler folders through ENV vars r=colby-swandale a=colby-swandale ### Overview This PR is just adding documentation for the feature in #6024. Co-authored-by: Colby Swandale <me@colby.fyi> (cherry picked from commit 97a0430885b370f9a5e1b647a0679be51dc3e20d)
* Version 1.17.0.pre.2 with changelogv1.17.0.pre.2Colby Swandale2018-10-132-1/+17
|
* fix failing bundle remove specsColby Swandale2018-10-131-3/+15
|
* Still document the `--force` optionDavid Rodríguez2018-10-122-6/+6
| | | | Only mention `--redownload` as an alias of it.
* scope specs testing bundler 2 deprecations to bundler 1 onlyColby Swandale2018-10-123-67/+55
|
* Merge #6718Bundlerbot2018-10-096-13/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6718: Correct `bundle show` deprecation r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was `bundle show` deprecation messages are incorrect: ``` $ bundle show yard [DEPRECATED FOR 2.0] use `bundle list` instead of `bundle show` Resolving dependencies... /home/deivid/Code/activeadmin/.bundle/ruby/2.5.0/gems/yard-0.9.16 $ bundle list yard ERROR: "bundle list" was called with arguments ["yard"] Usage: "bundle list" ``` ### What was your diagnosis of the problem? My diagnosis was that deprecation messages only mention `bundle list`, but in some cases, the replacement is `bundle info`. ### What is your fix for the problem, implemented in this PR? My fix is to replace "show" in the original command with the appropriate alternative in each case. ### Why did you choose this fix out of the possible options? I chose this fix because it was the most user friendly message, since it prints the exact command the user needs to type to get rid of the warning. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net> (cherry picked from commit 703b663a862aeada82169ecf183751616d61a268)
* Merge #6707Bundlerbot2018-10-093-7/+27
| | | | | | | | | | | | | | | | | | 6707: Run more assertions in more cases r=deivid-rodriguez a=deivid-rodriguez I noticed a couple of places where assertions were being excluded and they shouldn't: * One was introduced by me in #6702, where the specs added (and some already present) started being tested only on bundler 2.x. * The other one was introduced in f7414bcb17fe1bd67246021251b5f0527bd6afd1, where one assertion would be run only if a certain env variable was not set. I think it was because of a TravisCI environmental issue that now seems fixed. My diagnosis was that none of these exclusions are necessary. My fix is to restore the excluded assertions to all environments and branches. I chose this fix because it seems best to avoid future problems. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net> (cherry picked from commit 3d9e6167a7df9ca89a030dfe95c7cdff293e74a9)
* Merge #6702Bundlerbot2018-10-096-69/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6702: Better `--force` to `--redownload` transition r=indirect a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was. that, while trying to run `bundle install --force` today, I was getting the error `unknown switch --force` error, and I was not sure what was causing it and what I needed to do to fix it. Also, running `bundle install --help` would show `--force` as a supported option, so that would make things even more confusing. ### What was your diagnosis of the problem? My diagnosis was that: * A lot of removal/renaming of options in bundler 2 are artificially linked to the `forget_cli_options` switch. To me, those changes even though they are related (stopping rememebering cli options prompted us to actually remove some unnecessary ones), they are independent, so it's not straighforward to find out that it's the `forget_cli_options` setting causing this rename to be in place. * We should show a helpful deprecation message instead of a hard error, so the transition is easier for users. * We should update the commands help to document newer instead of deprecated options. * The `bundle update` command has an equivalent `--force` option that should be renamed too for sanity. ### What is your fix for the problem, implemented in this PR? My fix to the above problems is to: * Always keep the `--force` alias, independently of whether the `forget_cli_options` is set or not. * Show a deprecation message when `--force` is used in bundler 2, but still keep it working as before. * Update the commands help to use `--redownload`. * Make the equivalent changes to the `bundle update` ### Why did you choose this fix out of the possible options? I chose this fix because it seems like the more user friendly way going forward in my opinion. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net> (cherry picked from commit 16ebc8105b333e055e44711df59e0d42e88963ce)
* Merge #6316Bundlerbot2018-10-092-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6316: Display reason to require sudo r=colby-swandale a=okkez This is useful for non-interactive installation with bundler. ### What was the end-user problem that led to this PR? https://github.com/treasure-data/omnibus-td-agent/issues/166 I could not notice that bundler needs sudo privilege from logs. So I checked bundler code. ### What was your diagnosis of the problem? Bundler does not show the reason to need sudo privilege. ### What is your fix for the problem, implemented in this PR? Display reason to require sudo. ### Why did you choose this fix out of the possible options? If bundler displays reason to require sudo, we can notice permission problems as soon as possible. Co-authored-by: Kenji Okimoto <okimoto@clear-code.com> (cherry picked from commit 1bd53e3d930e4f915db5536c68b1ed7282304045)