Permalink
Browse files

Some changes

Change licence, Add constant in phpunit config file, refactoring autoload
  • Loading branch information...
1 parent ef42ae6 commit ccb97dbeb69f9c1b018e0101b237b2ea3e32f713 @nfabre committed Feb 25, 2011
Showing with 55 additions and 89 deletions.
  1. +4 −3 .gitignore
  2. +19 −0 LICENSE
  3. +10 −45 autoload.php.dist
  4. +12 −8 phpunit.xml.dist
  5. +10 −33 tests/bootstrap.php
View
@@ -1,6 +1,7 @@
.project
-index.php
.buildpath
-tests/PHPUnit/*
.settings/*
-.externalToolBuilders/*
+.externalToolBuilders/*
+src/vendor/imagine
+build
+phpunit.xml
View
19 LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2010-2011 Nicolas Fabre
+
+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.
View
@@ -1,51 +1,16 @@
<?php
-require_once __DIR__.'/src/vendor/symfony/src/Symfony/Framework/UniversalClassLoader.php';
-/**
-* Deep Zoom Tools
-*
-* Copyright (c) 2008-2010, OpenZoom <http://openzoom.org/>
-* Copyright (c) 2008-2010, Nicolas Fabre <nicolas.fabre@gmail.com>
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without modification,
-* are permitted provided that the following conditions are met:
-*
-* 1. Redistributions of source code must retain the above copyright notice,
-* this list of conditions and the following disclaimer.
-*
-* 2. Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-*
-* 3. Neither the name of OpenZoom nor the names of its contributors may be used
-* to endorse or promote products derived from this software without
-* specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-/**
- * Deepzoom universal loader for tests
- *
- * @package Deepzoom
- * @subpackage Test
- * @author Nicolas Fabre <nicolas.fabre@gmail.com>
- */
-$loader = new Symfony\Framework\UniversalClassLoader();
-$loader->registerNamespace('Symfony', __DIR__.'/src/vendor/symfony/src');
-$loader->registerNamespace('Imagine', __DIR__.'/src/vendor/imagine/lib');
-$loader->registerNamespace('Deepzoom\\Tests', __DIR__.'/tests');
-$loader->registerNamespace('Deepzoom', __DIR__.'/src');
+require_once __DIR__.'/src/vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
+use Symfony\Component\ClassLoader\UniversalClassLoader;
+
+$loader = new UniversalClassLoader();
+$loader->registerNamespaces(array(
+ 'Symfony' => __DIR__.'/src/vendor/symfony/src',
+ 'Imagine' => __DIR__.'/src/vendor/imagine/lib',
+ 'Deepzoom\\Tests' => __DIR__.'/tests',
+ 'Deepzoom' => __DIR__.'/src',
+));
$loader->registerPrefixes(array(
'Zend_' => __DIR__.'/src/vendor/zend/lib',
));
View
@@ -7,33 +7,37 @@
bootstrap="tests/bootstrap.php">
<php>
- <const name="DEEPZOOM_TESTSUITE_STREAMWRAPPER_CONTAINER" value="phpunitcontainer" />
- <const name="DEEPZOOM_TESTSUITE_STREAMWRAPPER_AMAZON_S3_ACCESSKEY" value="AKIAIA6FCTSAGBDW2WUQ" />
- <const name="DEEPZOOM_TESTSUITE_STREAMWRAPPER_AMAZON_S3_SECRETACCESSKEY" value="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" />
+ <const name="DEEPZOOM_TESTSUITE_STREAMWRAPPER_CONTAINER" value="" />
+ <const name="DEEPZOOM_TESTSUITE_STREAMWRAPPER_AMAZON_S3_ACCESSKEY" value="" />
+ <const name="DEEPZOOM_TESTSUITE_STREAMWRAPPER_AMAZON_S3_SECRETACCESSKEY" value="" />
<const name="DEEPZOOM_TESTSUITE_STREAMWRAPPER_AMAZON_S3_NAME" value="s3" />
- <const name="DEEPZOOM_TESTSUITE_STREAMWRAPPER_AZURE_HOST" value="blob.core.windows.net" />
+ <const name="DEEPZOOM_TESTSUITE_STREAMWRAPPER_AZURE_HOST" value="" />
<const name="DEEPZOOM_TESTSUITE_STREAMWRAPPER_AZURE_ACCOUNT" value="" />
<const name="DEEPZOOM_TESTSUITE_STREAMWRAPPER_AZURE_CREDENCIAL" value="" />
<const name="DEEPZOOM_TESTSUITE_STREAMWRAPPER_AZURE_NAME" value="azure" />
+ <const name="DEEPZOOM_TESTSUITE_DESTINATION_PATH" value="" />
+ <const name="DEEPZOOM_TESTSUITE_FIXTURES_PATH" value="/Fixtures/" />
</php>
<testsuites>
<testsuite name="Deepzoom Test Suite">
<directory>./tests/Deepzoom/</directory>
</testsuite>
</testsuites>
-<!--
+
<logging>
<log type="coverage-html" target="build/coverage" title="DeepZoom PHP"
charset="UTF-8" yui="true" highlight="true" lowUpperBound="35"
highLowerBound="70" />
- <log type="coverage-clover" target="build/logs/clover.xml"/> <log
- type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false"/>
+
</logging>
--->
+
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src/Deepzoom/</directory>
+ <exclude>
+ <file>./src/Deepzoom/ImageAdapter/Imagick.php</file>
+ </exclude>
</whitelist>
</filter>
</phpunit>
View
@@ -1,36 +1,13 @@
-<?php
-/**
-* Deep Zoom Tools
-*
-* Copyright (c) 2008-2010, OpenZoom <http://openzoom.org/>
-* Copyright (c) 2008-2010, Nicolas Fabre <nicolas.fabre@gmail.com>
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without modification,
-* are permitted provided that the following conditions are met:
-*
-* 1. Redistributions of source code must retain the above copyright notice,
-* this list of conditions and the following disclaimer.
-*
-* 2. Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-*
-* 3. Neither the name of OpenZoom nor the names of its contributors may be used
-* to endorse or promote products derived from this software without
-* specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
+<?php
+
+/*
+ * This file is part of the Deepzoom.php package.
+ *
+ * (c) Nicolas Fabre <nicolas.fabre@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
if (file_exists($file = __DIR__.'/../autoload.php')) {
require_once $file;

0 comments on commit ccb97db

Please sign in to comment.