openSUSE/trollolo

Trollolo doesn't work with Ruby 2.4

Ana06 opened this issue · 5 comments

Ana06 commented

Everything seems to work in Ruby 2.4.1, but no wit my current 2.4.2:

> ruby -v
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux-gnu]

That's the error:

> trollolo burndown --plot-to-board

/usr/lib64/ruby/gems/2.4.0/gems/rest-client-1.8.0/lib/restclient/request.rb:163:in `fetch': key not found: :ciphers (KeyError)
        from /usr/lib64/ruby/gems/2.4.0/gems/rest-client-1.8.0/lib/restclient/request.rb:163:in `initialize'
        from /usr/lib64/ruby/gems/2.4.0/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `new'
        from /usr/lib64/ruby/gems/2.4.0/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `execute'
        from /usr/lib64/ruby/gems/2.4.0/gems/ruby-trello-1.5.1/lib/trello/net.rb:29:in `execute_core'
        from /usr/lib64/ruby/gems/2.4.0/gems/ruby-trello-1.5.1/lib/trello/net.rb:18:in `try_execute'
        from /usr/lib64/ruby/gems/2.4.0/gems/ruby-trello-1.5.1/lib/trello/net.rb:10:in `execute'
        from /usr/lib64/ruby/gems/2.4.0/gems/ruby-trello-1.5.1/lib/trello/client.rb:88:in `invoke_verb'
        from /usr/lib64/ruby/gems/2.4.0/gems/ruby-trello-1.5.1/lib/trello/client.rb:19:in `get'
        from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/trello_wrapper.rb:84:in `get_board'
        from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/trello_wrapper.rb:32:in `retrieve_board_data'
        from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/trello_wrapper.rb:21:in `board'
        from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/burndown_data.rb:96:in `board'
        from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/burndown_data.rb:121:in `get_meta'
        from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/burndown_data.rb:100:in `fetch'
        from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/burndown_chart.rb:200:in `update'
        from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/lib/cli.rb:187:in `burndown'
        from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
        from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
        from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
        from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
        from /usr/lib64/ruby/gems/2.4.0/gems/trollolo-0.1.1/bin/trollolo:29:in `<top (required)>'
        from /usr/bin/trollolo.ruby2.4:23:in `load'
        from /usr/bin/trollolo.ruby2.4:23:in `<main>'

This may be solved by updating rest-client to the last version. For doing this we need to change the dependency with ruby-trello. To use >= 1.6 where a higher rest-client can be used. But according to 2592bf6 several rspec mocks won't work with ruby-trello 1.6, so we will need to take a look at this to allow the update.

I'm running the tests with ruby 2.4.3 and they work. I'm using rest-client 1.8.0 and ruby-trello 1.5.1. Can we assume that this issue has been fixed and remove the upper limit for the Ruby version?

Ana06 commented

@cornelius it fails when for example running trollolo burndown --plot-to-board, I am not sure if it fails when running the tests. I didn't try with Ruby 2.4.3, but I doubt the problem get solved without updating the other gems.

I also opened an issue in ruby-trello: jeremytregunna/ruby-trello#239

Ana06 commented

I have tried it and in my computer with Ruby 2.4.3 the tests also fail, but in travis they do not fail: https://travis-ci.org/Ana06/trollolo/builds/339864941

I wonder what is different between my local environment and Travis 🤔

Ana06 commented

I am also using Ruby 2.4.3, rest-client 1.8.0 and ruby-trello 1.5.1 And the error I get in the tests is the same one key not found: :ciphers and it seems this error is related to rest-client and solve in a higher
version 🤔

Ana06 commented

as discussed with @cornelius, we should update rest-client and ruby-trello, removing the restriction of the gemspec. If there are any test failures this should be fixed as well. 👍