summaryrefslogtreecommitdiff
path: root/spec/commands/pristine_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove global directory switching from specstests/less_flakynessDavid Rodríguez2020-01-121-0/+2
| | | | | | | | `Dir.chdir` is not thread safe, so it makes our parallel specs flaky. Instead, use the following alternatives: * Use `:chdir` parameter to `Open3` methods for specs that shell out. * Stub `find_gemfile` or other relevant helpers for unit tests.
* Use standard require paths for names with dashes in specsDavid Rodríguez2020-01-031-1/+1
|
* Ignore local overrides for bundle pristinefatkodima2019-11-061-1/+14
|
* Remove unnecessary rubygems monkeypatchDavid Rodríguez2019-08-171-2/+1
| | | | | Instead, make sure we always load the local copy of bundler during specs, and never end up using the default copy.
* Normalize file:// handling in specsDavid Rodríguez2019-06-111-1/+1
|
* Move on to bundler 3David Rodríguez2019-04-111-1/+8
| | | | | | * Drop bundler 1 stuff from tests. * Move all feature flags to bundler 3 (like they are in 2-0-stable) and get them tested.
* Use newest interface to `bundle config` everywhereDavid Rodríguez2019-02-191-2/+2
|
* Split stderr and stdout in specsDavid Rodríguez2019-02-141-5/+5
|
* Properly restrict rubygems version for failing specsDavid Rodríguez2019-02-101-1/+1
| | | | | These specs need https://github.com/rubygems/rubygems/pull/1527 to pass, so restrict them to rubygems version containing that.
* Merge #6743Bundlerbot2018-11-161-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6743: Support file structure of ruby core repository. r=hsbt a=hsbt ### What was the end-user problem that led to this PR? In the ruby core repository, I put bundler executable and bundler libraries under the `bin` and `lib` directories. It breaks the current behavior. ### What is your fix for the problem, implemented in this PR? Support the structure of ruby core repository. Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
| * Backport from ruby coreSHIBATA Hiroshi2018-11-011-1/+1
| |
| * Added ruby_core filtering condition with some examples.SHIBATA Hiroshi2018-10-201-2/+2
| | | | | | | | The ruby core repository couldn't invoke its examples.
* | Remove unnecessary stuff from specsDavid Rodríguez2018-10-261-3/+1
|/ | | | Since we no longer test against rubygems versions that old.
* Correctly re-install extensions when running `pristine` for a git sourcePeter Wagenet2018-02-221-0/+19
|
* Added workarounds for Travis specific issues.SHIBATA Hiroshi2017-12-211-1/+3
|
* Fix the pristine spec so it still can access the default gemSamuel Giddins2017-12-211-0/+1
|
* Auto merge of #5933 - NickLaMuro:bundle-pristine-respect-bundler-config, ↵The Bundler Bot2017-08-181-0/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r=segiddins Use Bundler::Installer for bundle pristine Fixes bundler pristine to respect the `bundle config` options for particular gems. In my particular case, on OSX I have a keg version of `pg` and a bundle config with the following entry: ```console $ bundle config ... build.pg Set for the current user (/Users/nicklamuro/.bundle/config): "--with-pg-config=/usr/local/Cellar/postgresql@9.5/9.5.6/bin/pg_config" ``` This would not be respected What was the end-user problem that led to this PR? -------------------------------------------------- See above, but steps to reproduce (requires `bundler` >= 1.15): 1. Install postgres on your machine if it is not already there (OS dependent) 2. Add the following bundler build arg for `pg`: ```console $ bundle config build.pg -- --with-pg-config=$(which pg_config) ``` 2. Make sure `pg_config` is not in your `$PATH`: ```console $ export PATH=$(echo "$PATH" | sed "s|:$(dirname $(which pg_conf)))||") ``` * Create a simple project with `pg` as a single gem in your Gemfile: ``` # Gemfile gem "pg" ``` * Bundle: ```console $ bundle install ``` * Attempt to `bundle pristine` (you should get an error): ```console $ bundle pristine ``` What was your diagnosis of the problem? --------------------------------------- The newly added `bundle pristine` did no use the same code that was used by `bundle install` to execute the re-installation of the gem. What is your fix for the problem, implemented in this PR? --------------------------------------------------------- By making use of the `Bundler::Installer` and `Bundler::Installer::GemInstaller` code that is already used with `bundle install`, we can reuse the code that injects the `bundle config` options into each gem that is being installed. Why did you choose this fix out of the possible options? -------------------------------------------------------- Didn't want to repeat code that was already being used elsewhere. Caused a few lines of code to be added that weren't there previously, but nothing obscene.
| * Use Bundler::Installer for bundle pristineNick LaMuro2017-08-141-0/+19
| | | | | | | | | | | | | | | | | | | | Using a combination of Bundler::Installer and Bundler::GemInstaller to install the gems in `bundle pristine` allows the code for making use of bundler config being respected to be reused when installing a gem. Makes use of the compiled Makefile for c-extensions to confirm that the args are passed properly (honestly... a little hacky, but no real other way to do this on older versions of rubygems).
* | [RuboCop] Enable Layout/EmptyLineAfterMagicComment copKoichi ITO2017-07-161-0/+1
|/
* Auto merge of #5790 - bundler:seg-suppress-using-messages, r=indirectThe Bundler Bot2017-07-051-6/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [2.0] Suppress `Using …` messages during installation when a version has not changed ### What was the end-user problem that led to this PR? The problem was that `bundle install` output can get very verbose, even when Bundler is not doing anything. See https://github.com/bundler/bundler-features/issues/33. ### Was was your diagnosis of the problem? My diagnosis was that bundler was printing a bunch of `Using name (version)` messages, even when we were already using that gem at the same version. ### What is your fix for the problem, implemented in this PR? My fix is to introduce a feature flag (enabled by default on 2.0), that will only print those extra `Using` messages when `--verbose` is passed, and will continue to print them when there was an old version we can tell users about. Note that we still print a message when installing a gem for the first time. ### Why did you choose this fix out of the possible options? I chose this fix because it was essentially what had been done in https://github.com/bundler/bundler/pull/3872, and allows for easy feature-flagging.
| * Update the Bundler 2 specs for the removal of using... messagesseg-suppress-using-messagesSamuel Giddins2017-07-031-6/+3
| |
* | Vendor fileutils since it is now a gemSamuel Giddins2017-06-281-1/+1
|/
* [Pristine] Raise when trying to pristine a missing gemseg-pristine-specific-gemsSamuel Giddins2017-06-141-3/+8
|
* [Pristine] Allow passing a list of gems to pristineSamuel Giddins2017-06-141-0/+31
|
* [Pristine] Ensure git gems have added files removedSamuel Giddins2017-06-141-3/+14
|
* Auto merge of #5634 - koic:specify_require_spec_helper_in_dot_rspec, r=indirectThe Bundler Bot2017-05-301-1/+0
|\ | | | | | | | | | | | | | | | | Specify `--require spec_helper` in .rspec Specifying `--require spec_helper` in .rspec will automatically require spec_helper in *_spec.rb. It isn't necessary to specify `require "spec_helper"` in individual *_spec.rb. I think that it's a [DRY](https://en.wikipedia.org/wiki/Don't_repeat_yourself) way. Refer: https://github.com/rspec/rspec/wiki#rspec
| * Specify `--require spec_helper` in .rspecKoichi ITO2017-05-031-1/+0
| |
* | Unify the notation of RubyGemsKoichi ITO2017-05-041-1/+1
|/
* [Pristine] Skip the bundler gemseg-pristine-skip-bundlerSamuel Giddins2017-04-121-2/+8
| | | | Since Source::Rubygems will never re-install it
* Fix rubocop errorsDennis Suratna2017-04-111-3/+3
|
* Handle and test gemspec. Add platform to messageDennis Suratna2017-04-111-5/+37
|
* Refactor specs and pristineDennis Suratna2017-04-111-8/+11
|
* Expand test and refactor to re-install using sourceDennis Suratna2017-04-111-17/+15
|
* Add more specs and handle git sourceDennis Suratna2017-04-111-18/+31
|
* Initial pristine specsDennis Suratna2017-04-111-0/+50