Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix table_name_prefix error on Rails 7.1.3 #43

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/models/lets_encrypt/certificate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class Certificate < ApplicationRecord
include CertificateVerifiable
include CertificateIssuable

self.table_name = 'letsencrypt_certificates'

validates :domain, presence: true, uniqueness: true

scope :active, -> { where('certificate IS NOT NULL AND expires_at > ?', Time.zone.now) }
Expand Down
71 changes: 36 additions & 35 deletions gemfiles/rails7.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,42 @@ GEM
acme-client (2.0.15)
faraday (>= 1.0, < 3.0.0)
faraday-retry (>= 1.0, < 3.0.0)
actionmailer (7.1.1)
actionpack (= 7.1.1)
actionview (= 7.1.1)
activejob (= 7.1.1)
activesupport (= 7.1.1)
actionmailer (7.1.3)
actionpack (= 7.1.3)
actionview (= 7.1.3)
activejob (= 7.1.3)
activesupport (= 7.1.3)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.1)
actionview (= 7.1.1)
activesupport (= 7.1.1)
actionpack (7.1.3)
actionview (= 7.1.3)
activesupport (= 7.1.3)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actionview (7.1.1)
activesupport (= 7.1.1)
actionview (7.1.3)
activesupport (= 7.1.3)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.1)
activesupport (= 7.1.1)
activejob (7.1.3)
activesupport (= 7.1.3)
globalid (>= 0.3.6)
activemodel (7.1.1)
activesupport (= 7.1.1)
activerecord (7.1.1)
activemodel (= 7.1.1)
activesupport (= 7.1.1)
activemodel (7.1.3)
activesupport (= 7.1.3)
activerecord (7.1.3)
activemodel (= 7.1.3)
activesupport (= 7.1.3)
timeout (>= 0.4.0)
activesupport (7.1.1)
activesupport (7.1.3)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
Expand All @@ -68,9 +69,9 @@ GEM
thor (>= 0.14.0)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.4)
bigdecimal (3.1.6)
builder (3.2.4)
concurrent-ruby (1.2.2)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
crass (1.0.6)
date (3.3.4)
Expand All @@ -90,13 +91,13 @@ GEM
activesupport (>= 6.1)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-console (0.6.0)
irb (1.8.3)
io-console (0.7.2)
irb (1.11.2)
rdoc
reline (>= 0.3.8)
reline (>= 0.4.2)
json (2.6.3)
language_server-protocol (3.17.0.3)
loofah (2.21.4)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
Expand All @@ -105,16 +106,16 @@ GEM
net-pop
net-smtp
mini_mime (1.1.5)
minitest (5.20.0)
minitest (5.22.2)
mutex_m (0.2.0)
net-imap (0.4.4)
net-imap (0.4.10)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.4.0)
net-smtp (0.4.0.1)
net-protocol
nokogiri (1.15.4-x86_64-darwin)
racc (~> 1.4)
Expand All @@ -124,7 +125,7 @@ GEM
parser (3.2.2.4)
ast (~> 2.4.1)
racc
psych (5.1.1.1)
psych (5.1.2)
stringio
racc (1.7.3)
rack (3.0.8)
Expand All @@ -142,24 +143,24 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.1.1)
actionpack (= 7.1.1)
activesupport (= 7.1.1)
railties (7.1.3)
actionpack (= 7.1.3)
activesupport (= 7.1.3)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.1.0)
rdoc (6.6.0)
rdoc (6.6.2)
psych (>= 4.0.0)
redis (5.0.8)
redis-client (>= 0.17.0)
redis-client (0.18.0)
connection_pool
regexp_parser (2.8.2)
reline (0.3.9)
reline (0.4.2)
io-console (~> 0.5)
rexml (3.2.6)
rspec-core (3.12.2)
Expand Down Expand Up @@ -205,14 +206,14 @@ GEM
simplecov-html (0.10.2)
sqlite3 (1.6.8-x86_64-darwin)
sqlite3 (1.6.8-x86_64-linux)
stringio (3.0.8)
stringio (3.1.0)
thor (1.3.0)
timeout (0.4.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
webrick (1.8.1)
zeitwerk (2.6.12)
zeitwerk (2.6.13)

PLATFORMS
x86_64-darwin-22
Expand Down
5 changes: 0 additions & 5 deletions lib/letsencrypt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ def config(&block)
@config
end

# @api private
def table_name_prefix
'letsencrypt_'
end

def certificate_model
@certificate_model ||= config.certificate_model.constantize
end
Expand Down