Skip to content

Commit 4111484

Browse files
committed
updated for laravel 4 only
1 parent 3f66beb commit 4111484

File tree

4 files changed

+26
-23
lines changed

4 files changed

+26
-23
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ GeoIP
33

44
> Geoip Wrapper with Laravel Support
55
6-
[![Build Status](http://img.shields.io/travis/pulkitjalan/geoip.svg?style=flat-square)](https://travis-ci.org/pulkitjalan/geoip)
7-
[![Scrutinizer Code Quality](http://img.shields.io/scrutinizer/g/pulkitjalan/geoip/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/pulkitjalan/geoip/)
8-
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/pulkitjalan/geoip/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/pulkitjalan/geoip/code-structure/master)
6+
[![Build Status](http://img.shields.io/travis/pulkitjalan/geoip/1.0.svg?style=flat-square)](https://travis-ci.org/pulkitjalan/geoip)
7+
[![Scrutinizer Code Quality](http://img.shields.io/scrutinizer/g/pulkitjalan/geoip/1.0.svg?style=flat-square)](https://scrutinizer-ci.com/g/pulkitjalan/geoip/)
8+
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/pulkitjalan/geoip/1.0.svg?style=flat-square)](https://scrutinizer-ci.com/g/pulkitjalan/geoip/code-structure/1.0)
99
[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](http://www.opensource.org/licenses/MIT)
1010
[![Latest Version](http://img.shields.io/packagist/v/pulkitjalan/geoip.svg?style=flat-square)](https://packagist.org/packages/pulkitjalan/geoip)
1111
[![Total Downloads](https://img.shields.io/packagist/dt/pulkitjalan/geoip.svg?style=flat-square)](https://packagist.org/packages/pulkitjalan/geoip)
@@ -50,6 +50,10 @@ Next add the following to the `aliases` array in your `config/app.php`
5050

5151
Next run `php artisan config:publish pulkitjalan/geoip` to publish the config file.
5252

53+
#### Looking for a Laravel 5 compatible version?
54+
55+
Checkout the [master branch](https://github.com/pulkitjalan/geoip/tree/master)
56+
5357
## Usage
5458

5559
The geoip class takes a config array as the first parameter or defaults to using the `ip-api` driver.

composer.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "pulkitjalan/geoip",
3-
"description": "Geoip Wrapper with Laravel Support",
3+
"description": "Geoip Wrapper with Laravel 4 & 5 Support",
44
"homepage": "https://github.com/pulkitjalan/geoip",
5-
"keywords": ["geoip", "maxmind", "ip-api"],
5+
"keywords": ["geoip", "maxmind", "ip-api", "telize"],
66
"license": "MIT",
77
"authors": [
88
{
@@ -11,8 +11,8 @@
1111
],
1212
"require": {
1313
"php": ">=5.4.0",
14-
"illuminate/support": "~4|~5",
15-
"illuminate/console": "~4|~5",
14+
"illuminate/support": "~4",
15+
"illuminate/console": "~4",
1616
"pulkitjalan/requester": "1.*",
1717
"geoip2/geoip2": "2.*"
1818
},
@@ -27,6 +27,5 @@
2727
"files": [
2828
"helpers.php"
2929
]
30-
},
31-
"minimum-stability": "stable"
30+
}
3231
}

tests/GeoIPTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ public function tearDown()
1515
Mockery::close();
1616
}
1717

18-
public function testInvalidDriverException()
18+
public function test_invalid_driver_exception()
1919
{
2020
$this->setExpectedException('PulkitJalan\GeoIP\Exceptions\InvalidDriverException');
2121

2222
$geoip = new \PulkitJalan\GeoIP\GeoIP([]);
2323
}
2424

25-
public function testBadMethodCallException()
25+
public function test_bad_method_call_exception()
2626
{
2727
$this->setExpectedException('BadMethodCallException');
2828

@@ -31,14 +31,14 @@ public function testBadMethodCallException()
3131
$geoip->setNothing();
3232
}
3333

34-
public function testMaxmindException()
34+
public function test_maxmind_exception()
3535
{
3636
$this->setExpectedException('PulkitJalan\GeoIP\Exceptions\InvalidCredentialsException');
3737

3838
$geoip = new \PulkitJalan\GeoIP\GeoIP(['driver' => 'maxmind']);
3939
}
4040

41-
public function testMaxmindDatabaseException()
41+
public function test_maxmind_database_exception()
4242
{
4343
$config = [
4444
'driver' => 'maxmind',
@@ -52,7 +52,7 @@ public function testMaxmindDatabaseException()
5252
$geoip = new \PulkitJalan\GeoIP\GeoIP($config);
5353
}
5454

55-
public function testMaxmindInvalidDatabaseException()
55+
public function test_maxmind_invalid_database_exception()
5656
{
5757
$config = [
5858
'driver' => 'maxmind',
@@ -66,7 +66,7 @@ public function testMaxmindInvalidDatabaseException()
6666
$geoip = new \PulkitJalan\GeoIP\GeoIP($config);
6767
}
6868

69-
public function testMaxmindWebApiException()
69+
public function test_maxmind_web_api_exception()
7070
{
7171
$config = [
7272
'driver' => 'maxmind',
@@ -80,7 +80,7 @@ public function testMaxmindWebApiException()
8080
$geoip = new \PulkitJalan\GeoIP\GeoIP($config);
8181
}
8282

83-
public function testMaxmindWebApiAuthenticationException()
83+
public function test_maxmind_web_api_authentication_exception()
8484
{
8585
$config = [
8686
'driver' => 'maxmind',
@@ -98,7 +98,7 @@ public function testMaxmindWebApiAuthenticationException()
9898
$geoip->get();
9999
}
100100

101-
public function testMaxmindDatabase()
101+
public function test_maxmind_database()
102102
{
103103
$config = [
104104
'driver' => 'maxmind',
@@ -118,7 +118,7 @@ public function testMaxmindDatabase()
118118
$this->assertEquals($geoip->getCountry(), '');
119119
}
120120

121-
public function testIpApiProException()
121+
public function test_ip_api_pro_exception()
122122
{
123123
$config = [
124124
'driver' => 'ip-api',
@@ -136,7 +136,7 @@ public function testIpApiProException()
136136
$geoip->get();
137137
}
138138

139-
public function testIpApi()
139+
public function test_ip_api()
140140
{
141141
$config = [
142142
'driver' => 'ip-api',
@@ -153,7 +153,7 @@ public function testIpApi()
153153
$this->assertEquals($geoip->getCountry(), '');
154154
}
155155

156-
public function testTelize()
156+
public function test_telize()
157157
{
158158
$config = [
159159
'driver' => 'telize',
@@ -170,7 +170,7 @@ public function testTelize()
170170
$this->assertEquals($geoip->getCountry(), '');
171171
}
172172

173-
public function testTelizeSecure()
173+
public function test_telize_secure()
174174
{
175175
$config = [
176176
'driver' => 'telize',

tests/GeoIPUpdaterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ public function tearDown()
1212
Mockery::close();
1313
}
1414

15-
public function testNoUpdate()
15+
public function test_no_update()
1616
{
1717
$geoipUpdater = new \PulkitJalan\GeoIP\GeoIPUpdater([]);
1818

1919
$this->assertFalse($geoipUpdater->update());
2020
}
2121

22-
public function testMaxmindUpdater()
22+
public function test_maxmind_updater()
2323
{
2424
$database = __DIR__.'/data/GeoLite2-City.mmdb';
2525
$config = [

0 commit comments

Comments
 (0)