Browse Source

Updated the documentation

tags/v13.0.0
Cédric Belin 2 months ago
parent
commit
bb38bd63ae
13 changed files with 72 additions and 39 deletions
  1. +5
    -5
      README.md
  2. +1
    -6
      RoboFile.php
  3. +3
    -3
      composer.json
  4. +20
    -0
      doc/about/license.md
  5. +4
    -4
      doc/about/see_also.md
  6. +1
    -1
      doc/features.md
  7. +2
    -2
      doc/installation.md
  8. +4
    -2
      doc/usage/api.md
  9. +3
    -1
      doc/usage/cli.md
  10. +21
    -14
      etc/mkdocs.yaml
  11. +1
    -0
      etc/requirements.txt
  12. +1
    -1
      example/main.php
  13. +6
    -0
      readthedocs.yaml

+ 5
- 5
README.md View File

@@ -4,13 +4,13 @@
Send [Clover](https://www.atlassian.com/software/clover) and [LCOV](http://ltp.sourceforge.net/coverage/lcov.php) coverage reports to the [Coveralls](https://coveralls.io) service, in [PHP](https://www.php.net).

## Documentation
- [User guide](https://dev.belin.io/coveralls.php)
- [API reference](https://dev.belin.io/coveralls.php/api)
- [User guide](https://docs.belin.io/coveralls.php)
- [API reference](https://api.belin.io/coveralls.php)

## Development
- [Git repository](https://github.com/cedx/coveralls.php)
- [Git repository](https://git.belin.io/cedx/coveralls.php)
- [Packagist package](https://packagist.org/packages/cedx/coveralls)
- [Submit an issue](https://github.com/cedx/coveralls.php/issues)
- [Submit an issue](https://git.belin.io/cedx/coveralls.php/issues)

## License
[Coveralls for PHP](https://dev.belin.io/coveralls.php) is distributed under the MIT License.
[Coveralls for PHP](https://docs.belin.io/coveralls.php) is distributed under the MIT License.

+ 1
- 6
RoboFile.php View File

@@ -54,13 +54,8 @@ class RoboFile extends Tasks {
function doc(): Result {
$phpdoc = PHP_OS_FAMILY == 'Windows' ? 'php '.escapeshellarg('C:\Program Files\PHP\share\phpDocumentor.phar') : 'phpdoc';
return $this->collectionBuilder()
->addTask($this->taskFilesystemStack()
->copy('CHANGELOG.md', 'doc/about/changelog.md')
->copy('LICENSE.md', 'doc/about/license.md'))
->addTask($this->taskExec("$phpdoc --config=etc/phpdoc.xml"))
->addTask($this->taskExec('mkdocs build --config-file=doc/mkdocs.yaml'))
->addTask($this->taskFilesystemStack()
->remove(['doc/about/changelog.md', 'doc/about/license.md', 'www/mkdocs.yaml']))
->addTask($this->taskExec('mkdocs build --config-file=etc/mkdocs.yaml'))
->run();
}



+ 3
- 3
composer.json View File

@@ -1,6 +1,6 @@
{
"description": "Send Clover and LCOV coverage reports to the Coveralls service.",
"homepage": "https://dev.belin.io/coveralls.php",
"homepage": "https://docs.belin.io/coveralls.php",
"license": "MIT",
"name": "cedx/coveralls",
"type": "library",
@@ -59,7 +59,7 @@
"test": "robo test"
},
"support": {
"docs": "https://dev.belin.io/coveralls.php/api",
"issues": "https://github.com/cedx/coveralls.php/issues"
"docs": "https://api.belin.io/coveralls.php",
"issues": "https://git.belin.io/cedx/coveralls.php/issues"
}
}

+ 20
- 0
doc/about/license.md View File

@@ -0,0 +1,20 @@
# MIT License
Copyright © 2017 - 2020 Cédric Belin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

+ 4
- 4
doc/about/see_also.md View File

@@ -1,14 +1,14 @@
# See also

## Development
- [API reference](https://dev.belin.io/coveralls.php/api)
- [API reference](https://api.belin.io/coveralls.php)
- [Packagist package](https://packagist.org/packages/cedx/coveralls)
- [Submit an issue](https://github.com/cedx/coveralls.php/issues)
- [Submit an issue](https://git.belin.io/cedx/coveralls.php/issues)

## Testing
- [Continuous integration](https://github.com/cedx/coveralls.php/actions)
- [Code coverage](https://coveralls.io/github/cedx/coveralls.php/)

## Other implementations
- Dart: [Coveralls for Dart](https://dev.belin.io/coveralls.dart)
- JavaScript: [Coveralls for JS](https://dev.belin.io/coveralls.js)
- Dart: [Coveralls for Dart](https://docs.belin.io/coveralls.dart)
- JavaScript: [Coveralls for JS](https://docs.belin.io/coveralls.js)

+ 1
- 1
doc/features.md View File

@@ -21,7 +21,7 @@ This project has been tested with [Travis CI](https://travis-ci.com) service, bu
- [Wercker](https://app.wercker.com)

!!! tip
You can find an [example workflow for GitHub Actions](https://github.com/cedx/coveralls.php/blob/master/.github/workflows/build.yaml) in the sources of this project.
You can find an [example workflow for GitHub Actions](https://git.belin.io/cedx/coveralls.php/src/branch/master/.github/workflows/build.yaml) in the sources of this project.

## Environment variables
If your build system is not supported, you can still use this package.


+ 2
- 2
doc/installation.md View File

@@ -11,10 +11,10 @@ You can verify if you're already good to go with the following commands:

```shell
php --version
# PHP 7.4.4 (cli) (built: Mar 17 2020 13:49:13) ( NTS Visual C++ 2017 x64 )
# PHP 7.4.5 (cli) (built: Apr 14 2020 16:17:19) ( NTS Visual C++ 2017 x64 )

composer --version
# Composer version 1.10.1 2020-03-13 20:34:27
# Composer version 1.10.5 2020-04-10 11:44:22
```

!!! info


+ 4
- 2
doc/usage/api.md View File

@@ -1,5 +1,7 @@
path: blob/master
---
path: src/branch/master
source: src/Client.php
---

# Application programming interface
The hard way. Use the `Coveralls\Client` class to upload your coverage reports:
@@ -10,7 +12,7 @@ use Coveralls\{Client, ClientException};

function main(): void {
try {
$coverage = @file_get_contents('/path/to/coverage.report');
$coverage = file_get_contents('/path/to/coverage.report');
(new Client)->upload($coverage);
echo 'The report was sent successfully.';
}


+ 3
- 1
doc/usage/cli.md View File

@@ -1,5 +1,7 @@
path: blob/master
---
path: src/branch/master
source: bin/coveralls
---

# Command line interface
The easy way. From a command prompt, install the `coveralls` executable:


doc/mkdocs.yaml → etc/mkdocs.yaml View File

@@ -1,30 +1,33 @@
site_name: Coveralls for PHP
site_description: Send LCOV and Clover coverage reports to the Coveralls service, in PHP.
site_author: Cédric Belin - cedric@belin.io
site_url: https://dev.belin.io/coveralls.php
site_url: https://docs.belin.io/coveralls.php

docs_dir: .
docs_dir: ../doc
site_dir: ../www

repo_name: GitHub
repo_url: https://github.com/cedx/coveralls.php
repo_name: git.belin.io
repo_url: https://git.belin.io/cedx/coveralls.php
edit_uri: ''

copyright: Copyright © 2017 - 2020 Cédric Belin
google_analytics:
- !!python/object/apply:os.getenv [GOOGLE_ANALYTICS_ID]
- auto

extra:
social:
- {type: globe, link: 'https://belin.io'}
- {type: github, link: 'https://github.com/cedx'}
- {type: twitter, link: 'https://twitter.com/cedxbelin'}
- {type: linkedin, link: 'https://linkedin.com/in/cedxbelin'}
- icon: fontawesome/solid/globe
link: 'https://belin.io'
- icon: fontawesome/brands/github
link: 'https://github.com/cedx'
- icon: fontawesome/brands/twitter
link: 'https://twitter.com/cedxbelin'
- icon: fontawesome/brands/linkedin
link: 'https://linkedin.com/in/cedxbelin'

markdown_extensions:
- admonition
- codehilite
- meta
- toc:
permalink: true

nav:
- Overview: index.md
@@ -34,11 +37,15 @@ nav:
- Command line interface: usage/cli.md
- Programming interface: usage/api.md
- About:
- Changelog: about/changelog.md
- License: about/license.md
- See also: about/see_also.md

theme:
icon:
logo: fontawesome/solid/book-reader
repo: fontawesome/brands/git-alt
name: material
favicon: img/favicon.ico
palette: {primary: deep purple, accent: deep purple}
palette:
accent: purple
primary: purple

+ 1
- 0
etc/requirements.txt View File

@@ -0,0 +1 @@
mkdocs-material

+ 1
- 1
example/main.php View File

@@ -4,7 +4,7 @@ use Coveralls\{Client, ClientException};
/** Uploads a coverage report. */
function main(): void {
try {
$coverage = @file_get_contents('/path/to/coverage.report');
$coverage = file_get_contents('/path/to/coverage.report');
(new Client)->upload($coverage);
echo 'The report was sent successfully.';
}


+ 6
- 0
readthedocs.yaml View File

@@ -0,0 +1,6 @@
version: 2
mkdocs:
configuration: etc/mkdocs.yaml
python:
install:
- requirements: etc/requirements.txt

Loading…
Cancel
Save