mirror of
https://github.com/sitelease/sugar-cube-client.git
synced 2025-10-29 11:02:30 +01:00
Removed several unneeded files and folders
This commit is contained in:
@ -1,8 +0,0 @@
|
||||
dist: xenial
|
||||
language: php
|
||||
notifications: {email: false}
|
||||
php: ['7.2', '7.3']
|
||||
|
||||
install: composer install --no-interaction
|
||||
script: composer run-script test
|
||||
after_success: composer run-script coverage
|
||||
54
.vscode/tasks.json
vendored
54
.vscode/tasks.json
vendored
@ -1,54 +0,0 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"command": "robo clean",
|
||||
"label": "robo : clean",
|
||||
"problemMatcher": [],
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"command": "robo coverage",
|
||||
"label": "robo : coverage",
|
||||
"problemMatcher": [],
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"command": "robo doc",
|
||||
"label": "robo : doc",
|
||||
"problemMatcher": [],
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"command": "robo lint",
|
||||
"label": "robo : lint",
|
||||
"problemMatcher": [],
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"command": "robo test",
|
||||
"group": {"isDefault": true, "kind": "build"},
|
||||
"label": "robo : test",
|
||||
"problemMatcher": [],
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"command": "robo upgrade",
|
||||
"label": "robo : upgrade",
|
||||
"problemMatcher": [],
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"command": "robo version",
|
||||
"label": "robo : version",
|
||||
"problemMatcher": [],
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"command": "robo watch",
|
||||
"label": "robo : watch",
|
||||
"problemMatcher": [],
|
||||
"type": "shell"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
Cédric Belin <cedric.belin@canalsab.com>
|
||||
19
CHANGELOG.md
19
CHANGELOG.md
@ -1,19 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
## Version [0.3.0](https://github.com/sab-international/gitea.php/compare/v0.2.0...v0.3.0)
|
||||
- Breaking change: removed `__toString()` methods from the model classes.
|
||||
- Breaking change: using camelcase instead of all caps for constants.
|
||||
- Modified the package layout.
|
||||
- Updated the package dependencies.
|
||||
|
||||
## Version [0.2.0](https://github.com/sab-international/gitea.php/compare/v0.1.1...v0.2.0)
|
||||
- Added `__toString()` methods to the model classes.
|
||||
- Added the `TrackedTime` model.
|
||||
- Added a user guide based on [MkDocs](http://www.mkdocs.org).
|
||||
- Updated the package dependencies.
|
||||
|
||||
## Version [0.1.1](https://github.com/sab-international/gitea.php/compare/v0.1.0...v0.1.1)
|
||||
- Fixed [issue #1](https://github.com/sab-international/gitea.php/issues/1): the `PushEvent::jsonSerialize()` method returns `"TODO"` strings.
|
||||
|
||||
## Version 0.1.0
|
||||
- Initial release.
|
||||
101
RoboFile.php
101
RoboFile.php
@ -1,101 +0,0 @@
|
||||
<?php declare(strict_types=1);
|
||||
use Robo\{Result, Tasks};
|
||||
|
||||
// Load the dependencies.
|
||||
require_once __DIR__.'/vendor/autoload.php';
|
||||
|
||||
/** Provides tasks for the build system. */
|
||||
class RoboFile extends Tasks {
|
||||
|
||||
/** Creates a new task runner. */
|
||||
function __construct() {
|
||||
$path = (string) getenv('PATH');
|
||||
$vendor = (string) realpath('vendor/bin');
|
||||
if (strpos($path, $vendor) === false) putenv("PATH=$vendor".PATH_SEPARATOR.$path);
|
||||
$this->stopOnFail();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all generated files and reset any saved state.
|
||||
* @return Result The task result.
|
||||
*/
|
||||
function clean(): Result {
|
||||
return $this->collectionBuilder()
|
||||
->addTask($this->taskCleanDir('var'))
|
||||
->addTask($this->taskDeleteDir(['build', 'doc/api', 'web']))
|
||||
->run();
|
||||
}
|
||||
|
||||
/**
|
||||
* Uploads the results of the code coverage.
|
||||
* @return Result The task result.
|
||||
*/
|
||||
function coverage(): Result {
|
||||
return $this->_exec('coveralls var/coverage.xml');
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the documentation.
|
||||
* @return Result The task result.
|
||||
*/
|
||||
function doc(): Result {
|
||||
return $this->collectionBuilder()
|
||||
->addTask($this->taskFilesystemStack()
|
||||
->copy('CHANGELOG.md', 'doc/about/changelog.md')
|
||||
->copy('LICENSE.md', 'doc/about/license.md'))
|
||||
->addTask($this->taskExec('mkdocs build --config-file=etc/mkdocs.yaml'))
|
||||
->addTask($this->taskFilesystemStack()
|
||||
->remove(['doc/about/changelog.md', 'doc/about/license.md']))
|
||||
->run();
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs the static analysis of source code.
|
||||
* @return Result The task result.
|
||||
*/
|
||||
function lint(): Result {
|
||||
return $this->taskExecStack()
|
||||
->exec('php -l example/main.php')
|
||||
->exec('phpstan analyse --configuration=etc/phpstan.neon')
|
||||
->run();
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the test suites.
|
||||
* @return Result The task result.
|
||||
*/
|
||||
function test(): Result {
|
||||
return $this->_exec('phpunit --configuration=etc/phpunit.xml');
|
||||
}
|
||||
|
||||
/**
|
||||
* Upgrades the project to the latest revision.
|
||||
* @return Result The task result.
|
||||
*/
|
||||
function upgrade(): Result {
|
||||
$composer = PHP_OS_FAMILY == 'Windows' ? 'php '.escapeshellarg('C:\Program Files\PHP\share\composer.phar') : 'composer';
|
||||
return $this->taskExecStack()
|
||||
->exec('git reset --hard')
|
||||
->exec('git fetch --all --prune')
|
||||
->exec('git pull --rebase')
|
||||
->exec("$composer update --no-interaction")
|
||||
->run();
|
||||
}
|
||||
|
||||
/**
|
||||
* Increments the version number of the package.
|
||||
* @param string $component The part in the version number to increment.
|
||||
* @return Result The task result.
|
||||
*/
|
||||
function version(string $component = 'patch'): Result {
|
||||
return $this->taskSemVer('.semver')->increment($component)->run();
|
||||
}
|
||||
|
||||
/**
|
||||
* Watches for file changes.
|
||||
* @return Result The task result.
|
||||
*/
|
||||
function watch(): Result {
|
||||
return $this->taskWatch()->monitor('test', function() { $this->test(); })->run();
|
||||
}
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
# See also
|
||||
|
||||
## Development
|
||||
- [API reference](https://dev.sabcomputer.com/gitea.php/api)
|
||||
- [Packagist package](https://packagist.org/packages/sab-international/gitea)
|
||||
- [Submit an issue](https://github.com/sab-international/gitea.php/issues)
|
||||
|
||||
## Testing
|
||||
- [Continuous integration](https://travis-ci.com/sab-international/gitea.php)
|
||||
- [Code coverage](https://coveralls.io/github/sab-international/gitea.php/)
|
||||
|
||||
## Other implementations
|
||||
- Dart: [Gitea for Dart](https://dev.sabcomputer.com/gitea.dart)
|
||||
- JavaScript: [Gitea for JS](https://dev.sabcomputer.com/gitea.js)
|
||||
- Yii Framework: [Gitea for Yii](https://dev.sabcomputer.com/yii2-gitea)
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB |
15
doc/index.md
15
doc/index.md
@ -1,15 +0,0 @@
|
||||
# Gitea <small>for PHP</small>
|
||||
     
|
||||
|
||||
[Gitea](https://gitea.io) client library, in [PHP](https://secure.php.net).
|
||||
|
||||

|
||||
|
||||
## Quick start
|
||||
Install the latest version of **Gitea for PHP** with [Composer](https://getcomposer.org):
|
||||
|
||||
```shell
|
||||
composer require sab-international/gitea
|
||||
```
|
||||
|
||||
For detailed instructions, see the [installation guide](installation.md).
|
||||
@ -1,39 +0,0 @@
|
||||
# Installation
|
||||
|
||||
## Requirements
|
||||
Before installing **Gitea for PHP**, you need to make sure you have [PHP](https://secure.php.net)
|
||||
and [Composer](https://getcomposer.org), the PHP package manager, up and running.
|
||||
|
||||
!!! warning
|
||||
Gitea for PHP requires PHP >= **7.2.0**.
|
||||
|
||||
You can verify if you're already good to go with the following commands:
|
||||
|
||||
```shell
|
||||
php --version
|
||||
# PHP 7.2.10-0ubuntu1 (cli) (built: Sep 13 2018 13:38:55) ( NTS )
|
||||
|
||||
composer --version
|
||||
# Composer version 1.7.3 2018-11-01 10:05:06
|
||||
```
|
||||
|
||||
!!! info
|
||||
If you plan to play with the package sources, you will also need
|
||||
[Robo](https://robo.li) and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material).
|
||||
|
||||
## Installing with Composer package manager
|
||||
|
||||
### 1. Install it
|
||||
From a command prompt, run:
|
||||
|
||||
```shell
|
||||
composer require sab-international/gitea
|
||||
```
|
||||
|
||||
### 2. Import it
|
||||
Now in your [PHP](https://secure.php.net) code, you can use:
|
||||
|
||||
```php
|
||||
<?php
|
||||
use Gitea\{Repository, Team, User};
|
||||
```
|
||||
@ -1,2 +0,0 @@
|
||||
# Usage
|
||||
TODO: document the usage of the **Gitea for PHP** library.
|
||||
@ -1,43 +0,0 @@
|
||||
site_name: Gitea for PHP
|
||||
site_description: Gitea client library, in PHP.
|
||||
site_author: SAB International - contact@sabcomputer.com
|
||||
site_url: https://dev.sabcomputer.com/gitea.php
|
||||
|
||||
docs_dir: ../doc
|
||||
site_dir: ../web
|
||||
|
||||
repo_name: GitHub
|
||||
repo_url: https://github.com/sab-international/gitea.php
|
||||
edit_uri: ''
|
||||
|
||||
copyright: Copyright © 2018 - 2019 SAB International
|
||||
google_analytics:
|
||||
- !!python/object/apply:os.getenv [GOOGLE_ANALYTICS_ID]
|
||||
- auto
|
||||
|
||||
extra:
|
||||
social:
|
||||
- {type: globe, link: 'http://www.sabcomputer.com'}
|
||||
- {type: github, link: 'https://github.com/sab-international'}
|
||||
- {type: facebook, link: 'https://www.facebook.com/sabinternational34'}
|
||||
- {type: twitter, link: 'https://twitter.com/SABDistribution'}
|
||||
- {type: linkedin, link: 'https://linkedin.com/company/sab-international-sarl'}
|
||||
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- codehilite
|
||||
- meta
|
||||
|
||||
nav:
|
||||
- Overview: index.md
|
||||
- Installation: installation.md
|
||||
- Usage: usage.md
|
||||
- About:
|
||||
- Changelog: about/changelog.md
|
||||
- License: about/license.md
|
||||
- See also: about/see_also.md
|
||||
|
||||
theme:
|
||||
name: material
|
||||
favicon: img/favicon.ico
|
||||
palette: {primary: deep purple, accent: deep purple}
|
||||
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<phpdoc>
|
||||
<title>Gitea for PHP</title>
|
||||
|
||||
<parser>
|
||||
<target>../var</target>
|
||||
</parser>
|
||||
<transformer>
|
||||
<target>../doc/api</target>
|
||||
</transformer>
|
||||
<transformations>
|
||||
<template name="responsive"/>
|
||||
</transformations>
|
||||
|
||||
<files>
|
||||
<directory>../src</directory>
|
||||
</files>
|
||||
</phpdoc>
|
||||
@ -1,3 +0,0 @@
|
||||
parameters:
|
||||
level: max
|
||||
paths: [src]
|
||||
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<phpunit bootstrap="../vendor/autoload.php" cacheResult="false">
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">../src</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
|
||||
<logging>
|
||||
<log type="coverage-clover" target="../var/coverage.xml"/>
|
||||
</logging>
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="all">
|
||||
<directory suffix="Test.php">../test</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
||||
@ -1,16 +0,0 @@
|
||||
<?php declare(strict_types=1);
|
||||
use Gitea\{PushEvent};
|
||||
|
||||
/**
|
||||
* Handles the payload of a Gitea push event.
|
||||
* @return PushEvent The parsed payload.
|
||||
* @throws UnexpectedValueException The request headers or the request body are invalid.
|
||||
*/
|
||||
function main(): PushEvent {
|
||||
if (!isset($_SERVER['HTTP_X_GITEA_DELIVERY']) || !isset($_SERVER['HTTP_X_GITEA_EVENT']))
|
||||
throw new UnexpectedValueException('Invalid payload data.');
|
||||
|
||||
$data = json_decode((string) file_get_contents('php://input'));
|
||||
if (!is_object($data)) throw new UnexpectedValueException('Invalid payload data.');
|
||||
return PushEvent::fromJson($data);
|
||||
}
|
||||
Reference in New Issue
Block a user