Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit b4e7758

Browse files
committed
Merge branch 'feature/mkdocs'
Close #170
2 parents 452b01b + 2398609 commit b4e7758

File tree

10 files changed

+60
-39
lines changed

10 files changed

+60
-39
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
doc/html/
22
vendor/
3+
zf-mkdoc-theme/
34
composer.lock
45
phpunit.xml

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ cache:
66
directories:
77
- $HOME/.composer/cache
88
- vendor
9+
- $HOME/.local
10+
- zf-mkdoc-theme
11+
12+
env:
13+
global:
14+
- SITE_URL: https://zendframework.github.io/zend-diactoros
15+
- GH_USER_NAME: "Matthew Weier O'Phinney"
16+
- GH_USER_EMAIL: [email protected]
17+
- GH_REF: github.com/zendframework/zend-diactoros.git
18+
- secure: "abqt51VvId/3EvfymODyivOye2YNlTXPMNk297kM3G5bMxB7ILPUwwSTxfMHoiW9BHjJpdKi+IGBF4GKeYElQHdIwleyLow8dTCpUiJS3RogwaTcm2FbwEJDCFbkV4WRm/HHjriji/wBfBmaAJEfYYlLQAHQWTT7AK7dAgQmiAzaItStl2TV5D/XZU9GLNXay3nH0cDygf+g4t6rFcf3VsI5weHb3WhjATfN+mU82XXkwm2z8Pc1IglBYHskdlwUgbsz8ppTdXplXdKjnf6YdxPapYDKd7TecIV3BWtueC2i48rqblPaSWOzx7qMCA/4aJjzEBmuqqSlYXka2SdGPdBPbpGwcKv09e273xqWQ9sF3d8YhEsSrJBpMpgu4RN+ucLRa15Xcj0oF4aVxrFqxtC7wud7hC0pg6q48dY7PlQh/wTO2biuXcGACcGqMcjPgmE3HJYpK5HoWHUBoWi1VHqbTPRx1jIQD1ILibu9WkuTEtdAi5IXSYAmVSknfyZ7UYJuJgOjhmmkMOcYzD5JJuRGEJASzQk1tX5DItX8mH/LIW942bVOQ+fwsmL/Z+tJDnMpJXLd6tXtyYs99lxFSBSSjqNGAG5HUFjVczvQy9GeeDd2p70IA80NuQNjfXrsyQ9tg8d1keNTOpPCJUwZm7S6IEsvrWAGO6lZ+q7DPQk="
919

1020
matrix:
1121
fast_finish: true
@@ -17,6 +27,8 @@ matrix:
1727
- php: 5.6
1828
env:
1929
- EXECUTE_COVERAGE=true
30+
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
31+
- PATH="$HOME/.local/bin:$PATH"
2032
- php: 7
2133
- php: hhvm
2234

@@ -37,6 +49,10 @@ script:
3749
- if [[ $EXECUTE_COVERAGE == 'true' ]]; then composer test-coverage ; fi
3850
- if [[ $EXECUTE_COVERAGE != 'true' ]]; then composer test ; fi
3951
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then composer cs ; fi
52+
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi
53+
54+
after_success:
55+
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi
4056

4157
after_script:
4258
- if [[ $EXECUTE_COVERAGE == 'true' ]]; then composer coveralls ; fi

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ All notable changes to this project will be documented in this file, in reverse
66

77
### Added
88

