Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: "bundler"
directory: "/"
target-branch: "develop"
schedule:
interval: "daily"
commit-message:
prefix: "build(deps): "

- package-ecosystem: "npm"
directory: "/website"
target-branch: "develop"
schedule:
interval: "daily"
commit-message:
prefix: "build(deps): "
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
branches:
- master
- develop
- '[0-9].[0-9]'
- '[0-9].[0-9].[0-9]'

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion CHECKS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
WAIT=10
ATTEMPTS=300
ATTEMPTS=100

/users/sign_in Sign in to
10 changes: 7 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ gem 'turbolinks', '~> 5'
# gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
gem 'redis', '~> 4.0'
# CORS support
gem 'rack-cors'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

Expand Down Expand Up @@ -65,6 +67,8 @@ gem 'jquery-ui-rails'
gem 'selectize-rails'
gem 'highcharts-rails', '~> 6.0'
gem 'bootstrap', '~> 4.3.1'
gem 'fullcalendar-rails'
gem 'momentjs-rails'

# Markdown parsing
gem 'redcarpet'
Expand All @@ -76,7 +80,7 @@ gem 'audited', '~> 4.7'

# Background job processing
gem 'sidekiq', '< 7'
gem 'sidekiq-cron', '~> 1.1'
gem 'sidekiq-cron', github: 'codeRIT/sidekiq-cron', branch: 'master'

# Misc support gems
gem 'rails-settings-cached', '~> 0.7.2'
Expand Down Expand Up @@ -111,8 +115,8 @@ end

group :test do
gem 'test-unit', '~> 3.0'
gem 'shoulda', '~> 3.5'
gem 'shoulda-matchers', '~> 2.0'
gem 'shoulda', '~> 4.0.0'
gem 'shoulda-matchers', '~> 4.4.0'
gem 'minitest-reporters'
gem 'valid_attribute'
gem 'factory_bot_rails'
Expand Down
64 changes: 40 additions & 24 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
GIT
remote: https://github.com/codeRIT/sidekiq-cron.git
revision: 571d7d74d2828aea2f55381a83f73ac3450e8819
branch: master
specs:
sidekiq-cron (1.2.0)
fugit (~> 1.1)
sidekiq (>= 4.2.1)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -129,7 +138,7 @@ GEM
dotenv (= 2.7.5)
railties (>= 3.2, < 6.1)
errbase (0.2.0)
erubi (1.9.0)
erubi (1.10.0)
erubis (2.7.0)
et-orbi (1.2.4)
tzinfo
Expand All @@ -149,9 +158,13 @@ GEM
font-awesome-rails (4.7.0.5)
railties (>= 3.2, < 6.1)
formatador (0.2.5)
fugit (1.3.6)
fugit (1.4.2)
et-orbi (~> 1.1, >= 1.1.8)
raabro (~> 1.3)
raabro (~> 1.4)
fullcalendar-rails (3.9.0.0)
jquery-rails (>= 4.0.5, < 5.0.0)
jquery-ui-rails (>= 5.0.2)
momentjs-rails (>= 2.9.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
groupdate (5.0.0)
Expand Down Expand Up @@ -205,7 +218,7 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.7.0)
loofah (2.8.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.2.6)
Expand All @@ -226,14 +239,16 @@ GEM
builder
minitest (>= 5.0)
ruby-progressbar
momentjs-rails (2.20.1)
railties (>= 3.1)
msgpack (1.3.3)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.1.1)
mustache (1.1.1)
mysql2 (0.5.3)
nenv (0.3.0)
nio4r (2.5.3)
nio4r (2.5.4)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
notiffany (0.1.3)
Expand Down Expand Up @@ -267,8 +282,10 @@ GEM
public_suffix (4.0.5)
puma (4.3.5)
nio4r (~> 2.0)
raabro (1.3.1)
raabro (1.4.0)
rack (2.2.3)
rack-cors (1.1.1)
rack (>= 2.0.0)
rack-protection (2.0.8.1)
rack
rack-test (1.1.0)
Expand Down Expand Up @@ -313,7 +330,7 @@ GEM
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.5.0)
redis (4.2.1)
redis (4.2.5)
regexp_parser (1.7.1)
responders (3.0.1)
actionpack (>= 5.0)
Expand Down Expand Up @@ -355,20 +372,16 @@ GEM
ruby_http_client (~> 3.4)
sexp_processor (4.15.0)
shellany (0.0.1)
shoulda (3.5.0)
shoulda-context (~> 1.0, >= 1.0.1)
shoulda-matchers (>= 1.4.1, < 3.0)
shoulda-context (1.2.2)
shoulda-matchers (2.8.0)
activesupport (>= 3.0.0)
sidekiq (6.0.7)
shoulda (4.0.0)
shoulda-context (~> 2.0)
shoulda-matchers (~> 4.0)
shoulda-context (2.0.0)
shoulda-matchers (4.4.1)
activesupport (>= 4.2.0)
sidekiq (6.1.3)
connection_pool (>= 2.2.2)
rack (~> 2.0)
rack-protection (>= 2.0.0)
redis (>= 4.1.0)
sidekiq-cron (1.2.0)
fugit (~> 1.1)
sidekiq (>= 4.2.1)
redis (>= 4.2.0)
simple_form (5.0.2)
actionpack (>= 5.0)
activemodel (>= 5.0)
Expand All @@ -386,7 +399,7 @@ GEM
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
Expand All @@ -402,7 +415,7 @@ GEM
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.7)
tzinfo (1.2.9)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
Expand Down Expand Up @@ -451,6 +464,7 @@ DEPENDENCIES
factory_bot_rails
file_validators
font-awesome-rails (~> 4.0)
fullcalendar-rails
groupdate
guard
guard-minitest
Expand All @@ -461,11 +475,13 @@ DEPENDENCIES
jquery-ui-rails
listen (>= 3.0.5, < 3.2)
minitest-reporters
momentjs-rails
mustache (~> 1.0)
mysql2 (>= 0.4.4, < 0.6.0)
omniauth-mlh (~> 0.4.1)
omniauth-rails_csrf_protection
puma (~> 4.3)
rack-cors
rails (~> 5.2.4.4)
rails-controller-testing
rails-settings-cached (~> 0.7.2)
Expand All @@ -479,10 +495,10 @@ DEPENDENCIES
selectize-rails
selenium-webdriver
sendgrid-actionmailer
shoulda (~> 3.5)
shoulda-matchers (~> 2.0)
shoulda (~> 4.0.0)
shoulda-matchers (~> 4.4.0)
sidekiq (< 7)
sidekiq-cron (~> 1.1)
sidekiq-cron!
simple_form
simple_spark
simplecov
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ $ bin/rails s # short for bin/rails server

6. Visit http://localhost:3000/apply, create an account, and complete an application

7. In another bash window, promote your user to an admin
7. In another bash window, promote your user to a director

```bash
$ cd hackathon-manager
$ bin/rails c # short for bin/rails console
# Wait for the console to start...
Loading development environment (Rails 5.1.1)
irb(main):001:0> User.last.update_attribute(:role, :admin)
irb(main):001:0> User.last.update_attribute(:role, :director)
```

8. Visit http://localhost:3000/manage and set up the hackathon as needed
Expand Down
3 changes: 3 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
//= require_directory .
//= require_directory ./channels
//= require ./vendor/simplemde.min.js
//= require moment
//= require fullcalendar
//= require fullcalendar/locale-all
43 changes: 43 additions & 0 deletions app/assets/javascripts/events.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
function eventCalendar() {
return $('#calendar').fullCalendar({
defaultView: 'listYear',
buttonText: {
today: 'Today'
},
eventRender: function (event, element, view) {
element.find('.fc-event-dot').css('display', 'none');
if(event.description) {
element.find('.fc-list-item-title').append('<div></div><span style="font-size: 12px">' + event.description + '</span>');
}
if (event.location) {
element.find('.fc-list-item-title').append('<div></div><span style="font-size: 12px"><b>Location: </b>' + event.location + '</span>');
}
if (event.category) {
element.find('.fc-list-item-title').append('<div></div><span style="font-size: 12px"><b>Category: </b>' + event.category + '</span>');
}
},
events: {
url: '/manage/events.json',
success: function (response) {
// due to "end" being a keyword in ruby and what fullcalender uses it is stored as finish and than it is
// converted to "end" when sending it to fullcalendar
response = JSON.parse(JSON.stringify(response).split('"finish":').join('"end":'));
return response;
}
},
eventClick: function (info) {
window.location = 'events/' + info.id;
},
height: 'auto',
});
}

function clearCalendar() {
$('#calendar').fullCalendar('delete');
$('#calendar').html('');
}

document.addEventListener('turbolinks:load', function () {
eventCalendar();
});
document.addEventListener('turbolinks:before-cache', clearCalendar);
13 changes: 13 additions & 0 deletions app/assets/javascripts/manage/lib/dashboardMap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
document.addEventListener('turbolinks:load', function () {
$('.map-button').click(function (){
var map = $('#map');
if(map.is(':visible')){
map.hide();
$(this).html('Show Map');
}
else{
map.show();
$(this).html('Hide Map');
}
});
});
4 changes: 2 additions & 2 deletions app/assets/javascripts/manage/lib/setupDataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ var setupDataTables = function () {
]
});

$('.datatable.stats-mlhinfo-applied').DataTable({
$('.datatable.stats-info-applied').DataTable({
order: [1, 'asc'],
columns: [
{ orderable: true, data: 'id', visible: false },
Expand All @@ -136,7 +136,7 @@ var setupDataTables = function () {
]
});

$('.datatable.stats-mlhinfo-checkedin').DataTable({
$('.datatable.stats-info-checkedin').DataTable({
order: [1, 'asc'],
columns: [
{ orderable: true, data: 'id', visible: false },
Expand Down
8 changes: 5 additions & 3 deletions app/assets/javascripts/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ document.addEventListener('turbolinks:load', function() {
switch (types[i]) {
case 'presence':
if (!value || $.trim(value).length < 1) {
if ($(this).parents('.agreement_input')) {
notify('.agreement_input', 'Please read & accept');
if ($(this).hasClass("agreement_input")) {
notify($(this).parent(), 'Please read & accept');
} else {
notify(this, 'Missing Information');
}
Expand Down Expand Up @@ -74,7 +74,9 @@ document.addEventListener('turbolinks:load', function() {
.fadeOut(200, function() {
$(this).remove();
});
$(".agreement_input")
// this removes the notification for agreements
$(this)
.parent()
.parent()
.removeClass('field_with_errors')
.find('.error')
Expand Down
2 changes: 2 additions & 0 deletions app/assets/stylesheets/forms/_forms.sass
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ hr
@include css4
color: var(--grey)
.error
display: inline-block
width: 100%
@include css4
background: var(--input--error--background)
color: var(--input--error--text)
Expand Down
Loading