Skip to content

Commit

Permalink
Merge branch 'release/v0.9.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
johndwells committed Apr 20, 2016
2 parents a8f9342 + f14adbe commit 7318a95
Show file tree
Hide file tree
Showing 200 changed files with 4,690 additions and 10,895 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Minimee for Craft - v0.9.6
# Minimee for Craft - v0.9.7

A [Craft CMS](http://buildwithcraft.com) port of the popular [Minimee](https://github.com/johndwells/Minimee) add-on for ExpressionEngine.

Expand Down
22 changes: 14 additions & 8 deletions minimee/MinimeePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function getName()
*/
public function getVersion()
{
return '0.9.6';
return '0.9.7';
}

/**
Expand Down Expand Up @@ -118,7 +118,7 @@ public function init()
*/
public static function log($msg, $level = LogLevel::Info, $force = false)
{
if(version_compare('2.0', craft()->getVersion(), '>'))
if (version_compare('2.0', craft()->getVersion(), '>'))
{
Craft::log($msg, $level, $force);
}
Expand Down Expand Up @@ -153,7 +153,7 @@ public function getSettingsHtml()

return craft()->templates->render('minimee/settings', array(
'settings' => $this->getSettings(),
'filesystemConfigExists' => (bool) IOHelper::fileExists($filesystemConfigPath)
'filesystemConfigExists' => (bool)IOHelper::fileExists($filesystemConfigPath)

));
}
Expand Down Expand Up @@ -189,16 +189,16 @@ public function getResourcePath($path)
{
if (strncmp($path, 'minimee/', 8) === 0)
{
return craft()->path->getStoragePath().'minimee/'.substr($path, 8);
return craft()->path->getStoragePath() . 'minimee/' . substr($path, 8);
}
}

/**
* Register our cache path that can then be deleted from CP
*/
function registerCachePaths()
public function registerCachePaths()
{
if(minimee()->service->settings->useResourceCache())
if (minimee()->service->settings->useResourceCache())
{
return array(
minimee()->service->makePathToStorageFolder() => Craft::t('Minimee caches')
Expand All @@ -219,7 +219,7 @@ function registerCachePaths()
*/
protected function _bindEvents()
{
craft()->on('minimee.createCache', function(Event $event) {
craft()->on('minimee.createCache', function() {
if(craft()->config->get('devMode'))
{
minimee()->service->deleteExpiredCache();
Expand All @@ -236,7 +236,13 @@ protected function _autoload()
{
require_once craft()->path->getPluginsPath() . 'minimee/library/vendor/autoload.php';

Craft::import('plugins.minimee.components.Minimee_Exception');
Craft::import('plugins.minimee.components.Minimee_InfoException');
Craft::import('plugins.minimee.components.Minimee_WarningException');
Craft::import('plugins.minimee.components.Minimee_ErrorException');

Craft::import('plugins.minimee.enums.MinimeeType');

Craft::import('plugins.minimee.models.Minimee_ISettingsModel');
Craft::import('plugins.minimee.models.Minimee_SettingsModel');
}
Expand All @@ -263,7 +269,7 @@ protected function _registerMinimeeDI()
return new Minimee_RemoteAssetModel($attributes);
});

minimee()->extend('makeClient', function(Zit $zit) {
minimee()->extend('makeClient', function() {
return new Client;
});
}
Expand Down
17 changes: 17 additions & 0 deletions minimee/components/Minimee_ErrorException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php namespace Craft;

/**
* Minimee by John D Wells
*
* @author John D Wells <http://johndwells.com>
* @package Minimee
* @since Craft 1.3
* @copyright Copyright (c) 2014, John D Wells
* @license http://opensource.org/licenses/mit-license.php MIT License
* @link http://github.com/johndwells/Minimee-Craft
*/

/**
*
*/
class Minimee_ErrorException extends Minimee_Exception {}
17 changes: 17 additions & 0 deletions minimee/components/Minimee_Exception.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php namespace Craft;

/**
* Minimee by John D Wells
*
* @author John D Wells <http://johndwells.com>
* @package Minimee
* @since Craft 1.3
* @copyright Copyright (c) 2014, John D Wells
* @license http://opensource.org/licenses/mit-license.php MIT License
* @link http://github.com/johndwells/Minimee-Craft
*/

/**
*
*/
class Minimee_Exception extends Exception {}
17 changes: 17 additions & 0 deletions minimee/components/Minimee_InfoException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php namespace Craft;

/**
* Minimee by John D Wells
*
* @author John D Wells <http://johndwells.com>
* @package Minimee
* @since Craft 1.3
* @copyright Copyright (c) 2014, John D Wells
* @license http://opensource.org/licenses/mit-license.php MIT License
* @link http://github.com/johndwells/Minimee-Craft
*/

/**
*
*/
class Minimee_InfoException extends Minimee_Exception {}
17 changes: 17 additions & 0 deletions minimee/components/Minimee_WarningException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php namespace Craft;

/**
* Minimee by John D Wells
*
* @author John D Wells <http://johndwells.com>
* @package Minimee
* @since Craft 1.3
* @copyright Copyright (c) 2014, John D Wells
* @license http://opensource.org/licenses/mit-license.php MIT License
* @link http://github.com/johndwells/Minimee-Craft
*/

/**
*
*/
class Minimee_WarningException extends Minimee_Exception {}
4 changes: 2 additions & 2 deletions minimee/enums/MinimeeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

class MinimeeType
{
const Css = 'css';
const Js = 'js';
const Css = 'css';
const Js = 'js';
}
7 changes: 4 additions & 3 deletions minimee/library/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
}
},
"require": {
"selvinortiz/zit": "dev-master",
"mrclay/minify" : "dev-master"
"mrclay/jsmin-php": "^2.3",
"mrclay/minify": "^2.3",
"selvinortiz/zit": "^0.5.2"
}
}
}
110 changes: 80 additions & 30 deletions minimee/library/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added minimee/library/composer.phar
Binary file not shown.
Loading

0 comments on commit 7318a95

Please sign in to comment.