Skip to content

Commit a4ca101

Browse files
authored
Merge pull request #560 from codeRIT/develop
master <- develop (2.2)
2 parents 4fa6f6e + d02d9aa commit a4ca101

File tree

107 files changed

+1204
-208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+1204
-208
lines changed

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "bundler"
4+
directory: "/"
5+
target-branch: "develop"
6+
schedule:
7+
interval: "daily"
8+
commit-message:
9+
prefix: "build(deps): "
10+
11+
- package-ecosystem: "npm"
12+
directory: "/website"
13+
target-branch: "develop"
14+
schedule:
15+
interval: "daily"
16+
commit-message:
17+
prefix: "build(deps): "

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
branches:
1313
- master
1414
- develop
15+
- '[0-9].[0-9]'
16+
- '[0-9].[0-9].[0-9]'
1517

1618
jobs:
1719
build:

CHECKS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
WAIT=10
2-
ATTEMPTS=300
2+
ATTEMPTS=100
33

44
/users/sign_in Sign in to

Gemfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ gem 'turbolinks', '~> 5'
2525
# gem 'jbuilder', '~> 2.5'
2626
# Use Redis adapter to run Action Cable in production
2727
gem 'redis', '~> 4.0'
28+
# CORS support
29+
gem 'rack-cors'
2830
# Use ActiveModel has_secure_password
2931
# gem 'bcrypt', '~> 3.1.7'
3032

@@ -65,6 +67,8 @@ gem 'jquery-ui-rails'
6567
gem 'selectize-rails'
6668
gem 'highcharts-rails', '~> 6.0'
6769
gem 'bootstrap', '~> 4.3.1'
70+
gem 'fullcalendar-rails'
71+
gem 'momentjs-rails'
6872

6973
# Markdown parsing
7074
gem 'redcarpet'
@@ -76,7 +80,7 @@ gem 'audited', '~> 4.7'
7680

7781
# Background job processing
7882
gem 'sidekiq', '< 7'
79-
gem 'sidekiq-cron', '~> 1.1'
83+
gem 'sidekiq-cron', github: 'codeRIT/sidekiq-cron', branch: 'master'
8084

8185
# Misc support gems
8286
gem 'rails-settings-cached', '~> 0.7.2'
@@ -111,8 +115,8 @@ end
111115

112116
group :test do
113117
gem 'test-unit', '~> 3.0'
114-
gem 'shoulda', '~> 3.5'
115-
gem 'shoulda-matchers', '~> 2.0'
118+
gem 'shoulda', '~> 4.0.0'
119+
gem 'shoulda-matchers', '~> 4.4.0'
116120
gem 'minitest-reporters'
117121
gem 'valid_attribute'
118122
gem 'factory_bot_rails'

