Allow install to complete even with some subset of sources missing #105

Closed
wants to merge 7 commits into
from

Conversation

Projects
None yet
4 participants
Contributor

presidentbeef commented Jun 13, 2011

I believe this addresses issue #101

These commits allow updating the spec cache to fail and the fetching of individual specs to fail. A message is shown when the cache cannot be updated, to indicate to the user that one of the sources may be unavailable.

I have tested this in following scenarios:

A remote source is successfully added alongside rubygems.org, then

  • specs.4.8.gz and latest_specs.4.8.gz are available, but no individual spec is available on new source
  • specs.4.8.gz is available, but latest_specs.4.8.gz is not available on new source
  • No files are available on new source

Then I removed rubygems.org and checked that the resulting errors messages (that is, when all sources will return 404s) made sense.

Justin Collins added some commits Jun 13, 2011

Justin Collins
Allow fetching of specs to fail
This is to allow use of multiple sources,
even if one more or more is unavailable

wordy?

Owner

presidentbeef replied Jun 14, 2011

That's the interface used in command.rb and by Gem::PlatformMismatch. I thought that was what was expected and would be easier than having a special case.

Contributor

zenspider commented Jun 14, 2011

OK. Well... I'll take that up with evan.

This type of change really needs to have automated tests behind it.

@ghost ghost assigned zenspider Jun 15, 2011

Contributor

presidentbeef commented Jun 15, 2011

I can work on adding tests, I am just a little unsure of how to simulate failing sources. On the other hand, these changes do not break any existing tests.

Contributor

presidentbeef commented Jul 29, 2011

I guess I should mention that I added the above-mentioned tests.

+1 for this feature.

Any word on when/if it will be pulled in?

This should be gems2.example.com to be proper.

Owner

presidentbeef replied Jan 31, 2012

Okay, will fix.

It seems like these two tests could be refactored such that they only have to yield to a block to do the write_file section. Lemme know if that makes sense or not. Sometimes there is impedance between my brain's code and my brain's words.

Owner

presidentbeef replied Jan 31, 2012

I'm really sorry, but I do need clarification. Where would the block be coming from? Where would the test be yielding?

Owner

presidentbeef replied Jan 31, 2012

Oh, okay. That does make more sense. Will do.

Contributor

presidentbeef commented Feb 2, 2012

Tests updated as requested.

@evanphx evanphx closed this in 056c533 Mar 2, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment