From 5d16f4e8a0a9e3f9fa6a3f699bb2d479345a756a Mon Sep 17 00:00:00 2001 From: everzet Date: Sun, 6 May 2012 21:53:36 +0200 Subject: [PATCH] added license and phar builder --- LICENSE | 22 ++++++++++++++++++++++ build.php | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ init.php | 21 +++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 LICENSE create mode 100755 build.php create mode 100644 init.php diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..29864dd --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2012 Konstantin Kudryashov + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/build.php b/build.php new file mode 100755 index 0000000..6bc94b0 --- /dev/null +++ b/build.php @@ -0,0 +1,50 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +$phar = new \Phar('behat-mink-extension.phar', 0, 'behat-mink-extension.phar'); +$phar->setSignatureAlgorithm(\Phar::SHA1); +$phar->startBuffering(); + +addFileToPhar($phar, 'src/Behat/MinkExtension/Compiler/SelectorsPass.php'); +addFileToPhar($phar, 'src/Behat/MinkExtension/Compiler/SessionsPass.php'); +addFileToPhar($phar, 'src/Behat/MinkExtension/Context/MinkAwareContextInterface.php'); +addFileToPhar($phar, 'src/Behat/MinkExtension/Context/MinkAwareContextInitializer.php'); +addFileToPhar($phar, 'src/Behat/MinkExtension/Context/RawMinkContext.php'); +addFileToPhar($phar, 'src/Behat/MinkExtension/Context/MinkContext.php'); +addFileToPhar($phar, 'src/Behat/MinkExtension/Configuration.php'); +addFileToPhar($phar, 'src/Behat/MinkExtension/Extension.php'); + +$phar->setStub(<< + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +Phar::mapPhar('behat-mink-extension.phar'); + +return require_once 'phar://behat-mink-extension.phar/init.php'; + +__HALT_COMPILER(); +STUB +); +$phar->stopBuffering(); + +unset($phar); + +function addFileToPhar($phar, $path) { + $phar->addFromString($path, __DIR__.'/'.$path); +} diff --git a/init.php b/init.php new file mode 100644 index 0000000..8698c01 --- /dev/null +++ b/init.php @@ -0,0 +1,21 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +require_once __DIR__.'/src/Behat/MinkExtension/Compiler/SelectorsPass.php'; +require_once __DIR__.'/src/Behat/MinkExtension/Compiler/SessionsPass.php'; +require_once __DIR__.'/src/Behat/MinkExtension/Context/MinkAwareContextInterface.php'; +require_once __DIR__.'/src/Behat/MinkExtension/Context/MinkAwareContextInitializer.php'; +require_once __DIR__.'/src/Behat/MinkExtension/Context/RawMinkContext.php'; +require_once __DIR__.'/src/Behat/MinkExtension/Context/MinkContext.php'; +require_once __DIR__.'/src/Behat/MinkExtension/Configuration.php'; +require_once __DIR__.'/src/Behat/MinkExtension/Extension.php'; + +return new Behat\MinkExtension\Extension;