Skip to content

Commit

Permalink
initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
lichunqiang committed Mar 21, 2016
0 parents commit f1b42b2
Show file tree
Hide file tree
Showing 13 changed files with 1,337 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# editorconfig.org
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8

[*.php]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.{js,twig,css,scss,html}]
indent_style = space
indent_size = 2

[{Gruntfile.js,bower.json,composer.json,package.json}]
indent_style = space
indent_size = 2

[*.yml]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Ignore all test and documentation for archive
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/composer.lock export-ignore
/phpunit.xml export-ignore
/tests export-ignore
/CHANGELOG.md export-ignore
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.idea
vendor
phpunit.xml
build
10 changes: 10 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
imports:
- php

tools:
external_code_coverage:
timeout: 2100 # Timeout in seconds.
# disable copy paste detector and similarity analyzer as they have no real value
# and a huge bunch of false-positives
php_sim: false
php_cpd: false
42 changes: 42 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
language: php

php:
- 5.5
- 5.6
- 7.0
- hhvm

# faster builds on new travis setup not using sudo
sudo: false

git:
submodules: false

# cache vendor dirs
cache:
directories:
- vendor
- $HOME/.composer/cache

# script run before anything
before_script:
- composer install
- cp phpunit.xml.dist phpunit.xml

install:
- travis_retry composer self-update && composer --version


script:
vendor/bin/phpunit --configuration phpunit.xml --coverage-clover=coverage.clover


after_script:
- |
if [ $TRAVIS_PHP_VERSION = '5.6' ]; then
travis_retry wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
fi
notifications:
on_success: never
on_failure: always
Empty file added CHANGELOG.md
Empty file.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 lichunqiang

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.
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
wordcolor
========
[![Build Status](https://img.shields.io/travis/lichunqiang/wordcolor.svg?style=flat-square)](http://travis-ci.org/lichunqiang/wordcolor)
[![version](https://img.shields.io/packagist/v/light/wordcolor.svg?style=flat-square)](https://packagist.org/packages/light/wordcolor)
[![Download](https://img.shields.io/packagist/dt/light/wordcolor.svg?style=flat-square)](https://packagist.org/packages/light/wordcolor)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/lichunqiang/wordcolor.svg?style=flat-square)](https://scrutinizer-ci.com/g/lichunqiang/wordcolor)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/lichunqiang/wordcolor.svg?style=flat-square)](https://scrutinizer-ci.com/g/lichunqiang/wordcolor)
[![Contact](https://img.shields.io/badge/weibo-@chunqiang-blue.svg?style=flat-square)](http://weibo.com/chunqiang)


Installation
------------

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist light/wordcolor "~1.0.0"
```

or add

```
"light/wordcolor": "~1.0.0"
```

to the require section of your `composer.json` file.

Usage
-----

```
echo WordColor::trans('word'); // rgb(188,174,18)
```



Tests
-----

```
$ composer test
```

Change Log
----------

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

License
-------
[![MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)

38 changes: 38 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "light/wordcolor",
"description": "generate color from the word.",
"keywords": [
"rgb",
"words",
"color"
],
"homepage": "https://github.com/light/wordcolor",
"license": "MIT",
"authors": [
{
"name": "lichunqiang",
"email": "light-li@hotmail.com"
}
],
"require": {
"php": ">=5.4.0"
},
"autoload": {
"psr-4": {
"light\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"light\\tests\\": "tests"
}
},
"scripts": {
"test": [
"php ./vendor/bin/phpunit"
]
},
"require-dev": {
"phpunit/phpunit": "~4.0"
}
}

0 comments on commit f1b42b2

Please sign in to comment.