GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
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
Then I removed rubygems.org and checked that the resulting errors messages (that is, when all sources will return 404s) made sense.
Allow spec cache updates to fail
Allow fetching of specs to fail
This is to allow use of multiple sources,
even if one more or more is unavailable
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.
OK. Well... I'll take that up with evan.
This type of change really needs to have automated tests behind it.
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.
Add FetchError rescue behavior to FakeFetcher
Add tests for mixture of failing and working sources
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?
Merge branch 'master' of git://github.com/rubygems/rubygems into allo…
This should be gems2.example.com to be proper.
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.
I'm really sorry, but I do need clarification. Where would the block be coming from? Where would the test be yielding?
Oh, okay. That does make more sense. Will do.
gems.example2.com -> gems2.example.com in test
for allowing missing sources
Deduplicate code in tests for missing source
Tests updated as requested.