Skip to content

Commit

Permalink
Changing Vendor name to uppercase.
Browse files Browse the repository at this point in the history
  • Loading branch information
meenie committed Mar 19, 2013
1 parent b27a22d commit 777b5f0
Show file tree
Hide file tree
Showing 24 changed files with 83 additions and 86 deletions.
18 changes: 9 additions & 9 deletions README.md
Expand Up @@ -45,12 +45,12 @@ Munee caches asset requests server side and returns a `304 Not Modified` on subs

### Step 1: Download/Install Munee using composer

Add `meenie/munee` to your `composer.json` file:
Add `meenie/Munee` to your `composer.json` file:

```js
{
"require": {
"meenie/munee": "*"
"meenie/Munee": "*"
}
}
```
Expand All @@ -67,7 +67,7 @@ Now install Munee
$ php composer.phar install
```

Make sure the `cache` folder inside `vendor/meenie/munee` is writable
Make sure the `cache` folder inside `vendor/meenie/Munee` is writable

### Step 2: Use Munee in your library

Expand All @@ -77,7 +77,7 @@ Create a file called `munee.php` that is web accessible and paste in the followi
// Include the composer autoload file
require 'vendor/autoload.php';
// Echo out the response
echo \munee\Dispatcher::run(new munee\Request());
echo \Munee\Dispatcher::run(new Munee\Request());
```

**Note: Update the correct path to the `autoload.php` file**
Expand All @@ -102,13 +102,13 @@ All LESS & SCSS (SASS is not supported!) files are automatically compiled into C
If you would like to run **all css** through the `LESS` compiler, then you will need to pass the `lessifyAllCss` parameter into the `Request` class with the value of `true` when you instantiate it:

```php
echo \munee\Dispatcher::run(new munee\Request(array('css' => array('lessifyAllCss' => true))));
echo \Munee\Dispatcher::run(new Munee\Request(array('css' => array('lessifyAllCss' => true))));
```

If you would like to run **all css** through the `scssphp` compiler, then you will need to pass the `scssifyAllCss` parameter into the `Request` class with the value of `true` when you instantiate it:

```php
echo \munee\Dispatcher::run(new munee\Request(array('css' => array('scssifyAllCss' => true))));
echo \Munee\Dispatcher::run(new Munee\Request(array('css' => array('scssifyAllCss' => true))));
```

**One Request For All CSS**
Expand Down Expand Up @@ -207,7 +207,7 @@ CoffeeScript can also be automatically compiled if included in your html. When

