Skip to content

Commit

Permalink
Create package scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Marco Sartori committed Sep 8, 2016
0 parents commit 547ed65
Show file tree
Hide file tree
Showing 15 changed files with 344 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
@@ -0,0 +1,15 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org

root = true

[*]
charset = utf-8
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
12 changes: 12 additions & 0 deletions .gitattributes
@@ -0,0 +1,12 @@
# Path-based git attributes
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

# Ignore all test and documentation with "export-ignore".
/.gitattributes export-ignore
/.gitignore export-ignore
/.styleci.yml export-ignore
/.travis.yml export-ignore
/phpspec.yml export-ignore
/.scrutinizer.yml export-ignore
/tests export-ignore
/src/.gitkeep export-ignore
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
build
composer.lock
docs
vendor
38 changes: 38 additions & 0 deletions .scrutinizer.yml
@@ -0,0 +1,38 @@
filter:
excluded_paths: [tests/*]

checks:
php:
code_rating: true
duplication: true
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: true
order_alphabetically: true
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true

tools:
external_code_coverage:
timeout: 300
runs: 3
php_analyzer: true
php_code_coverage: false
php_code_sniffer:
config:
standard: PSR2
filter:
paths: ['src']
php_loc:
enabled: true
excluded_dirs: [vendor, tests]
php_cpd:
enabled: true
excluded_dirs: [vendor, tests]
1 change: 1 addition & 0 deletions .styleci.yml
@@ -0,0 +1 @@
preset: psr2
30 changes: 30 additions & 0 deletions .travis.yml
@@ -0,0 +1,30 @@
language: php

php:
- 5.5
- 5.6
- 7.0
- hhvm

# This triggers builds to run on the new TravisCI infrastructure.
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false

matrix:
allow_failures:
- php: hhvm
include:
- php: 5.5
env: 'COMPOSER_FLAGS="--prefer-stable --prefer-lowest"'

before_script:
- if [[ $TRAVIS_PHP_VERSION =~ ^hhvm ]]; then echo 'xdebug.enable = On' >> /etc/hhvm/php.ini; fi
- travis_retry composer self-update
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source

script:
- vendor/bin/phpcs --standard=psr2 src/
- vendor/bin/phpspec run -vvv

after_script:
- if [[ $TRAVIS_PHP_VERSION != 'hhvm' && $TRAVIS_PHP_VERSION != '7.0' ]]; then php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover; fi
22 changes: 22 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,22 @@
# Changelog

All Notable changes to `cloak` will be documented in this file.

Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## NEXT - YYYY-MM-DD

### Added
- Nothing

### Deprecated
- Nothing

### Fixed
- Nothing

### Removed
- Nothing

### Security
- Nothing
22 changes: 22 additions & 0 deletions CONDUCT.md
@@ -0,0 +1,22 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
* Other unethical or unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.

This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community in a direct capacity. Personal views, beliefs and values of individuals do not necessarily reflect those of the organisation or affiliated individuals and organisations.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
32 changes: 32 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,32 @@
# Contributing

Contributions are **welcome** and will be fully **credited**.

We accept contributions via Pull Requests on [Github](https://github.com/cerbero90/Cloak).


## Pull Requests

- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).

- **Add tests!** - Your patch won't be accepted if it doesn't have tests.

- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.

- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.

- **Create feature branches** - Don't ask us to pull from your master branch.

- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.

- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.


## Running Tests

``` bash
$ composer test
```


**Happy coding**!
21 changes: 21 additions & 0 deletions LICENSE.md
@@ -0,0 +1,21 @@
# The MIT License (MIT)

Copyright (c) 2016 Andrea Marco Sartori <andrea.marco.sartori@gmail.com>

> 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.
89 changes: 89 additions & 0 deletions README.md
@@ -0,0 +1,89 @@
# Cloak

[![Author][ico-author]][link-author]
[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md)
[![Quality Score][ico-code-quality]][link-code-quality]
[![StyleCI][ico-styleci]][link-styleci]
[![Total Downloads][ico-downloads]][link-downloads]
[![Gratipay][ico-gratipay]][link-gratipay]

[![SensioLabsInsight][ico-sensiolabs]][link-sensiolabs]

**Note:** Enable the following services for the current package:

- [Packagist](https://packagist.org/packages/submit)
- [TravisCI](https://travis-ci.org/profile/cerbero90)
- [ScrutinizerCI](https://scrutinizer-ci.com/g/new)
- [StyleCI](https://styleci.io/account)
- [SensioLabs Insight](https://insight.sensiolabs.com/projects/new)

**Note:** Now that StyleCI and SensioLabs are enabled, replace their placeholders with the actual values in this file:

- ```:styleci_repo```
- ```:sensiolabs_project```

**Note:** Delete all the above notes, including this one.

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what
PSRs you support to avoid any confusion with users and contributors.

## Install

Via Composer

``` bash
composer require cerbero/cloak
```

## Usage

``` php
$skeleton = new League\Skeleton();
echo $skeleton->echoPhrase('Hello, League!');
```

## Change log

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

## Testing

``` bash
composer test
```

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

## Security

If you discover any security related issues, please email andrea.marco.sartori@gmail.com instead of using the issue tracker.

## Credits

- [Andrea Marco Sartori][link-author]
- [All Contributors][link-contributors]

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[ico-author]: http://img.shields.io/badge/author-@cerbero90-blue.svg?style=flat-square
[ico-version]: https://img.shields.io/packagist/v/cerbero/Cloak.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-code-quality]: https://img.shields.io/scrutinizer/g/cerbero90/cloak.svg?style=flat-square
[ico-styleci]: https://styleci.io/repos/:styleci_repo/shield
[ico-downloads]: https://img.shields.io/packagist/dt/cerbero/Cloak.svg?style=flat-square
[ico-gratipay]: https://img.shields.io/gratipay/cerbero.svg?style=flat-square
[ico-sensiolabs]: https://insight.sensiolabs.com/projects/:sensiolabs_project/big.png

[link-author]: https://twitter.com/cerbero90
[link-packagist]: https://packagist.org/packages/cerbero/cloak
[link-code-quality]: https://scrutinizer-ci.com/g/cerbero90/cloak
[link-styleci]: https://styleci.io/repos/:styleci_repo
[link-downloads]: https://packagist.org/packages/cerbero/cloak
[link-gratipay]: https://gratipay.com/cerbero
[link-sensiolabs]: https://insight.sensiolabs.com/projects/:sensiolabs_project
[link-contributors]: ../../contributors
46 changes: 46 additions & 0 deletions composer.json
@@ -0,0 +1,46 @@
{
"name": "cerbero/cloak",
"type": "library",
"description": "Encrypted communication between two systems.",
"keywords": [
"encryption",
"communication"
],
"homepage": "https://github.com/cerbero90/cloak",
"license": "MIT",
"authors": [
{
"name": "Andrea Marco Sartori",
"email": "andrea.marco.sartori@gmail.com",
"homepage": "https://github.com/cerbero90",
"role": "Developer"
}
],
"require": {
"php" : "~5.5|~7.0"
},
"require-dev": {
"phpspec/phpspec" : "^2.5",
"henrikbjorn/phpspec-code-coverage" : "^2.0",
"scrutinizer/ocular": "^1.1",
"squizlabs/php_codesniffer": "^2.3"
},
"autoload": {
"psr-4": {
"Cerbero\\Cloak\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Cerbero\\Cloak\\": "tests"
}
},
"scripts": {
"test": "phpspec run -vvv"
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
}
}
12 changes: 12 additions & 0 deletions phpspec.yml
@@ -0,0 +1,12 @@
suites:
main:
spec_path: tests
namespace: Cerbero\Cloak
psr4_prefix: Cerbero\Cloak
extensions:
- PhpSpec\Extension\CodeCoverageExtension
code_coverage:
format:
- clover
output:
clover: coverage.clover
Empty file added src/.gitkeep
Empty file.
Empty file added tests/.gitkeep
Empty file.

0 comments on commit 547ed65

Please sign in to comment.