summaryrefslogtreecommitdiff
path: root/spec/support/artifice
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Define the artifice module in fail.rbseg-spec-improvementsSamuel Giddins2016-12-221-0/+2
| | | | This is so persistent will use our override class
* Also load net/https before stubbing Net::HTTPSamuel Giddins2016-12-211-1/+11
|
* Don’t use Artifice for the fail endpointSamuel Giddins2016-12-211-10/+17
| | | | This avoids loading rack, which conflicts with some specs
* Update to sinatra 1.4.7 in the specsseg-specs-sinatra-updateSamuel Giddins2016-11-273-15/+3
|
* Replace fakeweb in the specs with artificeseg-remove-fakewebSamuel Giddins2016-11-183-2/+50
|
* [RuboCop] Avoid shadowing outer variableaa-missing-specsSamuel Giddins2016-10-141-3/+3
|
* the fake dependency api should return pre gems tooAndre Arko2016-10-121-1/+5
|
* include prereleases in the compact indexAndre Arko2016-10-121-2/+4
|
* Update specs to use compact_index 0.11Samuel Giddins2016-08-293-6/+6
|
* Distinguish tests for checksum mismatch & invalid checksumSamuel Giddins2016-08-221-2/+4
|
* [RubyGemsGemInstaller] Validate checksums from the compact indexSamuel Giddins2016-08-222-1/+23
|
* Fix network fail simulation on Ruby < 2.0seg-offline-new-indexSamuel Giddins2016-08-081-1/+3
|
* Add specs for allow_offline_installSamuel Giddins2016-08-051-0/+21
|
* Disallow updating gem_repo1 in the specsSamuel Giddins2016-07-102-6/+7
|
* Safely store concurrent compact index downloadsDominic Cleal2016-05-102-1/+40
| | | | | | | | | | | | | | | | When bundler is run concurrently using the same bundle dir in $HOME, the versions file can be updated from two processes at once. The download has been changed to a temporary file, which is securely moved into place over the original. If retrying the update operation, the original file is no longer immediately deleted and instead a full download is performed, later overwriting the original file if successful. If two processes are updating in parallel, this should ensure the original file isn't corrupted and that both processes succeed. - Fixes #4519
* [CompactIndex] Fall back when the versions checksum mismatchesseg-checksum-mismatch-errorSamuel Giddins2016-04-281-0/+15
|
* Compatibility with frozen string literalsSamuel Giddins2016-01-3128-1/+28
|
* [RuboCop] Fix Style/MutableConstantSamuel Giddins2016-01-312-10/+9
|
* [RuboCop] Address Style/GuardClauseSamuel Giddins2016-01-311-4/+3
|
* Pathname#path needs to be to_s here as wellAndre Arko2016-01-251-1/+1
|
* Pathname#to_path doesn’t exist on 1.8.7, so to_sAndre Arko2016-01-251-1/+1
|
* [rubocop] style, style, style :nail_care:Andre Arko2016-01-252-4/+4
|
* update extra_api artifice for structsAndre Arko2016-01-251-4/+3
|
* rewrite compact index artifice for 0.9.3 structsAndre Arko2016-01-251-17/+17
|
* [rubocop] cop those rubos right upAndre Arko2016-01-251-1/+1
|