envato / ami-spec

Acceptance testing your AMIs
MIT License
49 stars 15 forks source link

Fix deprecation warnings #39

Closed patrobinson closed 5 years ago

patrobinson commented 5 years ago

Currently AMISpec prints a lot of deprecation warnings:

[DEPRECATION] This gem has been renamed to optimist and will no longer be supported. Please switch to optimist as soon as possible.
...
/Users/patrickrobinson/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/net-ssh-2.9.4/lib/net/ssh/transport/session.rb:67:in `initialize': Object#timeout is deprecated, use Timeout.timeout instead.
/Users/patrickrobinson/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/net-ssh-2.9.4/lib/net/ssh/transport/session.rb:84:in `initialize': Object#timeout is deprecated, use Timeout.timeout instead.
/Users/patrickrobinson/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/net-ssh-2.9.4/lib/net/ssh/transport/cipher_factory.rb:98: warning: constant OpenSSL::Cipher::Cipher is deprecated
/Users/patrickrobinson/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/net-ssh-2.9.4/lib/net/ssh/transport/cipher_factory.rb:72: warning: constant OpenSSL::Cipher::Cipher is deprecated

This PR removes those warning by upgrading net-ssh and updating to use the Optimist Gem.

We also pin some important gems to a specific major version

Finally we drop support for Ruby < 2.2.6, as net-ssh 5.x does not support it.