github-v3-api
github-v3-api copied to clipboard
Invoking .assignee on an Issue with no assignee throws a NameError
Looks like Issue
is missing a natural_key
definition? Not sure exactly what this is supposed to be doing or I would fork it and submit a patch.
irb(main):011:0> @i.assignee
NameError: undefined local variable or method `natural_key' for #<GitHubV3API::Issue:0x877d03c>
from /var/lib/gems/1.9.1/gems/github-v3-api-0.1.0/lib/github_v3_api/entity.rb:50:in `fetch_data'
from /var/lib/gems/1.9.1/gems/github-v3-api-0.1.0/lib/github_v3_api/entity.rb:27:in `[]'
from /var/lib/gems/1.9.1/gems/github-v3-api-0.1.0/lib/github_v3_api/entity.rb:35:in `block (2 levels) in attr_reader'
from (irb):11
from /usr/bin/irb1.9.1:12:in `<main>'
Natural key is used by api to figure out what Entity to fetch. It looks like @jonmagic (who submitted the IssuesAPI) didn't address that, and I didn't catch it. For some reason, I also didn't see this bug report until months later (while looking at a different issue.) :-(
I'll have a look at this in the next few days and see if I can get it patched (unless @jonmagic gets to it first).
Thanks @jwilger, appreciate it.