Skip to content

Commit

Permalink
Avoid loading dependencies on boot
Browse files Browse the repository at this point in the history
This helps improve boot time in development, as it delays loading the
dependencies until Rodauth configuration is evaluated.
janko committed Dec 29, 2024

Verified

This commit was signed with the committer’s verified signature.
janko Janko Marohnić
1 parent 2a6c681 commit f06e5b7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/generators/rodauth/install_generator.rb
Original file line number Diff line number Diff line change
@@ -40,18 +40,18 @@ def create_rodauth_app

def add_gems
if activerecord? && !sequel?
gem "sequel-activerecord_connection", "~> 2.0", comment: "Enables Sequel to use Active Record's database connection"
gem "after_commit_everywhere", "~> 1.1", comment: "Required for Sequel's transaction hooks to work in all cases (on Active Record < 7.2)" if ActiveRecord.version < Gem::Version.new("7.2")
gem "sequel-activerecord_connection", "~> 2.0", require: false, comment: "Enables Sequel to use Active Record's database connection"
gem "after_commit_everywhere", "~> 1.1", require: false, comment: "Required for Sequel's transaction hooks to work in all cases (on Active Record < 7.2)" if ActiveRecord.version < Gem::Version.new("7.2")
end
if argon2?
gem "argon2", "~> 2.3", comment: "Used by Rodauth for password hashing"
gem "argon2", "~> 2.3", require: false, comment: "Used by Rodauth for password hashing"
else
gem "bcrypt", "~> 3.1", comment: "Used by Rodauth for password hashing"
gem "bcrypt", "~> 3.1", require: false, comment: "Used by Rodauth for password hashing"
end
if jwt?
gem "jwt", "~> 2.9", comment: "Used by Rodauth for JWT support"
gem "jwt", "~> 2.9", require: false, comment: "Used by Rodauth for JWT support"
end
gem "tilt", "~> 2.4", comment: "Used by Rodauth for rendering built-in view and email templates"
gem "tilt", "~> 2.4", require: false, comment: "Used by Rodauth for rendering built-in view and email templates"
end

def create_rodauth_controller

0 comments on commit f06e5b7

Please sign in to comment.