Gemfile.lock

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
GIT
2+
remote: https://github.com/codeRIT/sidekiq-cron.git
3+
revision: 571d7d74d2828aea2f55381a83f73ac3450e8819
4+
branch: master
5+
specs:
6+
sidekiq-cron (1.2.0)
7+
fugit (~> 1.1)
8+
sidekiq (>= 4.2.1)
9+
110
GEM
211
remote: https://rubygems.org/
312
specs:
@@ -129,7 +138,7 @@ GEM
129138
dotenv (= 2.7.5)
130139
railties (>= 3.2, < 6.1)
131140
errbase (0.2.0)
132-
erubi (1.9.0)
141+
erubi (1.10.0)
133142
erubis (2.7.0)
134143
et-orbi (1.2.4)
135144
tzinfo
@@ -149,9 +158,13 @@ GEM
149158
font-awesome-rails (4.7.0.5)
150159
railties (>= 3.2, < 6.1)
151160
formatador (0.2.5)
152-
fugit (1.3.6)
161+
fugit (1.4.2)
153162
et-orbi (~> 1.1, >= 1.1.8)
154-
raabro (~> 1.3)
163+
raabro (~> 1.4)
164+
fullcalendar-rails (3.9.0.0)
165+
jquery-rails (>= 4.0.5, < 5.0.0)
166+
jquery-ui-rails (>= 5.0.2)
167+
momentjs-rails (>= 2.9.0)
155168
globalid (0.4.2)
156169
activesupport (>= 4.2.0)
157170
groupdate (5.0.0)
@@ -205,7 +218,7 @@ GEM
205218
rb-fsevent (~> 0.9, >= 0.9.4)
206219
rb-inotify (~> 0.9, >= 0.9.7)
207220
ruby_dep (~> 1.2)
208-
loofah (2.7.0)
221+
loofah (2.8.0)
209222
crass (~> 1.0.2)
210223
nokogiri (>= 1.5.9)
211224
lumberjack (1.2.6)
@@ -226,14 +239,16 @@ GEM
226239
builder
227240
minitest (>= 5.0)
228241
ruby-progressbar
242+
momentjs-rails (2.20.1)
243+
railties (>= 3.1)
229244
msgpack (1.3.3)
230245
multi_json (1.15.0)
231246
multi_xml (0.6.0)
232247
multipart-post (2.1.1)
233248
mustache (1.1.1)
234249
mysql2 (0.5.3)
235250
nenv (0.3.0)
236-
nio4r (2.5.3)
251+
nio4r (2.5.4)
237252
nokogiri (1.10.10)
238253
mini_portile2 (~> 2.4.0)
239254
notiffany (0.1.3)
@@ -267,8 +282,10 @@ GEM
267282
public_suffix (4.0.5)
268283
puma (4.3.5)
269284
nio4r (~> 2.0)
270-
raabro (1.3.1)
285+
raabro (1.4.0)
271286
rack (2.2.3)
287+
rack-cors (1.1.1)
288+
rack (>= 2.0.0)
272289
rack-protection (2.0.8.1)
273290
rack
274291
rack-test (1.1.0)
@@ -313,7 +330,7 @@ GEM
313330
rb-inotify (0.10.1)
314331
ffi (~> 1.0)
315332
redcarpet (3.5.0)
316-
redis (4.2.1)
333+
redis (4.2.5)
317334
regexp_parser (1.7.1)
318335
responders (3.0.1)
319336
actionpack (>= 5.0)
@@ -355,20 +372,16 @@ GEM
355372
ruby_http_client (~> 3.4)
356373
sexp_processor (4.15.0)
357374
shellany (0.0.1)
358-
shoulda (3.5.0)
359-
shoulda-context (~> 1.0, >= 1.0.1)
360-
shoulda-matchers (>= 1.4.1, < 3.0)
361-
shoulda-context (1.2.2)
362-
shoulda-matchers (2.8.0)
363-
activesupport (>= 3.0.0)
364-
sidekiq (6.0.7)
375+
shoulda (4.0.0)
376+
shoulda-context (~> 2.0)
377+
shoulda-matchers (~> 4.0)
378+
shoulda-context (2.0.0)
379+
shoulda-matchers (4.4.1)
380+
activesupport (>= 4.2.0)
381+
sidekiq (6.1.3)
365382
connection_pool (>= 2.2.2)
366383
rack (~> 2.0)
367-
rack-protection (>= 2.0.0)
368-
redis (>= 4.1.0)
369-
sidekiq-cron (1.2.0)
370-
fugit (~> 1.1)
371-
sidekiq (>= 4.2.1)
384+
redis (>= 4.2.0)
372385
simple_form (5.0.2)
373386
actionpack (>= 5.0)
374387
activemodel (>= 5.0)
@@ -386,7 +399,7 @@ GEM
386399
sprockets (4.0.2)
387400
concurrent-ruby (~> 1.0)
388401
rack (> 1, < 3)
389-
sprockets-rails (3.2.1)
402+
sprockets-rails (3.2.2)
390403
actionpack (>= 4.0)
391404
activesupport (>= 4.0)
392405
sprockets (>= 3.0.0)
@@ -402,7 +415,7 @@ GEM
402415
turbolinks (5.2.1)
403416
turbolinks-source (~> 5.2)
404417
turbolinks-source (5.2.0)
405-
tzinfo (1.2.7)
418+
tzinfo (1.2.9)
406419
thread_safe (~> 0.1)
407420
uglifier (4.2.0)
408421
execjs (>= 0.3.0, < 3)
@@ -451,6 +464,7 @@ DEPENDENCIES
451464
factory_bot_rails
452465
file_validators
453466
font-awesome-rails (~> 4.0)
467+
fullcalendar-rails
454468
groupdate
455469
guard
456470
guard-minitest
@@ -461,11 +475,13 @@ DEPENDENCIES
461475
jquery-ui-rails
462476
listen (>= 3.0.5, < 3.2)
463477
minitest-reporters
478+
momentjs-rails
464479
mustache (~> 1.0)
465480
mysql2 (>= 0.4.4, < 0.6.0)
466481
omniauth-mlh (~> 0.4.1)
467482
omniauth-rails_csrf_protection
468483
puma (~> 4.3)
484+
rack-cors
469485
rails (~> 5.2.4.4)
470486
rails-controller-testing
471487
rails-settings-cached (~> 0.7.2)
@@ -479,10 +495,10 @@ DEPENDENCIES
479495
selectize-rails
480496
selenium-webdriver
481497
sendgrid-actionmailer
482-
shoulda (~> 3.5)
483-
shoulda-matchers (~> 2.0)
498+
shoulda (~> 4.0.0)
499+
shoulda-matchers (~> 4.4.0)
484500
sidekiq (< 7)
485-
sidekiq-cron (~> 1.1)
501+
sidekiq-cron!
486502
simple_form
487503
simple_spark
488504
simplecov

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ $ bin/rails s # short for bin/rails server
108108

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

