Skip to content

Commit

Permalink
Update build for Ruby 3.1, fixes #5115
Browse files Browse the repository at this point in the history
We need to remove Ruby 2.5 because the new net-smtp gem
is required for the mail gem on Ruby 3.1 but it does
not work on <=2.5.

mikel/mail#1439

Also remove an anon struct test which now breaks with
safe YAML loading on 3.1.
  • Loading branch information
mperham committed Jan 10, 2022
1 parent 63f6e68 commit d58a0a1
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 83 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.5, 2.6, 2.7, "3.0"]
ruby: ["2.6", "2.7", "3.0", "3.1"]
services:
redis:
image: redis
Expand Down
5 changes: 4 additions & 1 deletion Gemfile
Expand Up @@ -8,14 +8,17 @@ gem "rails", ">= 6.0.2"
gem "sqlite3", platforms: :ruby
gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby

# mail dependencies
gem "net-smtp", platforms: :mri, require: false

group :test do
gem "minitest"
gem "simplecov"
gem "codecov", require: false
end

group :development, :test do
gem "standard"
gem "standard", require: false
end

group :load_test do
Expand Down
179 changes: 103 additions & 76 deletions Gemfile.lock
Expand Up @@ -17,60 +17,65 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.3.1)
actionpack (= 6.1.3.1)
activesupport (= 6.1.3.1)
actioncable (6.1.4.4)
actionpack (= 6.1.4.4)
activesupport (= 6.1.4.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.3.1)
actionpack (= 6.1.3.1)
activejob (= 6.1.3.1)
activerecord (= 6.1.3.1)
activestorage (= 6.1.3.1)
activesupport (= 6.1.3.1)
actionmailbox (6.1.4.4)
actionpack (= 6.1.4.4)
activejob (= 6.1.4.4)
activerecord (= 6.1.4.4)
activestorage (= 6.1.4.4)
activesupport (= 6.1.4.4)
mail (>= 2.7.1)
actionmailer (6.1.3.1)
actionpack (= 6.1.3.1)
actionview (= 6.1.3.1)
activejob (= 6.1.3.1)
activesupport (= 6.1.3.1)
actionmailer (6.1.4.4)
actionpack (= 6.1.4.4)
actionview (= 6.1.4.4)
activejob (= 6.1.4.4)
activesupport (= 6.1.4.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.3.1)
actionview (= 6.1.3.1)
activesupport (= 6.1.3.1)
actionpack (6.1.4.4)
actionview (= 6.1.4.4)
activesupport (= 6.1.4.4)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.3.1)
actionpack (= 6.1.3.1)
activerecord (= 6.1.3.1)
activestorage (= 6.1.3.1)
activesupport (= 6.1.3.1)
actiontext (6.1.4.4)
actionpack (= 6.1.4.4)
activerecord (= 6.1.4.4)
activestorage (= 6.1.4.4)
activesupport (= 6.1.4.4)
nokogiri (>= 1.8.5)
actionview (6.1.3.1)
activesupport (= 6.1.3.1)
actionview (6.1.4.4)
activesupport (= 6.1.4.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.3.1)
activesupport (= 6.1.3.1)
activejob (6.1.4.4)
activesupport (= 6.1.4.4)
globalid (>= 0.3.6)
activemodel (6.1.3.1)
activesupport (= 6.1.3.1)
activerecord (6.1.3.1)
activemodel (= 6.1.3.1)
activesupport (= 6.1.3.1)
activestorage (6.1.3.1)
actionpack (= 6.1.3.1)
activejob (= 6.1.3.1)
activerecord (= 6.1.3.1)
activesupport (= 6.1.3.1)
activemodel (6.1.4.4)
activesupport (= 6.1.4.4)
activerecord (6.1.4.4)
activemodel (= 6.1.4.4)
activesupport (= 6.1.4.4)
activerecord-jdbc-adapter (61.1-java)
activerecord (~> 6.1.0)
activerecord-jdbcsqlite3-adapter (61.1-java)
activerecord-jdbc-adapter (= 61.1)
jdbc-sqlite3 (~> 3.8, < 3.30)
activestorage (6.1.4.4)
actionpack (= 6.1.4.4)
activejob (= 6.1.4.4)
activerecord (= 6.1.4.4)
activesupport (= 6.1.4.4)
marcel (~> 1.0.0)
mini_mime (~> 1.0.2)
activesupport (6.1.3.1)
mini_mime (>= 1.1.0)
activesupport (6.1.4.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -81,66 +86,82 @@ GEM
codecov (0.2.8)
json
simplecov
concurrent-ruby (1.1.8)
concurrent-ruby (1.1.9)
connection_pool (2.2.5)
crass (1.0.6)
digest (3.1.0)
docile (1.3.2)
erubi (1.10.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
globalid (1.0.0)
activesupport (>= 5.0)
hiredis (0.6.3)
i18n (1.8.10)
hiredis (0.6.3-java)
i18n (1.8.11)
concurrent-ruby (~> 1.0)
io-wait (0.2.1)
jdbc-sqlite3 (3.28.0)
json (2.3.1)
loofah (2.9.0)
json (2.3.1-java)
loofah (2.13.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.1)
marcel (1.0.2)
method_source (1.0.0)
mini_mime (1.0.3)
mini_portile2 (2.5.0)
minitest (5.14.4)
nio4r (2.5.7)
nokogiri (1.11.2)
mini_portile2 (~> 2.5.0)
mini_mime (1.1.2)
mini_portile2 (2.6.1)
minitest (5.15.0)
net-protocol (0.1.2)
io-wait
timeout
net-smtp (0.3.1)
digest
net-protocol
timeout
nio4r (2.5.8)
nio4r (2.5.8-java)
nokogiri (1.12.5)
mini_portile2 (~> 2.6.1)
racc (~> 1.4)
nokogiri (1.12.5-java)
racc (~> 1.4)
parallel (1.21.0)
parser (3.1.0.0)
ast (~> 2.4.1)
racc (1.5.2)
racc (1.6.0)
racc (1.6.0-java)
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.1.3.1)
actioncable (= 6.1.3.1)
actionmailbox (= 6.1.3.1)
actionmailer (= 6.1.3.1)
actionpack (= 6.1.3.1)
actiontext (= 6.1.3.1)
actionview (= 6.1.3.1)
activejob (= 6.1.3.1)
activemodel (= 6.1.3.1)
activerecord (= 6.1.3.1)
activestorage (= 6.1.3.1)
activesupport (= 6.1.3.1)
rails (6.1.4.4)
actioncable (= 6.1.4.4)
actionmailbox (= 6.1.4.4)
actionmailer (= 6.1.4.4)
actionpack (= 6.1.4.4)
actiontext (= 6.1.4.4)
actionview (= 6.1.4.4)
activejob (= 6.1.4.4)
activemodel (= 6.1.4.4)
activerecord (= 6.1.4.4)
activestorage (= 6.1.4.4)
activesupport (= 6.1.4.4)
bundler (>= 1.15.0)
railties (= 6.1.3.1)
railties (= 6.1.4.4)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
railties (6.1.3.1)
actionpack (= 6.1.3.1)
activesupport (= 6.1.3.1)
railties (6.1.4.4)
actionpack (= 6.1.4.4)
activesupport (= 6.1.4.4)
method_source
rake (>= 0.8.7)
rake (>= 0.13)
thor (~> 1.0)
rainbow (3.0.0)
rake (13.0.3)
rake (13.0.6)
redis (4.2.5)
regexp_parser (2.2.0)
rexml (3.2.5)
Expand All @@ -166,32 +187,38 @@ GEM
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
standard (1.6.0)
rubocop (= 1.24.1)
rubocop-performance (= 1.13.1)
thor (1.1.0)
thor (1.2.1)
timeout (0.2.0)
toxiproxy (1.0.3)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-display_width (2.1.0)
websocket-driver (0.7.3)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-driver (0.7.5-java)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.4.2)
zeitwerk (2.5.3)

PLATFORMS
java
ruby
universal-java-1.8

DEPENDENCIES
activerecord-jdbcsqlite3-adapter
codecov
hiredis
minitest
net-smtp
rails (>= 6.0.2)
rake
redis-namespace!
Expand Down
5 changes: 0 additions & 5 deletions test/test_extensions.rb
Expand Up @@ -109,9 +109,4 @@ def self.doit(arg)
assert_equal 1, q.size
end

it 'allows Psych to serialize anonymous structs' do
obj = Struct.new(:attribute).new(my: 'data')

assert_equal obj.attribute, Psych.load(Psych.dump(obj)).attribute
end
end

0 comments on commit d58a0a1

Please sign in to comment.