Skip to content

Commit 2e6ac57

Browse files
Added documentatin and links
1 parent fbe188d commit 2e6ac57

File tree

4 files changed

+52
-23
lines changed

4 files changed

+52
-23
lines changed

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/tests export-ignore
22
/.gitattributes export-ignore
33
/.gitignore export-ignore
4-
/.travis.yml export-ignore
4+
/.scrutinizer.yml export-ignore
55
/LICENSE export-ignore
6+
/CODE_OF_CONDUCT.md export-ignore
7+
/CONTRIBUTING.md export-ignore
68
/phpunit.xml export-ignore
79
/README.md export-ignore

CODE_OF_CONDUCT.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The Moon Http-Middleware code of conduct is derived from the Ruby code of conduct. Any violations of the code of conduct may be reported to Damiano Petrungaro ([email protected]).
2+
3+
- Participants will be tolerant of opposing views.
4+
5+
- Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
6+
7+
- When interpreting the words and actions of others, participants should always assume good intentions.
8+
9+
- Behavior which can be reasonably considered harassment will not be tolerated.

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# How to Contribute
2+
3+
The contribution guideline is derived from the SlimPHP contribution guideline
4+
5+
## Pull Requests
6+
7+
1. Fork the Moon Http-Middleware repository
8+
2. Create a new branch for each feature or improvement
9+
3. Send a pull request from each feature branch to the **develop** branch
10+
11+
It is very important to separate new features or improvements into separate feature branches, and to send a
12+
pull request for each branch.
13+
14+
This allows me to review and pull in new features or improvements individually.
15+
16+
## Style Guide
17+
18+
All pull requests must adhere to the [PSR-2 standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md).
19+
20+
## Unit Testing
21+
22+
All pull requests must be accompanied by passing unit tests and complete code coverage. The Moon Http-Middleware uses phpunit for testing.
23+
24+
[Learn about PHPUnit](https://github.com/sebastianbergmann/phpunit/)

README.md

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,36 @@
11
# Moon - HTTP Middleware
2-
A very simple HTTP Middleware implementation
32

43
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/moon-php/http-middleware/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/moon-php/http-middleware/?branch=master)
54
[![Code Coverage](https://scrutinizer-ci.com/g/moon-php/http-middleware/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/moon-php/http-middleware/?branch=master)
65
[![Build Status](https://scrutinizer-ci.com/g/moon-php/http-middleware/badges/build.png?b=master)](https://scrutinizer-ci.com/g/moon-php/http-middleware/build-status/master)
7-
86
**Accpeted as [awesome psr-15 middleware](https://github.com/middlewares/awesome-psr15-middlewares#packages) package**
97

10-
## Documentation
11-
12-
- Delegate
13-
14-
- InvalidArgumentException
15-
168

9+
### [Documentation](http://moon-php.com/docs/http-middleware/)
1710

18-
### Delegate
11+
## Tests
1912

20-
__namespace: Moon\HttpMiddleware\Delegate__
13+
To execute the test suite, you'll need phpunit.
14+
_It's a dev-dependency of this package_
2115

22-
According to the PSR15 proposal :
16+
```bash
17+
$ php vendon/bin/phpunit
18+
```
2319

24-
_The DelegateInterface defines a single method that accepts a request and returns a response._
20+
## Contributing
2521

26-
_The delegate interface must be implemented by any middleware dispatcher that uses middleware implementing MiddlewareInterface._
22+
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
2723

28-
So i decided to make the **Delegate** a **Middleware Dispatcher** itself.
24+
## Learn More
2925

30-
The object is really simple, it has a constructor that requires an **array of MiddlewareInterface** implementor and a callable to use as **default** response.
26+
Learn more at these links:
3127

32-
The MiddlewareInterface implementor will be directly implemented by the userland and inserted into the array.
28+
- [Website](http://moon-php.com)
3329

34-
$request = new ServerRequestImplementor();
35-
$delegate = new Delegate([new MiddlewareOne(), new MiddlewareTwo(), new MiddlewareThree()], new DefaultResponse());
36-
$delegate->process($request);
30+
## Security
3731

38-
### InvalidArgumentException
32+
If you discover security related issues, please email [email protected] instead of using the issue tracker.
3933

40-
__namespace Moon\HttpMiddleware\Exception\InvalidArgumentException__
34+
## License
4135

42-
If an object passed into the array is not a MiddlewareInterface implementor and **InvalidArgumentException** will be thrown.
36+
The Moon Http-Middleware is licensed under the MIT license. See [License File](LICENSE.md) for more information.

0 commit comments

Comments
 (0)