Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add composer.json and update tests to support it

  • Loading branch information...
commit 9ab47196419ed257885a473df2d879e9cdb5c2c9 1 parent 8173896
Richard Shank iampersistent authored
Showing with 195 additions and 32 deletions.
  1. +2 −0  .gitignore
  2. +32 −0 composer.json
  3. +151 −0 composer.lock
  4. +10 −32 tests/bootstrap.php
2  .gitignore
View
@@ -1,2 +1,4 @@
*.swp
.DS_Store
+composer.phar
+vendor/*
32 composer.json
View
@@ -0,0 +1,32 @@
+{
+ "name": "gpupo/camelspider",
+ "description": "A class to help handle gateways to processing entities.",
+ "authors": [
+ {"name": "Gilmar Pupo", "email": "g@g1mr.com"}
+ ],
+ "keywords": ["Camel Spider", "spider", "crawler"],
+ "require": {
+ "doctrine/common": "2.3.*",
+ "fabpot/goutte": "1.0.*",
+ "pear-horde/Horde_Text_Diff": "*",
+ "php": ">=5.3.2",
+ "Respect/Validation": "0.4.4",
+ "symfony/class-loader": "2.1.*",
+ "zendframework/zend-cache": "2.0.*",
+ "zendframework/zend-date": "2.0.*",
+ "zendframework/zend-http": "2.0.*",
+ "zendframework/zend-uri": "2.0.*",
+ "zendframework/zend-validator": "2.0.*"
+ },
+ "repositories": [
+ {
+ "type": "pear",
+ "url": "http://pear.horde.org"
+ }
+ ],
+ "autoload": {
+ "psr-0": {
+ "CamelSpider": "src/"
+ }
+ }
+}
151 composer.lock
View
@@ -0,0 +1,151 @@
+{
+ "hash": "bdc2d112e3c52a3ba8564f8bf07f7462",
+ "packages": [
+ {
+ "package": "Respect/Validation",
+ "version": "0.4.4"
+ },
+ {
+ "package": "doctrine/common",
+ "version": "dev-master",
+ "alias-pretty-version": "2.3.x-dev",
+ "alias-version": "2.3.9999999.9999999-dev"
+ },
+ {
+ "package": "doctrine/common",
+ "version": "dev-master",
+ "source-reference": "25e7b91a41dda2adfff529a814a4f9f90a30fa62"
+ },
+ {
+ "package": "fabpot/goutte",
+ "version": "dev-master",
+ "alias-pretty-version": "1.0.x-dev",
+ "alias-version": "1.0.9999999.9999999-dev"
+ },
+ {
+ "package": "fabpot/goutte",
+ "version": "dev-master",
+ "source-reference": "b1e5611edfff95a4872ae6ffc2501dd818b57223"
+ },
+ {
+ "package": "guzzle/guzzle",
+ "version": "v2.6.4"
+ },
+ {
+ "package": "pear-horde/Horde_Exception",
+ "version": "1.0.9"
+ },
+ {
+ "package": "pear-horde/Horde_Text_Diff",
+ "version": "1.0.2"
+ },
+ {
+ "package": "pear-horde/Horde_Translation",
+ "version": "1.0.2"
+ },
+ {
+ "package": "pear-horde/Horde_Url",
+ "version": "1.0.2"
+ },
+ {
+ "package": "pear-horde/Horde_Util",
+ "version": "1.3.1"
+ },
+ {
+ "package": "symfony/browser-kit",
+ "version": "dev-master",
+ "alias-pretty-version": "2.1.x-dev",
+ "alias-version": "2.1.9999999.9999999-dev"
+ },
+ {
+ "package": "symfony/browser-kit",
+ "version": "dev-master",
+ "source-reference": "6d1864547be92e51972a416fae9460b8be4afe0e"
+ },
+ {
+ "package": "symfony/class-loader",
+ "version": "dev-master",
+ "source-reference": "dd3f2ad5204df88b8938430e39a25c9a7f53f079"
+ },
+ {
+ "package": "symfony/class-loader",
+ "version": "dev-master",
+ "alias-pretty-version": "2.1.x-dev",
+ "alias-version": "2.1.9999999.9999999-dev"
+ },
+ {
+ "package": "symfony/css-selector",
+ "version": "dev-master",
+ "alias-pretty-version": "2.1.x-dev",
+ "alias-version": "2.1.9999999.9999999-dev"
+ },
+ {
+ "package": "symfony/css-selector",
+ "version": "dev-master",
+ "source-reference": "d0a98b37fbb57188766fd7c7d757354397ee6ead"
+ },
+ {
+ "package": "symfony/dom-crawler",
+ "version": "dev-master",
+ "alias-pretty-version": "2.1.x-dev",
+ "alias-version": "2.1.9999999.9999999-dev"
+ },
+ {
+ "package": "symfony/dom-crawler",
+ "version": "dev-master",
+ "source-reference": "2e27527036c4cd608692718414835173c40f52bd"
+ },
+ {
+ "package": "symfony/event-dispatcher",
+ "version": "dev-master",
+ "source-reference": "30d3f5da80c2aeab15bcdb5a7d448d15bc294b23"
+ },
+ {
+ "package": "symfony/event-dispatcher",
+ "version": "dev-master",
+ "alias-pretty-version": "2.1.x-dev",
+ "alias-version": "2.1.9999999.9999999-dev"
+ },
+ {
+ "package": "symfony/finder",
+ "version": "dev-master",
+ "source-reference": "9ee9a907afeef52956187e862714a7702ca26590"
+ },
+ {
+ "package": "symfony/finder",
+ "version": "dev-master",
+ "alias-pretty-version": "2.1.x-dev",
+ "alias-version": "2.1.9999999.9999999-dev"
+ },
+ {
+ "package": "symfony/process",
+ "version": "dev-master",
+ "source-reference": "f4f101fc7c1adb8b157058dcc1715f28f1d53208"
+ },
+ {
+ "package": "symfony/process",
+ "version": "dev-master",
+ "alias-pretty-version": "2.1.x-dev",
+ "alias-version": "2.1.9999999.9999999-dev"
+ },
+ {
+ "package": "zendframework/zendframework",
+ "version": "dev-master",
+ "source-reference": "48bf0c42bc6c406681327b16064ab3cf1a644218"
+ },
+ {
+ "package": "zendframework/zendframework",
+ "version": "dev-master",
+ "alias-pretty-version": "2.0.x-dev",
+ "alias-version": "2.0.9999999.9999999-dev"
+ }
+ ],
+ "packages-dev": null,
+ "aliases": [
+
+ ],
+ "minimum-stability": "dev",
+ "stability-flags": [
+
+ ]
+}
42 tests/bootstrap.php
View
@@ -2,35 +2,13 @@
date_default_timezone_set('UTC');
-/**
- * Set include path considering that camelSpider is contained in vendors directory
- *
- */
-set_include_path(
- '../../doctrine-common/lib/' . PATH_SEPARATOR
- . '../src' . PATH_SEPARATOR
- . '../../Symfony/src/'. PATH_SEPARATOR
- . '../../Goutte/src/'. PATH_SEPARATOR
- . '../../Respect/Validation/library/'
- . PATH_SEPARATOR . '../../Zend/library/'
- . PATH_SEPARATOR . get_include_path());
-
-/**
- * Autoloader that implements the PSR-0 spec for interoperability between
- * PHP software.
- */
-spl_autoload_register(
- function($className) {
- $fileParts = explode('\\', ltrim($className, '\\'));
-
- if (false !== strpos(end($fileParts), '_'))
- array_splice($fileParts, -1, 1, explode('_', current($fileParts)));
-
- $file = implode(DIRECTORY_SEPARATOR, $fileParts) . '.php';
-
- foreach (explode(PATH_SEPARATOR, get_include_path()) as $path) {
- if (file_exists($path = $path . DIRECTORY_SEPARATOR . $file))
- return require $path;
- }
- }
-);
+$loader = @include __DIR__ . '/../vendor/autoload.php';
+
+if (!$loader) {
+ die(<<<'EOT'
+You must set up the project dependencies, run the following commands:
+wget http://getcomposer.org/composer.phar
+php composer.phar install
+EOT
+ );
+}
Please sign in to comment.
Something went wrong with that request. Please try again.