8 Commits

Author SHA1 Message Date
a3517a25ab Merge pull request #6 from dcarrillo/1.0.4
Return an empty array when there is no data for json output
2021-02-19 17:51:56 +01:00
204ec8f9ff Return an empty array when there is no data for json output 2021-02-19 17:46:04 +01:00
ef31af865a Fix test 2021-02-19 17:45:07 +01:00
fda5957a04 Bump version to 1.0.3 2020-12-28 14:50:15 +01:00
0b2f98fa4f Fix license at setup.py 2020-12-28 14:01:44 +01:00
e6756888e7 Ensure tests run for every push 2020-12-26 19:00:42 +01:00
3e03e532fd Add badges to README.md 2020-12-26 18:50:48 +01:00
ae7bf28702 Fix github workflow 2020-12-26 17:02:04 +01:00
6 changed files with 11 additions and 6 deletions

View File

@ -4,12 +4,13 @@ on:
push:
branches:
- main
tags:
- '*'
pull_request:
jobs:
tests:
runs-on: ${{ matrix.os }}
if: github.event_name == 'pull_request'
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
@ -37,6 +38,7 @@ jobs:
build_publish:
runs-on: ubuntu-latest
needs: tests
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2

View File

@ -4,6 +4,9 @@ The digaws lookup tool displays information for a given IP address (v4 o v6) or
In order to save bandwidth and time this tool requests the [AWS IP ranges](https://ip-ranges.amazonaws.com/ip-ranges.json) and keeps
a cached version until a new version is published.
![PyPI version](https://badge.fury.io/py/digaws.svg)
![CI](https://github.com/dcarrillo/digaws/workflows/CI/badge.svg)
## Requirements
Python >= 3.7

View File

@ -1,2 +1,2 @@
__version__ = '1.0.2'
__version__ = '1.0.4'
__description__ = 'Look up canonical information for AWS IP addresses and networks'

View File

@ -127,8 +127,7 @@ class DigAWSPrettyPrinter:
item_dict.update({'network_border_group': prefix['network_border_group']})
data.append(item_dict)
if data:
print(json.dumps(data, indent=2))
print(json.dumps(data, indent=2))
class DigAWS():

View File

@ -17,7 +17,7 @@ setup(
url='http://github.com/dcarrillo/digaws',
author='Daniel Carrillo',
author_email='daniel.carrillo@gmail.com',
license='MIT',
license='Apache Software License',
packages=['digaws'],
zip_safe=False,
classifiers=[

View File

@ -84,4 +84,5 @@ def test_get_aws_ip_ranges_invalid_status(mocker, fs, create_cache_dir) -> None:
with pytest.raises(digaws.UnexpectedRequestException) as e:
digaws.get_aws_ip_ranges()
assert e.startswith('Unexpected response from')
assert e.match('^Unexpected response from')