111-
7. In another bash window, promote your user to an admin
111+
7. In another bash window, promote your user to a director
112112

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

121121
8. Visit http://localhost:3000/manage and set up the hackathon as needed

app/assets/javascripts/application.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@
2121
//= require_directory .
2222
//= require_directory ./channels
2323
//= require ./vendor/simplemde.min.js
24+
//= require moment
25+
//= require fullcalendar
26+
//= require fullcalendar/locale-all

app/assets/javascripts/events.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
function eventCalendar() {
2+
return $('#calendar').fullCalendar({
3+
defaultView: 'listYear',
4+
buttonText: {
5+
today: 'Today'
6+
},
7+
eventRender: function (event, element, view) {
8+
element.find('.fc-event-dot').css('display', 'none');
9+
if(event.description) {
10+
element.find('.fc-list-item-title').append('<div></div><span style="font-size: 12px">' + event.description + '</span>');
11+
}
12+
if (event.location) {
13+
element.find('.fc-list-item-title').append('<div></div><span style="font-size: 12px"><b>Location: </b>' + event.location + '</span>');
14+
}
15+
if (event.category) {
16+
element.find('.fc-list-item-title').append('<div></div><span style="font-size: 12px"><b>Category: </b>' + event.category + '</span>');
17+
}
18+
},
19+
events: {
20+
url: '/manage/events.json',
21+
success: function (response) {
22+
// due to "end" being a keyword in ruby and what fullcalender uses it is stored as finish and than it is
23+
// converted to "end" when sending it to fullcalendar
24+
response = JSON.parse(JSON.stringify(response).split('"finish":').join('"end":'));
25+
return response;
26+
}
27+
},
28+
eventClick: function (info) {
29+
window.location = 'events/' + info.id;
30+
},
31+
height: 'auto',
32+
});
33+
}
34+
35+
function clearCalendar() {
36+
$('#calendar').fullCalendar('delete');
37+
$('#calendar').html('');
38+
}
39+
40+
document.addEventListener('turbolinks:load', function () {
41+
eventCalendar();
42+
});
43+
document.addEventListener('turbolinks:before-cache', clearCalendar);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
document.addEventListener('turbolinks:load', function () {
2+
$('.map-button').click(function (){
3+
var map = $('#map');
4+
if(map.is(':visible')){
5+
map.hide();
6+
$(this).html('Show Map');
7+
}
8+
else{
9+
map.show();
10+
$(this).html('Hide Map');
11+
}
12+
});
13+
});

app/assets/javascripts/manage/lib/setupDataTables.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ var setupDataTables = function () {
124124
]
125125
});
126126

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

139-
$('.datatable.stats-mlhinfo-checkedin').DataTable({
139+
$('.datatable.stats-info-checkedin').DataTable({
140140
order: [1, 'asc'],
141141
columns: [
142142
{ orderable: true, data: 'id', visible: false },

app/assets/javascripts/validate.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ document.addEventListener('turbolinks:load', function() {
1818
switch (types[i]) {
1919
case 'presence':
2020
if (!value || $.trim(value).length < 1) {
21-
if ($(this).parents('.agreement_input')) {
22-
notify('.agreement_input', 'Please read & accept');
21+
if ($(this).hasClass("agreement_input")) {
22+
notify($(this).parent(), 'Please read & accept');
2323
} else {
2424
notify(this, 'Missing Information');
2525
}
@@ -74,7 +74,9 @@ document.addEventListener('turbolinks:load', function() {
7474
.fadeOut(200, function() {
7575
$(this).remove();
7676
});
77-
$(".agreement_input")
77+
// this removes the notification for agreements
78+
$(this)
79+
.parent()
7880
.parent()
7981
.removeClass('field_with_errors')
8082
.find('.error')

app/assets/stylesheets/forms/_forms.sass

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ hr
7373
@include css4
7474
color: var(--grey)
7575
.error
76+
display: inline-block
77+
width: 100%
7678
@include css4
7779
background: var(--input--error--background)
7880
color: var(--input--error--text)

0 commit comments

Comments
 (0)