Skip to content

Commit 97b08ca

Browse files
committed
prepared for 2.1 release
1 parent b86b197 commit 97b08ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+3894
-16430
lines changed

RoboFile.php

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<?php
2+
use Symfony\Component\Finder\Finder;
3+
24
class RoboFile extends \Robo\Tasks
35
{
46

@@ -25,4 +27,76 @@ function publish()
2527
->push()
2628
->run();
2729
}
30+
31+
32+
/**
33+
* builds docs for specific branch
34+
* @param [type] $branch [description]
35+
* @return [type] [description]
36+
*/
37+
function docsBranch($branch)
38+
{
39+
$this->yell("Creating docs for $branch");
40+
$dir = "docs-$branch";
41+
42+
$this->taskGitStack()
43+
->cloneRepo('git@github.com:Codeception/Codeception.git', 'source')
44+
->run();
45+
46+
$this->taskGitStack()
47+
->dir('source')
48+
->checkout($branch)
49+
->run();
50+
51+
$this->taskCleanDir($dir)->run();
52+
53+
$this->taskWriteToFile("_includes/doc_$branch.html")
54+
->text('<div class="alert alert-danger">')
55+
->text('You are viewing documentation for Codeception <strong>'.$branch.'</strong>. ')
56+
->text('Switch to <a href="/docs">latest stable &raquo;</a>')
57+
->text('</div>')
58+
->run();
59+
60+
61+
$indexFile = $this->taskWriteToFile($dir . '/index.md')
62+
->line('---')
63+
->line('layout: doc')
64+
->line("title: Codeception $branch Documentation")
65+
->line('---')
66+
->text("\n\n{% include doc_$branch.html %}\n\n\n")
67+
->line("# Codeception $branch Guides\n\n");
68+
69+
$guides = Finder::create()
70+
->ignoreVCS(true)
71+
->depth('== 0')
72+
->name('*.md')
73+
->sortByName()
74+
->in('source/docs');
75+
76+
77+
foreach ($guides as $file) {
78+
$contents = file_get_contents($file->getRealPath());
79+
$name = substr($file->getBasename(),0,-3);
80+
$title = preg_replace("(\d+-)", '', $name);
81+
if (preg_match('/^# (.*)$/m', $contents, $matches)) {
82+
$title = $matches[1];
83+
}
84+
$indexFile->line("* [$title](/$dir/$name)");
85+
86+
$this->taskWriteToFile($dir . '/' . $file->getBasename())
87+
->line('---')
88+
->line('layout: doc')
89+
->line('title: Codeception Documentation')
90+
->line('---')
91+
->line('')
92+
->line('')
93+
->text("{% include doc_$branch.html %}")
94+
->line('')
95+
->line('')
96+
->text($contents)
97+
->run();
98+
}
99+
$indexFile->run();
100+
// $this->taskDeleteDir('source')->run();
101+
}
28102
}

_includes/doc_1.8.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div class="alert alert-danger">You are viewing documentation for Codeception <strong>1.8</strong>. Switch to <a href="/docs">latest stable &raquo;</a></div>

_includes/doc_2.0.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div class="alert alert-danger">You are viewing documentation for Codeception <strong>2.0</strong>. Switch to <a href="/docs">latest stable &raquo;</a></div>
File renamed without changes.

_includes/switch.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div class="btn-group" role="group" style="float: right" aria-label="...">
2+
<a class="btn btn-default" href="/docs"><strong>current</strong> (2.1)</a>
3+
<a class="btn btn-default" href="/docs-2.0">2.0</a>
4+
<a class="btn btn-default" href="/docs-1.8">1.8</a>
5+
</div>

_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
<div class="col">
9494
<div class="footnote">
9595
<h4>Usages</h4>
96-
Powered by <a href="http://phpunit.de">PHPUnit</a> and <a href="http://mink.behat.org">Mink</a><br/>
96+
Powered by <a href="http://phpunit.de">PHPUnit</a> <br/>
9797

9898
<div class="small">
9999
This site works with Jekyll and Github.

_layouts/doc.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
<div>
99

1010
<div id="page">
11+
12+
13+
1114
{{ content }}
1215
</div>
1316
</div>

