Skip to content

Commit

Permalink
Devise + basic user minitests
Browse files Browse the repository at this point in the history
  • Loading branch information
Shpigford committed Jan 1, 2024
1 parent f260139 commit a123b3b
Show file tree
Hide file tree
Showing 12 changed files with 520 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ gem "tzinfo-data", platforms: %i[ windows jruby ]
# Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", require: false

# Authentication
gem "devise"

group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[ mri windows ]
Expand Down
14 changes: 14 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ GEM
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
base64 (0.2.0)
bcrypt (3.1.20)
bigdecimal (3.1.5)
bindex (0.8.1)
bootsnap (1.17.0)
Expand All @@ -130,6 +131,12 @@ GEM
debug (1.9.1)
irb (~> 1.10)
reline (>= 0.3.8)
devise (4.9.3)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
drb (2.2.0)
ruby2_keywords
error_highlight (0.6.0)
Expand Down Expand Up @@ -188,6 +195,7 @@ GEM
racc (~> 1.4)
nokogiri (1.16.0-x86_64-linux)
racc (~> 1.4)
orm_adapter (0.5.0)
parallel (1.24.0)
parser (3.2.2.4)
ast (~> 2.4.1)
Expand Down Expand Up @@ -228,6 +236,9 @@ GEM
regexp_parser (2.8.3)
reline (0.4.1)
io-console (~> 0.5)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.2.6)
rubocop (1.59.0)
json (~> 2.3)
Expand Down Expand Up @@ -291,6 +302,8 @@ GEM
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
useragent (0.16.10)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.2.1)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
Expand All @@ -315,6 +328,7 @@ DEPENDENCIES
brakeman
capybara
debug
devise
error_highlight (>= 0.4.0)
hotwire-livereload
importmap-rails
Expand Down
5 changes: 5 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class User < ApplicationRecord
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :validatable,
:confirmable, :lockable, :timeoutable, :trackable
end
2 changes: 2 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@

config.action_mailer.perform_caching = false

config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }

# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log

Expand Down
2 changes: 2 additions & 0 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test

config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }

# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr

Expand Down
Loading

0 comments on commit a123b3b

Please sign in to comment.