Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2311 commits
Select commit Hold shift + click to select a range
1456597
fix: add saml to gemfile.lock
jakerenzella Sep 17, 2021
f478102
fix: create saml config hash
jakerenzella Sep 17, 2021
0e17743
fix: read saml config from hash correctly
jakerenzella Sep 17, 2021
1d63e9c
fix: remove clock drift from settings object
jakerenzella Sep 17, 2021
a775bc8
enhance: create user from saml response
jakerenzella Sep 17, 2021
312390e
fix: use puts instead of y
jakerenzella Sep 17, 2021
4170226
config: adjust bundler version in api dockerfile and update gems
macite Sep 20, 2021
a231eae
config: remove unnecessary testdb container from api compose
macite Sep 20, 2021
db65d02
test: fix incorrect source for testing image upload
macite Sep 20, 2021
5a81141
config: have populate script drop database
macite Sep 20, 2021
c665cb7
fix: don't specify bundler version
jakerenzella Sep 20, 2021
83150d9
fix: remove postgres from Gemfile.lock
jakerenzella Sep 20, 2021
4daf1cb
new: add saml request method
jakerenzella Sep 20, 2021
a18eb8d
new: add saml envioronment variables
jakerenzella Sep 20, 2021
e5926fa
fix: add idp certificate to saml settings
jakerenzella Sep 20, 2021
caa51d2
quality: upgrade ruby-saml library
jakerenzella Sep 20, 2021
e84ff16
refactor: use logger.info not puts
jakerenzella Sep 20, 2021
0d5341b
fix: reenforce bundler version in dockerfile
jakerenzella Sep 20, 2021
b98fbf2
new: rebuild gemfile.lock with correct version of bundler
jakerenzella Sep 20, 2021
e5ca993
Merge branch '5.0.x' into config/new-rails
macite Sep 20, 2021
9fded48
config: use latest bundler with rails 6 Dockerfile
macite Sep 20, 2021
df54993
config: update docker cmd to migrate and update bind
macite Sep 20, 2021
967c8f3
new: add saml metadata load from xml file
jakerenzella Sep 20, 2021
50951f2
refactor: revert back to field saml setup
jakerenzella Sep 21, 2021
b5ba2d4
chore: update bundle
macite Sep 21, 2021
7cdb854
fix: fix typos in authentication helper doc
jakerenzella Sep 22, 2021
13f3cde
refactor: add saml_auth? helper method
jakerenzella Sep 22, 2021
d2c9a77
enhance: use saml xml metadata for settings if present
jakerenzella Sep 22, 2021
d1bb3f5
refactor: add saml env variable reading and verification
jakerenzella Sep 22, 2021
aee8d6b
fix: use password auth if not aaf or saml
jakerenzella Sep 22, 2021
f0d9aa0
enhance: add saml signout auth if saml auth used
jakerenzella Sep 22, 2021
f545386
refactor: return actual config auth method in /auth/method
jakerenzella Sep 22, 2021
7b7aafb
enhance: add saml option to /auth/method
jakerenzella Sep 22, 2021
c981928
enhance: add token-based /auth endpoint for saml or aaf
jakerenzella Sep 22, 2021
05aba35
refactor: decompose new user method
jakerenzella Sep 22, 2021
4034dd2
fix: add missing end from if statement in auth_helpers
jakerenzella Sep 22, 2021
e87fcc1
fix: fix logger syntax error
jakerenzella Sep 22, 2021
5bfef6c
chore: update migrate to bigint
macite Sep 22, 2021
44eaefe
config: switch from thin to puma
macite Sep 22, 2021
28caaab
fix: add missing end to authentication_api
jakerenzella Sep 22, 2021
12237a8
fix: remove create_and_post_user method
jakerenzella Sep 22, 2021
81287ea
fix: correct migrate index creation with bigint switch
macite Sep 22, 2021
6d23243
fix: remove duplicate index on learning outcomes
macite Sep 22, 2021
1b4a478
config: bind development server to all ips
macite Sep 22, 2021
e8f1bf9
config: add puma config
macite Sep 23, 2021
09c402f
fix: correct remove index migration
macite Sep 23, 2021
49fe373
config: update schema with latest db
macite Sep 23, 2021
203227a
chore: update the assembly cache for overseer test code
macite Sep 23, 2021
b40bdd9
feat: add ability to export auth tokens for migration from 5 to 6
macite Sep 23, 2021
26714d8
refactor: remove unused saml metadata file
jakerenzella Sep 23, 2021
20111f0
refactor: reset institution details in yml file
jakerenzella Sep 23, 2021
aae5bd1
refactor: don't use save! in authentication api
jakerenzella Sep 23, 2021
b37f6bb
refactor: use bundler 1.17.3 instead of 2.0.0
jakerenzella Sep 23, 2021
477a2dc
refactor: switch to bundler 1.17.3
jakerenzella Sep 23, 2021
de5887c
test: add github action to test API in push and pr
macite Sep 23, 2021
9165d5d
docs: add saml auth option to comment
jakerenzella Sep 24, 2021
1a5fcb8
fix: consolidate aaf/saml response format
jakerenzella Sep 24, 2021
c582218
Merge remote-tracking branch 'upstream/config/new-rails' into 5.1.x-saml
jakerenzella Sep 24, 2021
348b9c2
fix: remove old bundler version specified
jakerenzella Sep 24, 2021
9bf8298
refactor: adhere to robocop for Gemfile
jakerenzella Sep 24, 2021
f7faa13
refactor: regenerate Gemfile.lock for ruby-saml on rails 6
jakerenzella Sep 24, 2021
c000ede
test: fix auth tokens for webcal tests
macite Sep 24, 2021
a3742a5
feat: Add support for files from Elements of Computer Systems (#333)
Cecilia-Nguyen Sep 27, 2021
0f26694
config: use dev db for testing in standard api compose
macite Sep 27, 2021
779b766
quality: add extra logging and clean up auth
macite Sep 27, 2021
aa7c7c5
test: correct issue with status test - all status comments are read
macite Sep 27, 2021
794b6e4
fix: correct can destroy behaviour for rails 6
macite Sep 27, 2021
b2e6bdc
config: update rails 6 config for development environment
macite Sep 27, 2021
de3df26
fix: add required config/storage.yml file
jakerenzella Sep 27, 2021
5fec818
refactor: use && and ! instead of keywords
jakerenzella Sep 27, 2021
c789b64
refactor: stylistic code improvements
jakerenzella Sep 27, 2021
d383395
enhance: use SR for unused aaf and saml pwd
jakerenzella Sep 27, 2021
3f08645
refactor: improve code style
jakerenzella Sep 27, 2021
58a9fc2
fix: pass required username to sign_in page
jakerenzella Sep 27, 2021
1013d50
chore: check more header auth formatsd
jakerenzella Sep 27, 2021
912df40
quality: remove unused code in group.rb
macite Sep 27, 2021
0e4fc18
refactor: remove debugging statements
jakerenzella Sep 27, 2021
29d6f6e
refactor: prepare auth_api for prod
jakerenzella Sep 27, 2021
20f779b
fix: upgrade callbacks and use of _changed? and _was to new rails 6 b…
macite Sep 28, 2021
5714875
test: ensure unit date changes propogate to task date changes
macite Sep 28, 2021
958a263
feat: move task dates when unit start date changes
macite Sep 28, 2021
591780c
fix: correct calculation of week number for units outside teaching pe…
macite Sep 28, 2021
318c9bc
fix: improve reliability of get awaiting feedback test
macite Sep 28, 2021
e63d249
docs: document group toggle enrolment test
macite Sep 28, 2021
9513364
UI: Incorporate ability to submit Elements of Computer System file types
macite Sep 29, 2021
c411c72
Merge pull request #325 from doubtfire-lms/config/new-rails
macite Sep 29, 2021
a2a1aa1
Merge branch '6.0.x' into 5.1.x-saml
macite Sep 30, 2021
c4c34de
fix: remove unnecessary access token from action
macite Sep 30, 2021
7c17f0c
test: ensure webmock reset on test deakin unit sync
macite Oct 7, 2021
5c9c429
Merge branch '6.0.x' of https://github.com/doubtfire-lms/doubtfire-ap…
macite Oct 7, 2021
fc54786
Merge pull request #340 from macite/config/new-rails
macite Oct 7, 2021
bea3e95
Merge branch '6.0.x' into jakerenzella-5.1.x-saml
macite Oct 7, 2021
f8be6c4
Merge pull request #339 from jakerenzella/5.1.x-saml
macite Oct 8, 2021
be23a29
chore: update 5.0.0 change log
macite Oct 13, 2021
d4c2286
ui: fix portfolio assessment in ui
macite Oct 15, 2021
6fbd880
Merge pull request #342 from macite/development
macite Oct 15, 2021
570762b
chore: 5.0.1 release notes
macite Oct 27, 2021
ff424ce
Merge remote-tracking branch 'origin/5.0.x' into 6.0.x
macite Nov 9, 2021
1675dbf
fix: add listen gem for development environment
macite Nov 9, 2021
49c907c
fix: lock listen gem version
macite Nov 9, 2021
e853589
Merge pull request #343 from macite/main
macite Nov 11, 2021
36461ec
Merge branch '6.0.x' into development
macite Nov 11, 2021
6597744
Merge pull request #344 from macite/development
macite Nov 11, 2021
91b091f
chore(deps): bump puma from 5.5.0 to 5.5.1
dependabot[bot] Nov 11, 2021
e0d39b9
chore: add a default admin test user
macite Nov 18, 2021
5168fe2
docs: update readme with new getting started details
macite Nov 18, 2021
37407ca
chore: update version of dotnet sdk in overseer sample
macite Nov 19, 2021
37de3bc
fix: update bunny pub sub to fix subscriber launch
macite Nov 19, 2021
f972ce8
chore: update version of dotnet sdk in overseer sample
macite Nov 19, 2021
d722174
Merge branch '6.0.x' of https://github.com/macite/doubtfire-api into …
macite Nov 19, 2021
f594bdf
fix: update bunny pub sub version
macite Nov 19, 2021
56beadb
chore: release notes for 5.0.2
macite Nov 19, 2021
b789239
fix: correct error message on submission process fail
macite Nov 19, 2021
31041c6
feat: log messages to stdout on all environments
macite Nov 19, 2021
89ae68b
fix: ensure populator works with init
macite Nov 19, 2021
a3ae105
fix: update bunny pub sub to fix logging and launch issues
macite Nov 19, 2021
e0fb399
chore: add release notes for 5.0.3
macite Nov 19, 2021
54c8d6b
feat: adjust dockerfile to work without code volume
macite Nov 22, 2021
b846dd1
chore: update overseer test files
macite Nov 23, 2021
e7accd9
fix: remote username mangling
macite Nov 28, 2021
789fed1
fix: remote username mangling
macite Nov 28, 2021
e932725
feat: add script to sync enrolments
macite Dec 2, 2021
bc65722
feat: add script to sync enrolments
macite Dec 2, 2021
f3437bd
fix: remove set environment from scripts
macite Dec 3, 2021
cde09b6
chore: update change log
macite Dec 6, 2021
233f395
feat: add mail configuration options
macite Dec 6, 2021
701f58c
feat: make portfolio evidence relative
macite Dec 9, 2021
f216834
fix: correct convert submission to pdf to use new folder by default
macite Jul 22, 2021
90f5073
test: fix incorrect source for testing image upload
macite Sep 20, 2021
6ade5f1
fix: esure changes to portfolio evidence apply to task
macite Dec 9, 2021
8df0269
Merge branch '4.0.x' into 5.0.x
macite Dec 9, 2021
0b70eca
Merge branch '5.0.x' into 6.0.x
macite Dec 9, 2021
d4e480b
chore: 5.0.7 change log
macite Dec 9, 2021
97cbda5
chore: update container name in compose
macite Dec 17, 2021
855e1f2
chore: remove overseer test files contained within archive zip
macite Dec 17, 2021
6ae0220
fix: correct use of doubtfire logger
macite Dec 17, 2021
55a86e3
fix: rename not_queued enum constant
macite Dec 17, 2021
348b4b3
fix: update migration for ralls 6
macite Dec 17, 2021
faf8255
fix: ensure init includes aadmin
macite Dec 17, 2021
f9834b6
test: update auth test
macite Dec 17, 2021
7e75c15
fix: switch latex config to use recipe
macite Dec 17, 2021
989e8c2
fix: switch scopes to methods
macite Dec 17, 2021
51c7e00
test: update compose to simplify testing in isolation
macite Dec 17, 2021
68a1c0d
Merge branch '6.0.x' into development
macite Dec 19, 2021
06ecd9f
Merge pull request #345 from doubtfire-lms/dependabot/bundler/puma-5.5.1
macite Dec 19, 2021
652d08a
ci: adjust dockerfiles for dev and deployment
macite Dec 20, 2021
bb5cb29
ci: trigger build and push of images on push tag
macite Dec 20, 2021
a3772a7
ci: add action to build containers on branch push
macite Dec 20, 2021
6e52e92
ci: trigger deployment on branch push
macite Dec 20, 2021
840e090
ci: fix github action to trigger on branch push
macite Dec 20, 2021
4a52fcf
ci: fix environment and add build on *x branches
macite Dec 20, 2021
3d8fb90
ci: update db name
macite Dec 20, 2021
0d8f3d1
fix: correct task definition entity
macite Dec 23, 2021
23190fe
featL add ability to trigger overseer for a task
macite Dec 23, 2021
b39cae1
ci: limit ci action to main repo
macite Dec 23, 2021
0dc1e84
Merge branch '5.0.x' into 6.0.x
macite Jan 6, 2022
29a2700
ci: incorporate cron and mail settings
macite Jan 6, 2022
59651e7
test: correct random test fail caused by group test missing start date
macite Jan 7, 2022
e5e1092
fix: ensure rake db:init is available for new deployments
macite Jan 7, 2022
0de2c69
test: fix use of first user with changes to init process
macite Jan 7, 2022
fca64c6
fix: ensure migration tests for foreign keys
macite Jan 7, 2022
a70fb57
fix: correct issue in foreign key migration
macite Jan 7, 2022
bbeef86
fix: remove down migration data update for auth tokens.
macite Jan 7, 2022
58c264e
fix: remove task comment foreign key in id migration
macite Jan 7, 2022
90d2608
fix: correct logging of aaf login and add to saml
macite Jan 7, 2022
b5fa5f2
chore: update config for ruby 3.1
macite Jan 9, 2022
ebc5832
fix: update model object to work with ruby 3.1
macite Jan 9, 2022
7218be4
test: fix all tests to work with ruby 3.1
macite Jan 9, 2022
964832d
Merge pull request #356 from doubtfire-lms/config/ruby-3
macite Jan 9, 2022
f628ff4
fix: remove all use of active model serializers
macite Jan 10, 2022
15e3f96
fix: support zeitwerk mode loader
macite Jan 11, 2022
c99ec09
feat: update to rails 7 and rails encrypted attributes
macite Jan 11, 2022
1f0d7bf
chore: update model and tests to support rails 7
macite Jan 11, 2022
c05b624
fix: ensure all routes use presenters
macite Jan 11, 2022
b928f78
feat: add sprockets to development to host swagger
macite Jan 12, 2022
7d8571a
feat: report errors when attempting to add student as tutor
macite Jan 12, 2022
a270d25
fix: remove unused devise routes
macite Jan 12, 2022
76f1156
test: fix group test to use factory unit
macite Jan 12, 2022
9b624e5
fix: ensure unit roles always include the unit id
macite Jan 12, 2022
b21f196
test: update test for unit roles to include unit id
macite Jan 12, 2022
c445a5e
test: fix unit role entity to ignore unit id when in a unit
macite Jan 13, 2022
77f76b2
feat: enhance rails logging
macite Jan 13, 2022
0951aa9
perf: cache user by username for current user
macite Jan 13, 2022
e61f5f6
perf: reduce database calls for loading units taught
macite Jan 13, 2022
2a77ab2
Merge pull request #357 from macite/config/rails-7
macite Jan 13, 2022
799f5cc
fix: correct issues in schema and migration of discussion comments
macite Jan 14, 2022
d6507cf
fix: remove references to discussion comment table
macite Jan 15, 2022
19d7cc9
fix: correct key env settings in development
macite Jan 15, 2022
bbf7adb
fix: check userRole when creating SAML user
jakerenzella Jan 17, 2022
879624c
fix: add saml signout URL
jakerenzella Jan 17, 2022
7f09f50
fix: add missing overseer entities
macite Jan 17, 2022
3b3b717
chore: update gemfile - fix json-jwt issue
macite Jan 17, 2022
fce7fbd
fix: check userRole when creating SAML user
jakerenzella Jan 17, 2022
5562e3b
Merge branch '6.1.x' into 6.0.x
jakerenzella Jan 18, 2022
78f0973
refactor: remove unecessary assignment
jakerenzella Jan 19, 2022
9632b88
fix: use new Grape Entity model for overseer
jakerenzella Jan 19, 2022
d9c0f52
refactor: improve code clarity
jakerenzella Jan 19, 2022
91f8430
fix: ensure overseer comment entity has current user
macite Jan 27, 2022
621dbbf
Merge branch '6.0.x' of https://github.com/doubtfire-lms/doubtfire-ap…
macite Jan 27, 2022
b79e4ce
feat: enhance error reporting from overseer
macite Jan 27, 2022
ed8b3af
feat: allow configuration to turn off mail sending
macite Feb 1, 2022
f073556
ci: ensure tests include database encryption keys
macite Feb 1, 2022
16a0f84
ci: clearly mark production container images
macite Feb 1, 2022
b5ff9c1
docs: update details on contributing
macite Feb 1, 2022
5323772
chore(release): 6.0.0
macite Feb 2, 2022
ad1480a
Merge branch 'main' of https://github.com/doubtfire-lms/doubtfire-api
macite Feb 2, 2022
579cbee
ci: fix missing tag from production build for app server
macite Feb 2, 2022
5ef3a95
Merge branch '6.0.x' into development
macite Feb 2, 2022
5f0eb3f
Perf/fix project and unit load times (#359)
macite Feb 17, 2022
e45fdcb
chore(release): 6.0.1
macite Feb 17, 2022
0dcab00
fix: ensure students can withdraw from tutorials
macite Feb 23, 2022
06323b3
chore(release): 6.0.2
macite Feb 23, 2022
563079f
chore(release): 6.0.2
macite Feb 23, 2022
2dfabcd
Merge branch '6.0.x' into development
macite Feb 25, 2022
23714d0
fix: ensure enrolments sync script is executable
macite Feb 25, 2022
9eef58b
chore(release): 6.0.3
macite Feb 25, 2022
e7cdc50
chore: update schema date details
macite Feb 28, 2022
371688c
fix: revert to using serialize with task comments
macite Feb 28, 2022
5aa6381
chore(release): 6.0.4
macite Feb 28, 2022
919fd60
fix: align param and field names in stream put
macite Mar 3, 2022
9d79240
chore(release): 6.0.5
macite Mar 3, 2022
0f38961
fix: ensure content disposition is accessible on file download
macite Mar 3, 2022
35263d4
chore(release): 6.0.6
macite Mar 3, 2022
62d49d7
test: fix csv test filename
macite Mar 3, 2022
ae938c9
test: fix additional csv filename tests
macite Mar 3, 2022
20d6ec0
fix: ensure cron tasks are reported via email
macite Mar 10, 2022
0f0185d
fix: ensure sample compose contains institution settings
macite Mar 10, 2022
56a9b3f
perf: improve task stats performance
macite Mar 10, 2022
383a904
fix: ensure TaskStatus.count uses sql where needed
macite Mar 11, 2022
eb5ef83
perf: ensure that project updates happoen in batches
macite Mar 11, 2022
183b316
fix:fix the manual delete /tmp/pids/servers.pid file after restart co…
RayGuo-ergou Mar 13, 2022
37c8ffb
refactor: use only rm -f for delete server.pid
RayGuo-ergou Mar 14, 2022
1b0bf19
refactor: remove bundler because it already in the CMD
RayGuo-ergou Mar 14, 2022
619976b
add the remove server.pid command into dockerfile CMD
RayGuo-ergou Mar 14, 2022
c44915a
Merge pull request #365 from RayGuo-ergou/entrypoint-delete-pid
jakerenzella Mar 14, 2022
b1a6035
Fix: stop empty nicknames from rendering in student_name (#364)
lindenhutchinson Mar 16, 2022
faffb29
quality: introduce default task stats
macite Mar 16, 2022
976ec0a
fix: ensure there is access to task status count from database
macite Mar 16, 2022
cf245a6
quality: improve readability of task stats changes
macite Mar 16, 2022
9ba5a50
fix: post project uses default task stats
macite Mar 16, 2022
5e56eca
Merge pull request #362 from macite/perf/fix-project-and-unit-load-times
macite Mar 17, 2022
13b4b2b
chore(release): 6.0.7
macite Mar 17, 2022
fc75222
fix: ensure task stats uses float division
macite Mar 17, 2022
98c82a8
chore(release): 6.0.7
macite Mar 17, 2022
e2a9e24
refactor: add /auth/sam2 endpoint
sneaky-patriki Mar 20, 2022
0e45f39
refactor: pull out endpoint into seperate function
sneaky-patriki Mar 27, 2022
2267f70
refactor: include library imports in new file
sneaky-patriki Mar 27, 2022
34dd52a
refactor: Move authsaml helper to its own file inside helpers/
sneaky-patriki Apr 2, 2022
0d6f7c2
refactor: Create /helpers/auth directory and move auth_helpers_saml.r…
sneaky-patriki Apr 10, 2022
8aa1203
refactor: change authsamlhelper class to module
sneaky-patriki Apr 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .ci-setup/pdfGen/crontab
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SHELL=/bin/bash
BASH_ENV=/container.env
PATH=/tmp/texlive/bin/x86_64-linux:/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bundle/bin

10,15,20,25,30,35,40,45,50,55 * * * * /doubtfire/lib/shell/generate_pdfs.sh
0 5 * * 1,3,5 /doubtfire/lib/shell/check_plagiarism.sh
0 7 * * 1 /doubtfire/lib/shell/send_weekly_emails.sh
0 1 * * * /doubtfire/lib/shell/sync_enrolments.sh
26 changes: 26 additions & 0 deletions .ci-setup/pdfGen/entry_point.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

# Start the run once job.
echo "Docker container has been started"

# Save the docker user environment
declare -p | grep -Ev 'BASHOPTS|BASH_VERSINFO|EUID|PPID|SHELLOPTS|UID' > /container.env
cat /container.env

# Ensure log is present
touch /var/log/cron.log

sleep 1

# Setup crontab - clear then load with file
crontab -r
crontab /etc/cron.d/container_cronjob

echo "RESET CRONTAB" >> /var/log/cron.log

# Ensure mail settings are accessible only by root
chown root:root /etc/msmtprc
chmod 600 /etc/msmtprc

# Run cron and follow log
chmod 644 /etc/cron.d/container_cronjob && cron -f && tail -f /var/log/cron.log > /proc/1/fd/1 2>/proc/1/fd/2
11 changes: 11 additions & 0 deletions .ci-setup/pdfGen/msmtprc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
account default
host (your_mail_server)
port 587
tls on
tls_starttls on
auth on
user (your_mail_username)
password (your_mail_password)
auto_from off
from (your_mail_address)
logfile /doubtfire/log/msmtp
28 changes: 28 additions & 0 deletions .ci-setup/texlive-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+1] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'`
APP_PATH=`cd "$APP_PATH"; pwd`

# See if there is a cached version of TL available
export PATH=/tmp/texlive/bin/x86_64-linux:$PATH
if ! command -v lualatex > /dev/null; then
# Obtain TeX Live
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -xzf install-tl-unx.tar.gz
cd install-tl-20*

echo "Installing using profile:"
cat ${APP_PATH}/texlive.profile

echo

# Install a full texlive system
./install-tl --profile="${APP_PATH}/texlive.profile"

tlmgr install fontawesome luatextra luacode minted fvextra catchfile xstring framed lastpage

cd ..

# Keep no backups (not required, simply makes cache bigger)
tlmgr option -- autobackup 0
fi
11 changes: 11 additions & 0 deletions .ci-setup/texlive.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
selected_scheme scheme-small
TEXDIR /tmp/texlive
TEXMFCONFIG ~/.texlive/texmf-config
TEXMFHOME ~/texmf
TEXMFLOCAL /tmp/texlive/texmf-local
TEXMFSYSCONFIG /tmp/texlive/texmf-config
TEXMFSYSVAR /tmp/texlive/texmf-var
TEXMFVAR ~/.texlive/texmf-var
option_doc 0
option_src 0
instopt_write18_restricted 1
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Dockerfile
.git
build
dist
node_modules
vendor
student-work
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
tab_width = 2
trim_trailing_whitespace = true
1 change: 0 additions & 1 deletion .git-hooks
Submodule .git-hooks deleted from 42d9af
86 changes: 86 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: create-doubtfire-deployment
on:
push:
tags:
- 'v*'
branches:
- '*.x'
- 'development'
- 'main'
deployment:
workflow_dispatch:
jobs:
docker-api-server:
if: github.repository_owner == 'doubtfire-lms'
environment: doubtfire
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup meta for api server
id: docker_meta
uses: docker/metadata-action@v3
with:
images: lmsdoubtfire/apiServer
tags: |
type=ref,event=tag
type=ref,event=branch
type=semver,pattern=prod-{{version}}
type=semver,pattern=prod-{{major}}.{{minor}}
type=semver,pattern=prod-{{major}}
- name: Build and push api server
id: docker_build
uses: docker/build-push-action@v2
with:
file: deployApi.Dockerfile
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
docker-app-server:
if: github.repository_owner == 'doubtfire-lms'
environment: doubtfire
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup meta for app server
id: docker_meta
uses: docker/metadata-action@v3
with:
images: lmsdoubtfire/appServer
tags: |
type=ref,event=tag
type=ref,event=branch
type=semver,pattern=prod-{{version}}
type=semver,pattern=prod-{{major}}.{{minor}}
type=semver,pattern=prod-{{major}}
- name: Build and push app server
id: docker_build
uses: docker/build-push-action@v2
with:
file: deployAppSvr.Dockerfile
context: .
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: ${{ github.event_name != 'pull_request' }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
30 changes: 30 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: test-doubtfire-api
on: [push,pull_request]
jobs:
run-unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build base Doubtfire image
uses: docker/build-push-action@v2
with:
context: .
push: false
load: true
tags: doubtfire-core:local
- name: Create database and run rake tests
uses: addnab/docker-run-action@v3
with:
image: doubtfire-core:local
options: -v ${{ github.workspace }}:/doubtfire -e RAILS_ENV=test -e DF_STUDENT_WORK_DIR=/student-work -e DF_INSTITUTION_HOST=http://localhost:3000 -e DF_INSTITUTION_PRODUCT_NAME=OnTrack -e DF_SECRET_KEY_BASE='test-secret-key-test-secret-key!' -e DF_SECRET_KEY_ATTR='test-secret-key-test-secret-key!' -e DF_SECRET_KEY_DEVISE='test-secret-key-test-secret-key!' -e DF_TEST_DB_ADAPTER=mysql2 -e DF_TEST_DB_HOST=localhost -e DF_TEST_DB_DATABASE=doubtfire-test -e DF_TEST_DB_USERNAME=dfire -e DF_TEST_DB_PASSWORD=pwd -e OVERSEER_ENABLED=0 -e DF_ENCRYPTION_PRIMARY_KEY=AMLOMYA5GV8B4fTK3VKMhVGn8WdvUW8g -e DF_ENCRYPTION_DETERMINISTIC_KEY=anlmuJ6cB3bN3biXRbYvmPsC5ALPFqGG -e DF_ENCRYPTION_KEY_DERIVATION_SALT=hzPR8D4qpOnAg7VeAhkhWw6JmmzKJB10
run: |
echo "Install mariadb"
apt -y install mariadb-server mariadb-client
echo "Run mariadb"
service mysql start
mysql -uroot -e "CREATE USER 'dfire'@'localhost' IDENTIFIED BY 'pwd'; GRANT ALL PRIVILEGES ON *.* TO 'dfire'@'localhost'; FLUSH PRIVILEGES;"
echo "Setting up database"
bundle exec rake db:populate
echo "Running rake tests"
TERM=xterm bundle exec rails test
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ spec/reports
config/initializers/pdfkit.rb
config/ldap.yml
student_work/
student-work/

.DS_Store
.env
.env*

# RubyMine files
.idea/
.byebug_history
coverage/
.vscode
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

28 changes: 1 addition & 27 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,9 @@ AllCops:
- db/**/*
- vendor/**/*
- spec/**/*

Rails:
Enabled: true

Rails/HttpPositionalArguments:
Exclude:
- test/**/*

Rails/DynamicFindBy:
Whitelist:
- find_by_auth_token
- find_by_user

Metrics/LineLength:
Layout/LineLength:
Max: 120
# To make it possible to copy or click on URIs in the code, we allow lines
# containing a URI to be longer than Max.
Expand All @@ -25,18 +14,3 @@ Metrics/LineLength:
URISchemes:
- http
- https

Metrics/MethodLength:
Exclude:
- db/migrate/**/*

Style/BlockComments:
Exclude:
- spec/spec_helper.rb

Style/Documentation:
Description: 'Document classes and non-namespace modules.'
Enabled: false

Style/SpaceInsideBrackets:
Enabled: false
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.1
2.6.7
Loading