Slogger icon indicating copy to clipboard operation
Slogger copied to clipboard

Githublogger: no implicit conversion of String into Integer (TypeError)

Open skeskali opened this issue 10 years ago • 5 comments

Since updating a few repositories on my Github account, I'm getting this error whenever I run slogger:

Users/cecily/Desktop/Slogger-master/plugins/githublogger.rb:57:in `[]': no implicit conversion of String into Integer (TypeError)
from /Users/cecily/Desktop/Slogger-master/plugins/githublogger.rb:57:in `block in do_log'
from /Users/cecily/Desktop/Slogger-master/plugins/githublogger.rb:56:in `each'
from /Users/cecily/Desktop/Slogger-master/plugins/githublogger.rb:56:in `do_log'
from /Users/cecily/Desktop/Slogger-master/slogger.rb:284:in `block in run_plugins'
from /Users/cecily/Desktop/Slogger-master/slogger.rb:271:in `each'
from /Users/cecily/Desktop/Slogger-master/slogger.rb:271:in `run_plugins'
from /Users/cecily/Desktop/Slogger-master/slogger.rb:460:in `<top (required)>'
from /Users/cecily/.rvm/rubies/ruby-2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/cecily/.rvm/rubies/ruby-2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from ./slogger:18:in `<main>'

Unfortunately I don't have enough ruby experience to know why this is happening. Can you help?

skeskali avatar Jan 08 '15 08:01 skeskali

Looks like the GitHub API has been deprecated, as this is what it's trying to translate:

"Hello there, wayfaring stranger. If you're reading this then you probably didn't see our blog post a couple of years back announcing that this API would go away: http://git.io/17AROg Fear not, you should be able to get what you need from the shiny new Events API instead."

I'm leaving on a trip for a few days but will look into this when I get back (unless someone has time before then).

-Brett

On 8 Jan 2015, at 2:25, Cecily Walker wrote:

Since updating a few repositories on my Github account, I'm getting this error whenever I run slogger:

Users/cecily/Desktop/Slogger-master/plugins/githublogger.rb:57:in []': no implicit conversion of String into Integer (TypeError) from /Users/cecily/Desktop/Slogger-master/plugins/githublogger.rb:57:in block in do_log' from /Users/cecily/Desktop/Slogger-master/plugins/githublogger.rb:56:in each' from /Users/cecily/Desktop/Slogger-master/plugins/githublogger.rb:56:in do_log' from /Users/cecily/Desktop/Slogger-master/slogger.rb:284:in block in run_plugins' from /Users/cecily/Desktop/Slogger-master/slogger.rb:271:ineach' from /Users/cecily/Desktop/Slogger-master/slogger.rb:271:in run_plugins' from /Users/cecily/Desktop/Slogger-master/slogger.rb:460:in<top (required)>' from /Users/cecily/.rvm/rubies/ruby-2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in require' from /Users/cecily/.rvm/rubies/ruby-2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in require' from ./slogger:18:in `

'

Unfortunately I don't have enough ruby experience to know why this is happening. Can you help?


Reply to this email directly or view it on GitHub: https://github.com/ttscoff/Slogger/issues/340

ttscoff avatar Jan 08 '15 13:01 ttscoff

I think I have it updated to use the new API for stars. Use the other github logger for gists and commits pushed. I'll issue a PR later tonight

lazyguru avatar Jan 08 '15 13:01 lazyguru

I'm working on this, too.. In fact, I'm already done (it was pretty easy).

Issuing a PR in a few minutes

drallgood avatar Jan 08 '15 15:01 drallgood

Thanks!

skeskali avatar Jan 15 '15 04:01 skeskali

Looks like this has been merged into develop but not master. Therefore it doesn't work unless the user switches branch.

mrjcleaver avatar Jan 24 '15 14:01 mrjcleaver