Skip to content

Commit f06e5b7

Browse files
committed
Avoid loading dependencies on boot
This helps improve boot time in development, as it delays loading the dependencies until Rodauth configuration is evaluated.
1 parent 2a6c681 commit f06e5b7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/generators/rodauth/install_generator.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@ def create_rodauth_app
4040

4141
def add_gems
4242
if activerecord? && !sequel?
43-
gem "sequel-activerecord_connection", "~> 2.0", comment: "Enables Sequel to use Active Record's database connection"
44-
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")
43+
gem "sequel-activerecord_connection", "~> 2.0", require: false, comment: "Enables Sequel to use Active Record's database connection"
44+
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")
4545
end
4646
if argon2?
47-
gem "argon2", "~> 2.3", comment: "Used by Rodauth for password hashing"
47+
gem "argon2", "~> 2.3", require: false, comment: "Used by Rodauth for password hashing"
4848
else
49-
gem "bcrypt", "~> 3.1", comment: "Used by Rodauth for password hashing"
49+
gem "bcrypt", "~> 3.1", require: false, comment: "Used by Rodauth for password hashing"
5050
end
5151
if jwt?
52-
gem "jwt", "~> 2.9", comment: "Used by Rodauth for JWT support"
52+
gem "jwt", "~> 2.9", require: false, comment: "Used by Rodauth for JWT support"
5353
end
54-
gem "tilt", "~> 2.4", comment: "Used by Rodauth for rendering built-in view and email templates"
54+
gem "tilt", "~> 2.4", require: false, comment: "Used by Rodauth for rendering built-in view and email templates"
5555
end
5656

5757
def create_rodauth_controller

0 commit comments

Comments
 (0)