From 80fa6ab88eff9a91b3cd07f3f2972aa881de6550 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Sat, 4 Feb 2017 17:34:02 -0600 Subject: [PATCH] Bit of cleanup, renamespaced, testing/code coverage --- .coveralls.yml | 1 + .travis.yml | 26 ++++++++++++++++++++++++++ LICENSE | 2 +- composer.json | 10 ++++------ src/Sort.php | 9 +++++---- tests/SortTest.php | 7 ++++--- 6 files changed, 41 insertions(+), 14 deletions(-) create mode 100644 .coveralls.yml create mode 100644 .travis.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..9160059 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +service_name: travis-ci diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..eeb489e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,26 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - hhvm + +matrix: + allow_failures: + - php: hhvm + +install: + - composer install + +before_script: + - mkdir -p build/logs + - cd tests + +script: + - phpunit --colors --coverage-clover /home/travis/build/joshtronic/php-sort/build/logs/clover.xml . + +after_success: + - php ../vendor/bin/coveralls --config ../.coveralls.yml -v diff --git a/LICENSE b/LICENSE index d70834c..07105dd 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 Josh Sherman +Copyright (c) 2014, 2015, 2016, 2017 Josh Sherman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/composer.json b/composer.json index 525efe5..8de74cf 100644 --- a/composer.json +++ b/composer.json @@ -7,14 +7,12 @@ "php": ">=5.3" } }, + "require-dev": { + "satooshi/php-coveralls": "~1.0" + } "autoload": { "psr-4": { - "Pickles\\": "src" + "joshtronic\\": "src" } }, - "autoload-dev": { - "psr-4": { - "Pickles\\Tests\\": "tests" - } - } } diff --git a/src/Sort.php b/src/Sort.php index 5473208..7c1a0a8 100644 --- a/src/Sort.php +++ b/src/Sort.php @@ -6,13 +6,13 @@ * Licensed under The MIT License * Redistribution of these files must retain the above copyright notice. * - * @copyright Copyright 2007-2014, Josh Sherman + * @author Josh Sherman + * @copyright Copyright 2007-2017, Josh Sherman * @license http://www.opensource.org/licenses/mit-license.html - * @link https://github.com/joshtronic/pickles - * @package Pickles + * @link https://github.com/joshtronic/php-sort */ -namespace Pickles; +namespace joshtronic; /** * Sort Class @@ -66,3 +66,4 @@ class Sort return true; } } + diff --git a/tests/SortTest.php b/tests/SortTest.php index d29543e..0dcb697 100644 --- a/tests/SortTest.php +++ b/tests/SortTest.php @@ -1,10 +1,10 @@ assertEquals($sorted, $shuffled); } } +