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

Dev #16

Open
wants to merge 162 commits into
base: master
Choose a base branch
from
Open

Dev #16

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
4d58bd9
Fixed Yarn Issue
grimwolf007 Feb 25, 2020
2a1ed20
Added the stuff from database
grimwolf007 Mar 3, 2020
dbb1fca
Got Hello World
grimwolf007 Mar 3, 2020
98ba3f5
Created login page, create user is broken
grimwolf007 Mar 3, 2020
a7af91e
Athorization works, Forgot to add bcrypt to the gemfile.
grimwolf007 Mar 5, 2020
1d9d8bf
Changed the Welcome page a bit
grimwolf007 Mar 5, 2020
457d2b7
Making new branch
grimwolf007 Mar 5, 2020
80dd26f
reverted, and opened a new branch
grimwolf007 Mar 5, 2020
1712043
Not quite working correctly yet
grimwolf007 Mar 5, 2020
a417e3b
migration file added
Mar 5, 2020
293d737
Made the login a bit prettier
grimwolf007 Mar 9, 2020
d53a997
Added Background image to welcome page.
grimwolf007 Mar 10, 2020
455f04b
Created the stylesheet, fixed the user/create view in the controller
grimwolf007 Mar 10, 2020
38c4430
fixed root
grimwolf007 Mar 10, 2020
e133daa
Added the background
grimwolf007 Mar 10, 2020
acce8d7
configured db tables
Scogent Mar 10, 2020
1e1b8b4
Merge branch 'DBcreate' of https://github.com/jdelpizz/guard-app into…
Scogent Mar 10, 2020
0c20ccb
attempted to set the relationships between the entities in the db, th…
Mar 10, 2020
279b6e6
Merge branch 'DBcreate' of https://github.com/Jdelpizz/guard-app into…
Mar 10, 2020
01fa198
updated
Scogent Mar 10, 2020
72bf2c1
Created spreadsheet branch
Mar 10, 2020
9cb531a
created temporary spreadsheet and view
Mar 10, 2020
2026807
Merge branch 'DBcreate' of https://github.com/jdelpizz/guard-app into…
Scogent Mar 10, 2020
5160f96
Merge pull request #1 from Jdelpizz/database
blipscom Mar 10, 2020
30c1fcd
Merge branch 'index' into login_design
grimwolf007 Mar 12, 2020
928e271
Fixed up db tables
Scogent Mar 12, 2020
8af3890
Merge pull request #3 from Jdelpizz/login_design
gwilkening Mar 12, 2020
843f753
added in foreign key section
Scogent Mar 12, 2020
6089dc6
Merge branch 'spreadsheet' into master
blipscom Mar 12, 2020
c231bd9
Merge pull request #4 from Jdelpizz/master
blipscom Mar 12, 2020
3879ac6
Established relationships between entities.
Mar 12, 2020
05621e8
Linked spreadsheet to login (with authorization), changed background …
Mar 12, 2020
52d13a2
Merge pull request #5 from Jdelpizz/spreadsheet
gwilkening Mar 12, 2020
5e3127a
Successfully added relationships between entities :)
Mar 12, 2020
e7458e6
Merge branch 'DBcreate' into master
mafcontrer Mar 12, 2020
fe252b3
added haml file
Mar 23, 2020
43b0eea
Kim
Scogent Mar 24, 2020
a9c2d19
- fixed spreadsheet index.html file to be A LOT more readable
Scogent Mar 24, 2020
8ca455f
Removed the database dev folder
grimwolf007 Mar 24, 2020
afa4050
Added Testing
grimwolf007 Mar 24, 2020
4fabfaa
Added an example feature file
grimwolf007 Mar 24, 2020
1503f65
Added cucumber and cucumber training wheels
Mar 24, 2020
d6756f9
Merge branch 'logout' of https://github.com/jdelpizz/guard-app into l…
Mar 24, 2020
191fd5e
Started adding tests
grimwolf007 Mar 24, 2020
2db1929
training wheels works
grimwolf007 Mar 24, 2020
a6023e8
Created create_user, login and logout tests
grimwolf007 Mar 24, 2020
7744c26
Added a bulk add user step
grimwolf007 Mar 24, 2020
431c6e6
create_user and login passed
grimwolf007 Mar 24, 2020
7e46de6
cadets mimics spreadsheet
Scogent Mar 24, 2020
e5dafed
Fixed up the show route and added in a create cadet feature
Scogent Mar 25, 2020
e227915
changed routing to newly created table.
Mar 25, 2020
6ef6529
fixed one bug
Scogent Mar 25, 2020
88c8424
changed routing to display newly created table
Mar 25, 2020
e180b6c
Merge branch 'dbView' of https://github.com/Jdelpizz/guard-app into d…
Mar 25, 2020
96ed17f
added user's foreign key to cadets table
Mar 25, 2020
b82e643
added in error and confirmation msgs
Scogent Mar 25, 2020
01ed4a6
Merge branch 'dbView' of https://github.com/jdelpizz/guard-app into d…
Scogent Mar 25, 2020
9701de2
added in update feature for the cadets table
Scogent Mar 25, 2020
537a2d5
Set up cucumber and added simple features to test.
mafcontrer Mar 25, 2020
f91113a
Merge branch 'dbView' of https://github.com/Jdelpizz/guard-app into d…
mafcontrer Mar 25, 2020
6d01971
Added in links to nav the cadets menu
Scogent Mar 25, 2020
7b5a774
Merge branch 'dbView' of https://github.com/jdelpizz/guard-app into d…
Scogent Mar 25, 2020
a7396b8
added bootstrap
Scogent Mar 25, 2020
ef3ecbd
- Added in days section
Scogent Mar 25, 2020
690fa05
Shows and enforces password requirements on newly created users.
grimwolf007 Mar 25, 2020
20a0517
added in delete feature
Scogent Mar 25, 2020
2b4132e
fixed bootstrap to work with rails 6
Scogent Mar 26, 2020
29447c2
changed some files
Scogent Mar 26, 2020
d09e268
Fixed bootstrap error and now 100% works with ruby 6
Scogent Mar 26, 2020
180ca99
reverted some changes
Scogent Mar 26, 2020
172960d
Added Logout button
Mar 26, 2020
44b3e5d
updated
Scogent Mar 26, 2020
107abbd
updated
Scogent Mar 26, 2020
8885121
log out feature complete, passes test
Mar 26, 2020
4fc02ef
Merge branch 'master' into logout
Mar 26, 2020
1c22632
Changed tests to accomadate for spreadsheet
Mar 26, 2020
1e8fb2b
testing
Mar 29, 2020
b61c8f2
Merge branch 'master' into user_roles (troubleshooting)
grimwolf007 Mar 29, 2020
b016b18
Merge branch 'master' into user_roles
blipscom Mar 30, 2020
08ea482
Merge pull request #7 from Jdelpizz/user_roles
blipscom Mar 30, 2020
775978c
Revert "Merge pull request #7 from Jdelpizz/user_roles"
Mar 30, 2020
3eb3918
Revert "User roles"
Jdelpizz Mar 31, 2020
dc0d8dd
Merge pull request #8 from Jdelpizz/revert-7-user_roles
Jdelpizz Mar 31, 2020
b9cde79
Merge branch 'logout' into password_reqs
grimwolf007 Mar 31, 2020
6b76850
Merge branch 'master' into password_reqs
grimwolf007 Mar 31, 2020
7957261
Forgot to save merge
grimwolf007 Mar 31, 2020
52384cc
All tests passed
grimwolf007 Mar 31, 2020
2f65b87
Added test for adding schedule.
Mar 31, 2020
7a279d0
Added in parser
Scogent Mar 31, 2020
ade4085
added cadets_controller.rb
mafcontrer Apr 1, 2020
7c99ac4
Merge pull request #9 from Jdelpizz/password_reqs
mafcontrer Apr 1, 2020
980a008
Merge branch 'master' of https://github.com/Jdelpizz/guard-app
mafcontrer Apr 1, 2020
bc86dcf
Resolved conflicts
mafcontrer Apr 1, 2020
145a4fe
Merged master into dbView to check for functionality. Resolved confli…
mafcontrer Apr 1, 2020
7acb7db
top commit is now working
Scogent Apr 1, 2020
4e900b9
added in a new table
Scogent Apr 2, 2020
a62856a
Merge branch 'password_reqs' into scheduleParser to fix cucumber issues
grimwolf007 Apr 2, 2020
ba4ef07
Updated index.html.erb to show a template of the guard roster.
mafcontrer Apr 2, 2020
ad4e759
Changed redirect after login
grimwolf007 Apr 2, 2020
eb7b5ff
Added removed the guard controller and view
grimwolf007 Apr 2, 2020
653dd11
added buttons to profile and spreadsheet
grimwolf007 Apr 2, 2020
c228ac4
added user profile and schedule parser
grimwolf007 Apr 2, 2020
6b75502
Merge branch 'master' into scheduleParser
grimwolf007 Apr 2, 2020
c7164db
Added Simplecov
grimwolf007 Apr 2, 2020
5f10901
Revert "Updated index.html.erb to show a template of the guard roster."
mafcontrer Apr 6, 2020
bb8feee
added base cadets for testing purposes. Subject of change.
mafcontrer Apr 6, 2020
8ffbe06
modified index view, added features to fix later, added paths to be u…
mafcontrer Apr 6, 2020
1897fde
Merge branch 'master' of https://github.com/Jdelpizz/guard-app into d…
mafcontrer Apr 6, 2020
fd81495
Merge branch 'master' into scheduleParser
grimwolf007 Apr 7, 2020
dc1361f
Added CWID to users table and added it to signup
grimwolf007 Apr 7, 2020
f17738f
Modified controller files
citadeljst Apr 8, 2020
1964a50
Fixing views [WIP]
grimwolf007 Apr 8, 2020
8578e7f
Initial buglemaster commit, has view and controller
Apr 8, 2020
8e4ed5a
attempted to add cadet step definitions for future testing (WIP)
mafcontrer Apr 8, 2020
5627bb2
added cadets_feature to test if dbView displayed correct information.
mafcontrer Apr 8, 2020
6a9456b
fixed small problem with cadets_controller. Now master is working
mafcontrer Apr 8, 2020
bf9d597
Template schedule complete
Apr 12, 2020
cd23637
Added ability to add cadet names
Apr 12, 2020
65a89a6
Fixed heading issues, shrunk tables. Alligned headings to the center.
Apr 13, 2020
a9cc9ae
Made it so a user has to create a profile to continue with the site a…
grimwolf007 Apr 14, 2020
e9e1746
Merge branch 'master' into scheduleParser
grimwolf007 Apr 14, 2020
fa29557
forgot to save the gemfile
grimwolf007 Apr 14, 2020
cee2c01
Added Seeds for locations, companies, ranks
grimwolf007 Apr 14, 2020
ac74d84
Added C_Status table
grimwolf007 Apr 14, 2020
6966efa
added models for c_status, company, locations, and ranks
grimwolf007 Apr 14, 2020
93582e4
db:seed worked
grimwolf007 Apr 14, 2020
a30ed24
Added a cadet from the gui
grimwolf007 Apr 14, 2020
6eaa19f
fixed create_user.feature
grimwolf007 Apr 15, 2020
3d97e9d
Fixed login feature
grimwolf007 Apr 15, 2020
1e8bd03
the database now resets every time cucumber is run
grimwolf007 Apr 15, 2020
abb8ef1
Fixed Logout Feature
grimwolf007 Apr 15, 2020
5ab5169
Fixed password req test and cadets test
grimwolf007 Apr 15, 2020
c3778c4
Made test, and fixed
grimwolf007 Apr 15, 2020
2b5d431
Removed text boxes, added empty dropdown menus
Apr 15, 2020
d42e3fe
All tests work, 83% coverage
grimwolf007 Apr 15, 2020
e64300c
fixed the rank table, and added it to cadet
grimwolf007 Apr 15, 2020
629b160
limited input on some fields
grimwolf007 Apr 15, 2020
af0e98d
Merge pull request #11 from Jdelpizz/case_insensitive_login
mafcontrer Apr 15, 2020
d5a8157
The User profile now inputs the cadet schedule into the cadets table.
Apr 16, 2020
8b056a8
added some skeleton tests for adding profile
grimwolf007 Apr 16, 2020
479fa35
Merge branch 'scheduleParser' of https://github.com/jdelpizz/guard-ap…
grimwolf007 Apr 16, 2020
441fbaa
Fixed schedule parser so lesesne and cas save in the same format (hhm…
grimwolf007 Apr 16, 2020
90d475d
Added user roles and permissions, wrote part of the README
citadeljst Apr 16, 2020
d3bdc4f
replaced some flashes with vars
grimwolf007 Apr 16, 2020
77f0750
made create cadet test
grimwolf007 Apr 16, 2020
26bb723
Added rspec expectations, created test to check if things are in db, …
grimwolf007 Apr 18, 2020
140e309
removed the base_cadets in db/seeds, adding new test
grimwolf007 Apr 18, 2020
1c1c0d0
finished add_schedule.feature, adding to cadet_action_steps.rb
grimwolf007 Apr 18, 2020
fcbcd9c
added test for the classes table
grimwolf007 Apr 18, 2020
a8d2e7d
the test for checking for classes and enrollments in the database is …
grimwolf007 Apr 18, 2020
1516ce8
removed the "the db should have my schedule step"
grimwolf007 Apr 18, 2020
6218558
Merge branch 'master' into buglemaster
blipscom Apr 19, 2020
24542be
Fixed cadets controller
Scogent Apr 20, 2020
8859970
Merge pull request #13 from Jdelpizz/buglemaster
Domahawx Apr 20, 2020
346cfbc
Merge branch 'master' into UserCreate
Domahawx Apr 20, 2020
6b51753
Merge pull request #12 from Jdelpizz/UserCreate
Domahawx Apr 20, 2020
16226cd
Fixed typo
grimwolf007 Apr 20, 2020
1a15b20
changed username flash to @username
grimwolf007 Apr 20, 2020
33c4be2
fixed gemlock
Apr 20, 2020
e159691
adding classes and enrollments
Apr 21, 2020
fc2030d
adding spec
grimwolf007 Apr 28, 2020
69937a8
Merge branch 'master' into dev and reverted some of schedule parser
grimwolf007 Apr 28, 2020
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@
/yarn-error.log
yarn-debug.log*
.yarn-integrity
coverage
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
17 changes: 14 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@ source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

gem 'rails', '6.0.2.1'
gem 'puma', '3.12.3'
gem 'puma', '3.12.2'
gem 'sass-rails', '5.1.0'
gem 'webpacker', '4.0.7'
gem 'turbolinks', '5.2.0'
gem 'jbuilder', '2.9.1'
gem 'bootsnap', '1.4.5', require: false
gem 'bcrypt' , '>= 2.1.4'
gem 'cucumber'
gem 'rspec-rails'
gem 'pundit'
gem 'cancancan'

group :development, :test do
gem 'sqlite3', '1.4.1'
Expand All @@ -22,9 +27,15 @@ group :development do
end

group :test do
gem 'capybara', '3.28.0'
gem 'selenium-webdriver', '3.142.4'
gem 'cucumber-rails', require: false
gem 'capybara', '3.28.0'
gem 'selenium-webdriver', '3.142.4'
gem 'webdrivers', '4.1.2'
gem 'cucumber-rails-training-wheels', require: false
gem 'database_cleaner', require: false
gem 'simplecov', require: false
gem 'capybara-screenshot'
gem 'rspec-expectations'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
Expand Down
95 changes: 85 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,14 @@ GEM
zeitwerk (~> 2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
backports (3.17.1)
bcrypt (3.1.13)
bindex (0.8.1)
bootsnap (1.4.5)
msgpack (~> 1.0)
builder (3.2.4)
byebug (11.0.1)
cancancan (3.1.0)
capybara (3.28.0)
addressable
mini_mime (>= 0.1.3)
Expand All @@ -71,40 +74,80 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
xpath (~> 3.2)
capybara-screenshot (1.0.24)
capybara (>= 1.0, < 4)
launchy
childprocess (2.0.0)
rake (< 13.0)
concurrent-ruby (1.1.6)
crass (1.0.6)
cucumber (3.1.2)
builder (>= 2.1.2)
cucumber-core (~> 3.2.0)
cucumber-expressions (~> 6.0.1)
cucumber-wire (~> 0.0.1)
diff-lcs (~> 1.3)
gherkin (~> 5.1.0)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.2)
cucumber-core (3.2.1)
backports (>= 3.8.0)
cucumber-tag_expressions (~> 1.1.0)
gherkin (~> 5.0)
cucumber-expressions (6.0.1)
cucumber-rails (2.0.0)
capybara (>= 2.12, < 4)
cucumber (>= 3.0.2, < 4)
mime-types (>= 2.0, < 4)
nokogiri (~> 1.8)
railties (>= 4.2, < 7)
cucumber-rails-training-wheels (1.0.0)
cucumber-rails (>= 1.1.1)
cucumber-tag_expressions (1.1.1)
cucumber-wire (0.0.1)
database_cleaner (1.8.4)
diff-lcs (1.3)
docile (1.3.2)
erubi (1.9.0)
ffi (1.12.2)
gherkin (5.1.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
jbuilder (2.9.1)
activesupport (>= 4.2.0)
launchy (2.5.0)
addressable (~> 2.7)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.4.0)
loofah (2.5.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (0.9.2)
method_source (1.0.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2020.0425)
mimemagic (0.3.4)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.0)
msgpack (1.3.3)
multi_json (1.14.1)
multi_test (0.1.2)
nio4r (2.5.2)
nokogiri (1.10.8)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
public_suffix (4.0.3)
puma (3.12.3)
public_suffix (4.0.4)
puma (3.12.2)
pundit (2.1.0)
activesupport (>= 3.0.0)
rack (2.2.2)
rack-proxy (0.6.5)
rack
Expand Down Expand Up @@ -140,7 +183,24 @@ GEM
rb-fsevent (0.10.3)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (1.6.0)
regexp_parser (1.7.0)
rspec-core (3.9.1)
rspec-support (~> 3.9.1)
rspec-expectations (3.9.1)
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.0)
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.2)
ruby_dep (1.5.0)
rubyzip (1.3.0)
sass (3.7.4)
Expand All @@ -157,6 +217,10 @@ GEM
selenium-webdriver (3.142.4)
childprocess (>= 0.5, < 3.0)
rubyzip (~> 1.2, >= 1.2.2)
simplecov (0.18.5)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov-html (0.12.2)
spring (2.1.0)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
Expand All @@ -175,7 +239,7 @@ GEM
turbolinks (5.2.0)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.6)
tzinfo (1.2.7)
thread_safe (~> 0.1)
web-console (4.0.1)
actionview (>= 6.0.0)
Expand All @@ -195,21 +259,32 @@ GEM
websocket-extensions (0.1.4)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.2.2)
zeitwerk (2.3.0)

