Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit addf932

Browse files
committed
Updated to 1.1.3 version
1 parent 4608f8d commit addf932

File tree

1,364 files changed

+118231
-60
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,364 files changed

+118231
-60
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
/tests export-ignore
2+
/src/bootstrap.php export-ignore
3+
/vendor export-ignore
24
.gitattributes export-ignore
35
.gitignore export-ignore
6+
_config.yml export-ignore
7+
.travis.yml export-ignore
48
CHANGELOG.md export-ignore
9+
phpunit.xml.dist export-ignore
510
CONDUCT.md export-ignore
611
contributors.txt export-ignore
712
README.md export-ignore

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ phpunit.xml
22
composer.phar
33
composer.lock
44
composer-test.lock
5-
vendor/
65
build/artifacts/
76
artifacts/
87
docs/_build

.travis.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
language: php
2+
3+
sudo: false
4+
5+
dist: trusty
6+
7+
git:
8+
depth: 5
9+
10+
php:
11+
- 5.6
12+
- 7.0
13+
- 7.1
14+
- hhvm
15+
- nightly
16+
17+
matrix:
18+
fast_finish: true
19+
allow_failures:
20+
- php: nightly
21+
22+
before_script:
23+
- composer self-update
24+
- composer install
25+
26+
script:
27+
- composer test

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,59 @@
11
# CHANGELOG
22

3+
## 1.1.4 - 2017-09-14
4+
5+
* Unit tests supported by `PHPUnit` were added.
6+
7+
* The repository was synchronized with Travis CI to implement continuous integration.
8+
9+
* Type attributes were deleted from HTML tags. Since HTML5 doesn't longer necessary.
10+
11+
* Added `Ip/src/bootstrap.php` file
12+
13+
* Added `Ip/tests/bootstrap.php` file.
14+
15+
* Added `Ip/phpunit.xml.dist` file.
16+
* Added `Ip/_config.yml` file.
17+
* Added `Ip/.travis.yml` file.
18+
19+
* Deleted `Josantonius\Ip\Tests\IpTest::testGetIp()` method.
20+
21+
* Added `Josantonius\Ip\Test\IpTest::testGetIp()` method.
22+
323
## 1.1.3 - 2017-07-16
24+
425
* Deleted `Josantonius\Ip\Exception\IpException` class.
526
* Deleted `Josantonius\Ip\Exception\Exceptions` abstract class.
627
* Deleted `Josantonius\Ip\Exception\IpException->__construct()` method.
728

829
## 1.1.2 - 2017-07-09
30+
931
* Added `Josantonius\Ip\Ip::validate()` method.
1032

1133
## 1.1.1 - 2017-03-18
34+
1235
* Some files were excluded from download and comments and readme files were updated.
1336

1437
## 1.1.0 - 2017-01-30
38+
1539
* Compatible with PHP 5.6 or higher.
1640

1741
## 1.0.0 - 2017-01-30
42+
1843
* Compatible only with PHP 7.0 or higher. In the next versions, the library will be modified to make it compatible with PHP 5.6 or higher.
1944

2045
## 1.0.0 - 2017-01-17
46+
2147
* Added `Josantonius\Ip\Ip` class.
2248
* Added `Josantonius\Ip\Ip::get()` method.
2349

2450
## 1.0.0 - 2017-01-17
51+
2552
* Added `Josantonius\Ip\Exception\IpException` class.
2653
* Added `Josantonius\Ip\Exception\Exceptions` abstract class.
2754
* Added `Josantonius\Ip\Exception\IpException->__construct()` method.
2855

2956
## 1.0.0 - 2017-01-17
57+
3058
* Added `Josantonius\Ip\Tests\IpTest` class.
3159
* Added `Josantonius\Ip\Tests\IpTest::testGetIp()` method.

README-ES.md

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PHP Ip library
22

3-
[![Latest Stable Version](https://poser.pugx.org/josantonius/ip/v/stable)](https://packagist.org/packages/josantonius/ip) [![Total Downloads](https://poser.pugx.org/josantonius/ip/downloads)](https://packagist.org/packages/josantonius/ip) [![Latest Unstable Version](https://poser.pugx.org/josantonius/ip/v/unstable)](https://packagist.org/packages/josantonius/ip) [![License](https://poser.pugx.org/josantonius/ip/license)](https://packagist.org/packages/josantonius/ip)
3+
[![Latest Stable Version](https://poser.pugx.org/josantonius/ip/v/stable)](https://packagist.org/packages/josantonius/ip) [![Total Downloads](https://poser.pugx.org/josantonius/ip/downloads)](https://packagist.org/packages/josantonius/ip) [![Latest Unstable Version](https://poser.pugx.org/josantonius/ip/v/unstable)](https://packagist.org/packages/josantonius/ip) [![License](https://poser.pugx.org/josantonius/ip/license)](https://packagist.org/packages/josantonius/ip) [![Travis](https://travis-ci.org/Josantonius/PHP-Ip.svg)](https://travis-ci.org/Josantonius/PHP-Ip)
44

55
[English version](README.md)
66

@@ -21,16 +21,6 @@ Biblioteca PHP para obtener la IP del usuario.
2121

2222
---
2323

24-
<p align="center"><strong>Echa un vistazo al código</strong></p>
25-
26-
<p align="center">
27-
<a href="https://youtu.be/vqPAgdpsYfk" title="Echa un vistazo al código">
28-
<img src="https://raw.githubusercontent.com/Josantonius/PHP-Algorithm/master/resources/youtube-thumbnail.jpg">
29-
</a>
30-
</p>
31-
32-
---
33-
3424
### Instalación
3525

3626
La mejor forma de instalar esta extensión es a través de [composer](http://getcomposer.org/download/).
@@ -82,21 +72,13 @@ print_r(Ip::get()); # 66.249.76.29
8272

8373
### Tests
8474

85-
Para utilizar la clase de [pruebas](tests), simplemente:
75+
Para ejecutar las [pruebas](tests/Ip/test) simplemente:
8676

87-
```php
88-
<?php
89-
$loader = require __DIR__ . '/vendor/autoload.php';
77+
$ git clone https://github.com/Josantonius/PHP-Ip.git
78+
79+
$ cd PHP-Ip
9080

91-
$loader->addPsr4('Josantonius\\Ip\\Tests\\', __DIR__ . '/vendor/josantonius/ip/tests');
92-
93-
use Josantonius\Ip\Tests\IpTest;
94-
```
95-
Métodos de prueba disponibles en esta biblioteca:
96-
97-
```php
98-
IpTest::testGetIp();
99-
```
81+
$ phpunit
10082

10183
### Contribuir
10284
1. Comprobar si hay incidencias abiertas o abrir una nueva para iniciar una discusión en torno a un fallo o función.

README.md

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PHP Ip library
22

3-
[![Latest Stable Version](https://poser.pugx.org/josantonius/ip/v/stable)](https://packagist.org/packages/josantonius/ip) [![Total Downloads](https://poser.pugx.org/josantonius/ip/downloads)](https://packagist.org/packages/josantonius/ip) [![Latest Unstable Version](https://poser.pugx.org/josantonius/ip/v/unstable)](https://packagist.org/packages/josantonius/ip) [![License](https://poser.pugx.org/josantonius/ip/license)](https://packagist.org/packages/josantonius/ip)
3+
[![Latest Stable Version](https://poser.pugx.org/josantonius/ip/v/stable)](https://packagist.org/packages/josantonius/ip) [![Total Downloads](https://poser.pugx.org/josantonius/ip/downloads)](https://packagist.org/packages/josantonius/ip) [![Latest Unstable Version](https://poser.pugx.org/josantonius/ip/v/unstable)](https://packagist.org/packages/josantonius/ip) [![License](https://poser.pugx.org/josantonius/ip/license)](https://packagist.org/packages/josantonius/ip) [![Travis](https://travis-ci.org/Josantonius/PHP-Ip.svg)](https://travis-ci.org/Josantonius/PHP-Ip)
44

55
[Versión en español](README-ES.md)
66

@@ -21,16 +21,6 @@ PHP class to get user IP.
2121

2222
---
2323

24-
<p align="center"><strong>Take a look at the code</strong></p>
25-
26-
<p align="center">
27-
<a href="https://youtu.be/vqPAgdpsYfk" title="Take a look at the code">
28-
<img src="https://raw.githubusercontent.com/Josantonius/PHP-Algorithm/master/resources/youtube-thumbnail.jpg">
29-
</a>
30-
</p>
31-
32-
---
33-
3424
### Installation
3525

3626
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
@@ -82,22 +72,13 @@ print_r(Ip::get()); # 66.249.76.29
8272

8373
### Tests
8474

85-
To use the [test](tests) class, simply:
86-
87-
```php
88-
<?php
89-
$loader = require __DIR__ . '/vendor/autoload.php';
90-
91-
$loader->addPsr4('Josantonius\\Ip\\Tests\\', __DIR__ . '/vendor/josantonius/ip/tests');
92-
93-
use Josantonius\Ip\Tests\IpTest;
75+
To run [tests](tests/Ip/test) simply:
9476

95-
```
96-
Available test methods in this library:
77+
$ git clone https://github.com/Josantonius/PHP-Ip.git
78+
79+
$ cd PHP-Ip
9780

98-
```php
99-
IpTest::testGetIp();
100-
```
81+
$ phpunit
10182

10283
### Contribute
10384
1. Check for open issues or open a new issue to start a discussion around a bug or feature.

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
theme: jekyll-theme-cayman

composer.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "josantonius/ip",
3-
"version": "1.1.3",
3+
"version": "1.1.4",
44
"type": "library",
55
"description": "PHP class to get user IP.",
66
"keywords": [
@@ -20,6 +20,8 @@
2020
}
2121
],
2222
"support": {
23+
"issues": "https://github.com/josantonius/php-ip/issues",
24+
"forum": "http://stackoverflow.com/tags/josantonius/php-ip",
2325
"source": "https://github.com/josantonius/php-ip"
2426
},
2527
"config": {
@@ -29,19 +31,20 @@
2931
"require": {
3032
"php": "^5.6 || ^7.0"
3133
},
32-
"autoload": {
33-
"psr-4": {
34-
"Josantonius\\Ip\\": "src/"
35-
}
34+
"require-dev": {
35+
"phpunit/phpunit": "5.7.*"
3636
},
37-
"autoload-dev": {
37+
"autoload": {
3838
"psr-4": {
39-
"Josantonius\\Ip\\Tests\\": "tests/"
39+
"Josantonius\\Ip\\": "src/Ip/"
4040
}
4141
},
4242
"extra": {
4343
"branch-alias": {
4444
"dev-master": "1.0-dev"
4545
}
46+
},
47+
"scripts": {
48+
"test": "phpunit"
4649
}
4750
}

phpunit.xml.dist

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<phpunit backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false"
11+
syntaxCheck="false"
12+
bootstrap="tests/bootstrap.php"
13+
>
14+
<testsuites>
15+
<testsuite name="Ip Test Suite">
16+
<directory>tests/Ip</directory>
17+
</testsuite>
18+
</testsuites>
19+
20+
<filter>
21+
<whitelist>
22+
<directory>src/Ip</directory>
23+
</whitelist>
24+
</filter>
25+
</phpunit>
File renamed without changes.

0 commit comments

Comments
 (0)