-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d2c4533
Showing
6 changed files
with
255 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## | ||
## .gitignore -- Specifies intentionally untracked files to ignore | ||
## =============================================================== | ||
## | ||
## See: http://www.kernel.org/pub/software/scm/git/docs/gitignore.html | ||
## | ||
|
||
## ---------------------------------------------------------------------------- | ||
## project specific files | ||
## ---------------------------------------------------------------------------- | ||
|
||
build/ | ||
composer.lock | ||
composer.phar | ||
phpunit.xml | ||
vendor/ | ||
|
||
!.travis.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
language: php | ||
|
||
php: | ||
- "5.6" | ||
- "5.5" | ||
- "5.4" | ||
- "5.3" | ||
- "hhvm" | ||
- "hhvm-nightly" | ||
|
||
branches: | ||
except: | ||
- /^draft-.*/ | ||
|
||
matrix: | ||
allow_failures: | ||
- php: hhvm | ||
- php: hhvm-nightly | ||
|
||
branches: | ||
except: | ||
- /^draft-.*/ | ||
|
||
before_script: | ||
- composer self-update | ||
- composer require satooshi/php-coveralls:dev-master --no-update | ||
- composer install --dev | ||
|
||
script: ./vendor/bin/phpunit --coverage-text | ||
|
||
after_script: | ||
- php vendor/bin/coveralls -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Copyright © 2014 Oscar Cubo Medina | ||
|
||
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, m odify, 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. | ||
|
||
Except as contained in this notice, the name(s) of the above copyright | ||
holders shall not be used in advertising or otherwise to promote the sale, | ||
use or other dealings in this Software without prior written authorization. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
Email Address | ||
============= | ||
|
||
_Email Address_ is a PHP implementation of an Email Address [value object][]. | ||
|
||
The address is checked against | ||
[RFC 3696](http://tools.ietf.org/html/rfc3696 "RFC 3696: Application Techniques for Checking and Transformation of Names"), | ||
[RFC 1123](http://tools.ietf.org/html/rfc1123 "RFC 1123: Requirements for Internet Hosts — Application and Support"), | ||
[RFC 4291](http://tools.ietf.org/html/rfc4291 "RFC 4291: IP Version 6 Addressing Architecture"), | ||
[RFC 5321](http://tools.ietf.org/html/rfc5321 "RFC 5321: Simple Mail Transfer Protocol") and | ||
[RFC 5322](http://tools.ietf.org/html/rfc5322 "RFC 5322: Internet Message Format") | ||
thanks to [is_email()][] code by [Dominic Sayers][]. | ||
|
||
Installation | ||
------------ | ||
|
||
Just use [composer][] to add the dependency: | ||
|
||
``` | ||
composer require ocubom/email-address:dev-master | ||
``` | ||
|
||
Or add the dependecy manually: | ||
|
||
1. Update ``composer.json`` file with the lines: | ||
|
||
``` | ||
{ | ||
"require": { | ||
"ocubom/email-address": "dev-master" | ||
} | ||
} | ||
``` | ||
2. And update the dependencies: | ||
``` | ||
composer update "ocubom/email-address" | ||
``` | ||
Authorship | ||
---------- | ||
Current maintainer: | ||
* [Oscar Cubo Medina](http://github.com/ocubom/ "@ocubom projects"). | ||
Twitter: [@ocubom](http://twitter.com/ocubom/ "@ocubom on twitter"). | ||
Copyright and License | ||
--------------------- | ||
_Email Address_ is licensed under the MIT License — see the [`LICENSE`][0] file | ||
for details. | ||
If you did not receive a copy of the license, contact with the author. | ||
### is_email() License | ||
Includes "[is_email()][]” code by [Dominic Sayers][]: | ||
> Copyright © 2008—2011 Dominic Sayers | ||
> (http://isemail.info) | ||
> BSD License (http://www.opensource.org/licenses/bsd-license.php) | ||
[0]: https://github.com/ocubom/email-address/blob/master/LICENSE | ||
"PHP Email Type" | ||
[Dominic Sayers]: http://github.com/dominicsayers | ||
"@dominicsayers on github" | ||
[is_email()]: http://github.com/dominicsayers/isemail | ||
"dominicsayers/isemail" | ||
[Composer]: http://getcomposer.org/ | ||
"Composer Dependency Manager for PHP" | ||
[value object]: http://wikipedia.org/wiki/value_object | ||
"Value object" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name" : "ocubom/email-address", | ||
"description" : "Email address value object checked against RFC 3696, RFC 1123, RFC 4291, RFC 5321 and RFC 5322.", | ||
"keywords" : [ "address", "email", "validator", "RFC 1123", "RFC 3696", "RFC 4291", "RFC 5321", "RFC 5322" ], | ||
"homepage" : "http://github.com/ocubom/email-address", | ||
"license" : "MIT", | ||
"authors" : [{ | ||
"name" : "Oscar Cubo Medina", | ||
"homepage" : "http://ocubom.github.io" | ||
}], | ||
"support" : { | ||
"issues" : "http://github.com/ocubom/email-address/issues", | ||
"source" : "http://github.com/ocubom/email-address" | ||
}, | ||
|
||
"require": { | ||
"php": ">=5.3.3" | ||
}, | ||
|
||
"require-dev": { | ||
"phpunit/phpunit": "~4.0" | ||
}, | ||
|
||
"autoload": { | ||
"psr-4": { "Ocubom\\Email\\": "src/" } | ||
}, | ||
|
||
"autoload-dev": { | ||
"psr-4": { "Ocubom\\Email\\Tests\\": "tests/" } | ||
}, | ||
|
||
"extra": { | ||
"branch-alias": { "dev-master": "1.0.x-dev" } | ||
}, | ||
|
||
"archive": { | ||
"exclude": [ "tests", "*phpunit.xml*", "composer.phar" ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
* This file is part of the Email Address component. | ||
* | ||
* © Oscar Cubo Medina <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
--> | ||
<phpunit | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
syntaxCheck="false" | ||
bootstrap="vendor/autoload.php" | ||
> | ||
|
||
<testsuites> | ||
<testsuite name="Email Address Test Suite"> | ||
<directory suffix="Test.php">./tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<!-- Ignored files for code coverage --> | ||
<filter> | ||
<whitelist> | ||
<directory>./</directory> | ||
<exclude> | ||
<directory>./Resources/</directory> | ||
<directory>./tests/</directory> | ||
<directory>./vendor/</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
|
||
<!-- Generate reports --> | ||
<logging> | ||
<log | ||
type="coverage-html" | ||
target="build/coverage" | ||
title="EmailAddress" | ||
charset="UTF-8" | ||
yui="true" | ||
highlight="true" | ||
lowUpperBound="35" | ||
highLowerBound="70" | ||
/> | ||
<log | ||
type="coverage-clover" | ||
target="build/logs/clover.xml" | ||
/> | ||
<log | ||
type="junit" | ||
target="build/logs/junit.xml" | ||
logIncompleteSkipped="false" | ||
/> | ||
</logging> | ||
|
||
</phpunit> |