PLATFORMS
ruby

DEPENDENCIES
bcrypt (>= 2.1.4)
bootsnap (= 1.4.5)
byebug (= 11.0.1)
cancancan
capybara (= 3.28.0)
capybara-screenshot
cucumber
cucumber-rails
cucumber-rails-training-wheels
database_cleaner
jbuilder (= 2.9.1)
listen (= 3.1.5)
puma (= 3.12.3)
puma (= 3.12.2)
pundit
rails (= 6.0.2.1)
rspec-expectations
rspec-rails
sass-rails (= 5.1.0)
selenium-webdriver (= 3.142.4)
simplecov
spring (= 2.1.0)
spring-watcher-listen (= 2.0.1)
sqlite3 (= 1.4.1)
Expand All @@ -220,4 +295,4 @@ DEPENDENCIES
webpacker (= 4.0.7)

BUNDLED WITH
1.17.2
1.17.3
40 changes: 31 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
# README

This README would normally document whatever steps are necessary to get the
application up and running.

Things you may want to cover:

* Ruby version

* System dependencies
This Ruby-on-Rails app schedules guard shifts for Citadel cadets.

RUBY VERSION:
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]

DEPENDENCIES:

gem 'rails', '6.0.2.1'
gem 'puma', '3.12.2'
gem 'sass-rails', '5.1.0'
gem 'webpacker', '4.0.7'
gem 'turbolinks', '5.2.0'
gem 'jbuilder', '2.9.1'
gem 'bootsnap', '1.4.5', require: false
gem 'bcrypt' , '>= 2.1.4'
gem 'cucumber'
gem 'pundit'
gem 'cancancan'
gem 'sqlite3', '1.4.1'
gem 'byebug', '11.0.1', platforms: [:mri, :mingw, :x64_mingw]
gem 'web-console', '4.0.1'
gem 'listen', '3.1.5'
gem 'spring', '2.1.0'
gem 'spring-watcher-listen', '2.0.1'
gem 'cucumber-rails', require: false
gem 'capybara', '3.28.0'
gem 'selenium-webdriver', '3.142.4'
gem 'webdrivers', '4.1.2'
gem 'cucumber-rails-training-wheels', require: false
gem 'database_cleaner', require: false