_layouts/page.html

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
---
44
<div class="row">
55
<div class="col-sm-8 col-lg-8">
6-
<div class="content page" id="page">
6+
<div class="content page" id="page">
7+
78
<div>
89
{{ content }}
910
</div>
@@ -18,26 +19,28 @@
1819
</p>
1920
</div>
2021
<p>
21-
</p><div>
22+
</p>
23+
<div class="links"> <a href="https://github.com/codeception/codeception">
24+
<img src="/images/github.png"> GitHub Repository
25+
</a>
26+
</div>
27+
28+
<div>
2229
<a href="http://codeception.com/thanks.html">
2330
<img src="https://poser.pugx.org/Codeception/Codeception/version.png" alt="Latest stable version">
2431
</a>
2532
</div>
33+
<div>
34+
<img src="https://camo.githubusercontent.com/ba3ef343659e0ec242700c28c571dd89c6fd54d8/68747470733a2f2f706f7365722e707567782e6f72672f636f646563657074696f6e2f636f646563657074696f6e2f646f776e6c6f6164732e706e67" alt="Total Downloads" data-canonical-src="https://poser.pugx.org/codeception/codeception/downloads.png" style="max-width:100%;">
35+
</div>
2636
<p></p>
2737

2838
<p>Codeception was started in November 2011, and released the <strong>first stable
29-
version 1.0 in January 2012</strong>. Based on <a href="http://symfony.com/components" target="_blank">Symfony2 Components</a>, <a href="http://phpunit.de" target="_blank">PHPUnit</a>, <a href="http://mink.behat.org" target="_blank">Mink</a>. Codeception is a mature and stable project, well-tested and documented. It's open-source and <strong>MIT licensed</strong>.
39+
version 1.0 in January 2012</strong>. Based on <a href="http://symfony.com/components" target="_blank">Symfony2 Components</a>, <a href="http://phpunit.de" target="_blank">PHPUnit</a>. Codeception is open-source and <strong>MIT licensed</strong>.
3040
</p>
3141
<div>
32-
<div class="links">
33-
34-
<a href="https://github.com/codeception/codeception">
35-
<img src="/images/github.png"> Fork on GitHub
36-
</a>
37-
38-
</div>
39-
<p>
40-
Join <strong>#codeception</strong> on FreeNode IRC.
42+
<p>
43+
4144
</p>
4245

4346
</div>

addons.markdown

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ title: Addons
55

66
# Addons
77

8+
9+
{% include extensions.md %}
10+
11+
812
## Applications
913

1014
#### [WebCeption](https://github.com/jayhealey/Webception)
@@ -66,45 +70,6 @@ An extension of Codeception own PhpBrowser and Db modules to allow for easy and
6670

