Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating to work with Stash v0.11.2

  • Loading branch information...
commit 29c987098c73ea799a9e623ee1f74f135783c84f 1 parent eb23ba9
@ehough ehough authored
View
10 composer.json
@@ -15,13 +15,13 @@
"ehough/coauthor": "~1.0.0",
"ehough/contemplate": "~1.0.0",
"ehough/curly": "~1.0.0",
- "ehough/epilog": "~1.5",
- "ehough/finder": "~2.0",
- "ehough/iconic": "~2.3",
- "ehough/pulsar": "~2.3",
+ "ehough/epilog": "~1.7",
+ "ehough/finder": "~2.4.0",
+ "ehough/iconic": "~2.4.0",
+ "ehough/pulsar": "~2.4.0",
"ehough/shortstop": "~2.0",
"ehough/stash": "~0.10",
- "ehough/tickertape": "~2.3"
+ "ehough/tickertape": "~2.4.0"
},
"require-dev": {
"ehough/mockery": "~0.8",
View
196 composer.lock
@@ -3,7 +3,7 @@
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
],
- "hash": "1db24eaf9e8467d58e89b8de89769802",
+ "hash": "7f5c4ab1675e95de6ddf1cdf6fe1378a",
"packages": [
{
"name": "ehough/chaingang",
@@ -11,19 +11,19 @@
"source": {
"type": "git",
"url": "https://github.com/ehough/chaingang.git",
- "reference": "1.0.3"
+ "reference": "a94a458bdd468d85231984454508bf3049052157"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ehough/chaingang/zipball/1.0.3",
- "reference": "1.0.3",
+ "url": "https://api.github.com/repos/ehough/chaingang/zipball/a94a458bdd468d85231984454508bf3049052157",
+ "reference": "a94a458bdd468d85231984454508bf3049052157",
"shasum": ""
},
"require": {
"php": ">=5.2.0"
},
"require-dev": {
- "ehough/mockery": ">=1.0,<1.1"
+ "ehough/mockery": "~1.0.0"
},
"type": "library",
"autoload": {
@@ -95,12 +95,12 @@
"source": {
"type": "git",
"url": "https://github.com/ehough/contemplate.git",
- "reference": "1.0.4"
+ "reference": "15f8dc18c40e68fa354993fb8406791ccab134db"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ehough/contemplate/zipball/1.0.4",
- "reference": "1.0.4",
+ "url": "https://api.github.com/repos/ehough/contemplate/zipball/15f8dc18c40e68fa354993fb8406791ccab134db",
+ "reference": "15f8dc18c40e68fa354993fb8406791ccab134db",
"shasum": ""
},
"require": {
@@ -136,12 +136,12 @@
"source": {
"type": "git",
"url": "https://github.com/ehough/curly.git",
- "reference": "1.0.3"
+ "reference": "abd70d9ccaf774caa7496e77ae27d5c2eb66d2ce"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ehough/curly/zipball/1.0.3",
- "reference": "1.0.3",
+ "url": "https://api.github.com/repos/ehough/curly/zipball/abd70d9ccaf774caa7496e77ae27d5c2eb66d2ce",
+ "reference": "abd70d9ccaf774caa7496e77ae27d5c2eb66d2ce",
"shasum": ""
},
"require": {
@@ -170,27 +170,29 @@
},
{
"name": "ehough/epilog",
- "version": "1.6.0",
+ "version": "1.7.0",
"source": {
"type": "git",
"url": "https://github.com/ehough/epilog.git",
- "reference": "1.6.0"
+ "reference": "dbdb5edb126d5e09fb6cb05aab11451e584f8cbd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ehough/epilog/zipball/1.6.0",
- "reference": "1.6.0",
+ "url": "https://api.github.com/repos/ehough/epilog/zipball/dbdb5edb126d5e09fb6cb05aab11451e584f8cbd",
+ "reference": "dbdb5edb126d5e09fb6cb05aab11451e584f8cbd",
"shasum": ""
},
"require": {
"php": ">=5.2.0"
},
"require-dev": {
+ "aws/aws-sdk-php": "~2.4.8",
"doctrine/couchdb": "dev-master",
"ehough/pulsar": "~2.3",
"mlehner/gelf-php": "1.0.*",
- "phpunit/phpunit": "3.7.*",
- "raven/raven": "0.5.*"
+ "phpunit/phpunit": "~3.7.0",
+ "raven/raven": "0.5.*",
+ "ruflin/elastica": "0.90.*"
},
"type": "library",
"autoload": {
@@ -211,35 +213,76 @@
],
"description": "Fork of seldaek/monolog compatible with PHP 5.2+.",
"homepage": "https://github.com/ehough/epilog",
- "time": "2013-08-18 22:31:34"
+ "time": "2013-12-05 02:07:00"
},
{
- "name": "ehough/finder",
- "version": "v2.3.5",
- "target-dir": "Symfony/Component/Finder",
+ "name": "ehough/filesystem",
+ "version": "v2.4.0",
"source": {
"type": "git",
- "url": "https://github.com/ehough/finder.git",
- "reference": "a175521f680b178e63c5d0ab87c6b046c0990c3f"
+ "url": "https://github.com/ehough/filesystem.git",
+ "reference": "8efba59e82f6fc4c855acdf09387ef6aaef9f235"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ehough/finder/zipball/a175521f680b178e63c5d0ab87c6b046c0990c3f",
- "reference": "a175521f680b178e63c5d0ab87c6b046c0990c3f",
+ "url": "https://api.github.com/repos/ehough/filesystem/zipball/8efba59e82f6fc4c855acdf09387ef6aaef9f235",
+ "reference": "8efba59e82f6fc4c855acdf09387ef6aaef9f235",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=5.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "3.7.*"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.3-dev"
+ "autoload": {
+ "psr-0": {
+ "ehough_filesystem": "src/main/php"
}
},
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Eric Hough",
+ "email": "eric@ehough.com",
+ "homepage": "http://ehough.com"
+ }
+ ],
+ "description": "Fork of Symfony's Filesystem Component compatible with PHP 5.2+",
+ "keywords": [
+ "filesystem"
+ ],
+ "time": "2013-12-04 20:26:38"
+ },
+ {
+ "name": "ehough/finder",
+ "version": "v2.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ehough/finder.git",
+ "reference": "6070a85d73d38be99411861adfddead706833a34"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ehough/finder/zipball/6070a85d73d38be99411861adfddead706833a34",
+ "reference": "6070a85d73d38be99411861adfddead706833a34",
+ "shasum": ""
+ },
+ "require": {
+ "ehough/filesystem": "~2.0",
+ "php": ">=5.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "3.7.*"
+ },
+ "type": "library",
"autoload": {
"psr-0": {
- "Symfony\\Component\\Finder\\": ""
+ "ehough_finder": "src/main/php"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -248,30 +291,26 @@
],
"authors": [
{
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
+ "name": "Eric Hough",
+ "email": "eric@ehough.com",
+ "homepage": "http://ehough.com"
}
],
- "description": "Symfony Finder Component",
- "homepage": "http://symfony.com",
- "time": "2013-09-19 09:45:20"
+ "description": "Fork of Symfony's Finder Component compatible with PHP 5.2+",
+ "time": "2013-12-05 00:28:26"
},
{
"name": "ehough/iconic",
- "version": "v2.3.3",
+ "version": "v2.4.0",
"source": {
"type": "git",
"url": "https://github.com/ehough/iconic.git",
- "reference": "v2.3.3"
+ "reference": "6f8008253cb525d97c283b0a7809b483ce0db43f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ehough/iconic/zipball/v2.3.3",
- "reference": "v2.3.3",
+ "url": "https://api.github.com/repos/ehough/iconic/zipball/6f8008253cb525d97c283b0a7809b483ce0db43f",
+ "reference": "6f8008253cb525d97c283b0a7809b483ce0db43f",
"shasum": ""
},
"require": {
@@ -280,6 +319,7 @@
"require-dev": {
"phpunit/phpunit": "3.7.*",
"symfony/config": "~2.2",
+ "symfony/expression-language": "~2.4",
"symfony/yaml": "~2.0"
},
"suggest": {
@@ -306,20 +346,20 @@
],
"description": "Fork of Symfony's Dependency Injection component compatible with PHP 5.2+.",
"homepage": "https://github.com/ehough/iconic",
- "time": "2013-08-19 00:25:21"
+ "time": "2013-12-05 00:04:34"
},
{
"name": "ehough/pulsar",
- "version": "v2.3.3",
+ "version": "v2.4.0",
"source": {
"type": "git",
"url": "https://github.com/ehough/pulsar.git",
- "reference": "268659204ab103517068d2ecbd2441f0840bdc62"
+ "reference": "cbc89cafa739146111dfc8127ebe318bb64c159a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ehough/pulsar/zipball/268659204ab103517068d2ecbd2441f0840bdc62",
- "reference": "268659204ab103517068d2ecbd2441f0840bdc62",
+ "url": "https://api.github.com/repos/ehough/pulsar/zipball/cbc89cafa739146111dfc8127ebe318bb64c159a",
+ "reference": "cbc89cafa739146111dfc8127ebe318bb64c159a",
"shasum": ""
},
"require": {
@@ -353,7 +393,7 @@
"autoloader",
"psr-0"
],
- "time": "2013-08-18 23:48:22"
+ "time": "2013-12-04 22:08:10"
},
{
"name": "ehough/shortstop",
@@ -361,12 +401,12 @@
"source": {
"type": "git",
"url": "https://github.com/ehough/shortstop.git",
- "reference": "2.0.2"
+ "reference": "1014368f357322968d37b90f0beacfab973f6d78"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ehough/shortstop/zipball/2.0.2",
- "reference": "2.0.2",
+ "url": "https://api.github.com/repos/ehough/shortstop/zipball/1014368f357322968d37b90f0beacfab973f6d78",
+ "reference": "1014368f357322968d37b90f0beacfab973f6d78",
"shasum": ""
},
"require": {
@@ -403,16 +443,16 @@
},
{
"name": "ehough/stash",
- "version": "v0.10.5",
+ "version": "v0.11.2",
"source": {
"type": "git",
"url": "https://github.com/ehough/stash.git",
- "reference": "v0.10.5"
+ "reference": "677f6f8bded32345541fc127ae2b3bbef224f643"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ehough/stash/zipball/v0.10.5",
- "reference": "v0.10.5",
+ "url": "https://api.github.com/repos/ehough/stash/zipball/677f6f8bded32345541fc127ae2b3bbef224f643",
+ "reference": "677f6f8bded32345541fc127ae2b3bbef224f643",
"shasum": ""
},
"require": {
@@ -446,25 +486,23 @@
"cache",
"caching",
"memcached",
- "performance",
"redis",
- "scalability",
"sessions"
],
- "time": "2013-07-17 20:40:08"
+ "time": "2013-12-05 17:30:58"
},
{
"name": "ehough/tickertape",
- "version": "v2.3.2",
+ "version": "v2.4.0",
"source": {
"type": "git",
"url": "https://github.com/ehough/tickertape.git",
- "reference": "v2.3.2"
+ "reference": "d096f5591755ebc64fe67504243c413ccac79ceb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ehough/tickertape/zipball/v2.3.2",
- "reference": "v2.3.2",
+ "url": "https://api.github.com/repos/ehough/tickertape/zipball/d096f5591755ebc64fe67504243c413ccac79ceb",
+ "reference": "d096f5591755ebc64fe67504243c413ccac79ceb",
"shasum": ""
},
"require": {
@@ -493,7 +531,7 @@
],
"description": "Fork of Symfony's Event Dispatcher compatible with PHP 5.2+.",
"homepage": "https://github.com/ehough/tickertape",
- "time": "2013-07-30 04:59:25"
+ "time": "2013-12-04 21:04:42"
}
],
"packages-dev": [
@@ -503,12 +541,12 @@
"source": {
"type": "git",
"url": "https://github.com/ehough/mockery.git",
- "reference": "0.8.0"
+ "reference": "baeb890e7335f2cca6362cb72e20cbdeaa35d968"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ehough/mockery/zipball/0.8.0",
- "reference": "0.8.0",
+ "url": "https://api.github.com/repos/ehough/mockery/zipball/baeb890e7335f2cca6362cb72e20cbdeaa35d968",
+ "reference": "baeb890e7335f2cca6362cb72e20cbdeaa35d968",
"shasum": ""
},
"require": {
@@ -663,13 +701,13 @@
"version": "1.1.4",
"source": {
"type": "git",
- "url": "git://github.com/sebastianbergmann/php-text-template.git",
- "reference": "1.1.4"
+ "url": "https://github.com/sebastianbergmann/php-text-template.git",
+ "reference": "5180896f51c5b3648ac946b05f9ec02be78a0b23"
},
"dist": {
"type": "zip",
- "url": "https://github.com/sebastianbergmann/php-text-template/zipball/1.1.4",
- "reference": "1.1.4",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5180896f51c5b3648ac946b05f9ec02be78a0b23",
+ "reference": "5180896f51c5b3648ac946b05f9ec02be78a0b23",
"shasum": ""
},
"require": {
@@ -700,7 +738,7 @@
"keywords": [
"template"
],
- "time": "2012-10-31 11:15:28"
+ "time": "2012-10-31 18:15:28"
},
{
"name": "phpunit/php-timer",
@@ -708,12 +746,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "1.0.5"
+ "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1.0.5",
- "reference": "1.0.5",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
+ "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
"shasum": ""
},
"require": {
@@ -875,13 +913,13 @@
"version": "1.2.3",
"source": {
"type": "git",
- "url": "git://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "1.2.3"
+ "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
+ "reference": "5794e3c5c5ba0fb037b11d8151add2a07fa82875"
},
"dist": {
"type": "zip",
- "url": "https://github.com/sebastianbergmann/phpunit-mock-objects/archive/1.2.3.zip",
- "reference": "1.2.3",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5794e3c5c5ba0fb037b11d8151add2a07fa82875",
+ "reference": "5794e3c5c5ba0fb037b11d8151add2a07fa82875",
"shasum": ""
},
"require": {
View
4 src/main/php/add-ons/core/classes/tubepress/addons/core/impl/ioc/IocContainerExtension.php
@@ -89,14 +89,14 @@ private function _registerCacheService(tubepress_api_ioc_ContainerInterface $con
'tubepress_addons_core_impl_ioc_FilesystemCacheBuilder'
);
- $actualPoolDefinition = new tubepress_impl_ioc_Definition('ehough_stash_PoolInterface');
+ $actualPoolDefinition = new tubepress_impl_ioc_Definition('ehough_stash_interfaces_PoolInterface');
$actualPoolDefinition->setFactoryService($builderServiceId);
$actualPoolDefinition->setFactoryMethod('buildCache');
$container->setDefinition($actualPoolServiceId, $actualPoolDefinition);
$container->register(
- 'ehough_stash_PoolInterface',
+ 'ehough_stash_interfaces_PoolInterface',
'tubepress_impl_cache_PoolDecorator'
)->addArgument(new tubepress_impl_ioc_Reference($actualPoolServiceId));
View
64 src/main/php/classes/tubepress/impl/cache/ItemDecorator.php
@@ -12,19 +12,19 @@
/**
* Decorates ehough_stash_Item to handle cache cleaning and TTL.
*/
-class tubepress_impl_cache_ItemDecorator implements ehough_stash_ItemInterface
+class tubepress_impl_cache_ItemDecorator implements ehough_stash_interfaces_ItemInterface
{
/**
- * @var ehough_stash_ItemInterface
+ * @var ehough_stash_interfaces_ItemInterface
*/
private $_delegate;
/**
- * @var ehough_stash_PoolInterface
+ * @var ehough_stash_interfaces_PoolInterface
*/
private $_parentCache;
- public function __construct(ehough_stash_ItemInterface $delegate, ehough_stash_PoolInterface $parentCache)
+ public function __construct(ehough_stash_interfaces_ItemInterface $delegate, ehough_stash_interfaces_PoolInterface $parentCache)
{
$this->_delegate = $delegate;
$this->_parentCache = $parentCache;
@@ -54,9 +54,9 @@ public function getKey()
*
* @return mixed
*/
- public function get()
+ public function get($invalidation = 0, $arg = null, $arg2 = null)
{
- return $this->_delegate->get();
+ return $this->_delegate->get($invalidation, $arg, $arg2);
}
/**
@@ -93,7 +93,7 @@ public function set($value = null, $ttl = null)
*/
if ($cleaningFactor > 0 && rand(1, $cleaningFactor) === 1) {
- $this->_parentCache->clear();
+ $this->_parentCache->flush();
}
if ($ttl === null) {
@@ -104,30 +104,38 @@ public function set($value = null, $ttl = null)
return $this->_delegate->set($value, $ttl);
}
- /**
- * Validates the current state of the item in the cache.
- *
- * Checks the validity of a cache result. If the object is good (is not a
- * miss, and meets all the standards set by the Implementing Library) then
- * this function returns true.
- *
- * @return bool
- */
- public function isValid()
+ public function disable()
{
- return $this->_delegate->isValid();
+ return $this->_delegate->disable();
}
- /**
- * Removes the current key from the cache.
- *
- * Returns true if the item is no longer present (either because it was
- * removed or was not present to begin with).
- *
- * @return bool
- */
- public function remove()
+ public function clear()
+ {
+ return $this->_delegate->clear();
+ }
+
+ public function isMiss()
+ {
+ return $this->_delegate->isMiss();
+ }
+
+ public function lock($ttl = null)
+ {
+ return $this->_delegate->lock($ttl);
+ }
+
+ public function extend($ttl = null)
+ {
+ return $this->_delegate->extend($ttl);
+ }
+
+ public function isDisabled()
+ {
+ return $this->_delegate->isDisabled();
+ }
+
+ public function setLogger($logger)
{
- return $this->_delegate->remove();
+ $this->_delegate->setLogger($logger);
}
}
View
49 src/main/php/classes/tubepress/impl/cache/PoolDecorator.php
@@ -12,14 +12,14 @@
/**
* Basic cache functionality.
*/
-class tubepress_impl_cache_PoolDecorator implements ehough_stash_PoolInterface
+class tubepress_impl_cache_PoolDecorator implements ehough_stash_interfaces_PoolInterface
{
/**
- * @var ehough_stash_PoolInterface
+ * @var ehough_stash_interfaces_PoolInterface
*/
private $_delegate;
- public function __construct(ehough_stash_PoolInterface $delegate)
+ public function __construct(ehough_stash_interfaces_PoolInterface $delegate)
{
$this->_delegate = $delegate;
}
@@ -32,14 +32,12 @@ public function __construct(ehough_stash_PoolInterface $delegate)
* backends, but must be able to supply the original key if needed. Keys
* should not contain the special characters listed:
* {}()/\@
- *
- * @param string $key
- *
- * @return ehough_stash_ItemInterface
+ * *
+ * @return ehough_stash_interfaces_ItemInterface
*/
- public function getItem($key)
+ public function getItem()
{
- return $this->_toDecoratedItem($this->_delegate->getItem($key));
+ return $this->_toDecoratedItem($this->_delegate->getItem(func_get_args()));
}
/**
@@ -63,18 +61,33 @@ public function getItemIterator($keys)
return new ArrayIterator($items);
}
- /**
- * Clears the cache pool of all items.
- *
- * @return bool
- */
- public function clear()
+ private function _toDecoratedItem(ehough_stash_interfaces_ItemInterface $item)
{
- return $this->_delegate->clear();
+ return new tubepress_impl_cache_ItemDecorator($item, $this);
}
- private function _toDecoratedItem(ehough_stash_ItemInterface $item)
+ public function flush()
{
- return new tubepress_impl_cache_ItemDecorator($item, $this);
+ return $this->_delegate->flush();
+ }
+
+ public function purge()
+ {
+ return $this->_delegate->purge();
+ }
+
+ public function setDriver(ehough_stash_interfaces_DriverInterface $driver)
+ {
+ $this->_delegate->setDriver($driver);
+ }
+
+ public function getDriver()
+ {
+ return $this->_delegate->getDriver();
+ }
+
+ public function setLogger($logger)
+ {
+ $this->_delegate->setLogger($logger);
}
}
View
12 src/main/php/classes/tubepress/impl/feed/CacheAwareFeedFetcher.php
@@ -82,7 +82,7 @@ private function _getFromNetwork($url)
private function _getFromCache($url, tubepress_spi_context_ExecutionContext $context, $isDebugEnabled)
{
/**
- * @var $cache ehough_stash_PoolInterface
+ * @var $cache ehough_stash_interfaces_PoolInterface
*/
$cache = tubepress_impl_patterns_sl_ServiceLocator::getCacheService();
@@ -91,9 +91,10 @@ private function _getFromCache($url, tubepress_spi_context_ExecutionContext $con
$this->_logger->debug(sprintf('First asking cache for <a href="%s">URL</a>', $url));
}
- $result = $cache->getItem($url);
+ $cacheKey = $this->_urlToCacheKey($url);
+ $result = $cache->getItem($cacheKey);
- if ($result && $result->isValid()) {
+ if ($result && !$result->isMiss()) {
if ($isDebugEnabled) {
@@ -124,4 +125,9 @@ private function _getFromCache($url, tubepress_spi_context_ExecutionContext $con
return $result->get();
}
+
+ private function _urlToCacheKey($url)
+ {
+ return str_replace('/', '~', $url);
+ }
}
View
4 src/main/php/classes/tubepress/impl/patterns/sl/ServiceLocator.php
@@ -69,11 +69,11 @@ public static function getAjaxHandler()
}
/**
- * @return ehough_stash_PoolInterface The cache service.
+ * @return ehough_stash_interfaces_PoolInterface The cache service.
*/
public static function getCacheService()
{
- return self::getService('ehough_stash_PoolInterface');
+ return self::getService('ehough_stash_interfaces_PoolInterface');
}
/**
View
18 src/main/php/scripts/classmaps/full.php
@@ -188,17 +188,29 @@
'ehough_shortstop_spi_HttpTransferDecoder' => $shortstopPrefix . '/spi/HttpTransferDecoder.php',
'ehough_shortstop_spi_HttpTransport' => $shortstopPrefix . '/spi/HttpTransport.php',
- 'ehough_stash_driver_DriverInterface' => $stashPrefix . '/driver/DriverInterface.php',
+ 'ehough_stash_driver_Apc' => $stashPrefix . '/driver/Apc.php',
+ 'ehough_stash_driver_BlackHole' => $stashPrefix . '/driver/BlackHole.php',
+ 'ehough_stash_driver_Composite' => $stashPrefix . '/driver/Composite.php',
+ 'ehough_stash_driver_Ephemeral' => $stashPrefix . '/driver/Ephemeral.php',
'ehough_stash_driver_FileSystem' => $stashPrefix . '/driver/FileSystem.php',
+ 'ehough_stash_driver_Memcache' => $stashPrefix . '/driver/Memcache.php',
'ehough_stash_Drivers' => $stashPrefix . '/Drivers.php',
+ 'ehough_stash_driver_sub_Memcached' => $stashPrefix . '/driver/sub/Memcached.php',
+ 'ehough_stash_driver_sub_Memcache' => $stashPrefix . '/driver/sub/Memcache.php',
'ehough_stash_exception_Exception' => $stashPrefix . '/exception/Exception.php',
'ehough_stash_exception_InvalidArgumentException' => $stashPrefix . '/exception/InvalidArgumentException.php',
'ehough_stash_exception_LogicException' => $stashPrefix . '/exception/LogicException.php',
'ehough_stash_exception_RuntimeException' => $stashPrefix . '/exception/RuntimeException.php',
+ 'ehough_stash_interfaces_DriverInterface' => $stashPrefix . '/interfaces/DriverInterface.php',
+ 'ehough_stash_interfaces_drivers_ExtendInterface' => $stashPrefix . '/interfaces/drivers/ExtendInterface.php',
+ 'ehough_stash_interfaces_drivers_IncDecInterface' => $stashPrefix . '/interfaces/drivers/IncDecInterface.php',
+ 'ehough_stash_interfaces_drivers_MultiInterface' => $stashPrefix . '/interfaces/drivers/MultiInterface.php',
+ 'ehough_stash_interfaces_ItemInterface' => $stashPrefix . '/interfaces/ItemInterface.php',
+ 'ehough_stash_interfaces_PoolInterface' => $stashPrefix . '/interfaces/PoolInterface.php',
'ehough_stash_Item' => $stashPrefix . '/Item.php',
- 'ehough_stash_ItemInterface' => $stashPrefix . '/ItemInterface.php',
'ehough_stash_Pool' => $stashPrefix . '/Pool.php',
- 'ehough_stash_PoolInterface' => $stashPrefix . '/PoolInterface.php',
+ 'ehough_stash_session_SessionHandlerInterface' => $stashPrefix . '/session/SessionHandlerInterface.php',
+ 'ehough_stash_Session' => $stashPrefix . '/Session.php',
'ehough_stash_Utilities' => $stashPrefix . '/Utilities.php',
'ehough_tickertape_ContainerAwareEventDispatcher' => $tickerTapePrefix . '/ContainerAwareEventDispatcher.php',
View
4 ...hp/add-ons/core/classes/tubepress/test/addons/core/impl/ioc/IocContainerExtensionTest.php
@@ -639,10 +639,10 @@ private function _cacheService()
{
$this->expectRegistration('tubepress_addons_core_impl_ioc_IocContainerExtension__registerCacheService_builderServiceId', 'tubepress_addons_core_impl_ioc_FilesystemCacheBuilder');
- $def = new tubepress_impl_ioc_Definition('ehough_stash_PoolInterface');
+ $def = new tubepress_impl_ioc_Definition('ehough_stash_interfaces_PoolInterface');
$this->expectDefinition('tubepress_addons_core_impl_ioc_IocContainerExtension__registerCacheService_actualPoolServiceId', $def);
- $this->expectRegistration('ehough_stash_PoolInterface', 'tubepress_impl_cache_PoolDecorator')
+ $this->expectRegistration('ehough_stash_interfaces_PoolInterface', 'tubepress_impl_cache_PoolDecorator')
->withArgument(new tubepress_impl_ioc_Reference('tubepress_addons_core_impl_ioc_IocContainerExtension__registerCacheService_actualPoolServiceId'))
;
}
View
6 src/test/php/classes/tubepress/test/impl/boot/DefaultBootConfigServiceTest.php
@@ -88,11 +88,13 @@ public function testNormal()
private function assertDefaults()
{
+ $tmpDir = sys_get_temp_dir();
+
$result = $this->_sut->getAbsolutePathToCacheFileForElement('add-ons');
- $this->assertRegExp('~^/tmp/[^/]+/serialized-addons\.txt$~', $result);
+ $this->assertRegExp('~^' . $tmpDir . '/[^/]+/serialized-addons\.txt$~', $result);
$result = $this->_sut->getAbsolutePathToCacheFileForElement('ioc-container');
- $this->assertRegExp('~^/tmp/[^/]+/cached-ioc-container\.php~', $result);
+ $this->assertRegExp('~^' . $tmpDir . '/[^/]+/cached-ioc-container\.php~', $result);
$result = $this->_sut->getAddonBlacklistArray();
$this->assertEquals(array(), $result);
View
14 src/test/php/classes/tubepress/test/impl/cache/ItemDecoratorTest.php
@@ -32,8 +32,8 @@ class tubepress_test_impl_cache_ItemDecoratorTest extends tubepress_test_TubePre
public function onSetup()
{
- $this->_mockPool = ehough_mockery_Mockery::mock('ehough_stash_PoolInterface');
- $this->_mockItem = ehough_mockery_Mockery::mock('ehough_stash_ItemInterface');
+ $this->_mockPool = ehough_mockery_Mockery::mock('ehough_stash_interfaces_PoolInterface');
+ $this->_mockItem = ehough_mockery_Mockery::mock('ehough_stash_interfaces_ItemInterface');
$this->_sut = new tubepress_impl_cache_ItemDecorator($this->_mockItem, $this->_mockPool);
@@ -43,7 +43,7 @@ public function onSetup()
public function testCacheCleaningFactor()
{
$this->_mockExecutionContext->shouldReceive('get')->once()->with(tubepress_api_const_options_names_Cache::CACHE_CLEAN_FACTOR)->andReturn('1');
- $this->_mockPool->shouldReceive('clear')->once();
+ $this->_mockPool->shouldReceive('flush')->once();
$this->_mockItem->shouldReceive('set')->once()->with(array(55), 88)->andReturn(true);
@@ -77,9 +77,9 @@ public function testSetDefaultTtl()
public function testRemove()
{
- $this->_mockItem->shouldReceive('remove')->once()->andReturn(false);
+ $this->_mockItem->shouldReceive('clear')->once()->andReturn(false);
- $result = $this->_sut->remove();
+ $result = $this->_sut->clear();
$this->assertFalse($result);
}
@@ -104,9 +104,9 @@ public function testGetKey()
public function testIsValid()
{
- $this->_mockItem->shouldReceive('isValid')->once()->andReturn(true);
+ $this->_mockItem->shouldReceive('isMiss')->once()->andReturn(true);
- $result = $this->_sut->isValid();
+ $result = $this->_sut->isMiss();
$this->assertTrue($result);
}
View
10 src/test/php/classes/tubepress/test/impl/cache/PoolDecoratorTest.php
@@ -27,7 +27,7 @@ class tubepress_test_impl_cache_PoolDecoratorTest extends tubepress_test_TubePre
public function onSetup()
{
- $this->_mockPool = ehough_mockery_Mockery::mock('ehough_stash_PoolInterface');
+ $this->_mockPool = ehough_mockery_Mockery::mock('ehough_stash_interfaces_PoolInterface');
$this->_sut = new tubepress_impl_cache_PoolDecorator($this->_mockPool);
@@ -36,7 +36,7 @@ public function onSetup()
public function testGetItemIterator()
{
- $this->_mockPool->shouldReceive('getItem')->once()->with('foo')->andReturn(ehough_mockery_Mockery::mock('ehough_stash_ItemInterface'));
+ $this->_mockPool->shouldReceive('getItem')->once()->andReturn(ehough_mockery_Mockery::mock('ehough_stash_interfaces_ItemInterface'));
$item = $this->_sut->getItemIterator(array('foo'));
@@ -46,7 +46,7 @@ public function testGetItemIterator()
public function testGetItem()
{
- $this->_mockPool->shouldReceive('getItem')->once()->with('foo')->andReturn(ehough_mockery_Mockery::mock('ehough_stash_ItemInterface'));
+ $this->_mockPool->shouldReceive('getItem')->once()->andReturn(ehough_mockery_Mockery::mock('ehough_stash_interfaces_ItemInterface'));
$item = $this->_sut->getItem('foo');
@@ -55,8 +55,8 @@ public function testGetItem()
public function testClear()
{
- $this->_mockPool->shouldReceive('clear')->once()->andReturn(true);
+ $this->_mockPool->shouldReceive('flush')->once()->andReturn(true);
- $this->assertTrue($this->_sut->clear());
+ $this->assertTrue($this->_sut->flush());
}
}
View
13 src/test/php/classes/tubepress/test/impl/feed/CacheAwareFeedFetcherTest.php
@@ -11,6 +11,7 @@
class tubepress_test_impl_feed_CacheAwareFeedFetcherTest extends tubepress_test_TubePressUnitTest
{
private static $_fakeUrl = 'http://foo.bar/x/y/z/index.php?cat=dog#bird';
+ private static $_fakeKey = 'http:~~foo.bar~x~y~z~index.php?cat=dog#bird';
/**
* @var tubepress_impl_feed_CacheAwareFeedFetcher
@@ -44,9 +45,9 @@ class tubepress_test_impl_feed_CacheAwareFeedFetcherTest extends tubepress_test_
public function onSetup()
{
- $this->_mockCache = $this->createMockSingletonService('ehough_stash_PoolInterface');
+ $this->_mockCache = $this->createMockSingletonService('ehough_stash_interfaces_PoolInterface');
$this->_mockHttpClient = $this->createMockSingletonService('ehough_shortstop_api_HttpClientInterface');
- $this->_mockItem = $this->createMockSingletonService('ehough_stash_ItemInterface');
+ $this->_mockItem = $this->createMockSingletonService('ehough_stash_interfaces_ItemInterface');
$this->_mockEventDispatcher = $this->createMockSingletonService(tubepress_api_event_EventDispatcherInterface::_);
$this->_mockExecutionContext = $this->createMockSingletonService(tubepress_spi_context_ExecutionContext::_);
@@ -56,8 +57,8 @@ public function onSetup()
public function testFetchCacheHit()
{
$this->_mockExecutionContext->shouldReceive('get')->once()->with(tubepress_api_const_options_names_Cache::CACHE_ENABLED)->andReturn(true);
- $this->_mockCache->shouldReceive('getItem')->once()->with(self::$_fakeUrl)->andReturn($this->_mockItem);
- $this->_mockItem->shouldReceive('isValid')->once()->andReturn(true);
+ $this->_mockCache->shouldReceive('getItem')->once()->with(self::$_fakeKey)->andReturn($this->_mockItem);
+ $this->_mockItem->shouldReceive('isMiss')->once()->andReturn(false);
$this->_mockItem->shouldReceive('get')->once()->andReturn('someValue');
$this->assertEquals('someValue', $this->_sut->fetch(self::$_fakeUrl));
@@ -67,8 +68,8 @@ public function testFetchCacheMiss()
{
$this->_mockExecutionContext->shouldReceive('get')->once()->with(tubepress_api_const_options_names_Cache::CACHE_ENABLED)->andReturn(true);
$this->_mockExecutionContext->shouldReceive('get')->once()->with(tubepress_api_const_options_names_Cache::CACHE_LIFETIME_SECONDS)->andReturn(333);
- $this->_mockCache->shouldReceive('getItem')->once()->with(self::$_fakeUrl)->andReturn($this->_mockItem);
- $this->_mockItem->shouldReceive('isValid')->once()->andReturn(false);
+ $this->_mockCache->shouldReceive('getItem')->once()->with(self::$_fakeKey)->andReturn($this->_mockItem);
+ $this->_mockItem->shouldReceive('isMiss')->once()->andReturn(true);
$this->_mockItem->shouldReceive('set')->once()->with('abc', 333)->andReturn(true);
$this->_mockItem->shouldReceive('get')->once()->andReturn('someValue');
$this->_setupHttpExecution();
View
2  src/test/php/classes/tubepress/test/impl/patterns/sl/ServiceLocatorTest.php
@@ -42,7 +42,7 @@ private function getTestMap()
tubepress_spi_boot_AddonDiscoverer::_,
tubepress_spi_boot_AddonBooter::_,
tubepress_spi_http_AjaxHandler::_,
- 'ehough_stash_PoolInterface',
+ 'ehough_stash_interfaces_PoolInterface',
tubepress_spi_embedded_EmbeddedHtmlGenerator::_,
tubepress_spi_environment_EnvironmentDetector::_,
tubepress_api_event_EventDispatcherInterface::_,
Please sign in to comment.
Something went wrong with that request. Please try again.