Skip to content

Commit b0bf29a

Browse files
Add Devise
1 parent 6efa57e commit b0bf29a

File tree

14 files changed

+522
-0
lines changed

14 files changed

+522
-0
lines changed

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ gem "sprockets-rails"
1010

1111
# Start debugger with binding.b [https://github.com/ruby/debug]
1212
# gem "debug", ">= 1.0.0"
13+
14+
gem "devise"

Gemfile.lock

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ PATH
22
remote: .
33
specs:
44
ombu_labs-auth (0.1.0)
5+
devise (~> 4.8.1)
56
rails (>= 7.0.4)
67

78
GEM
@@ -72,9 +73,16 @@ GEM
7273
i18n (>= 1.6, < 2)
7374
minitest (>= 5.1)
7475
tzinfo (~> 2.0)
76+
bcrypt (3.1.18)
7577
builder (3.2.4)
7678
concurrent-ruby (1.1.10)
7779
crass (1.0.6)
80+
devise (4.8.1)
81+
bcrypt (~> 3.0)
82+
orm_adapter (~> 0.1)
83+
railties (>= 4.1.0)
84+
responders
85+
warden (~> 1.2.3)
7886
erubi (1.11.0)
7987
globalid (1.0.0)
8088
activesupport (>= 5.0)
@@ -100,6 +108,7 @@ GEM
100108
nio4r (2.5.8)
101109
nokogiri (1.13.8-arm64-darwin)
102110
racc (~> 1.4)
111+
orm_adapter (0.5.0)
103112
pg (1.4.4)
104113
racc (1.6.0)
105114
rack (2.2.4)
@@ -132,6 +141,9 @@ GEM
132141
thor (~> 1.0)
133142
zeitwerk (~> 2.5)
134143
rake (13.0.6)
144+
responders (3.0.1)
145+
actionpack (>= 5.0)
146+
railties (>= 5.0)
135147
sprockets (4.1.1)
136148
concurrent-ruby (~> 1.0)
137149
rack (> 1, < 3)
@@ -143,6 +155,8 @@ GEM
143155
timeout (0.3.0)
144156
tzinfo (2.0.5)
145157
concurrent-ruby (~> 1.0)
158+
warden (1.2.9)
159+
rack (>= 2.0.9)
146160
websocket-driver (0.7.5)
147161
websocket-extensions (>= 0.1.0)
148162
websocket-extensions (0.1.5)
@@ -152,6 +166,7 @@ PLATFORMS
152166
arm64-darwin-21
153167

154168
DEPENDENCIES
169+
devise
155170
ombu_labs-auth!
156171
pg
157172
sprockets-rails

app/models/ombu_labs/auth/user.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module OmbuLabs::Auth
2+
class User < ApplicationRecord
3+
# Include default devise modules. Others available are:
4+
# :confirmable, :lockable, :timeoutable and :omniauthable
5+
devise :database_authenticatable, :registerable,
6+
:recoverable, :rememberable, :validatable
7+
:trackable
8+
end
9+
end

app/views/layouts/ombu_labs/auth/application.html.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
</head>
1010
<body>
1111

12+
<p class="notice"><%= notice %></p>
13+
<p class="alert"><%= alert %></p>
1214
<%= yield %>
1315

1416
</body>

config/environments/development.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
require "active_support/core_ext/integer/time"
2+
3+
Rails.application.configure do
4+
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
5+
end

0 commit comments

Comments
 (0)