Skip to content

Commit 23fa07b

Browse files
committed
Merge branch 'release/v0.1.0' into main
2 parents 4fdb9e8 + 78801db commit 23fa07b

22 files changed

+682
-165
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ Features:
2424
- [x] Fast API client
2525
- [x] LAPI Support
2626
- [x] Built-in support for the most known cache systems: Redis, Memcached, PhpFiles
27-
- [x] Rupture mode
28-
- [ ] Stream mode (alpha version)
27+
- [x] Live mode
28+
- [x] Stream mode
29+
- [x] Log events using monolog
2930
- [ ] Cap remediation level (ex: for sensitives websites: ban will be capped to captcha)
30-
- [ ] Direct CAPI support
31-
- [ ] Log events using monolog
32-
- [ ] PHP 5.6 retro compatibility (currenly PHP 7.2+)
31+
- [ ] PHP 7.x+8.x compatibility (currenly only PHP 7.2+)
3332
- [ ] Retrieve cache items with pagination
33+
- [ ] Direct CAPI support
3434
- [ ] Release 1.0.0 version
3535
- [ ] Support more cache systems (Apcu, Couchbase, Doctrine, Pdo)
3636

3737
Code:
38-
- [x] Docker dev environment (Dockerized Crowdsec, Redis, Memcached, Composer, PHPUnit)
38+
- [x] Docker dev environment (Dockerized Crowdsec, Redis, Memcached, PHP)
3939
- [x] Continuous Integration (CI, includes Integration Tests and Super Linter)
4040
- [x] Integration tests (with TDD)
4141
- [x] Documented (Static documentation, PHP Doc)

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@
1111
},
1212
"require-dev": {
1313
"symfony/var-dumper": "^5.1",
14-
"phpunit/phpunit": "^8.5",
1514
"predis/predis": "^1.1",
15+
"phpstan/phpstan": "^0.12.58",
16+
"bramus/monolog-colored-line-formatter": "^3.0",
1617
"friendsofphp/php-cs-fixer": "^2.16",
17-
"phpstan/phpstan": "^0.12.58"
18+
"phpunit/phpunit": "^8.5"
1819
},
1920
"require": {
2021
"symfony/config": "^5.1",
21-
"symfony/cache": "^5.1"
22+
"symfony/cache": "^5.1",
23+
"monolog/monolog": "^2.1"
2224
},
2325
"scripts": {
2426
"lintfix":"vendor/bin/php-cs-fixer fix --verbose --show-progress=estimating --config=.php_cs ./src",

composer.lock

Lines changed: 195 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker-compose.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@ services:
66
- DISABLE_AGENT=true
77
volumes:
88
- ./var/docker-data:/var/lib/crowdsec/data
9-
composer:
10-
image: composer:latest
11-
environment:
12-
- COMPOSER_CACHE_DIR=/app/var/cache/composer
13-
volumes:
14-
- .:/app
9+
ports:
10+
- 8085:8080
1511
redis:
1612
image: redis:6-alpine
1713
memcached:

docs/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Full configuration reference
1616
// Optional. In seconds. The timeout when calling CAPI/LAPI. Defaults to 2 sec.
1717
'api_timeout'=> 2,
1818
19-
// Optional. true to enable rupture mode, false to enable the stream mode. Default to true.
20-
'rupture_mode'=> true,
19+
// Optional. true to enable live mode, false to enable the stream mode. Default to true.
20+
'live_mode'=> true,
2121
2222
// Optional. Cap the remediation to the selected one. Select from 'bypass' (minimum remediation), 'captcha' or 'ban' (maximum remediation). Defaults to 'ban'.
2323
'max_remediation'=> 'ban',

docs/core-development.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Lint code
2727

2828
.. code-block:: sh
2929
30-
composer lintfix
31-
composer phpstan
30+
docker-composer run app composer lintfix
31+
docker-composer run app composer phpstan
3232
3333
Also, you can run "Super linter" locally:
3434

@@ -42,6 +42,8 @@ Full details here: https://github.com/github/super-linter/blob/master/docs/run-l
4242
Git Flow
4343
--------
4444

45+
More info here: https://danielkummer.github.io/git-flow-cheatsheet/
46+
4547
To start a new feature:
4648

4749
.. code-block:: sh
@@ -61,7 +63,12 @@ To pull the feature:
6163
6264
Important: As we use pull requests, we just don't use `git flow feature finish <name>` and we just remove the local branch when the PR is merged.
6365

66+
To create a release:
6467

68+
.. code-block:: sh
69+
git flow release start vx.x.x
70+
git flow release publish vx.x.x
71+
git flow release finish vx.x.x
6572
6673
https://stackoverflow.com/questions/55706856/proper-way-to-use-gitflow-with-pull-requests
6774

docs/getting-started.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ In your existing project, install the library:
1010
1111
$ composer install crowdsec/bouncer-library
1212
13-
Use the bouncer library (rupture mode)
13+
Use the bouncer library (live mode)
1414
--------------------------------------
1515

1616
.. code-block:: php
@@ -31,7 +31,7 @@ Use the bouncer library (rupture mode)
3131
3232
$remediation = $bouncer->getRemediationForIp($blockedIp);// Return "ban", "catpcha" or "bypass"
3333
34-
Use the bouncer library (steam mode)
34+
Use the bouncer library (stream mode)
3535
------------------------------------
3636

3737
TODO P2

docs/tests.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ The install composer dependencies:
2626

2727
.. code-block:: sh
2828
29-
docker-compose run --rm composer install
29+
docker-composer run app composer install
3030
3131
.. _3-run-tests:
3232

3333
3) Run tests
3434
~~~~~~~~~~~~
3535

36-
Finally, run the tests.sh file:
36+
Finally, run the tests-local.sh file:
3737

3838
.. code-block:: sh
3939

0 commit comments

Comments
 (0)