6771
Codeception extensions are developed by third-party contributors and can enhance test execution flow, by listening to internal events. [Read more about extensions](http://codeception.com/docs/08-Customization#Extension-classes).
6872

69-
70-
### Official Extensions
71-
72-
Official Extensions are installed with Codeception but you should enable them manually. Also they are a good point to learn about developing your own extensions.
73-
74-
#### [Codeception\Platform\Logger](https://github.com/Codeception/Codeception/blob/2.0/src/Codeception/Platform/Logger.php)
75-
76-
Logs suites/tests/steps using Monolog library *(formerly enabled by default)*.
77-
78-
Enable it in `codeception.yml`:
79-
80-
{% highlight yaml %}
81-
extensions:
82-
enabled: [Codeception\Platform\Logger]
83-
{% endhighlight %}
84-
85-
#### [Codeception\Platform\RunFailed](https://github.com/Codeception/Codeception/blob/2.0/src/Codeception/Platform/RunFailed.php)
86-
87-
Saves failed tests into tests/_output/failed in order to rerun failed tests.
88-
89-
Enable it in `codeception.yml`:
90-
91-
{% highlight yaml %}
92-
extensions:
93-
enabled: [Codeception\Platform\RunFailed]
94-
{% endhighlight %}
95-
96-
Then you can run failed tests by running `failed` group:
97-
98-
```
99-
codecept run -g failed
100-
```
101-
102-
#### [Codeception\Platform\SimpleOutput](https://github.com/Codeception/Codeception/blob/2.0/src/Codeception/Platform/SimpleOutput.php)
103-
104-
Changes output style. If you need to implement your own output format you should use this extension as a starting point.
105-
106-
### 3rd Party Extensions
107-
10873
Extensions should be installed via **Composer**.
10974

11075
#### [Allure Codeception Adapter](https://github.com/allure-framework/allure-codeception)

credits.html

Lines changed: 24 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,71 +3,47 @@
33
title: Codeception Credits
44
---
55

6-
<h1>Credits</h1>
76

87
<div class="row">
9-
<img src="https://si0.twimg.com/profile_images/781559256/lj_avatar_reasonably_small.jpg" class="pull-right">
8+
<h1>Credits</h1>
109

1110
<p>
12-
Project created and maintained by <strong>Michael Bodnarchuk "Davert"</strong>.
11+
Project created by <strong><a href="http://twitter.com/davert">Michael Bodnarchuk "Davert"</a></a></strong>.
1312
Greatfully sponsored by <a href="http://2amigos.us/"><strong>2Amigos</strong></a>.
1413
</p>
1514

16-
<p>
17-
To get support either:
18-
19-
<ul>
20-
<li>join converstion on <strong>#codeception</strong> channel on FreeNode IRC.</li>
21-
<li>create issue on <a href="http://github.com/codeception/codeception/issues">GitHub</a>.</li>
22-
<li>create quest on StackOverflow (and send link to IRC chat, that will speed up things).</li>
23-
<li>ask question in Q&A section on site.</li>
24-
25-
26-
</ul>
27-
28-
</p>
29-
15+
<h3>Codeception Team</h3>
3016

31-
</div>
32-
33-
<div class="row">
34-
<div class="col-sm-8 col-lg-8">
35-
<h3>Contacts</h3>
36-
37-
<p>
38-
<a href="http://twitter.com/davert">
39-
<img src="/images/twitter.png" alt="Twitter">@davert
40-
</a>
17+
<p>
18+
<a href="https://github.com/DavertMik" target="_blank" rel="tooltip" title="DavertMik"><img src="https://avatars.githubusercontent.com/u/220264?v=3" width="80" height="80"></a>
4119

42-
</p>
43-
<img src="/images/skype.png" alt="Skype"> davert.ua
20+
<a href="https://github.com/tiger-seo" target="_blank" rel="tooltip" title="tiger-seo"><img src="https://avatars.githubusercontent.com/u/398720?v=3" width="80" height="80"></a>
4421

45-
<p>
46-
<img src="/images/email.png"> davert.codeception <img src="/images/at-sign.png" alt="a"> mailican.com
47-
</p>
22+
<a href="https://github.com/Naktibalda" target="_blank" rel="tooltip" title="Naktibalda"><img src="https://avatars.githubusercontent.com/u/395992?v=3" width="80" height="80"></a>
4823

49-
<p>
24+
<a href="https://github.com/samdark" target="_blank" rel="tooltip" title="samdark"><img src="https://avatars.githubusercontent.com/u/47294?v=3" width="80" height="80"></a>
5025

51-
<a href="http://github.com/davertmik">
52-
<img src="/images/github.png" alt="GitHub">DavertMik
53-
</a>
26+
<a href="https://github.com/zbateson" target="_blank" rel="tooltip" title="zbateson"><img src="https://avatars.githubusercontent.com/u/8356974?v=3" width="80" height="80"></a>
5427

55-
</p>
28+
<a href="https://github.com/janhenkgerritsen" target="_blank" rel="tooltip" title="janhenkgerritsen"><img src="https://avatars.githubusercontent.com/u/1123080?v=3" width="80" height="80"></a>
5629

30+
<a href="https://github.com/sergeyklay" target="_blank" rel="tooltip" title="sergeyklay"><img src="https://avatars.githubusercontent.com/u/1256298?v=3" width="80" height="80"></a>
5731

58-
</div>
32+
</p>
5933

60-
<div class="col-sm-4 col-lg-4">
34+
<h3>Support</h3>
6135

62-
<p>
63-
«
64-
<a href="http://codegyre.com/">Codegyre</a> developers team is providing additional services and consulting for Codeception.
65-
»
66-
</p>
67-
</div>
36+
<ul>
37+
<li>start a thread at <a href="http://phptest.club/category/codeception">PHP Test Club</a> forum</li>
38+
<li>ask your question in <a href="http://gitter.im/Codeception/Codeception">Gitter</a> chat</li>
39+
<li>create an issue on <a href="https://github.com/codeception/codeception/issues">GitHub</a>.</li>
40+
<li>create quest on StackOverflow (and send link to IRC chat, that will speed up things).</li>
41+
<li>join converstion on <strong>#codeception</strong> channel on FreeNode IRC.</li>
42+
43+
</ul>
6844

45+
<h3>Consulting</h3>
6946

70-
</div>
47+
For additional support contact us via email <a href="mailto:davert@codegyre.com">davert(at)codegyre.com</a> or Skype <strong>davert.ua</strong>
7148

72-
<h4>Special Thanks</h4>
73-
Nick Palamarchuk "lividgreen" for consulting, brain-storming and additional beer for BDD.</body></html>
49+
</div>

0 commit comments

Comments
 (0)