RallyTools / RallyRestToolkitForRuby

A toolkit wrapping Rally's REST webservice for Ruby
MIT License
47 stars 32 forks source link

Object#timeout is deprecated, use Timeout.timeout instead. #58

Open bharathnalla opened 7 years ago

bharathnalla commented 7 years ago

This warning is thrown by dependency httpclient 2.6.0.1 when using rally_api 1.2.1 along with windows ruby version 2.3.1p112.

This issue seems to be fixed in the latest release version 2.8.2.4 here. can we use the latest release as dependency if it is alright? However i donot see any issue with ruby version 2.1.7

Warnings from console: Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:747:in connect': Object#timeout is deprecated, use Timeout.timeout instead. Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:617:inquery': Object#timeout is deprecated, use Timeout.timeout instead. Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:617:in query': Object#timeout is deprecated, use Timeout.timeout instead. Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:617:inquery': Object#timeout is deprecated, use Timeout.timeout instead. Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:617:in query': Object#timeout is deprecated, use Timeout.timeout instead. Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:617:inquery': Object#timeout is deprecated, use Timeout.timeout instead. Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:617:in `query': Object#timeout is deprecated, use Timeout.timeout instead.

jessejensen commented 7 years ago

It looks like they are just forcing httpclient 2.6 because it was a quick fix for a cert validation issue. Maybe just change it to: s.add_dependency('httpclient', '>=2.6.0.1')