Skip to content

Commit 32fe626

Browse files
authored
Merge pull request #37 from atoum/update-atoum-3
Bump dependencies to support atoum 3.x
2 parents 1f7c554 + e038d51 commit 32fe626

File tree

7 files changed

+41
-22
lines changed

7 files changed

+41
-22
lines changed

.atoum.php

Lines changed: 0 additions & 8 deletions
This file was deleted.

.bootstrap.atoum.php

Lines changed: 0 additions & 3 deletions
This file was deleted.

.travis.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,35 @@
11
language: php
2+
23
php:
34
- 5.4
45
- 5.5
56
- 5.6
67
- 7.0
8+
- 7.1
9+
- nightly
710

811
cache:
912
directories:
1013
- vendor
1114

15+
sudo: false
16+
1217
env:
1318
matrix:
1419
- COMPOSER_PREFER="--prefer-stable"
1520
- COMPOSER_PREFER="--prefer-lowest"
16-
notifications:
17-
irc: "irc.freenode.org##atoum"
18-
sudo: false
21+
22+
matrix:
23+
allow_failures:
24+
- php: nightly
25+
exclude:
26+
- php: 7.0
27+
env: COMPOSER_PREFER="--prefer-lowest"
28+
- php: 7.1
29+
env: COMPOSER_PREFER="--prefer-lowest"
30+
- php: nightly
31+
env: COMPOSER_PREFER="--prefer-lowest"
32+
1933
script:
2034
- composer update $COMPOSER_PREFER
21-
- ./vendor/bin/atoum
35+
- vendor/bin/atoum --test-ext

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.3.0 - 2017-02-24
2+
3+
* [#37](https://github.com/atoum/ruler-extension/pull/37) Support atoum 3.x ([@vdechenaux] & [@jubianchi])
4+
15
# 1.2.0 - 2016-01-19
26

37
* [#30](https://github.com/atoum/ruler-extension/pull/30) Update Hoa dependency ([@jubianchi] & [@Hywan])
@@ -27,3 +31,4 @@
2731
[@jubianchi]: https://github.com/jubianchi
2832
[@Metalaka]: https://github.com/Metalaka
2933
[@Hywan]: https://github.com/Hywan
34+
[@vdechenaux]: https://github.com/vdechenaux

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,18 @@ Install extension using [composer](https://getcomposer.org):
4141
composer require --dev atoum/ruler-extension
4242
```
4343

44-
Enable the extension using atoum configuration file:
44+
The extension will be automatically loaded. If you ever want to unload it, you can add this to your configuration file:
4545

4646
```php
4747
<?php
4848

4949
// .atoum.php
5050

51-
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
51+
use mageekguy\atoum\ruler;
5252

53-
$extension = new \atoum\ruler\extension($script);
54-
$extension->addToRunner($extension);
53+
$runner->removeExtension(ruler\extension::class);
5554
```
5655

57-
5856
## Examples
5957

6058

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "The atoum ruler-extension allows you to filter your tests using Hoa\\Ruler",
44
"keywords": ["TDD", "atoum", "test", "unit testing", "ruler", "atoum-extension"],
55
"require": {
6-
"atoum/atoum": ">=1.3.0,<3.0",
6+
"atoum/atoum": "^2.9 | ^3.0",
77
"hoa/ruler": ">=1.15.11.09,<2.0 | >=2.16.01.15,<3.0"
88
},
99
"conflict": {
@@ -23,6 +23,7 @@
2323
"autoload": {
2424
"psr-4": {
2525
"mageekguy\\atoum\\ruler\\": "classes"
26-
}
26+
},
27+
"files": ["configuration.php"]
2728
}
2829
}

configuration.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
use mageekguy\atoum;
4+
use mageekguy\atoum\scripts;
5+
6+
if (defined('mageekguy\atoum\scripts\runner') === true) {
7+
scripts\runner::addConfigurationCallable(function(atoum\configurator $script, atoum\runner $runner) {
8+
$extension = new atoum\ruler\extension($script);
9+
10+
$extension->addToRunner($runner);
11+
});
12+
}

0 commit comments

Comments
 (0)