Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'release/1.17'

* release/1.17:
  Update changelog
  Bump version to v1.17
  Add Peter Wiggers to contributers
  FuelException instead of Fuel_Exception (removed in FuelPHP v1.2)
  Add iturgeon to the contributers
  Teach js_inline() and css_inline() not to create multiple tags
  Fix typos in readme
  Correct 'contributing' instructions in readme
  • Loading branch information...
commit 00d374a91b69df320a178f512529b79cdcebd7e4 2 parents a51c186 + b08ee8d
@canton7 authored
View
2  bootstrap.php
@@ -4,7 +4,7 @@
* Casset: Convenient asset library for FuelPHP.
*
* @package Casset
- * @version v1.16
+ * @version v1.17
* @author Antony Male
* @license MIT License
* @copyright 2012 Antony Male
View
6 changelog.md
@@ -3,6 +3,12 @@ Changelog
This file lists the important changes between versions. For a list of minor changes, check the log.
+v1.17
+-----
+ - `js_inline` and `css_inline` won't spit out lots of consecutive tags.
+ - Casset_Exception inherits from FuelException instead of the (deprecated) Fuel_Exception.
+ - Various documentation fixes.
+
v1.16
-----
- Add 'img_url' to twig extension, and improve twig docs slightly.
View
20 classes/casset.php
@@ -4,7 +4,7 @@
* Casset: Convenient asset library for FuelPHP.
*
* @package Casset
- * @version v1.16
+ * @version v1.17
* @author Antony Male
* @license MIT License
* @copyright 2012 Antony Male
@@ -651,7 +651,7 @@ public static function add_deps($type, $group, $new_deps)
if (!is_array($new_deps))
$new_deps = array($new_deps);
if (!array_key_exists($group, static::$groups[$type]))
- throw new \Fuel_Exception("Group $group ($type) doesn't exist, so can't add deps to it.");
+ throw new Casset_Exception("Group $group ($type) doesn't exist, so can't add deps to it.");
// Avoid duplicates in deps array
$deps = &static::$groups[$type][$group]['deps'];
$deps = array_unique(array_merge($deps, $new_deps));
@@ -1157,12 +1157,7 @@ public static function render_js_inline()
else
$attr = array();
- $ret = '';
- foreach (static::$inline_assets['js'] as $content)
- {
- $ret .= html_tag('script', $attr, PHP_EOL.$content.PHP_EOL).PHP_EOL;
- }
- return $ret;
+ return html_tag('script', $attr, PHP_EOL.implode(PHP_EOL, static::$inline_assets['js']).PHP_EOL).PHP_EOL;
}
/**
@@ -1180,12 +1175,7 @@ public static function render_css_inline()
else
$attr = array();
- $ret = '';
- foreach (static::$inline_assets['css'] as $content)
- {
- $ret .= html_tag('style', $attr, PHP_EOL.$content.PHP_EOL).PHP_EOL;
- }
- return $ret;
+ return html_tag('style', $attr, PHP_EOL.implode(PHP_EOL, static::$inline_assets['css']).PHP_EOL).PHP_EOL;
}
/**
@@ -1289,7 +1279,7 @@ protected static function clear_cache_base($filter = '*', $before = 'now')
}
-class Casset_Exception extends \Fuel_Exception {
+class Casset_Exception extends \FuelException {
}
/* End of file casset.php */
View
2  classes/casset/addons/twig.php
@@ -4,7 +4,7 @@
* Casset: Convenient asset library for FuelPHP.
*
* @package Casset
- * @version v1.16
+ * @version v1.17
* @author Antony Male
* @author Derek Myers
* @license MIT License
View
2  classes/casset/csscompressor.php
@@ -17,7 +17,7 @@
* This library is used as part of Casset.
*
* @package Casset
- * @version v1.16
+ * @version v1.17
* @author Antony Male
* @license MIT License
* @link http://github.com/canton7/fuelphp-casset
View
2  classes/casset/cssurirewriter.php
@@ -10,7 +10,7 @@
* This library is used as part of Casset.
*
* @package Casset
- * @version v1.16
+ * @version v1.17
* @author Antony Male
* @license MIT License
* @link http://github.com/canton7/fuelphp-casset
View
2  classes/casset/jsmin.php
@@ -52,7 +52,7 @@
/**
* This library is used as part of Casset.
* @package Casset
- * @version v1.16
+ * @version v1.17
* @author Antony Male
* @license MIT License
* @link http://github.com/canton7/fuelphp-casset
View
2  config/casset.php
@@ -3,7 +3,7 @@
* Casset: Convenient asset library for FuelPHP.
*
* @package Casset
- * @version v1.16
+ * @version v1.17
* @author Antony Male
* @license MIT License
* @copyright 2012 Antony Male
View
7 readme.md
@@ -817,7 +817,7 @@ RewriteRule ^(.*)\/(.+)\.([0-9]+)\.(js|css|jpg|jpeg|gif|png)$ $1/$2.$4 [L]
Addons
------
-Casset also ships with the following addons, to easy integration wit third-party frameworks.
+Casset also ships with the following addons, to ease integration with third-party frameworks.
For more details, see `classes/casset/addons/readme.md`.
- **Twig** - Adds the `render`, `render_js`, `render_css`, and `img` functions to Twig.
@@ -918,6 +918,8 @@ The following people have helped Casset become what it is, so thank you!
- [Anton Stoychev](https://github.com/antitoxic)
- [gnodeb](https://github.com/gnodeb)
- [Derek Myers](https://github.com/dmyers)
+ - [Ian Turgeon](https://github.com/iturgeon)
+ - [Peter Wiggers](https://github.com/pwwebdev)
Contributing
------------
@@ -931,8 +933,9 @@ For example:
# Fork canton7/fuelphp-casset on github
# Clone your new repo
$ git clone git@github.com:your_user/fuelphp-casset.git
-# Add my repo as a remote, so you can pull in new changes
+# Add my repo as a remote, so you can pull in new changes, then fetch from it
$ git remote add upstream git://github.com/canton7/fuelphp-casset.git
+$ git fetch upstream
# Create a new feature branch based off my develop branch
$ git checkout -b feature/my_feature_name upstream/develop
# Push this branch to origin
Please sign in to comment.
Something went wrong with that request. Please try again.