Skip to content
Snippets Groups Projects
Commit 52026652 authored by Demian Katz's avatar Demian Katz
Browse files

Moved VuFindHttp module to external dependency.

parent 6156bdca
No related merge requests found
Showing
with 223 additions and 116 deletions
......@@ -4,7 +4,7 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "bdf603dc03336b065db2cb676f092114",
"hash": "9cd1fe9a339a11f246bbda40fadca844",
"packages": [
{
"name": "aferrandini/phpqrcode",
......@@ -557,6 +557,52 @@
"homepage": "http://symfony.com",
"time": "2014-09-22 09:14:18"
},
{
"name": "vufind-org/vufindhttp",
"version": "v1.0.0",
"source": {
"type": "git",
"url": "https://github.com/vufind-org/vufindhttp.git",
"reference": "2f56535bd3c306747ecf89ecea33c798f16f8c4e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vufind-org/vufindhttp/zipball/2f56535bd3c306747ecf89ecea33c798f16f8c4e",
"reference": "2f56535bd3c306747ecf89ecea33c798f16f8c4e",
"shasum": ""
},
"require": {
"zendframework/zend-http": "2.2.*"
},
"require-dev": {
"zendframework/zend-uri": "2.2.*"
},
"type": "library",
"autoload": {
"psr-0": {
"VuFindHttp\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0"
],
"authors": [
{
"name": "David Maus",
"email": "maus@hab.de",
"role": "Developer"
},
{
"name": "Demian Katz",
"email": "demian.katz@villanova.edu",
"role": "Maintainer"
}
],
"description": "VuFind 2.x HTTP service library",
"homepage": "http://vufind.org/",
"time": "2014-10-16 14:38:35"
},
{
"name": "zendframework/zendframework",
"version": "2.2.7",
......
......@@ -2,7 +2,7 @@
// Set up modules:
$modules = array(
'VuFindHttp', 'VuFindTheme', 'VuFindSearch', 'VuFind', 'VuFindAdmin'
'VuFindTheme', 'VuFindSearch', 'VuFind', 'VuFindAdmin'
);
if (PHP_SAPI == 'cli' && !defined('VUFIND_PHPUNIT_RUNNING')) {
$modules[] = 'VuFindConsole';
......
......@@ -346,8 +346,7 @@ function validateModule($module)
$regex = '/^[a-zA-Z][0-9a-zA-Z_]*$/';
$illegalModules = array(
'VuDL', 'VuFind', 'VuFindAdmin', 'VuFindConsole', 'VuFindDevTools',
'VuFindHttp', 'VuFindLocalTemplate', 'VuFindSearch', 'VuFindTest',
'VuFindTheme',
'VuFindLocalTemplate', 'VuFindSearch', 'VuFindTest', 'VuFindTheme',
);
if (in_array($module, $illegalModules)) {
return "{$module} is a reserved module name; please try another.";
......
TAGS
\#*
.\#*
ChangeLog
review
test.php
vendor/
<?php
/**
* ZF2 module definition for the VF2 http service
*
* PHP version 5
*
* Copyright (C) Villanova University 2012, 2013.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @category VuFind2
* @package Http
* @author David Maus <maus@hab.de>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link http://vufind.org
*/
namespace VuFindHttp;
/**
* ZF2 module definition for the VF2 HTTP service.
*
* @category VuFind2
* @package Http
* @author David Maus <maus@hab.de>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link http://vufind.org
*/
class Module
{
/**
* Return autoloader configuration.
*
* @return array
*/
public function getAutoloaderConfig()
{
return array(
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
),
),
);
}
}
\ No newline at end of file
<?php
/**
* Proxy service PHPUnit bootstrap.
*
* @author David Maus <maus@hab.de>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @copyright Copyright (C) Villanova University 2011
*
*/
require_once('Zend/Loader/AutoloaderFactory.php');
\Zend\Loader\AutoloaderFactory::factory(
array(
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
'VuFindHttp' => realpath(__DIR__ . '/../../src/VuFindHttp'),
'VuFindTest' => realpath(__DIR__ . '/src/VuFindTest'),
),
'autoregister_zf' => true
)
)
);
<?xml version="1.0" encoding="utf-8"?>
<phpunit bootstrap="bootstrap.php">
<testsuites>
<testsuite name="core-proxy">
<directory>src</directory>
</testsuite>
</testsuites>
<logging>
<log type="coverage-html" target="../../review/coverage"/>
</logging>
<php>
<includePath>../../vendor/zf2/library</includePath>
</php>
</phpunit>
......@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit0f2072e16558438728ae5fe1a74a0c86::getLoader();
return ComposerAutoloaderInit7dec02740c412b5209419ea980a0c5fa::getLoader();
......@@ -11,6 +11,7 @@ return array(
'ZendService\\Amazon\\' => array($vendorDir . '/zendframework/zendservice-amazon/library'),
'ZendService' => array($vendorDir . '/zendframework/zendservice-recaptcha/library'),
'ZendRest' => array($vendorDir . '/zendframework/zendrest/library'),
'VuFindHttp\\' => array($vendorDir . '/vufind-org/vufindhttp/src'),
'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'),
'SerialsSolutions' => array($vendorDir . '/serialssolutions/summon'),
'ProxyManager\\' => array($vendorDir . '/ocramius/proxy-manager/src'),
......
......@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit0f2072e16558438728ae5fe1a74a0c86
class ComposerAutoloaderInit7dec02740c412b5209419ea980a0c5fa
{
private static $loader;
......@@ -19,9 +19,9 @@ class ComposerAutoloaderInit0f2072e16558438728ae5fe1a74a0c86
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit0f2072e16558438728ae5fe1a74a0c86', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit7dec02740c412b5209419ea980a0c5fa', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit0f2072e16558438728ae5fe1a74a0c86', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit7dec02740c412b5209419ea980a0c5fa', 'loadClassLoader'));
$includePaths = require __DIR__ . '/include_paths.php';
array_push($includePaths, get_include_path());
......@@ -48,7 +48,7 @@ class ComposerAutoloaderInit0f2072e16558438728ae5fe1a74a0c86
}
}
function composerRequire0f2072e16558438728ae5fe1a74a0c86($file)
function composerRequire7dec02740c412b5209419ea980a0c5fa($file)
{
require $file;
}
......@@ -903,5 +903,53 @@
],
"description": "Symfony Yaml Component",
"homepage": "http://symfony.com"
},
{
"name": "vufind-org/vufindhttp",
"version": "v1.0.0",
"version_normalized": "1.0.0.0",
"source": {
"type": "git",
"url": "https://github.com/vufind-org/vufindhttp.git",
"reference": "2f56535bd3c306747ecf89ecea33c798f16f8c4e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vufind-org/vufindhttp/zipball/2f56535bd3c306747ecf89ecea33c798f16f8c4e",
"reference": "2f56535bd3c306747ecf89ecea33c798f16f8c4e",
"shasum": ""
},
"require": {
"zendframework/zend-http": "2.2.*"
},
"require-dev": {
"zendframework/zend-uri": "2.2.*"
},
"time": "2014-10-16 14:38:35",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-0": {
"VuFindHttp\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0"
],
"authors": [
{
"name": "David Maus",
"email": "maus@hab.de",
"role": "Developer"
},
{
"name": "Demian Katz",
"email": "demian.katz@villanova.edu",
"role": "Maintainer"
}
],
"description": "VuFind 2.x HTTP service library",
"homepage": "http://vufind.org/"
}
]
File moved
VuFindHttp
==========
Introduction
------------
VuFindHttp contains a convenience class built around Zend\Http\Client which allows
creation of proxy-aware clients and convenient GET/POST behavior. This is part of
the VuFind project (http://vufind.org) but may be useful for any software dealing
with HTTP calls.
Installation
------------
The recommended method for incorporating this library into your project is to use
Composer (http://getcomposer.org).
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project name="vufindhttp" basedir="." default="main">
<property name="tmp" value="/tmp" />
<property name="package" value="${phing.project.name}" override="true" />
<property name="builddir" value="${tmp}/build/${phing.project.name}" override="true" />
<property name="srcdir" value="${project.basedir}" override="true" />
<!-- Main Target -->
<target name="main" description="main target">
<trycatch property="exceptionmsg">
<try>
<phingcall target="startup" />
<phingcall target="ci-tasks" />
<phingcall target="shutdown" />
</try>
<catch>
<phingcall target="shutdown" />
<fail>Unexpected error during continuous integration tasks -- ${exceptionmsg}</fail>
</catch>
</trycatch>
</target>
<!-- Continuous Integration Tasks -->
<target name="ci-tasks" description="continuous integration tasks">
<!-- Create dirs -->
<mkdir dir="${builddir}/reports"/>
<mkdir dir="${builddir}/reports/coverage"/>
<!-- Call standard tasks -->
<phingcall target="phpcs"/>
<phingcall target="phpunit"/>
<phingcall target="phpdoc"/>
<phingcall target="phpcpd"/>
<phingcall target="phpmd"/>
<phingcall target="pdepend"/>
<phingcall target="phploc"/>
</target>
<!-- Report rule violations with PHPMD (mess detector) -->
<target name="phpmd">
<exec command="phpmd ${srcdir}/src xml ${srcdir}/tests/phpmd.xml --exclude ${srcdir}/tests --reportfile ${builddir}/reports/phpmd.xml" />
</target>
<!-- Measure project with phploc -->
<target name="phploc">
<exec command="phploc --log-csv ${builddir}/reports/phploc.csv ${srcdir}/src" />
</target>
<!-- PHP_Depend code analysis -->
<target name="pdepend">
<exec command="pdepend --jdepend-xml=${builddir}/reports/jdepend.xml --jdepend-chart=${builddir}/reports/dependencies.svg --overview-pyramid=${builddir}/reports/pdepend-pyramid.svg ${srcdir}/src" />
</target>
<!-- PHP copy-and-paste detection -->
<target name="phpcpd">
<exec command="phpcpd --log-pmd ${builddir}/reports/pmd-cpd.xml --exclude tests ${srcdir}/src" />
</target>
<!-- PHP CodeSniffer -->
<target name="phpcs">
<exec command="phpcs --standard=PEAR --ignore=tests/* --extensions=php --report=checkstyle ${srcdir}/src &gt; ${builddir}/reports/checkstyle.xml" escape="false" />
</target>
<!-- PHP API Documentation -->
<target name="phpdoc">
<mkdir dir="${builddir}/apidocs"/>
<phpdoc2 title="VuFindHttp API Documentation"
destdir="${builddir}/apidocs">
<fileset dir=".">
<include name="src/**/*.php" />
</fileset>
</phpdoc2>
</target>
<!-- PHPUnit -->
<target name="phpunit" description="Run tests">
<exec dir="${srcdir}" command="phpunit -dzend.enable_gc=0 --log-junit ${builddir}/reports/phpunit.xml --coverage-clover ${builddir}/reports/coverage/clover.xml --coverage-html ${builddir}/reports/coverage/" passthru="true" checkreturn="true" />
</target>
<!-- PHPUnit without logging output -->
<target name="phpunitfast" description="Run tests">
<exec dir="${srcdir}" command="phpunit -dzend.enable_gc=0" passthru="true" checkreturn="true" />
</target>
<!-- Set up dependencies -->
<target name="startup" description="set up dependencies">
<exec command="composer install" />
</target>
<!-- Uninstall and Deactivate VuFind -->
<target name="shutdown" description="clean up file system">
<delete dir="${srcdir}/vendor" includeemptydirs="true" failonerror="true" />
<delete file="${srcdir}/composer.lock" failonerror="true" />
<exec command="git reset --hard" />
</target>
</project>
{
"name": "vufind/http",
"name": "vufind-org/vufindhttp",
"description": "VuFind 2.x HTTP service library",
"authors": [
{
......@@ -18,9 +18,6 @@
"support": {
"issues": "http://vufind.org/jira"
},
"repositories": [
{ "type": "composer", "url": "http://packages.zendframework.com/" }
],
"require": {
"zendframework/zend-http": "2.2.*"
},
......@@ -29,7 +26,7 @@
},
"autoload": {
"psr-0": {
"VuFindHttp\\": "src"
"VuFindHttp\\": "src/"
}
}
}
......@@ -9,4 +9,9 @@
<php>
<includePath>.</includePath>
</php>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment