Skip to content

Commit

Permalink
Merge pull request #316 from ucfopen/dev/v2-3-0
Browse files Browse the repository at this point in the history
Dev/v2.3.0 to master
  • Loading branch information
bagofarms authored Dec 19, 2017
2 parents 12a64d0 + 8d69f93 commit 6f255c9
Show file tree
Hide file tree
Showing 71 changed files with 4,695 additions and 1,359 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ config/localConfig.php
vendor
reports
assets/js/vendor/

config/log.log
11 changes: 7 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ cache:
- $COMPOSER_CACHE_DIR
- vendor
install:
- 'composer install --no-scripts'
- 'composer install'
php:
- '5.4'
- '5.5'
- '5.6'
script:
- 'find . -type f -iname "*.php" -not -path "./lib/quail/tests/*" -not -path "./vendor/*" | xargs -n1 php -l'
- './vendor/phpunit/phpunit/phpunit --testsuite "UDOIT"'
- '7.0'
- '7.1'
script:
- 'composer lint'
- 'composer sniff-summary'
- 'composer test'
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ If you are outside of UCF, you will need to fork the UDOIT project in order to w

### Dev Branches

* Naming Convention: `dev/v1.2.10` - a new one for every upcoming release version
* 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.)
* Issue branches merge into this branch (never master)
* When this dev branch is ready for release, it is merged into master and deleted

