Add Ruby 3.1 support

Add net-smtp as a dependency for Ruby 3.1 compatibility

It was recently removed from the default gems:

  - https://bugs.ruby-lang.org/issues/17873
  - https://github.com/ruby/ruby/pull/4530

Also add net-imap and net-pop to the gemspec

This dependencies introduces `strscan` as a subdependency, but JRuby
only has prerelease support for it. Make sure the prerelease is
properly picked up by our tests by adding it to the `Gemfile`.
This commit is contained in:
Jean Boussier 2021-05-28 09:23:08 +02:00 committed by David Rodríguez
parent 355e3bb089
commit d9d8dcc6ba
No known key found for this signature in database
GPG Key ID: 1008A258BB37309C
3 changed files with 7 additions and 0 deletions

View File

@ -23,6 +23,8 @@ jobs:
timeout: 5
- ruby: '3.0'
timeout: 5
- ruby: 3.1
timeout: 5
- ruby: truffleruby-head
timeout: 50
- ruby: jruby

View File

@ -13,3 +13,5 @@ gem 'jruby-openssl', :platforms => :jruby
gem 'mini_mime'
gem 'byebug', :platforms => :mri
gem "strscan", ">= 3.0.2.pre1"

View File

@ -16,6 +16,9 @@ Gem::Specification.new do |s|
s.required_ruby_version = ">= 2.5"
s.add_dependency('mini_mime', '>= 0.1.1')
s.add_dependency('net-smtp')
s.add_dependency('net-imap')
s.add_dependency('net-pop')
s.add_development_dependency('bundler', '>= 1.0.3')
s.add_development_dependency('rake', '> 0.8.7')