Skip to content

Commit

Permalink
Merge pull request #22 from mirko-pagliai/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mirko-pagliai authored Jun 1, 2017
2 parents e5f457e + 322c3d8 commit 05c9c6c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# 1.x branch
## 1.0 branch
### 1.0.5
## 1.1 branch
# 1.1.0
* configuration parameters have the name of the plugin (`Thumber`) as prefix. So
now they are `Thumber.driver` and `Thumber.target`;
* the target directory is created automatically, if it does not exist;
* added `rtr()` global function;
* added `THUMBER` constant.

## 1.0 branch
### 1.0.4
* added `ThumbNotFoundException` class. This exception is thrown when you
request a thumb that is not available;
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,18 @@ The plugin uses some configuration parameters and you can set them using the
For example, you can do this at the bottom of the file `APP/config/app.php`
of your application.

**Note**: up to the *1.0.4* version, the configuration parameters had the `Thumbs` name as a prefix. Starting with the *1.1.0* version, they have the plugin name (`Thumber`) as a prefix.

### Configuration values

Configure::write('Thumbs.driver', 'imagick');
Configure::write('Thumber.driver', 'imagick');

Setting `Thumbs.driver`, you can choose which driver to use for the creation of
Setting `Thumber.driver`, you can choose which driver to use for the creation of
thumbnails. Valid values are `imagick` or `gd`.

Configure::write('Thumbs.target', TMP . 'thumbs');
Configure::write('Thumber.target', TMP . 'thumbs');

Setting `Thumbs.target`, you can use another directory where the plugin will
Setting `Thumber.target`, you can use another directory where the plugin will
save thumbnails.

## How to use
Expand Down
2 changes: 1 addition & 1 deletion config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

//Sets the default Thumber name
if (!defined('THUMBER')) {
define('THUMBER', 'Thumbs');
define('THUMBER', 'Thumber');
}

//Default thumbnails driver
Expand Down
2 changes: 1 addition & 1 deletion config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
use Cake\Routing\Router;

Router::plugin('Thumber', ['path' => '/thumb'], function ($routes) {
Router::plugin(THUMBER, ['path' => '/thumb'], function ($routes) {
$routes->connect(
'/:basename',
['controller' => 'Thumbs', 'action' => 'thumb'],
Expand Down
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
],
]);

Configure::write('Thumbs.comparingDir', TESTS . DS . 'comparing_files' . DS . 'imagick' . DS);
Configure::write('Thumber.comparingDir', TESTS . DS . 'comparing_files' . DS . 'imagick' . DS);

Plugin::load('Thumber', [
'bootstrap' => true,
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.5
1.1.0

0 comments on commit 05c9c6c

Please sign in to comment.