Expand Down Expand Up @@ -81,8 +81,8 @@ This section is mainly for the project managers, but is here for documentation p
release ◄── merge ◄── merge
tags: branches: branches:
v0.0.3 ◄── dev/v0.0.3 ◄── issue/123-fix-broken-links + issue/211
v0.0.2 ◄── dev/v0.0.2 ◄── issue/251-rename-all-the-files + issue/222 + issue/12221
v0.0.1 ◄── dev/v0.0.1 ◄── issue/121-get-logins-working-again
v0.0.3 ◄── dev/v0-0-3 ◄── issue/123-fix-broken-links + issue/211
v0.0.2 ◄── dev/v0-0-2 ◄── issue/251-rename-all-the-files + issue/222 + issue/12221
v0.0.1 ◄── dev/v0-0-1 ◄── issue/121-get-logins-working-again
```
7 changes: 6 additions & 1 deletion HEROKU.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,9 @@ If you need to check that the tables exist, you can connect to Postgres using so
If needed, you can manually run the table creation script: `heroku run composer dbsetup`

## Table Schema
The table schema can be found in [bin/db_create_tables.php](bin/db_create_tables.php)
The table schema can be found in [migrations/](migrations/)

# FAQ

## Why aren't my scans completing?
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**.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
web: vendor/bin/heroku-php-apache2 public/
worker: php lib/worker.php
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ To start the Heroku deployment process, you can click the button below, please n

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

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

```
$ php composer.phar dbsetup
$ php composer.phar db-setup
```

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

```
$ php -S localhost:8000
$ php composer.phar start
```

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

```
$ ./vendor/phpunit/phpunit/phpunit
$ php composer.phar test
```

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:

```
$ php composer.phar docker-test
```

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:
By default, we exclude functional tests that include external APIs. If you would like to run those tests, run this command:

```
$ ./vendor/phpunit/phpunit/phpunit --exclude-group functional
$ ./vendor/phpunit/phpunit/phpunit
```

## Contributors
Expand Down
20 changes: 17 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,19 @@
"Instructure",
"508"
],
"website": "http://online.ucf.edu/teach-online/resources/udoit/",
"website": "https://cdl.ucf.edu/initiatives/udoit/",
"repository": "https://github.com/ucfopen/UDOIT",
"success_url": "/",
"formation": {
"web": {
"quantity": 1,
"size": "free"
},
"worker": {
"quantity": 1,
"size": "free"
}
},
"env": {
"CONSUMER_KEY": {
"description": "LTI consumer key entered when adding UDOIT LTI to Canvas",
Expand Down Expand Up @@ -43,6 +53,10 @@
"CANVAS_NAV_ITEM_NAME" : {
"description": "The text displayed in the canvas navigation menu to launch this app",
"value": "UDOIT"
},
"WORKER_ENABLED": {
"description": "Enable the background worker (requires you turn on the worker dyno).",
"value": "true"
}
},
"addons": [
Expand All @@ -54,6 +68,6 @@
}
],
"scripts": {
"postdeploy": "composer dbsetup"
"postdeploy": "composer db-setup"
}
}
}
51 changes: 0 additions & 51 deletions bin/db_create_tables.php

This file was deleted.

79 changes: 0 additions & 79 deletions bin/move_reports_to_db.php

This file was deleted.

11 changes: 11 additions & 0 deletions bin/run_database_migrations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

require_once(__DIR__.'/../config/settings.php');
$migrations_dir = __DIR__.'/../migrations';

$files = scandir($migrations_dir, SCANDIR_SORT_ASCENDING);
$files = array_diff($files, ['..', '.']);

foreach ($files as $file) {
include($migrations_dir.DIRECTORY_SEPARATOR.$file);
}
50 changes: 45 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,36 @@
"description" : "The Universal Design Online content Inspection Tool, or UDOIT enables faculty to identify accessibility issues in Canvas by Instructure. It will scan a course, generate a report, and provide resources on how to address common accessibility issues.",
"keywords": ["instructure", "canvas", "education", "udoit", "ucf", "accessibility", "edtech", "canvas-lms", "instructure", "section-508"],
"homepage": "https://github.com/ucfopen/UDOIT",
"version": "2.3.0",
"license": "GPL-3.0",
"scripts":{
"dbsetup" : "php bin/db_create_tables.php",
"migrate" : "php bin/move_reports_to_db.php"
"test": "vendor/phpunit/phpunit/phpunit --exclude-group functional --coverage-html ./reports --coverage-text",
"test-no-coverage": "vendor/phpunit/phpunit/phpunit --exclude-group functional",
"test-include-functional": "vendor/phpunit/phpunit/phpunit",
"lint": "./vendor/bin/parallel-lint --exclude vendor --exclude lib/quail .",
"sniff": "./vendor/bin/phpcs --extensions=php .",
"sniff-errors-only": "./vendor/bin/phpcs -n --extensions=php .",
"sniff-summary": "./vendor/bin/phpcs --report=summary --extensions=php .",
"db-setup" : "@migrate",
"migrate" : "php bin/run_database_migrations.php",
"start": "php -S localhost:8000 -t public/",

"docker-test": "docker-compose run --rm php71 php composer.phar test",
"docker-test-multi": [
"@docker-test-no-coverage-php55",
"@docker-test-no-coverage-php56",
"@docker-test-no-coverage-php70",
"@docker-test-no-coverage-php71"
],
"docker-test-no-coverage-php55": "docker-compose run --rm php55 php composer.phar test-no-coverage",
"docker-test-no-coverage-php56": "docker-compose run --rm php56 php composer.phar test-no-coverage",
"docker-test-no-coverage-php70": "docker-compose run --rm php70 php composer.phar test-no-coverage",
"docker-test-no-coverage-php71": "docker-compose run --rm php71 php composer.phar test-no-coverage",
"docker-test-include-functional": "docker-compose run --rm php71 php composer.phar test-include-functional",
"docker-lint": "docker-compose run --rm php71 php composer.phar lint",
"docker-db-setup": "docker-compose run --rm php71 php composer.phar db-setup",
"docker-start": "docker-compose run --rm php71 php -S localhost:8000 -t public/"

},
"repositories" : [
{
Expand All @@ -28,12 +54,12 @@
}
],
"require": {
"php": "^5.4.0 || ^5.5.0 || ^5.6.0",
"php": "^5.4.0 || ^5.5.0 || ^5.6.0 || ^7.0.0 || ^7.1.0",
"ext-pdo": "*",
"ext-gd": "*",
"nategood/httpful": "^0.2.20",
"zaininnari/html-minifier": "^0.4.2",
"mpdf/mpdf": "^6.1.3",
"mpdf/mpdf": "6.1.3",
"league/plates": "^3.1.1",
"monolog/monolog": "^1.21",
"mnsami/composer-custom-directory-installer": "1.1.*",
Expand All @@ -43,7 +69,21 @@
"phpunit/phpunit": "4.8.*",
"phpspec/prophecy": "1.3.1",
"symfony/yaml": "v2.8.9",
"heroku/heroku-buildpack-php": "v117"
"heroku/heroku-buildpack-php": "v121",
"mockery/mockery": "^0.9.9",
"jakub-onderka/php-parallel-lint": "^0.9.2",
"squizlabs/php_codesniffer": "3.0.0",
"escapestudios/symfony2-coding-standard": "3.x-dev#03f63512cac06e6ccf5694c503121aba978fdd55"
},
"autoload": {
"psr-0": {
"": "lib/"
},
"exclude-from-classmap": [
"lib/ims-blti",
"lib/quail",
"tests/"
]
},
"extra": {
"installer-paths": {
Expand Down
Loading

0 comments on commit 6f255c9

Please sign in to comment.