Closed sean-dickinson closed 1 year ago
hey @sean-dickinson thank you for the PR. :heart:
Do you mind checking the build as it is failing? I think it is due to:
The safe navigation operator (&.) was added in Ruby 2.3.0.
So the spec for ruby versions below 2.3.0 are failing. Can you fix those?
Looks good to me @sean-dickinson ! thanks for working on this. I am marking this as approved, but not merging yet for someone from the team to also look at it.
Hey @hmdros! May you have a quick look at this PR if you have some free time?
Description
GemInfo#state
conditional expressionMotivation and Context
else
part of this condition is never reached when@latest_compatible_version
isnil
.I will say I'm not completely clear on the logic in
#find_latest_compatible
. I don't know enough about the shape of the spec objects and the edge cases surrounding them. It appears to me that the error state is caused when there are specs found by theGem::SpecFetcher
but none of them are compatible with the version of Rails given. This will execute#find_latest_compatible
but never set the@latest_compatible_version
instance variable. It's a bit confusing as there is a null object pattern being used along with a nil state and it's hard to parse the meaning behind each without more context.I'd be happy to adjust the solution if this is more of a band-aid than a true fix.
How Has This Been Tested?
I will abide by the code of conduct