Skip to content

Commit

Permalink
Merge branch 'release/1.17'
Browse files Browse the repository at this point in the history
* 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
canton7 committed May 19, 2012
2 parents a51c186 + b08ee8d commit 00d374a
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion bootstrap.php
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Expand Up @@ -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.
Expand Down
20 changes: 5 additions & 15 deletions classes/casset.php
Expand Up @@ -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
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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;
}

/**
Expand All @@ -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;
}

/**
Expand Down Expand Up @@ -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 */
2 changes: 1 addition & 1 deletion classes/casset/addons/twig.php
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion classes/casset/csscompressor.php
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion classes/casset/cssurirewriter.php
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion classes/casset/jsmin.php
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config/casset.php
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions readme.md
Expand Up @@ -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.
Expand Down Expand Up @@ -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
------------
Expand All @@ -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
Expand Down

0 comments on commit 00d374a

Please sign in to comment.