Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User can log out #9

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<<<<<<< HEAD
--format documentation
--require spec_helper
=======
--require spec_helper

--format documentation
--color

--color
--format documentation
>>>>>>> 9fb149fe2ba069d7a44a08f92a3869118afb44ad
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

22 changes: 18 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
source 'https://rubygems.org'
ruby '2.6.3'

gem 'rails', '5.1.5'
ruby '2.5.1'

gem 'bootstrap-sass'
gem 'chosen-rails'
Expand All @@ -16,10 +14,26 @@ gem 'sass-rails', '~> 5.0'
gem 'turbolinks'
gem 'uglifier', '>= 1.3.0'

group :development do
group :development, :test do
gem 'rspec-rails'
gem 'shoulda-matchers'
gem 'factory_bot_rails'
gem 'capybara'
gem 'pry-byebug'
gem 'coveralls', require: false
end

group :development do
gem 'spring'
gem 'web-console', '~> 2.0'
gem 'capybara'
end

group :development, :test do
gem 'rspec-rails'
gem 'shoulda-matchers'
gem 'capybara'
gem 'factory_bot_rails'
end

group :production do
Expand Down
159 changes: 112 additions & 47 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,46 +1,50 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (5.1.5)
actionpack (= 5.1.5)
actioncable (5.2.4.3)
actionpack (= 5.2.4.3)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.5)
actionpack (= 5.1.5)
actionview (= 5.1.5)
activejob (= 5.1.5)
websocket-driver (>= 0.6.1)
actionmailer (5.2.4.3)
actionpack (= 5.2.4.3)
actionview (= 5.2.4.3)
activejob (= 5.2.4.3)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.5)
actionview (= 5.1.5)
activesupport (= 5.1.5)
rack (~> 2.0)
actionpack (5.2.4.3)
actionview (= 5.2.4.3)
activesupport (= 5.2.4.3)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.5)
activesupport (= 5.1.5)
actionview (5.2.4.3)
activesupport (= 5.2.4.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.5)
activesupport (= 5.1.5)
activejob (5.2.4.3)
activesupport (= 5.2.4.3)
globalid (>= 0.3.6)
activemodel (5.1.5)
activesupport (= 5.1.5)
activerecord (5.1.5)
activemodel (= 5.1.5)
activesupport (= 5.1.5)
arel (~> 8.0)
activesupport (5.1.5)
activemodel (5.2.4.3)
activesupport (= 5.2.4.3)
activerecord (5.2.4.3)
activemodel (= 5.2.4.3)
activesupport (= 5.2.4.3)
arel (>= 9.0)
activestorage (5.2.4.3)
actionpack (= 5.2.4.3)
activerecord (= 5.2.4.3)
marcel (~> 0.3.1)
activesupport (5.2.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
arel (8.0.0)
arel (9.0.0)
autoprefixer-rails (9.8.4)
execjs
bcrypt (3.1.13)
Expand All @@ -51,6 +55,14 @@ GEM
sassc (>= 2.0.0)
builder (3.2.4)
byebug (11.1.3)
capybara (3.33.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
xpath (~> 3.2)
carrierwave (2.1.0)
activemodel (>= 5.0.0)
activesupport (>= 5.0.0)
Expand All @@ -63,14 +75,20 @@ GEM
railties (>= 3.0)
sassc-rails (>= 2.1.2)
coderay (1.1.3)
coffee-rails (4.2.2)
coffee-rails (5.0.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
railties (>= 5.2.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.6)
coveralls (0.8.23)
json (>= 1.8, < 3)
simplecov (~> 0.16.1)
term-ansicolor (~> 1.3)
thor (>= 0.19.4, < 2.0)
tins (~> 1.6)
crass (1.0.6)
debug_inspector (0.0.3)
devise (4.7.2)
Expand All @@ -79,12 +97,19 @@ GEM
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
diff-lcs (1.4.2)
docile (1.3.2)
erubi (1.9.0)
execjs (2.7.0)
factory_bot (6.0.2)
activesupport (>= 5.0.0)
factory_bot_rails (6.0.0)
factory_bot (~> 6.0.0)
railties (>= 5.0.0)
ffi (1.13.1)
globalid (0.4.2)
activesupport (>= 4.2.0)
i18n (0.9.5)
i18n (1.8.3)
concurrent-ruby (~> 1.0)
image_processing (1.11.0)
mini_magick (>= 4.9.5, < 5)
Expand All @@ -95,6 +120,7 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.3.0)
loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
Expand All @@ -103,6 +129,8 @@ GEM
mailboxer (0.15.1)
carrierwave (>= 0.5.8)
rails (>= 5.0.0)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (1.0.0)
mimemagic (0.3.5)
mini_magick (4.10.1)
Expand All @@ -125,17 +153,18 @@ GEM
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.1.5)
actioncable (= 5.1.5)
actionmailer (= 5.1.5)
actionpack (= 5.1.5)
actionview (= 5.1.5)
activejob (= 5.1.5)
activemodel (= 5.1.5)
activerecord (= 5.1.5)
activesupport (= 5.1.5)
rails (5.2.4.3)
actioncable (= 5.2.4.3)
actionmailer (= 5.2.4.3)
actionpack (= 5.2.4.3)
actionview (= 5.2.4.3)
activejob (= 5.2.4.3)
activemodel (= 5.2.4.3)
activerecord (= 5.2.4.3)
activestorage (= 5.2.4.3)
activesupport (= 5.2.4.3)
bundler (>= 1.3.0)
railties (= 5.1.5)
railties (= 5.2.4.3)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
Expand All @@ -147,28 +176,46 @@ GEM
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (5.1.5)
actionpack (= 5.1.5)
activesupport (= 5.1.5)
railties (5.2.4.3)
actionpack (= 5.2.4.3)
activesupport (= 5.2.4.3)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
thor (>= 0.19.0, < 2.0)
rake (11.3.0)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (1.7.1)
responders (3.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
rspec-core (3.9.2)
rspec-support (~> 3.9.3)
rspec-expectations (3.9.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-rails (4.0.1)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
rspec-core (~> 3.9)
rspec-expectations (~> 3.9)
rspec-mocks (~> 3.9)
rspec-support (~> 3.9)
rspec-support (3.9.3)
ruby-vips (2.0.17)
ffi (~> 1.9)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.7)
railties (>= 4.0.0, < 6)
sass-rails (5.1.0)
railties (>= 5.2.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
Expand All @@ -181,6 +228,13 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
shoulda-matchers (4.3.0)
activesupport (>= 4.2.0)
simplecov (0.16.1)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
spring (2.1.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
Expand All @@ -189,9 +243,14 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sync (0.5.0)
term-ansicolor (1.7.1)
tins (~> 1.0)
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.10)
tins (1.25.0)
sync
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
Expand All @@ -206,37 +265,43 @@ GEM
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
websocket-driver (0.6.5)
websocket-driver (0.7.2)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)

PLATFORMS
ruby

DEPENDENCIES
bootstrap-sass
capybara
chosen-rails
coveralls
devise
factory_bot_rails
jbuilder (~> 2.0)
jquery-rails
loofah (~> 2.2.1)
mailboxer
pg (~> 0.15)
pry-byebug
puma (~> 3.7)
rails (= 5.1.5)
rails-html-sanitizer (~> 1.0.4)
rails_12factor
rake (~> 11.1, >= 11.1.2)
rspec-rails
sass-rails (~> 5.0)
shoulda-matchers
spring
sprockets (~> 3.7.2)
turbolinks
uglifier (>= 1.3.0)
web-console (~> 2.0)

RUBY VERSION
ruby 2.6.3p62
ruby 2.5.1p57

BUNDLED WITH
1.17.3
2.1.4
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
## CA Mailboxer 2018

Code base for week 5 challenge - Working with legacy code
Code base for week 5 challenge - Working with legacy code...
...
Empty file added [email protected]
Empty file.
5 changes: 5 additions & 0 deletions app/controllers/recipients_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class RecipientsController < ApplicationController
def index
@recipient = Recipient.all
end
end
4 changes: 2 additions & 2 deletions app/helpers/mailbox_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module MailboxHelper
def unread_messages_count
# how to get the number of unread messages for the current user
def unread_s_count
# how to get the number of unread s for the current user
# using mailboxer
mailbox.inbox(unread: true).count
end
Expand Down
3 changes: 3 additions & 0 deletions app/models/recipient.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Recipient < ApplicationRecord
validates_presence_of :name
end
2 changes: 2 additions & 0 deletions app/views/recipients/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Recipients#index</h1>
<p>Find me in app/views/recipients/index.html.erb</p>
Loading