From 31a72660842cf27b0a27e504c9c65ea27f9437fe Mon Sep 17 00:00:00 2001 From: Erin Millard Date: Mon, 4 Mar 2013 20:40:05 +1000 Subject: [PATCH] Repository maintenance. --- .gitattributes | 5 +- .gitignore | 6 +- .travis.env | 1 + .travis.install | 26 ++++ .travis.key | 6 + .travis.yml | 29 ++-- CHANGELOG.md | 6 + CONTRIBUTING.md | 29 ++++ LICENSE | 2 +- README.md | 26 ++-- composer.json | 2 +- composer.lock | 164 ++++++++++++++++++---- src/Ezzatron/LCS/LCSSolver.php | 2 +- test/suite/Ezzatron/LCS/LCSSolverTest.php | 2 +- 14 files changed, 240 insertions(+), 66 deletions(-) create mode 100644 .travis.env create mode 100755 .travis.install create mode 100644 .travis.key create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md diff --git a/.gitattributes b/.gitattributes index 9b72a62..c7ada74 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,7 @@ +# archer start .gitattributes export-ignore .gitignore export-ignore -.travis.yml export-ignore +.travis.* export-ignore +.archer.* export-ignore test export-ignore +# archer end diff --git a/.gitignore b/.gitignore index a820ec9..672b208 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ -test/report -vendor +# archer start +/artifacts/ +/vendor/ +# archer end diff --git a/.travis.env b/.travis.env new file mode 100644 index 0000000..2ca4449 --- /dev/null +++ b/.travis.env @@ -0,0 +1 @@ +3G+wU0c9r9fKxnWsHSpwKNAJMUVBAyqG3pkflpHJ8grfe/qJb5Od0HyW/IJHRcm8FoUtmz46AK3u/Xup34cah+6+8H7IR4TrW8/5YNLv7k8mAAN3LqQgP8K0kcdUgr9DibWRbhNLAHHZxMD0FXELWfxotj92XJiT5aNV+JjyQug= \ No newline at end of file diff --git a/.travis.install b/.travis.install new file mode 100755 index 0000000..60d38bd --- /dev/null +++ b/.travis.install @@ -0,0 +1,26 @@ +#!/usr/bin/env php + array( + 'github-oauth' => array('github.com' => $token) + ) + ); + + $file = '~/.composer/config.json'; + $dir = dirname($file); + if (!is_dir($dir)) { + mkdir($dir, 0755, true); + } + file_put_contents($file, json_encode($config)); + + $composerFlags = '--prefer-dist'; +} else { + $composerFlags = '--prefer-source'; +} + +passthru('composer install --dev --no-progress --no-interaction --ansi ' . $composerFlags); diff --git a/.travis.key b/.travis.key new file mode 100644 index 0000000..dc02f74 --- /dev/null +++ b/.travis.key @@ -0,0 +1,6 @@ +-----BEGIN RSA PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDiNuj+afvKEkTjTZN28lCo8rrG +gjN8X5qd34gnZPpsHU6QETQv58tYl3754P3HZb9eOzlvS1WVIukLVLcDQ22H7XBg +AfnidBMYWw2R0XPxBgdmCmsUbN9soALPOHpu7Zw9Mj1I9iMAAZ34iJKhc7TFTYlZ +Zoqr79OJ4lR8CfohxQIDAQAB +-----END RSA PUBLIC KEY----- diff --git a/.travis.yml b/.travis.yml index 80178ff..378cd82 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,29 @@ +# +# This is the default Travis CI configuration. +# +# It uses a GitHub OAuth token when fetching composer dependencies +# to avoid IP-based API throttling. +# +# It also allows publication of artifacts via an additional build. +# language: php php: - - 5.3.3 - 5.3 - 5.4 - 5.5 -matrix: - # Use PHP 5.4 for coverage reporting. - include: - - php: 5.4 - env: - - secure: "kGkszrQG6V6BAfwZmGAHRfaOHbn2o0hXuBfp8TutXtdc3dNFCy5ZVptJrTR3\nSQF4baDhRQDIBVWrIpbLiaLIVH/XxrstriGv5hfD7Mumun98/X2qXUOl0ku4\n69usbE9mfZ+z0yGsRti6Owt6Elz5qU+OsVpWgP5ZblT1K6OUACA=" +env: + global: + - ARCHER_PUBLISH_VERSION=5.4 + - secure: "3G+wU0c9r9fKxnWsHSpwKNAJMUVBAyqG3pkflpHJ8grfe/qJb5Od0HyW/IJHRcm8FoUtmz46AK3u/Xup34cah+6+8H7IR4TrW8/5YNLv7k8mAAN3LqQgP8K0kcdUgr9DibWRbhNLAHHZxMD0FXELWfxotj92XJiT5aNV+JjyQug=" + +install: + - ./.travis.install +script: + - ./vendor/bin/archer travis:build +matrix: # PHP 5.5 is still in alpha, so ignore build failures. allow_failures: - php: 5.5 - -install: composer install --dev -script: ./vendor/bin/travis-build -after_success: ./vendor/bin/travis-success diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..fb733d8 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,6 @@ +# PHP-LCS changelog + +### 1.0.3 + +* [Archer](https://github.com/IcecaveStudios/archer) integration +* Implemented changelog diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..dc35e05 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,29 @@ +# Contributing + +**PHP-LCS** is open source software; contributions from the community are +encouraged. Please take a moment to read these guidelines before submitting +changes. + +### Code style + +All PHP code must adhere to the +[PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) +standards. + +### Branching and pull requests + +As a guideline, please follow this process: + + 1. [Fork the repository](https://help.github.com/articles/fork-a-repo). + 2. Create a topic branch for the change: + * New features should branch from **develop**. + * Bug fixes to existing versions should branch from **master**. + * Please ensure the branch is clearly labelled as a feature or fix. + 3. Make the relevant changes. + 4. [Squash](http://git-scm.com/book/en/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) + commits if necessary. + 4. Submit a pull request to the **develop** branch. + +Please note this is a general guideline only. For more information on the +branching structure please see the +[git-flow cheatsheet](http://danielkummer.github.com/git-flow-cheatsheet/). diff --git a/LICENSE b/LICENSE index 4fa9f49..f23d006 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright © 2012 Erin Millard +Copyright © 2013 Erin Millard 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/README.md b/README.md index 0518060..dbd3baa 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,13 @@ *An implementation of the 'longest common subsequence' algorithm for PHP.* -## Installation - -### With [Composer](http://getcomposer.org/) - -* Add 'ezzatron/php-lcs' to your project's composer.json dependencies -* Run `php composer.phar install` +[![Build Status]](http://travis-ci.org/ezzatron/php-lcs) +[![Test Coverage]](http://ezzatron.com/php-lcs/artifacts/tests/coverage/) -### Bare installation +## Installation -* Clone from GitHub: `git clone git://github.com/ezzatron/php-lcs.git` -* Use a [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) compatible autoloader (namespace 'Ezzatron\LCS' in the 'src' directory) +Available as [Composer](http://getcomposer.org/) package +[ezzatron/php-lcs](https://packagist.org/packages/ezzatron/php-lcs). ## What is PHP-LCS? @@ -34,7 +30,6 @@ From [Wikipedia](http://en.wikipedia.org/wiki/Longest_common_subsequence_problem ## Usage ```php - +[Build Status]: https://raw.github.com/ezzatron/php-lcs/gh-pages/artifacts/images/icecave/regular/build-status.png +[Test Coverage]: https://raw.github.com/ezzatron/php-lcs/gh-pages/artifacts/images/icecave/regular/coverage.png diff --git a/composer.json b/composer.json index f182fcf..3d8ce89 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "php": ">=5" }, "require-dev": { - "icecave/testing": "dev-master" + "icecave/archer": "~0.2" }, "autoload": { "psr-0": { diff --git a/composer.lock b/composer.lock index bac9166..0c4b6f6 100644 --- a/composer.lock +++ b/composer.lock @@ -1,59 +1,69 @@ { - "hash": "fca287a858aad674ce78cdde4e100f93", + "hash": "d0c54150060ff40d6c29bf125acf82c2", "packages": [ ], "packages-dev": [ { - "name": "icecave/testing", - "version": "dev-master", + "name": "icecave/archer", + "version": "0.2.1", "source": { "type": "git", - "url": "https://github.com/IcecaveStudios/testing.git", - "reference": "2e85d5579d147933bb59fa81e452182de0fa6a63" + "url": "https://github.com/IcecaveStudios/archer.git", + "reference": "0.2.1" }, "dist": { "type": "zip", - "url": "https://github.com/IcecaveStudios/testing/archive/2e85d5579d147933bb59fa81e452182de0fa6a63.zip", - "reference": "2e85d5579d147933bb59fa81e452182de0fa6a63", + "url": "https://api.github.com/repos/IcecaveStudios/archer/zipball/0.2.1", + "reference": "0.2.1", "shasum": "" }, "require": { - "phake/phake": "1.*" + "phake/phake": ">=1.0,<2.0", + "php": ">=5.3", + "symfony/console": ">=2.0,<3.0", + "symfony/process": ">=2.0,<3.0" }, "suggest": { - "eloquent/asplode": "Use the asplode error handler instead of PHPUnit's internal error handler.", - "eloquent/liberator": "Use liberator for circumventing PHP access modifier restrictions inside tests." + "ext-openssl": "OpenSSL is required to encrypt GitHub OAuth tokens for artifact publication." }, - "time": "2013-01-16 13:35:43", "bin": [ - "bin/phpunit", - "bin/phpunit-coverage", - "bin/travis-init", - "bin/travis-build", - "bin/travis-success" + "bin/archer", + "bin/woodhouse" ], "type": "library", + "autoload": { + "psr-0": { + "Icecave\\Archer": "lib" + } + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Erin Millard", + "email": "ezzatron@gmail.com", + "homepage": "http://ezzatron.com/" + }, { "name": "James Harris", "email": "james.harris@icecave.com.au" } ], - "description": "Helper package for testing Icecave projects in a uniform way.", - "homepage": "https://github.com/IcecaveStudios/testing", + "description": "PHP testing and continuous integration by convention.", + "homepage": "https://github.com/IcecaveStudios/archer", "keywords": [ - "testing", + "artifacts", + "coverage", + "phake", "phpunit", "test", - "unit", - "phake", - "coverage" - ] + "testing", + "unit" + ], + "time": "2013-02-27 04:42:20" }, { "name": "phake/phake", @@ -72,7 +82,6 @@ "require": { "php": ">=5.2.0" }, - "time": "2012-05-14 08:06:51", "type": "library", "autoload": { "classmap": [ @@ -95,16 +104,111 @@ "description": "The Phake mock testing library", "homepage": "https://github.com/mlively/Phake", "keywords": [ - "testing", - "mock" - ] + "mock", + "testing" + ], + "time": "2012-05-14 08:06:51" + }, + { + "name": "symfony/console", + "version": "v2.2.0", + "target-dir": "Symfony/Component/Console", + "source": { + "type": "git", + "url": "https://github.com/symfony/Console.git", + "reference": "v2.2.0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Console/zipball/v2.2.0", + "reference": "v2.2.0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Console\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "http://symfony.com", + "time": "2013-03-01 06:43:14" + }, + { + "name": "symfony/process", + "version": "v2.2.0", + "target-dir": "Symfony/Component/Process", + "source": { + "type": "git", + "url": "https://github.com/symfony/Process.git", + "reference": "v2.2.0-RC3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Process/zipball/v2.2.0-RC3", + "reference": "v2.2.0-RC3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Process\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "http://symfony.com", + "time": "2013-02-18 21:28:10" } ], "aliases": [ ], "minimum-stability": "stable", - "stability-flags": { - "icecave/testing": 20 - } + "stability-flags": [ + + ] } diff --git a/src/Ezzatron/LCS/LCSSolver.php b/src/Ezzatron/LCS/LCSSolver.php index b5bf179..45048cd 100644 --- a/src/Ezzatron/LCS/LCSSolver.php +++ b/src/Ezzatron/LCS/LCSSolver.php @@ -3,7 +3,7 @@ /* * This file is part of the PHP-LCS package. * - * Copyright © 2012 Erin Millard + * Copyright © 2013 Erin Millard * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/test/suite/Ezzatron/LCS/LCSSolverTest.php b/test/suite/Ezzatron/LCS/LCSSolverTest.php index cd9335f..678f1c8 100644 --- a/test/suite/Ezzatron/LCS/LCSSolverTest.php +++ b/test/suite/Ezzatron/LCS/LCSSolverTest.php @@ -3,7 +3,7 @@ /* * This file is part of the PHP-LCS package. * - * Copyright © 2012 Erin Millard + * Copyright © 2013 Erin Millard * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code.