diff --git a/Gemfile b/Gemfile index c10332e..ca6bd27 100644 --- a/Gemfile +++ b/Gemfile @@ -58,5 +58,11 @@ group :development do gem 'spring-watcher-listen', '~> 2.0.0' end +# Use devise for users and authentication +gem 'devise' + +# Use Letter Opener for development mail previews +gem "letter_opener", :group => :development + # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby] diff --git a/Gemfile.lock b/Gemfile.lock index 50d9bd5..8180f07 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -45,6 +45,7 @@ GEM addressable (2.5.2) public_suffix (>= 2.0.2, < 4.0) arel (9.0.0) + bcrypt (3.1.12) bindex (0.5.0) builder (3.2.3) byebug (10.0.2) @@ -72,6 +73,12 @@ GEM thor (~> 0.19.4) tins (~> 1.6) crass (1.0.4) + devise (4.5.0) + bcrypt (~> 3.0) + orm_adapter (~> 0.1) + railties (>= 4.1.0, < 6.0) + responders + warden (~> 1.2.3) docile (1.1.5) erubi (1.7.1) execjs (2.7.0) @@ -84,6 +91,10 @@ GEM activesupport (>= 4.2.0) multi_json (>= 1.2) json (2.1.0) + launchy (2.4.3) + addressable (~> 2.3) + letter_opener (1.6.0) + launchy (~> 2.2) listen (3.1.5) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) @@ -139,6 +150,9 @@ GEM rb-fsevent (0.10.3) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) + responders (2.4.0) + actionpack (>= 4.2.0, < 5.3) + railties (>= 4.2.0, < 5.3) ruby_dep (1.5.0) rubyzip (1.2.1) sass (3.5.6) @@ -185,6 +199,8 @@ GEM thread_safe (~> 0.1) uglifier (4.1.18) execjs (>= 0.3.0, < 3) + warden (1.2.7) + rack (>= 1.0) web-console (3.6.2) actionview (>= 5.0) activemodel (>= 5.0) @@ -204,7 +220,9 @@ DEPENDENCIES capybara (~> 3.6) coffee-rails (~> 4.2) coveralls + devise jbuilder (~> 2.5) + letter_opener listen (>= 3.0.5, < 3.2) pg puma (~> 3.12) diff --git a/app/models/user.rb b/app/models/user.rb new file mode 100644 index 0000000..3d8d59f --- /dev/null +++ b/app/models/user.rb @@ -0,0 +1,6 @@ +class User < ApplicationRecord + # Include default devise modules. Others available are: + # :lockable, :timeoutable, and :omniauthable + devise :database_authenticatable, :confirmable, :registerable, + :recoverable, :rememberable, :validatable, :trackable +end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index a851f86..97136b4 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -9,6 +9,8 @@
+<%= notice %>
+<%= alert %>
<%= yield %>