Skip to content

Commit

Permalink
Rails 7.1 support (#1315)
Browse files Browse the repository at this point in the history
* Add coder argument to serialize

* Add expires_at keyword

* Update gem dependencies
  • Loading branch information
Bramjetten authored Oct 6, 2023
1 parent d6c0124 commit 3e39177
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 80 deletions.
188 changes: 110 additions & 78 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,80 +25,90 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
actioncable (7.1.0)
actionpack (= 7.1.0)
activesupport (= 7.1.0)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
zeitwerk (~> 2.6)
actionmailbox (7.1.0)
actionpack (= 7.1.0)
activejob (= 7.1.0)
activerecord (= 7.1.0)
activestorage (= 7.1.0)
activesupport (= 7.1.0)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.8)
actionpack (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activesupport (= 7.0.8)
actionmailer (7.1.0)
actionpack (= 7.1.0)
actionview (= 7.1.0)
activejob (= 7.1.0)
activesupport (= 7.1.0)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.8)
actionview (= 7.0.8)
activesupport (= 7.0.8)
rack (~> 2.0, >= 2.2.4)
rails-dom-testing (~> 2.2)
actionpack (7.1.0)
actionview (= 7.1.0)
activesupport (= 7.1.0)
nokogiri (>= 1.8.5)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.8)
actionpack (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.0)
actionpack (= 7.1.0)
activerecord (= 7.1.0)
activestorage (= 7.1.0)
activesupport (= 7.1.0)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.8)
activesupport (= 7.0.8)
actionview (7.1.0)
activesupport (= 7.1.0)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.8)
activesupport (= 7.0.8)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.0)
activesupport (= 7.1.0)
globalid (>= 0.3.6)
activemodel (7.0.8)
activesupport (= 7.0.8)
activerecord (7.0.8)
activemodel (= 7.0.8)
activesupport (= 7.0.8)
activestorage (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activesupport (= 7.0.8)
activemodel (7.1.0)
activesupport (= 7.1.0)
activerecord (7.1.0)
activemodel (= 7.1.0)
activesupport (= 7.1.0)
timeout (>= 0.4.0)
activestorage (7.1.0)
actionpack (= 7.1.0)
activejob (= 7.1.0)
activerecord (= 7.1.0)
activesupport (= 7.1.0)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.8)
activesupport (7.1.0)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.4)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
ancestry (4.3.3)
activerecord (>= 5.2.6)
ansi (1.5.0)
attr_json (2.1.0)
activerecord (>= 6.0.0, < 7.1)
attr_json (2.2.0)
activerecord (>= 6.0.0, < 7.2)
babosa (2.0.0)
base64 (0.1.1)
bcrypt (3.1.19)
bigdecimal (3.1.4)
breadcrumbs_on_rails (4.1.0)
railties (>= 5.0)
browser (5.3.1)
Expand All @@ -116,13 +126,16 @@ GEM
simplecov (<= 0.13)
coderay (1.1.3)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
crass (1.0.6)
date (3.3.3)
docile (1.1.5)
drb (2.1.1)
ruby2_keywords
erubi (1.12.0)
factory_bot (6.3.0)
activesupport (>= 5.0.0)
ffi (1.15.5)
ffi (1.16.3)
globalid (1.2.1)
activesupport (>= 6.1)
i18n (1.14.1)
Expand All @@ -133,6 +146,10 @@ GEM
importmap-rails (1.2.1)
actionpack (>= 6.0.0)
railties (>= 6.0.0)
io-console (0.6.0)
irb (1.8.1)
rdoc
reline (>= 0.3.8)
json (2.6.3)
jsonapi-serializer (2.2.0)
activesupport (>= 4.2)
Expand All @@ -148,8 +165,8 @@ GEM
activerecord
kaminari-core (= 1.2.2)
kaminari-core (1.2.2)
launchy (2.5.0)
addressable (~> 2.7)
launchy (2.5.2)
addressable (~> 2.8)
letter_opener (1.8.1)
launchy (>= 2.2, < 3)
loofah (2.21.3)
Expand Down Expand Up @@ -177,47 +194,55 @@ GEM
request_store (~> 1.0)
mocha (2.1.0)
ruby2_keywords (>= 0.0.5)
net-imap (0.3.7)
mutex_m (0.1.2)
net-imap (0.4.0)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.1)
timeout
net-smtp (0.3.3)
net-smtp (0.4.0)
net-protocol
nio4r (2.5.9)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
pg (1.5.4)
pry (0.14.1)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (5.0.1)
psych (5.1.0)
stringio
public_suffix (5.0.3)
puma (6.4.0)
nio4r (~> 2.0)
racc (1.7.1)
rack (2.2.8)
rack (3.0.8)
rack-rewrite (1.5.1)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
rails (7.0.8)
actioncable (= 7.0.8)
actionmailbox (= 7.0.8)
actionmailer (= 7.0.8)
actionpack (= 7.0.8)
actiontext (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activemodel (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails (7.1.0)
actioncable (= 7.1.0)
actionmailbox (= 7.1.0)
actionmailer (= 7.1.0)
actionpack (= 7.1.0)
actiontext (= 7.1.0)
actionview (= 7.1.0)
activejob (= 7.1.0)
activemodel (= 7.1.0)
activerecord (= 7.1.0)
activestorage (= 7.1.0)
activesupport (= 7.1.0)
bundler (>= 1.15.0)
railties (= 7.0.8)
railties (= 7.1.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -229,15 +254,20 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
method_source
railties (7.1.0)
actionpack (= 7.1.0)
activesupport (= 7.1.0)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.0.6)
rdoc (6.5.0)
psych (>= 4.0.0)
regexp_parser (2.8.1)
reline (0.3.9)
io-console (~> 0.5)
request_store (1.5.1)
rack (>= 1.4)
rexml (3.2.6)
Expand All @@ -255,7 +285,7 @@ GEM
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
sprockets (4.2.0)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
sprockets-rails (3.4.2)
Expand All @@ -264,6 +294,7 @@ GEM
sprockets (>= 3.0.0)
stimulus-rails (1.2.2)
railties (>= 6.0.0)
stringio (3.0.8)
tailwindcss-rails (2.0.30)
railties (>= 6.0.0)
thor (1.2.2)
Expand All @@ -278,13 +309,14 @@ GEM
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
websocket (1.2.9)
webrick (1.8.1)
websocket (1.2.10)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.11)
zeitwerk (2.6.12)

PLATFORMS
ruby
Expand Down
2 changes: 1 addition & 1 deletion app/models/spina/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Account < ApplicationRecord
include Partable
include TranslatedContent

serialize :preferences
serialize :preferences, coder: Psych

after_save :bootstrap_website

Expand Down
5 changes: 4 additions & 1 deletion app/models/spina/parts/image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ def present?
signed_blob_id.present?
end

def signed_id(expires_in: nil)
# Rails 7.1 started using 'expires_at', so we
# include both expires_in and expires_at for backwards
# compatibility
def signed_id(expires_at: nil, expires_in: nil)
signed_blob_id
end

Expand Down

0 comments on commit 3e39177

Please sign in to comment.