Skip to content
This repository was archived by the owner on Feb 25, 2023. It is now read-only.

Handle rubygems failure#38

Open
stuartmg wants to merge 7 commits into
appfolio:masterfrom
patientslikeme:handle_rubygems_failure
Open

Handle rubygems failure#38
stuartmg wants to merge 7 commits into
appfolio:masterfrom
patientslikeme:handle_rubygems_failure

Conversation

@stuartmg

@stuartmg stuartmg commented Aug 6, 2019

Copy link
Copy Markdown

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.lock file from the repository and ignores it.

This PR addresses #35 and #36.

@magneland magneland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for this Pull Request, Stuart!
Sorry about being a bit slow to respond to these.

Comment thread gemsurance.gemspec
s.executables = ["gemsurance"]

s.add_dependency("bundler", "~> 1.2")
s.add_dependency("bundler", ">= 1.2")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you revert this line? The master branch was updated to handle this requirement (with a < 3.0).

Comment thread gemsurance.gemspec
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")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dev dependencies got moved into Gemfile. If you want to update them there, feel free.

Comment thread gemsurance.gemspec
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")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
{}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

ansh-wal and others added 4 commits September 15, 2021 07:49
- Fix issue with index method because of the bundler gem update.
- Index method no longer directly accessible like this so update the gem
  according to the new method specs.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants