Skip to content

Commit

Permalink
Merge branch 'master' into flag-submission-box-disappears-mitre-cyber…
Browse files Browse the repository at this point in the history
  • Loading branch information
camdenmoors authored Aug 19, 2020
2 parents 99f4ffb + 5966e29 commit 738dbb3
Show file tree
Hide file tree
Showing 67 changed files with 724 additions and 601 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
RAILS_ENV: test
run: |
bundle exec brakeman -qAzw1
bundle exec bundle-audit check --update --ignore CVE-2016-10735 CVE-2019-8331
bundle exec bundle-audit check --update
bundle exec rails db:create
bundle exec rails test
bundle exec rails spellcheck
Expand Down
8 changes: 5 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ source 'https://rubygems.org'
gem 'activerecord-precounter'
gem 'awesome_nested_fields'
gem 'bootsnap', '>= 1.1.0', require: false
gem 'bootstrap-kaminari-views'
gem 'bootstrap-sass', '~> 2.3.2.2'
gem 'bootstrap', '~> 4.5.0'
gem 'bootstrap4-kaminari-views'
gem 'carrierwave-postgresql', '< 0.3.0' # Can be upgraded once https://github.com/diogob/carrierwave-postgresql/issues/33
gem 'chartkick'
gem 'delayed_job'
gem 'delayed_job_active_record'
gem 'devise'
gem 'filterrific'
gem 'font-awesome-rails'
gem 'formtastic'
gem 'geocoder'
gem 'groupdate'
Expand All @@ -27,6 +28,7 @@ gem 'paper_trail'
gem 'paper_trail-association_tracking'
gem 'passenger', require: 'phusion_passenger/rack_handler'
gem 'pg'
gem 'popper_js', '~> 1.14.5'
gem 'prawn'
gem 'rails', '~> 6.0.2'
gem 'rails_admin'
Expand Down Expand Up @@ -61,7 +63,7 @@ group :assets do
gem 'coffee-rails'
gem 'sass-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby
gem 'mini_racer', platforms: :ruby
gem 'uglifier'
end

Expand Down
40 changes: 21 additions & 19 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,20 @@ GEM
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.1)
autoprefixer-rails (9.8.6.1)
execjs
awesome_nested_fields (0.6.4)
rails (>= 3.0.0)
bcrypt (3.1.13)
bcrypt (3.1.15)
bootsnap (1.4.8)
msgpack (~> 1.0)
bootstrap-kaminari-views (0.0.5)
bootstrap (4.5.2)
autoprefixer-rails (>= 9.1.0)
popper_js (>= 1.14.3, < 2)
sassc-rails (>= 2.0.0)
bootstrap4-kaminari-views (1.0.1)
kaminari (>= 0.13)
rails (>= 3.1)
bootstrap-sass (2.3.2.2)
sass (~> 3.2)
brakeman (4.9.0)
builder (3.2.4)
bundler-audit (0.7.0.1)
Expand All @@ -96,7 +100,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.6)
concurrent-ruby (1.1.7)
crass (1.0.6)
delayed_job (4.1.8)
activesupport (>= 3.0, < 6.1)
Expand Down Expand Up @@ -126,6 +130,8 @@ GEM
ffi-hunspell (0.5.0)
ffi (~> 1.0)
filterrific (5.2.1)
font-awesome-rails (4.7.0.5)
railties (>= 3.2, < 6.1)
formtastic (3.1.5)
actionpack (>= 3.2.13)
geocoder (1.6.3)
Expand Down Expand Up @@ -177,7 +183,7 @@ GEM
addressable (~> 2.7)
letter_opener (1.7.0)
launchy (~> 2.2)
libv8 (3.16.14.19)
libv8 (8.4.255.0)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
Expand All @@ -195,6 +201,8 @@ GEM
mimemagic (0.3.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
mini_racer (0.3.1)
libv8 (~> 8.4.255)
minitest (5.14.1)
msgpack (1.3.3)
multipart-post (2.1.1)
Expand All @@ -216,6 +224,7 @@ GEM
rake (>= 0.8.1)
pdf-core (0.8.1)
pg (1.2.3)
popper_js (1.14.7)
prawn (2.3.0)
pdf-core (~> 0.8.1)
ttfunk (~> 1.6)
Expand Down Expand Up @@ -281,7 +290,6 @@ GEM
ffi (~> 1.0)
recaptcha (5.5.0)
json
ref (2.0.0)
regexp_parser (1.7.1)
remotipart (1.4.4)
request_store (1.5.0)
Expand Down Expand Up @@ -309,11 +317,6 @@ GEM
ruby_parser (3.14.2)
sexp_processor (~> 4.9)
rubyzip (2.3.0)
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 (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0)
Expand Down Expand Up @@ -342,9 +345,6 @@ GEM
activesupport (>= 4.0)
sprockets (>= 3.0.0)
temple (0.8.2)
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.10)
Expand All @@ -356,7 +356,7 @@ GEM
unicode-display_width (1.7.0)
warden (1.2.8)
rack (>= 2.0.6)
websocket-driver (0.7.2)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.4.0)
Expand All @@ -368,8 +368,8 @@ DEPENDENCIES
activerecord-precounter
awesome_nested_fields
bootsnap (>= 1.1.0)
bootstrap-kaminari-views
bootstrap-sass (~> 2.3.2.2)
bootstrap (~> 4.5.0)
bootstrap4-kaminari-views
brakeman
bundler-audit
carrierwave-postgresql (< 0.3.0)
Expand All @@ -382,6 +382,7 @@ DEPENDENCIES
faker
ffi-hunspell
filterrific
font-awesome-rails
formtastic
geocoder
groupdate
Expand All @@ -393,11 +394,13 @@ DEPENDENCIES
kramdown
letter_opener
listen
mini_racer
obscenity
paper_trail
paper_trail-association_tracking
passenger
pg
popper_js (~> 1.14.5)
prawn
pry-remote
rails (~> 6.0.2)
Expand All @@ -411,7 +414,6 @@ DEPENDENCIES
scout_apm
sentry-raven
simplecov
therubyracer
uglifier

BUNDLED WITH
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ If the project is being hosted on Heroku a daily task can be created using the H

#### Gameboard

![gameboard](https://i.imgur.com/UgkPX5q.png)
![gameboard](https://i.imgur.com/9NkEPac.png)

#### Administration Dashboard

![admin dashboard](https://i.imgur.com/lzj7U3m.png)
![admin dashboard](https://i.imgur.com/T9Fth6g.png)

#### Administration Dashboard -> Add challenge

![add challenge](https://i.imgur.com/ZRyimTp.png)
![add challenge](https://i.imgur.com/kjkZ1pI.png)

##### More screenshots available on the [wiki](https://github.com/mitre-cyber-academy/ctf-scoreboard/wiki/Screenshots).

Expand Down
5 changes: 5 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
//= require_tree .
//= require jquery.nested-fields
// Loads all Bootstrap javascripts
//= require popper
//= require bootstrap
//= require filterrific/filterrific-jquery
//= require highcharts
Expand All @@ -23,3 +24,7 @@
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})

var submitUserForm = function () {
document.getElementById("user-form").submit();
};
2 changes: 1 addition & 1 deletion app/assets/javascripts/challenges.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

$(document).ready ->
$('.toggler').click (e) ->
$('#hiddenUntilToggle').toggleClass("d-none")
e.preventDefault()
$('.hide').toggle()
return
return
2 changes: 1 addition & 1 deletion app/assets/javascripts/sticky-footer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var stick = function () {
$('body').css('margin-bottom', $('#page-footer').height() + 40);
$('body').css('margin-bottom', $('#page-footer').height() + 60);
}
$(document).ready(function () {
stick();
Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/user.js.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
window.runOnPageLoad = () ->
$('input[type=file]').bootstrapFileInput()
if $('#user_state').val() == "NA" or $('#user_year_in_school').val() == "0"
$('#compete-for-prizes').hide()
$('#user_compete_for_prizes').prop("checked", false)
Expand Down
23 changes: 23 additions & 0 deletions app/assets/stylesheets/challenges.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
// Place all the styles related to the challenges controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

@media (max-device-width: 767px) {
.container {
max-width: 100% !important;
margin-right: 0 !important;
margin-left: 0 !important;
}

h1 {
margin-right: auto;
margin-left: 1em;
}

nav {
margin-right: -2%;
margin-left: auto;
}

footer {
margin-right: auto;
margin-left: auto;
}
}
Loading

0 comments on commit 738dbb3

Please sign in to comment.