-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from assertchris/make-supported
Made supported
- Loading branch information
Showing
32 changed files
with
682 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/tests export-ignore | ||
/docs export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.travis.yml export-ignore | ||
/.scrutinizer.yml export-ignore | ||
/phpunit.xml export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
inherit: true | ||
|
||
tools: | ||
external_code_coverage: | ||
timeout: 1800 # 30 minute delay to allow for coverage reporting taking ages! | ||
|
||
checks: | ||
php: | ||
code_rating: true | ||
duplication: true | ||
|
||
filter: | ||
paths: [code/*, tests/*] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
language: php | ||
|
||
php: | ||
- 5.3 | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- 7.0 | ||
|
||
sudo: false | ||
|
||
env: | ||
- DB=MYSQL CORE_RELEASE=3.1 | ||
|
||
before_script: | ||
- composer self-update || true | ||
- git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support | ||
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss | ||
- cd ~/builds/ss | ||
- composer install | ||
|
||
script: | ||
- vendor/bin/phpunit --coverage-clover coverage.clover environmentcheck/tests | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- git remote rm origin | ||
- git remote add origin git@github.com:silverstripe-labs/silverstripe-environmentcheck.git | ||
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
matrix: | ||
allow_failures: | ||
- php: 7.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
## [1.1.1] | ||
|
||
Changelog added. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Code of Conduct | ||
|
||
https://docs.silverstripe.org/en/3.1/contributing/code_of_conduct/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,37 @@ | ||
<?php | ||
|
||
class DevCheckController extends Controller { | ||
|
||
/** | ||
* @var array | ||
*/ | ||
public static $allowed_actions = array( | ||
'index' | ||
); | ||
|
||
/** | ||
* @var string Permission code to check for access to this controller. | ||
* Permission code to check for access to this controller. | ||
* | ||
* @var string | ||
*/ | ||
private static $permission = 'ADMIN'; | ||
|
||
/** | ||
* @param SS_HTTPRequest $request | ||
* | ||
* @return EnvironmentChecker | ||
* | ||
* @throws SS_HTTPResponse_Exception | ||
*/ | ||
function index($request) { | ||
$suiteName = $request->param('Suite') ? $request->param('Suite') : 'check'; | ||
$e = new EnvironmentChecker($suiteName, 'Environment status'); | ||
$e->init($this->config()->permission); //check for admin permissions before running this check | ||
return $e; | ||
$suite = 'check'; | ||
|
||
if ($name = $request->param('Suite')) { | ||
$suite = $name; | ||
} | ||
|
||
$checker = new EnvironmentChecker($suite, 'Environment status'); | ||
$checker->init($this->config()->permission); | ||
|
||
return $checker; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
<?php | ||
|
||
class DevHealthController extends Controller { | ||
|
||
/** | ||
* @var array | ||
*/ | ||
public static $allowed_actions = array( | ||
'index' | ||
); | ||
|
||
/** | ||
* @return EnvironmentChecker | ||
* | ||
* @throws SS_HTTPResponse_Exception | ||
*/ | ||
function index() { | ||
$e = new EnvironmentChecker('health', 'Site health'); | ||
$e->init(''); //empty permission check, the "health" check does not require a permission check to run | ||
$e->setErrorCode(404); | ||
return $e; | ||
// health check does not require permission to run | ||
|
||
$checker = new EnvironmentChecker('health', 'Site health'); | ||
$checker->init(''); | ||
$checker->setErrorCode(404); | ||
|
||
return $checker; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.