Handle rubygems failure#38
Conversation
magneland
left a comment
There was a problem hiding this comment.
Thank you so much for this Pull Request, Stuart!
Sorry about being a bit slow to respond to these.
| s.executables = ["gemsurance"] | ||
|
|
||
| s.add_dependency("bundler", "~> 1.2") | ||
| s.add_dependency("bundler", ">= 1.2") |
There was a problem hiding this comment.
Could you revert this line? The master branch was updated to handle this requirement (with a < 3.0).
| s.add_development_dependency("rake", "0.9.2.2") | ||
| s.add_development_dependency("nokogiri", "1.10.0") | ||
| s.add_development_dependency("test-unit", "3.0.9") | ||
| s.add_development_dependency("mocha", "1.9.0") |
There was a problem hiding this comment.
The dev dependencies got moved into Gemfile. If you want to update them there, feel free.
| s.add_development_dependency("nokogiri", "1.10.0") | ||
| s.add_development_dependency("test-unit", "3.0.9") | ||
| s.add_development_dependency("mocha", "1.9.0") | ||
| s.add_development_dependency("rake", ">= 10.0.0") |
There was a problem hiding this comment.
I think this should be OK. I doubt we make use of any old rake features.
Although note what's in gem_info_retriever_test.rb
| def get_gem_info(gem_name) | ||
| Gems.info(gem_name) | ||
| rescue StandardError | ||
| {} |
There was a problem hiding this comment.
OK, I did a little digging here. I suppose the idea is to guard against any network errors here?
https://github.com/rubygems/gems/blob/v0.8.0/lib/gems/request.rb
The newer versions will have a check for JSON parsing errors here:
rubygems/gems#41
I don't know which errors you are experiencing here?
In any case, could you output a warning here?
Something like:
rescue StandardError => e
$stderr.puts e
{}
end
…rade Bugfix Bunlder Update
This PR rescues any errors that occur while fetching the gem info from rubygems.org. This information is only used to create links to the gem homepage, documentation, and source. An error during this lookup should not prevent the report from being generated.
This also updates the version of a number of dependencies so that it can be more easily used by other projects.
Finally, this removes the
Gemfile.lockfile from the repository and ignores it.This PR addresses #35 and #36.