9-
- Nothing.
9+
- [#170](https://github.com/zendframework/zend-diactoros/pull/170) prepared
10+
documentation for publication at https://zendframework.github.io/zend-diactoros/
1011

1112
### Deprecated
1213

README.md

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,11 @@ This package supercedes and replaces [phly/http](https://github.com/phly/http).
1818

1919
## Documentation
2020

21-
Documentation is [in the doc tree](doc/), and can be compiled using [bookdown](http://bookdown.io):
22-
23-
```console
24-
$ bookdown doc/bookdown.json
25-
$ php -S 0.0.0.0:8080 -t doc/html/ # then browse to http://localhost:8080/
26-
```
27-
28-
> ### Bookdown
29-
>
30-
> You can install bookdown globally using `composer global require bookdown/bookdown`.
31-
> If you do this, make sure that `$HOME/.composer/vendor/bin` is on your `$PATH`;
32-
> on *nix-like systems, you can do this by adding the following line to your
33-
> `.bashrc` (or preferred shell RC file):
34-
>
35-
> ```bash
36-
> export PATH="$HOME/.composer/vendor/bin:$PATH"
37-
> ```
21+
Documentation is available at:
22+
23+
- https://zendframework.github.io/zend-diactoros/
24+
25+
Source files for documentation are [in the doc/ tree](doc/).
3826

3927
[Master]: https://travis-ci.org/zendframework/zend-diactoros
4028
[Master image]: https://secure.travis-ci.org/zendframework/zend-diactoros.svg?branch=master

doc/book/api.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class Request
1919
}
2020
```
2121

22-
Requests are immutable. Any methods that would change state -- those prefixed with `with` and
23-
`without` -- all return a new instance with the changes requested.
22+
Requests are immutable. Any methods that would change state — those prefixed with `with` and
23+
`without` — all return a new instance with the changes requested.
2424

2525
## ServerRequest Message
2626

@@ -45,8 +45,8 @@ class ServerRequest
4545
}
4646
```
4747

48-
The `ServerRequest` is immutable. Any methods that would change state -- those prefixed with `with`
49-
and `without` -- all return a new instance with the changes requested. Server parameters are
48+
The `ServerRequest` is immutable. Any methods that would change state — those prefixed with `with`
49+
and `without` — all return a new instance with the changes requested. Server parameters are
5050
considered completely immutable, however, as they cannot be recalculated, and, rather, is a source
5151
for other values.
5252

@@ -71,7 +71,7 @@ class Response
7171
```
7272

7373
Like the `Request` and `ServerRequest`, responses are immutable. Any methods that would change state
74-
-- those prefixed with `with` and `without` -- all return a new instance with the changes requested.
74+
— those prefixed with `with` and `without` — all return a new instance with the changes requested.
7575

7676
### StringResponse (factory)
7777

@@ -145,8 +145,9 @@ class Uri
145145
}
146146
```
147147

148-
Like the various message objects, URIs are immutable. Any methods that would change state -- those
149-
prefixed with `with` and `without` -- all return a new instance with the changes requested.
148+
Like the various message objects, URIs are immutable. Any methods that would
149+
change state — those
150+
prefixed with `with` and `without` — all return a new instance with the changes requested.
150151

151152
## Stream
152153

doc/book/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<div class="container">
2+
<div class="jumbotron">
3+
<h1>zend-diactoros</h1>
4+
5+
<p>PSR-7 HTTP message implementation.</p>
6+
7+
<pre><code class="language-bash">$ composer require zendframework/zend-diactoros</code></pre>
8+
</div>
9+
</div>
10+

doc/book/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../README.md

doc/book/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For server-side applications, you will create a `ServerRequest` instance, and po
1212

1313
A client will _send_ a request, and _return_ a response. As a developer, you will _create_ and
1414
_populate_ the request, and then _introspect_ the response. Both requests and responses are
15-
immutable; if you make changes -- e.g., by calling setter methods -- you must capture the return
15+
immutable; if you make changes &mdash; e.g., by calling setter methods &mdash; you must capture the return
1616
value, as it is a new instance.
1717

1818
```php

doc/bookdown.json

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

mkdocs.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
docs_dir: doc/book
2+
site_dir: doc/html
3+
pages:
4+
- index.md
5+
- Overview: overview.md
6+
- Installation: install.md
7+
- Usage: usage.md
8+
- Reference:
9+
- "Custom Responses": custom-responses.md
10+
- "Emitting Responses": emitting-responses.md
11+
- Serialization: serialization.md
12+
- API: api.md
13+
site_name: zend-diactoros
14+
site_description: 'zend-diactoros: PSR-7 HTTP message implementation'
15+
repo_url: 'https://github.com/zendframework/zend-diactoros'
16+
copyright: 'Copyright (c) 2016 <a href="http://www.zend.com/">Zend Technologies USA Inc.</a>'

0 commit comments

Comments
 (0)