* Configuration

Expand All @@ -21,4 +43,4 @@ Things you may want to cover:

* Deployment instructions

* ...
* ...
Binary file added app/assets/images/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,12 @@
*= require_tree .
*= require_self
*/

body {
background: url(background.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
h1 {color: grey;}
13 changes: 13 additions & 0 deletions app/assets/stylesheets/buglemaster.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
body {
background-color: lightblue;
}

h1 {
color: white;
text-align: center;
}

p {
font-family: verdana;
font-size: 20px;
}
1 change: 1 addition & 0 deletions app/assets/stylesheets/custom.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// "bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
3 changes: 3 additions & 0 deletions app/assets/stylesheets/guard.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the Guard controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/sessions.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the sessions controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/spreadsheet.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the Spreadsheet controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/users.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the users controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
33 changes: 33 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,35 @@
class ApplicationController < ActionController::Base
before_action :authorized
before_action :has_profile?
helper_method :current_user
helper_method :logged_in?
add_flash_types :notice1, :notice2, :notice3

def current_user
::User.find_by(id: session[:user_id])
end

def logged_in?
!current_user.nil?
end

def authorized
redirect_to '/welcome' unless logged_in?
end

def has_profile?
if logged_in?
redirect_to '/cadets/new' unless has_cadet?()
end
end

def has_cadet?
@user = current_user
if ::Cadets.find_by(CWID: @user.CWID) != nil
return true
else
return false
end
end

end
5 changes: 5 additions & 0 deletions app/controllers/buglemaster_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class BuglemasterController < ApplicationController

def bugleschedule
end
end
Loading