Skip to content
This repository was archived by the owner on Jun 16, 2021. It is now read-only.

Commit dbb1361

Browse files
authored
Merge pull request #888 from omu/develop
Merge develop into master
2 parents 9735958 + 7843257 commit dbb1361

File tree

77 files changed

+1208
-913
lines changed

Some content is hidden

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

77 files changed

+1208
-913
lines changed

.markdownlintrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"style": "sublist"
88
},
99
"MD013": {
10-
"code_blocks": false,
11-
"tables": false,
10+
"line_length": 120,
11+
"tables": false
1212
},
1313
"MD024": {
1414
"allow_different_nesting": true

Gemfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ gem 'aws-sdk-s3', require: false
2626
gem 'image_processing', '~> 1.2'
2727

2828
# authentication
29+
gem 'authy'
2930
gem 'devise'
3031

3132
# assets: core asset dependencies
@@ -58,10 +59,16 @@ gem 'telephone_number'
5859

5960
# error tracking
6061
gem 'rollbar', github: 'rollbar/rollbar-gem'
62+
gem 'slack-notifier'
6163

6264
# permalinks
6365
gem 'friendly_id', '~> 5.2.0'
6466

67+
# sms
68+
gem 'nexmo'
69+
gem 'smstools'
70+
gem 'twilio-ruby', '~> 5.21.2'
71+
6572
group :development, :test do
6673
gem 'brakeman', require: false
6774
gem 'bullet', github: 'flyerhzm/bullet'
@@ -76,9 +83,8 @@ end
7683

7784
group :test do
7885
gem 'capybara', '>= 2.15'
79-
gem 'chromedriver-helper'
8086
gem 'codacy-coverage', require: false
81-
gem 'selenium-webdriver'
87+
gem 'webdrivers', '~> 3.0'
8288
gem 'webmock'
8389
end
8490

Gemfile.lock

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ GIT
88

99
GIT
1010
remote: https://github.com/rails/rails.git
11-
revision: efb706daad0e2e1039c6abb4879c837ef8bf4d10
11+
revision: 4ec486145290efb4059b64e84a2bfd9e157bf787
1212
specs:
1313
actioncable (6.0.0.beta3)
1414
actionpack (= 6.0.0.beta3)
@@ -63,7 +63,7 @@ GIT
6363
i18n (>= 0.7, < 2)
6464
minitest (~> 5.1)
6565
tzinfo (~> 1.1)
66-
zeitwerk (~> 1.4)
66+
zeitwerk (~> 1.4, >= 1.4.2)
6767
rails (6.0.0.beta3)
6868
actioncable (= 6.0.0.beta3)
6969
actionmailbox (= 6.0.0.beta3)
@@ -129,11 +129,11 @@ GEM
129129
public_suffix (>= 2.0.2, < 4.0)
130130
ancestry (3.0.5)
131131
activerecord (>= 3.2.0)
132-
archive-zip (0.12.0)
133-
io-like (~> 0.3.0)
134132
ast (2.4.0)
133+
authy (2.7.5)
134+
httpclient (>= 2.5.3.3)
135135
aws-eventstream (1.0.2)
136-
aws-partitions (1.145.0)
136+
aws-partitions (1.146.0)
137137
aws-sdk-core (3.48.2)
138138
aws-eventstream (~> 1.0, >= 1.0.2)
139139
aws-partitions (~> 1.0)
@@ -142,7 +142,7 @@ GEM
142142
aws-sdk-kms (1.16.0)
143143
aws-sdk-core (~> 3, >= 3.48.2)
144144
aws-sigv4 (~> 1.1)
145-
aws-sdk-s3 (1.34.0)
145+
aws-sdk-s3 (1.35.0)
146146
aws-sdk-core (~> 3, >= 3.48.2)
147147
aws-sdk-kms (~> 1)
148148
aws-sigv4 (~> 1.0)
@@ -177,9 +177,6 @@ GEM
177177
chartkick (3.0.2)
178178
childprocess (0.9.0)
179179
ffi (~> 1.0, >= 1.0.11)
180-
chromedriver-helper (2.1.0)
181-
archive-zip (~> 0.10)
182-
nokogiri (~> 1.8)
183180
cocoon (1.2.12)
184181
codacy-coverage (2.1.0)
185182
simplecov
@@ -219,6 +216,8 @@ GEM
219216
smart_properties
220217
erubi (1.8.0)
221218
execjs (2.7.0)
219+
faraday (0.15.4)
220+
multipart-post (>= 1.2, < 3)
222221
ffi (1.10.0)
223222
fit-commit (3.8.1)
224223
swearjar (~> 1.3)
@@ -232,18 +231,19 @@ GEM
232231
activesupport (>= 4.2)
233232
hashdiff (0.3.8)
234233
html_tokenizer (0.0.7)
234+
httpclient (2.8.3)
235235
i18n (1.6.0)
236236
concurrent-ruby (~> 1.0)
237237
image_processing (1.8.0)
238238
mini_magick (>= 4.9.3, < 5)
239239
ruby-vips (>= 2.0.13, < 3)
240-
io-like (0.3.0)
241240
jaro_winkler (1.5.2)
242241
jbuilder (2.8.0)
243242
activesupport (>= 4.2.0)
244243
multi_json (>= 1.2)
245244
jmespath (1.4.0)
246245
json (2.2.0)
246+
jwt (2.1.0)
247247
launchy (2.4.3)
248248
addressable (~> 2.3)
249249
letter_opener (1.7.0)
@@ -271,7 +271,11 @@ GEM
271271
minitest (5.11.3)
272272
msgpack (1.2.9)
273273
multi_json (1.13.1)
274+
multipart-post (2.0.0)
275+
net_http_ssl_fix (0.0.10)
274276
netaddr (2.0.3)
277+
nexmo (5.6.0)
278+
jwt (~> 2)
275279
nio4r (2.3.1)
276280
nokogiri (1.10.1)
277281
mini_portile2 (~> 2.4.0)
@@ -365,7 +369,9 @@ GEM
365369
simplecov-html (0.10.2)
366370
simpleidn (0.1.1)
367371
unf (~> 0.1.4)
372+
slack-notifier (2.3.2)
368373
smart_properties (1.13.1)
374+
smstools (0.2.0)
369375
spring (2.0.2)
370376
activesupport (>= 4.2)
371377
spring-watcher-listen (2.0.1)
@@ -383,6 +389,10 @@ GEM
383389
thor (0.20.3)
384390
thread_safe (0.3.6)
385391
tilt (2.0.9)
392+
twilio-ruby (5.21.2)
393+
faraday (~> 0.9)
394+
jwt (>= 1.5, <= 2.5)
395+
nokogiri (>= 1.6, < 2.0)
386396
tzinfo (1.2.5)
387397
thread_safe (~> 0.1)
388398
uglifier (4.1.20)
@@ -394,6 +404,11 @@ GEM
394404
uniform_notifier (1.12.1)
395405
warden (1.2.8)
396406
rack (>= 2.0.6)
407+
webdrivers (3.7.0)
408+
net_http_ssl_fix
409+
nokogiri (~> 1.6)
410+
rubyzip (~> 1.0)
411+
selenium-webdriver (~> 3.0)
397412
webmock (3.5.1)
398413
addressable (>= 2.3.6)
399414
crack (>= 0.3.2)
@@ -409,13 +424,14 @@ GEM
409424
activesupport
410425
xpath (3.2.0)
411426
nokogiri (~> 1.8)
412-
zeitwerk (1.4.0)
427+
zeitwerk (1.4.2)
413428

414429
PLATFORMS
415430
ruby
416431

417432
DEPENDENCIES
418433
ancestry
434+
authy
419435
aws-sdk-s3
420436
bcrypt (~> 3.1.7)
421437
bootsnap (>= 1.4.0)
@@ -425,7 +441,6 @@ DEPENDENCIES
425441
byebug
426442
capybara (>= 2.15)
427443
chartkick
428-
chromedriver-helper
429444
cocoon
430445
codacy-coverage
431446
coffee-rails (~> 4.2)
@@ -442,6 +457,7 @@ DEPENDENCIES
442457
letter_opener
443458
listen (>= 3.0.5, < 3.2)
444459
lol_dba
460+
nexmo
445461
nokul-support!
446462
nokul-tenant!
447463
nokul-tenant-omu!
@@ -461,15 +477,18 @@ DEPENDENCIES
461477
rubocop
462478
ruby-progressbar
463479
sassc-rails
464-
selenium-webdriver
465480
sidekiq
466481
simple_form
467482
simplecov
483+
slack-notifier
484+
smstools
468485
spring
469486
spring-watcher-listen (~> 2.0.0)
470487
telephone_number
488+
twilio-ruby (~> 5.21.2)
471489
uglifier (>= 1.3.0)
472490
web-console!
491+
webdrivers (~> 3.0)
473492
webmock
474493
webpacker
475494
wicked_pdf

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
[![Security](https://hakiri.io/projects/cf546402fb7117/stacks/622121c74c17f4/622121c74c17f4.svg?repo_token=xo-yGdqDKXvCf-jypXd-)](https://hakiri.io/projects/cf546402fb7117/stacks/622121c74c17f4/shield)
99
[![Known Vulnerabilities](https://snyk.io/test/github/omu/nokul/badge.svg)](https://snyk.io/test/github/omu/nokul)
1010

11-
1211
[Nokul](https://github.com/omu/nokul) aims to become a complete solution for universities that face many challanges while trying to manage all the complex procedures of a university online.
1312

1413
Dealing with ill-structured processes of a university is hard, especially when they backed with complex legal procedures. Many universities facing similar issues when it comes to automating things, and moving face-to-face operations to online. Nokul aims to remediate these wounds by taking a Turkish university with more than 70 web services, 50K students and 4K employees as a case.

app/controllers/calendar_management/calendars_controller.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,13 @@ def destroy
4343
end
4444

4545
def duplicate
46-
@calendar = Calendar.find(params[:calendar_id])
47-
@duplicate_record = DuplicateService.new(@calendar, 'name').duplicate
48-
49-
redirect_to(:calendars, alert: t('.warning')) && return unless @duplicate_record
46+
calendar = Calendar.find(params[:calendar_id])
5047

51-
AcademicCalendars::DuplicateEventsService.new(@calendar, @duplicate_record)
48+
duplicate_record = AcademicCalendars::DuplicateCalendarService.new(calendar, 'name').duplicate
49+
redirect_to(:calendars, alert: t('.warning')) && return unless duplicate_record
5250

53-
redirect_to([:edit, @duplicate_record], notice: t('.success'))
51+
AcademicCalendars::DuplicateEventsService.new(calendar, duplicate_record)
52+
redirect_to([:edit, duplicate_record], notice: t('.success'))
5453
end
5554

5655
def units

app/errors/concatenation_error.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
class ConcatenationError < StandardError
4+
def message
5+
I18n.t('errors.can_not_be_concatenated')
6+
end
7+
end
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
class EncodingMismatchError < StandardError
4+
def message
5+
I18n.t('errors.encoding_mismatch')
6+
end
7+
end

app/errors/id_number_error.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
class InvalidPhoneNumberError < StandardError
4+
def message
5+
I18n.t('errors.invalid_phone_number')
6+
end
7+
end
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
class UnicodeSupportError < StandardError
4+
def message
5+
I18n.t('errors.unicode_not_supported')
6+
end
7+
end

0 commit comments

Comments
 (0)