Skip to content

Commit 6f255c9

Browse files
authored
Merge pull request #316 from ucfopen/dev/v2-3-0
Dev/v2.3.0 to master
2 parents 12a64d0 + 8d69f93 commit 6f255c9

Some content is hidden

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

71 files changed

+4695
-1359
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ config/localConfig.php
1111
vendor
1212
reports
1313
assets/js/vendor/
14+
15+
config/log.log

.travis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ cache:
44
- $COMPOSER_CACHE_DIR
55
- vendor
66
install:
7-
- 'composer install --no-scripts'
7+
- 'composer install'
88
php:
99
- '5.4'
1010
- '5.5'
1111
- '5.6'
12-
script:
13-
- 'find . -type f -iname "*.php" -not -path "./lib/quail/tests/*" -not -path "./vendor/*" | xargs -n1 php -l'
14-
- './vendor/phpunit/phpunit/phpunit --testsuite "UDOIT"'
12+
- '7.0'
13+
- '7.1'
14+
script:
15+
- 'composer lint'
16+
- 'composer sniff-summary'
17+
- 'composer test'

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ If you are outside of UCF, you will need to fork the UDOIT project in order to w
4747

4848
### Dev Branches
4949

50-
* Naming Convention: `dev/v1.2.10` - a new one for every upcoming release version
50+
* Naming Convention: `dev/v1-2-10` - a new one for every upcoming release version. (Note: Hyphens are used instead of periods to preserve compatibility with the Heroku button.)
5151
* Issue branches merge into this branch (never master)
5252
* When this dev branch is ready for release, it is merged into master and deleted
5353

@@ -81,8 +81,8 @@ This section is mainly for the project managers, but is here for documentation p
8181
release ◄── merge ◄── merge
8282
8383
tags: branches: branches:
84-
v0.0.3 ◄── dev/v0.0.3 ◄── issue/123-fix-broken-links + issue/211
85-
v0.0.2 ◄── dev/v0.0.2 ◄── issue/251-rename-all-the-files + issue/222 + issue/12221
86-
v0.0.1 ◄── dev/v0.0.1 ◄── issue/121-get-logins-working-again
84+
v0.0.3 ◄── dev/v0-0-3 ◄── issue/123-fix-broken-links + issue/211
85+
v0.0.2 ◄── dev/v0-0-2 ◄── issue/251-rename-all-the-files + issue/222 + issue/12221
86+
v0.0.1 ◄── dev/v0-0-1 ◄── issue/121-get-logins-working-again
8787
8888
```

HEROKU.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,9 @@ If you need to check that the tables exist, you can connect to Postgres using so
124124
If needed, you can manually run the table creation script: `heroku run composer dbsetup`
125125

126126
## Table Schema
127-
The table schema can be found in [bin/db_create_tables.php](bin/db_create_tables.php)
127+
The table schema can be found in [migrations/](migrations/)
128+
129+
# FAQ
130+
131+
## Why aren't my scans completing?
132+
If you are using the free tier, you may need to manually turn on the worker dyno. You can do this by going to the [Heroku Control Panel](https://dashboard.heroku.com/apps), selecting your instance of UDOIT, clicking **Configure Dynos**, clicking the pencil icon next to the **Worker** dyno, clicking the slider to the **on** position, then clicking **Confirm**.

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
web: vendor/bin/heroku-php-apache2 public/
2+
worker: php lib/worker.php

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ To start the Heroku deployment process, you can click the button below, please n
5151

5252
## System Requirements
5353
* Apache or Nginx webserver
54-
* PHP 5.4, 5.5, or 5.6 (some users have modified the code to work on 5.3)
54+
* PHP 5.4, 5.5, 5.6, 7.0, 7.1 (some users have modified the code to work on 5.3)
5555
* [GD Graphics Library](http://php.net/manual/en/book.image.php)
5656
* MySQL or PostgreSQL
5757

@@ -125,7 +125,7 @@ Edit `config/localConfig.php`:
125125
To create the required tables, run the creation script below. You'll need to complete the db steps above first.
126126

127127
```
128-
$ php composer.phar dbsetup
128+
$ php composer.phar db-setup
129129
```
130130

131131
The table schema can be found in [bin/db_create_tables.php](bin/db_create_tables.php)
@@ -261,7 +261,7 @@ For quick local development, set `$UDOIT_ENV = ENV_DEV;` in `config/localConfig.
261261
From the public directory, run:
262262

263263
```
264-
$ php -S localhost:8000
264+
$ php composer.phar start
265265
```
266266

267267
Then open [http://localhost:8000 in a browser](http://localhost:8000).
@@ -270,13 +270,19 @@ Then open [http://localhost:8000 in a browser](http://localhost:8000).
270270
We use phpunit to run unit tests on UDOIT. To run the tests, type the following command:
271271

272272
```
273-
$ ./vendor/phpunit/phpunit/phpunit
273+
$ php composer.phar test
274+
```
275+
276+
We included a Dockerfile, docker-compose.yml, and tests script to run your tests in a predictable environment. To run tests using docker run this command:
277+
278+
```
279+
$ php composer.phar docker-test
274280
```
275281

276-
By default, phpunit will run all tests, including the functional tests that require access to outside APIs. If you would like to exclude those tests, run this command:
282+
By default, we exclude functional tests that include external APIs. If you would like to run those tests, run this command:
277283

278284
```
279-
$ ./vendor/phpunit/phpunit/phpunit --exclude-group functional
285+
$ ./vendor/phpunit/phpunit/phpunit
280286
```
281287

282288
## Contributors

app.json

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,19 @@
1010
"Instructure",
1111
"508"
1212
],
13-
"website": "http://online.ucf.edu/teach-online/resources/udoit/",
13+
"website": "https://cdl.ucf.edu/initiatives/udoit/",
1414
"repository": "https://github.com/ucfopen/UDOIT",
1515
"success_url": "/",
16+
"formation": {
17+
"web": {
18+
"quantity": 1,
19+
"size": "free"
20+
},
21+
"worker": {
22+
"quantity": 1,
23+
"size": "free"
24+
}
25+
},
1626
"env": {
1727
"CONSUMER_KEY": {
1828
"description": "LTI consumer key entered when adding UDOIT LTI to Canvas",
@@ -43,6 +53,10 @@
4353
"CANVAS_NAV_ITEM_NAME" : {
4454
"description": "The text displayed in the canvas navigation menu to launch this app",
4555
"value": "UDOIT"
56+
},
57+
"WORKER_ENABLED": {
58+
"description": "Enable the background worker (requires you turn on the worker dyno).",
59+
"value": "true"
4660
}
4761
},
4862
"addons": [
@@ -54,6 +68,6 @@
5468
}
5569
],
5670
"scripts": {
57-
"postdeploy": "composer dbsetup"
71+
"postdeploy": "composer db-setup"
5872
}
59-
}
73+
}

bin/db_create_tables.php

Lines changed: 0 additions & 51 deletions
This file was deleted.

bin/move_reports_to_db.php

Lines changed: 0 additions & 79 deletions
This file was deleted.

bin/run_database_migrations.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
require_once(__DIR__.'/../config/settings.php');
4+
$migrations_dir = __DIR__.'/../migrations';
5+
6+
$files = scandir($migrations_dir, SCANDIR_SORT_ASCENDING);
7+
$files = array_diff($files, ['..', '.']);
8+
9+
foreach ($files as $file) {
10+
include($migrations_dir.DIRECTORY_SEPARATOR.$file);
11+
}

0 commit comments

Comments
 (0)