summaryrefslogtreecommitdiff
path: root/spec/support/artifice
Commit message (Collapse)AuthorAgeFilesLines
* Add ruby2_keywordsSutou Kouhei2019-12-313-3/+3
|
* Read marshaled gemspecs binarilyDavid Rodríguez2019-11-228-8/+8
|
* Always use folder structure aware path helpersspec_normalizationsDavid Rodríguez2019-11-041-1/+2
|
* Simplify a bunch of test requiresDavid Rodríguez2019-11-0438-38/+38
|
* Simplify building some pathsDavid Rodríguez2019-11-041-1/+1
|
* Rename `lib` to `lib_dir`David Rodríguez2019-11-041-1/+1
| | | | For consistency with `spec_dir`.
* Bump tested rubies and regenerate cassettesbump_rubiesDavid Rodríguez2019-10-20706-342/+342
|
* Test against latest rubiesDavid Rodríguez2019-09-01704-341/+341
|
* Remove unnecessary rubygems monkeypatchDavid Rodríguez2019-08-171-1/+1
| | | | | Instead, make sure we always load the local copy of bundler during specs, and never end up using the default copy.
* Remove a bunch of unneeded rubygems requiresDavid Rodríguez2019-08-171-1/+0
|
* Bump rack and sinatra to latest versionsbump_test_depsDavid Rodríguez2019-08-063-3/+4
|
* Normalize style with other artifice filesDavid Rodríguez2019-08-061-4/+2
|
* Rerecord cassettesrerecord_cassettesrerecord_cassetesDavid Rodríguez2019-08-05706-325/+444
| | | | Don't think it will make a difference, but I'll try.
* Cleanup more stuff only needed for old rubiesDavid Rodríguez2019-04-081-5/+1
|
* Remove ruby version leftoversremove_ruby_version_leftoversDavid Rodríguez2019-03-151-7/+0
|
* Fix rubocop issuesDavid Rodríguez2019-03-081-2/+2
|
* Fallback to sequentially fetching specs on 429sDavid Rodríguez2019-03-081-0/+48
| | | | | If the compact index returns TooManyRequests, take it easier by requesting dependencies sequentially instead.
* Auto-correct `Style/RescueStandardError` offensesDavid Rodríguez2019-03-041-2/+2
|
* Auto-correct `Style/StderrPuts` rubocop offensesDavid Rodríguez2019-03-042-2/+2
|
* Auto-correct `Style/TrailingCommaInHashLiteral` offensesglobally_enable_some_layout_copsDavid Rodríguez2019-03-041-1/+1
|
* Refresh all VCR cassettesrefresh_vcr_cassettesDavid Rodríguez2019-02-22708-414/+503
|
* Let updater retry on HTTPRequestedRangeNotSatisfiable (416)Maxime Lapointe2018-08-271-0/+34
| | | | | | Fixes issues when gems get yanked, which leads to the cached infos being longer than what is on the server. Being longer, the compact index api just return a 416, and bundler would fallback to the dependency API. Retrying to the compact index with no range would fix the issue. This is what this fix does.
* Use Bundler.rubygems.inflate instead of the Gem::Util method directlysegiddins/use-rubygems-integration-inflateSamuel Giddins2018-03-102-2/+2
|
* Use Gem::Util.inflate instead of Gem.inflateupdate-deprecated-methodsSHIBATA Hiroshi2018-03-012-2/+2
|
* finally working test for the inline double-checkindirect/fix-6072Andre Arko2017-11-282-0/+7
| | | | | this test appears to only fail when the server is rubygems.org, so I moved the test into realworld and pulled in vcr.
* Load digest subclasses in a thread-safe mannerseg-digest-loadingSamuel Giddins2017-10-151-1/+1
|
* Load Digest::SHA2 using Digest()colby/flaky-testColby Swandale2017-10-141-1/+1
|
* Add a way to assert that Artifice only gets certain requestsSamuel Giddins2017-09-131-0/+26
|
* Remove `File.expand_path` when it given Pathname objectSHIBATA Hiroshi2017-09-071-1/+1
|
* Use Pathname#join instead of string interpolationSHIBATA Hiroshi2017-09-071-1/+1
|
* To use helper methods for relative path references.SHIBATA Hiroshi2017-09-061-1/+1
| | | | | | | | Ruby core needs to change `Spec::Path.root` and gemspec, bin, spec directories structure. * Added Spec::Path.bin, gemspec, spec methods. * Replace Spec::Path methods from relative references like "../../..".
* [RuboCop] Enable Layout/EmptyLineAfterMagicComment copKoichi ITO2017-07-1637-0/+37
|
* Auto merge of #5826 - greysteil:handle-invalid-range-errors, r=indirectThe Bundler Bot2017-07-081-0/+37
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid Range Not Satisfiable errors during normal request flow ### What was the end-user problem that led to this PR? Previously, Bundler was requesting partial response ranges for the Rubygems compact index that could be empty. Since Rubygems was [ignoring the `ETag` header](https://github.com/rubygems/rubygems.org/pull/1652) for these requests, empty ranges would occur whenever the versions index (for instance) hadn't been modified since the version Bundler currently had cached. When this happened, Rubygems would respond with a 416 (Range Not Satisfiable). Bundler would treat this as a `Bundler::HTTPError`, and fall back to using `Fetcher::Dependency` for dependency info. Sadly, that meant metadata about what Ruby version each dependency required was no-longer checked, and updates for gems which should be limited by the system Ruby version were failing. Closes #5373. ### What was your diagnosis of the problem? See above ### What is your fix for the problem, implemented in this PR? This PR updates the range Bundler requests from Rubygems to ensure it's always satisfiable. It does that but requesting all bytes from (and including) the final byte in the Bundler cache, rather than all bytes after (and not including) it. ### Why did you choose this fix out of the possible options? An alternative fix would be to catch the 416 responses and retry the index lookup in those cases, asking for a full response. That would mean an extra request in all of those cases, though - this method keeps the number of calls to Rubygems down.
| * Make CompactIndexPartialUpdate artifice deterministicGrey Baker2017-07-051-9/+8
| |
| * Avoid Range Not Satisfiable errors during normal request flowGrey Baker2017-07-041-0/+38
| |
* | Auto merge of #5829 - bundler:colby/vcr-cassettes-illegal-path-chars, ↵The Bundler Bot2017-07-053-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r=segiddins remove forbidden chars in cassettes pathname ### What was the end-user problem that led to this PR? Users running Micorsoft Windows are currently unable to clone to Bundler project due to a forbidden character in the folder path: `spec/support/artifice/vcr_cassettes/realworld/api.rubygems.org/api/v1/dependencies?gems=bundler'` The `?` being the forbidden character. See #5828 ### What is your fix for the problem, implemented in this PR? Replaced the forbidden character in the folder name with a `-` and updated the VCR spec helper to replace any forbidden character with a `-` in the filename function. ### Why did you choose this fix out of the possible options? This was the most simple approach to fix the issue.
| * remove forbidden chars in cassettes pathnamecolby/vcr-cassettes-illegal-path-charsColby Swandale2017-07-043-1/+1
| |
* | Auto merge of #5792 - bundler:seg-remove-rubygems-aggregate, r=segiddinsThe Bundler Bot2017-06-271-0/+16
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [2.0] Remove RubyGems Aggregate & support transitive source pinning ### What was the end-user problem that led to this PR? The problem was that the resolver could resolve specs from _any_ of the sources specified in the Gemfile, even if that source had nothing to do with the spec in question. This was such a large security vulnerability that, when discovered, it warranted a CVE and its own minor release of Bundler. Closes #3671. Closes #3696. Closes #4059. ### Was was your diagnosis of the problem? My diagnosis was that we needed to get rid of the notion of a `rubygems aggregate` and enforce that specs could only come either from the source they were declared to come from (the top-level source if declared at the top-level of the Gemfile, else a scoped source), or a source that it transitively "inherited" from the gems that required it. ### What is your fix for the problem, implemented in this PR? My fix is to disable multiple top-level sources in the Gemfile, remove the RubyGems aggregate, and filter the sources gems could come from as described above. ### Why did you choose this fix out of the possible options? I chose this fix because it allows doing the filtering in a reasonably performant manner, and refactors the way we handle sources to abstract some of the grossness in such a way that the machinations to make sure that all of the necessary gem info is downloaded is encapsulated into a single method, driven from the definition, rather than being specific to rubygems sources. See https://github.com/bundler/bundler/pull/4714 and https://github.com/bundler/bundler/pull/4930 for the prior implementation.
| * | Avoid fetching the full index to get all dependency namesSamuel Giddins2017-06-231-0/+16
| |/
* | Add specs for the global gem cacheSamuel Giddins2017-06-271-0/+12
|/
* Add cassettes for realworld trampoline specs used on old RGSamuel Giddins2017-06-138-0/+28
|
* [Rakefile] Allow re-recording all VCR cassettesSamuel Giddins2017-06-131-1/+2
|
* Add VCR cassettes for realworld specsSamuel Giddins2017-06-13646-0/+2284
|
* Disallow making realworld network requests on CISamuel Giddins2017-06-131-1/+1
|
* Get the realworld specs running on 1.8.7 againSamuel Giddins2017-06-132-7/+16
|
* Re-implement VCR to support marshalled responses with incorrect ↵Samuel Giddins2017-06-131-131/+82
| | | | content-length headers
* Use a single cassette for the realworld specsSamuel Giddins2017-06-131-1/+1
|
* [Realworld] Use VCR for network requestsSamuel Giddins2017-06-131-0/+196
|
* [RuboCop] Enable Style/PercentLiteralDelimitersKoichi ITO2017-05-284-4/+4
| | | | Run `rubocop -a --only Style/PercentLiteralDelimiters` and `rubocop --auto-gen-config`.
* Fail gracefully when installing a spec where the API is missing depsSamuel Giddins2017-02-131-0/+16
|