Build status
------------
[![Build Status](https://secure.travis-ci.org/meenie/munee.png?branch=master)](http://travis-ci.org/meenie/munee)
[![Build Status](https://secure.travis-ci.org/meenie/Munee.png?branch=master)](http://travis-ci.org/meenie/Munee)

Tips & Tricks
-------------
Expand All @@ -217,7 +217,7 @@ Tips & Tricks
If you want to resize images through Munee in your emails, you will need to turn off one of the security features in Munee. This is the Referrer check. To get it working, you can pass in the following option when you instantiate Munee:

```php
echo \munee\Dispatcher::run(new \munee\Request(array(
echo \Munee\Dispatcher::run(new \Munee\Request(array(
'image' => array(
'checkReferrer' => false
)
Expand Down Expand Up @@ -247,5 +247,5 @@ You will need to do this:
If for some reason you would like to prevent Munee from setting any headers, you can pass a second argument in the Dispatcher::run() function with `array('setHeaders' => false)`.

```php
$content = \munee\Dispatcher::run(new \munee\Request(array('files' => '/css/site.css')), array('setHeaders' => false));
$content = \Munee\Dispatcher::run(new \Munee\Request(array('files' => '/css/site.css')), array('setHeaders' => false));
```
3 changes: 0 additions & 3 deletions composer.json
Expand Up @@ -4,9 +4,6 @@
"keywords": ["php","less","scss","coffeescript","cache","asset optimisation","asset optimization","asset management","css","javascript","lessphp","scssphp","image manipulation"],
"homepage": "http://mun.ee",
"license": "MIT",
"replace": {
"meenie/munee": "*"
},
"authors": [
{
"name": "Cody Lundquist",
Expand Down
16 changes: 8 additions & 8 deletions config/bootstrap.php
@@ -1,10 +1,10 @@
<?php

use munee\asset\Registry;
use Munee\asset\Registry;

// DIRECTORY_SEPARATOR alias
defined('DS') || define('DS' , DIRECTORY_SEPARATOR);
// Folder where munee is located
// Folder where Munee is located
defined('MUNEE_FOLDER') || define('MUNEE_FOLDER', dirname(__DIR__));
// Define Webroot if hasn't already been defined
defined('WEBROOT') || define('WEBROOT', str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME']));
Expand All @@ -14,20 +14,20 @@
/**
* Register the CSS Asset Class with the extensions .css and .less
*/
Registry::register(array('css', 'less', 'scss'), function (\munee\Request $Request) {
return new \munee\asset\type\Css($Request);
Registry::register(array('css', 'less', 'scss'), function (\Munee\Request $Request) {
return new \Munee\asset\type\Css($Request);
});

/**
* Register the JavaScript Asset Class with the extension .js
*/
Registry::register(array('js', 'coffee'), function (\munee\Request $Request) {
return new \munee\asset\type\JavaScript($Request);
Registry::register(array('js', 'coffee'), function (\Munee\Request $Request) {
return new \Munee\asset\type\JavaScript($Request);
});

/**
* Register the Image Asset Class with the extensions .jpg, .jpeg, .gif, and .png
*/
Registry::register(array('jpg', 'jpeg', 'gif', 'png'), function (\munee\Request $Request) {
return new \munee\asset\type\Image($Request);
Registry::register(array('jpg', 'jpeg', 'gif', 'png'), function (\Munee\Request $Request) {
return new \Munee\asset\type\Image($Request);
});
2 changes: 1 addition & 1 deletion src/Munee/Dispatcher.php
Expand Up @@ -6,7 +6,7 @@
* @license http://opensource.org/licenses/mit-license.php
*/

namespace munee;
namespace Munee;

/**
* The outermost layer of Munee that wraps everything in a Try/Catch block and also instantiates the Render Class
Expand Down
2 changes: 1 addition & 1 deletion src/Munee/ErrorException.php
Expand Up @@ -6,6 +6,6 @@
* @license http://opensource.org/licenses/mit-license.php
*/

namespace munee;
namespace Munee;

class ErrorException extends \Exception {}
8 changes: 4 additions & 4 deletions src/Munee/Request.php
Expand Up @@ -6,10 +6,10 @@
* @license http://opensource.org/licenses/mit-license.php
*/

namespace munee;
namespace Munee;

use munee\ErrorException;
use munee\asset\Registry;
use Munee\ErrorException;
use Munee\asset\Registry;

/**
* Munee Request Class
Expand Down Expand Up @@ -193,7 +193,7 @@ protected function _getParamOptions($checkParam)
*
* @return string|array
*
* @throws \munee\ErrorException
* @throws \Munee\ErrorException
*/
protected function _getParamValue($param, $paramOptions, $value)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Munee/Response.php
Expand Up @@ -6,7 +6,7 @@
* @license http://opensource.org/licenses/mit-license.php
*/

namespace munee;
namespace Munee;

/**
* Munee Response Class
Expand Down Expand Up @@ -34,8 +34,8 @@ class Response
*/
public function __construct($AssetType)
{
// Must be a Sub-Class of \munee\asset\Type
$baseClass = '\\munee\\asset\\Type';
// Must be a Sub-Class of \Munee\asset\Type
$baseClass = '\\Munee\\asset\\Type';
if (! is_subclass_of($AssetType, $baseClass)) {
throw new ErrorException(
get_class($AssetType) . ' is not a sub class of ' . $baseClass
Expand Down
2 changes: 1 addition & 1 deletion src/Munee/Utils.php
@@ -1,6 +1,6 @@
<?php

namespace munee;
namespace Munee;

class Utils
{
Expand Down
2 changes: 1 addition & 1 deletion src/Munee/asset/Filter.php
Expand Up @@ -6,7 +6,7 @@
* @license http://opensource.org/licenses/mit-license.php
*/

namespace munee\asset;
namespace Munee\asset;

/**
* Filter to manipulate images
Expand Down
4 changes: 2 additions & 2 deletions src/Munee/asset/NotFoundException.php
Expand Up @@ -6,8 +6,8 @@
* @license http://opensource.org/licenses/mit-license.php
*/

namespace munee\asset;
namespace Munee\asset;

use munee\ErrorException;
use Munee\ErrorException;

class NotFoundException extends ErrorException {}
8 changes: 4 additions & 4 deletions src/Munee/asset/Registry.php
Expand Up @@ -6,10 +6,10 @@
* @license http://opensource.org/licenses/mit-license.php
*/

namespace munee\asset;
namespace Munee\asset;

use munee\ErrorException;
use munee\Request;
use Munee\ErrorException;
use Munee\Request;
use Closure;

/**
Expand Down Expand Up @@ -60,7 +60,7 @@ public static function unRegister($extensions)
/**
* Return the AssetClass based on the file extension in the Request Class
*
* @param \munee\Request $Request
* @param \Munee\Request $Request
*
* @return Object
*
Expand Down
12 changes: 6 additions & 6 deletions src/Munee/asset/Type.php
Expand Up @@ -6,11 +6,11 @@
* @license http://opensource.org/licenses/mit-license.php
*/

namespace munee\asset;
namespace Munee\asset;

use munee\Request;
use munee\Utils;
use munee\asset\NotFoundException;
use Munee\Request;
use Munee\Utils;
use Munee\asset\NotFoundException;

/**
* Base Asset Class
Expand Down Expand Up @@ -58,7 +58,7 @@ abstract class Type
/**
* Constructor
*
* @param \munee\Request $Request
* @param \Munee\Request $Request
*
* @throws NotFoundException
*/
Expand All @@ -71,7 +71,7 @@ public function __construct(Request $Request)
$assetShortName = strtolower(preg_replace('%^.*\\\\%','', get_class($this)));
$allowedParams = array();
foreach (array_keys($rawParams) as $filterName) {
$filterClass = 'munee\\asset\\filter\\' . $assetShortName . '\\' . ucfirst($filterName);
$filterClass = 'Munee\\asset\\filter\\' . $assetShortName . '\\' . ucfirst($filterName);
if (class_exists($filterClass)) {
$Filter = new $filterClass();
$allowedParams += $Filter->getAllowedParams();
Expand Down
6 changes: 3 additions & 3 deletions src/Munee/asset/filter/css/Minify.php
Expand Up @@ -6,10 +6,10 @@
* @license http://opensource.org/licenses/mit-license.php
*/

namespace munee\asset\filter\css;
namespace Munee\asset\filter\css;

use munee\asset\Filter;
use munee\Utils;
use Munee\asset\Filter;
use Munee\Utils;

/**
* Minify Filter for CSS
Expand Down
6 changes: 3 additions & 3 deletions src/Munee/asset/filter/image/Resize.php
Expand Up @@ -6,10 +6,10 @@
* @license http://opensource.org/licenses/mit-license.php
*/

namespace munee\asset\filter\image;
namespace Munee\asset\filter\image;

use munee\asset\Filter;
use munee\ErrorException;
use Munee\asset\Filter;
use Munee\ErrorException;
use Imagine\Image\ImageInterface;
use Imagine\Image\Box;
use Imagine\Image\Color;
Expand Down
4 changes: 2 additions & 2 deletions src/Munee/asset/filter/javascript/Minify.php
Expand Up @@ -6,9 +6,9 @@
* @license http://opensource.org/licenses/mit-license.php
*/

namespace munee\asset\filter\javascript;
namespace Munee\asset\filter\javascript;

use munee\asset\Filter;
use Munee\asset\Filter;

/**
* Minify Filter for JavaScript
Expand Down
6 changes: 3 additions & 3 deletions src/Munee/asset/type/Css.php
Expand Up @@ -6,10 +6,10 @@
* @license http://opensource.org/licenses/mit-license.php
*/

namespace munee\asset\type;
namespace Munee\asset\type;

use munee\Utils;
use munee\asset\Type;
use Munee\Utils;
use Munee\asset\Type;
use lessc;

/**
Expand Down
8 changes: 4 additions & 4 deletions src/Munee/asset/type/Image.php
Expand Up @@ -6,11 +6,11 @@
* @license http://opensource.org/licenses/mit-license.php
*/

namespace munee\asset\type;
namespace Munee\asset\type;

use munee\ErrorException;
use munee\asset\Type;
use munee\Utils;
use Munee\ErrorException;
use Munee\asset\Type;
use Munee\Utils;

/**
* Handles Images
Expand Down
4 changes: 2 additions & 2 deletions src/Munee/asset/type/JavaScript.php
Expand Up @@ -6,9 +6,9 @@
* @license http://opensource.org/licenses/mit-license.php
*/

namespace munee\asset\type;
namespace Munee\asset\type;

use munee\asset\Type;
use Munee\asset\Type;
use CoffeeScript;

/**
Expand Down
14 changes: 7 additions & 7 deletions tests/Munee/cases/RequestTest.php
Expand Up @@ -6,13 +6,13 @@
* @license http://opensource.org/licenses/mit-license.php
*/

namespace munee\cases;
namespace Munee\cases;

use munee\Request;
use munee\Utils;
use Munee\Request;
use Munee\Utils;

/**
* Tests for the \munee\Request Class
* Tests for the \Munee\Request Class
*
* @author Cody Lundquist
*/
Expand Down Expand Up @@ -49,7 +49,7 @@ public function testNoFilesQueryStringParam()
{
$Request = new Request();

$this->setExpectedException('munee\ErrorException');
$this->setExpectedException('Munee\ErrorException');
$Request->init();
}

Expand Down Expand Up @@ -89,7 +89,7 @@ public function testExtensionNotSupported()
'files' => '/js/foo.jpg,/js/bar.js'
);

$this->setExpectedException('munee\ErrorException');
$this->setExpectedException('Munee\ErrorException');
$Request->init();
}

Expand Down Expand Up @@ -219,7 +219,7 @@ public function testWrongParamValue()
)
);

$this->setExpectedException('munee\ErrorException');
$this->setExpectedException('Munee\ErrorException');
$Request->parseParams($allowedParams);
}
}

0 comments on commit 777b5f0

Please sign in to comment.