Skip to content

Commit

Permalink
Merge pull request #52 from rednaks/master
Browse files Browse the repository at this point in the history
bug fix release
  • Loading branch information
rednaks authored Mar 25, 2021
2 parents 00ddac3 + 2cd80f5 commit 9d1f577
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
language: python

python:
- "2.7"
- "3.5"
- "3.6" # current default Python on Travis CI
- "3.7"
- "3.8"
- "3.9"

# updating pip
before_install:
- pip install --upgrade pip tox virtualenv

# command to install dependencies
install:
- pip install -r tests/requirements.txt
# command to run tests

# command to run tests
script:
- flake8 --count --statistics django_ip_geolocation
- bandit -r django_ip_geolocation
Expand Down
2 changes: 1 addition & 1 deletion django_ip_geolocation/backends/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self, ip):
self._continent = None
self._country = None
self._geo_data = None
self._raw_data = None
self._raw_data = {}

def geolocate(self):
"""Call geoloaction api. Should be overriden."""
Expand Down
1 change: 0 additions & 1 deletion django_ip_geolocation/backends/ipdataco.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def _parse(self):
'code': self._raw_data.get('country_code'),
'name': self._raw_data.get('country_name'),
}

self._geo_data = {
'latitude': self._raw_data.get('latitude'),
'longitude': self._raw_data.get('longitude'),
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def readme():

setup(
name='django-ip-geolocation',
version='1.6.0',
version='1.6.1',
author='Skander Ben Mahmoud',
author_email='[email protected]',
packages=find_packages(exclude=("*tests*", "docs")),
Expand Down
20 changes: 10 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
[tox]
envlist =
{py27}-django-111
{py35}-django-20
{py36}-django-20
{py37}-django-22
{py38}-django-30
{py35}-django-22
{py36}-django-30
{py37}-django-31
{py38}-django-stable
{py39}-django-stable

[testenv]
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/django_ip_geolocation
commands = coverage run --source django_ip_geolocation manage.py test -v2
deps =
django-111: Django>=1.11,<1.12
django-20: Django>=2.0,<2.1
django-22: Django>=2.2
django-30: Django>=3.0
django-22: Django>=2.2,<2.3
django-30: Django>=3.0,<3.1
django-31: Django>=3.1,<3.2
django-stable: git+https://github.com/django/django.git@stable/3.1.x#egg=Django
-r{toxinidir}/tests/requirements.txt
basepython =
py27: python2.7
py35: python3.5
py36: python3.6
py37: python3.7
py38: python3.8
py39: python3.9

0 comments on commit 9d1f577

Please sign in to comment.