Skip to content

Commit 8b7493e

Browse files
Merge branch 'master' into openwrt-firewall
2 parents a89c7e9 + cadb36b commit 8b7493e

70 files changed

Lines changed: 4444 additions & 6394 deletions

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ htmlcov/
3737
.tox/
3838
.coverage
3939
.cache
40-
nosetests.xml
4140
coverage.xml
4241

4342
# Translations
@@ -55,6 +54,7 @@ target/
5554

5655
# editors
5756
*.komodoproject
57+
.vscode
5858

5959
# other
6060
*.DS_Store*

.landscape.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.travis.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ sudo: false
33
cache: pip
44

55
python:
6-
- "3.5"
7-
- "3.4"
8-
- "2.7"
6+
- "3.6"
7+
- "3.7"
98

109
branches:
1110
only:
@@ -14,26 +13,15 @@ branches:
1413
before_install:
1514
- pip install -U pip setuptools wheel
1615
- pip install -r requirements-test.txt
17-
- flake8
18-
- isort --check-only --recursive .
1916

2017
install:
2118
- python setup.py -q develop
2219

2320
before_script:
24-
- mkdir docs/source/_static
25-
- sphinx-build -W -b html docs/source docs/_build
21+
- ./run-qa-checks
2622

2723
script:
28-
- nosetests --with-coverage --cover-package=netjsonconfig
29-
- |
30-
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
31-
# gets commit message of last commit before pull request merge
32-
COMMIT_MESSAGE=$(git log $TRAVIS_PULL_REQUEST_SHA --format=%B -n 1)
33-
printf "Checking commit message:\n\n"
34-
printf "$COMMIT_MESSAGE\n\n"
35-
checkcommit --message "$COMMIT_MESSAGE"
36-
fi
24+
- coverage run -a --source=netjsonconfig runtests.py
3725

3826
after_success:
3927
coveralls

CHANGES.rst

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,37 @@
11
Change log
22
==========
33

4-
Version 0.6.4 [unreleased]
4+
Version 0.8.1 [2020-05-28]
55
--------------------------
66

7-
WIP
7+
- Fixed bug that prevented overriding the contents of a file present
8+
in a template and caused the file to be duplicated instead of overwritten
9+
- Fixed bug affecting backward conversion of switch VLAN on OpenWRT
10+
11+
Version 0.8.0 [2020-04-03]
12+
--------------------------
13+
14+
- Changed default file mode for certificate files generated with
15+
from ``0644`` to ``0600``
16+
17+
Version 0.7.0 [2020-01-14]
18+
--------------------------
19+
20+
- Dropped support for python 2.7
21+
- Updated github buttons in documentation which were causing an unintended redirect
22+
- Updated the jsonschema library to version 3.x
23+
24+
Version 0.6.4 [2019-12-09]
25+
--------------------------
26+
27+
- `#113 <https://github.com/openwisp/netjsonconfig/issues/113>`_:
28+
[bugfix] Made "encryption none" explicit in OpenWRT
29+
- `5ddc201 <https://github.com/openwisp/netjsonconfig/commit/5ddc201>`_:
30+
[bugfix] Fixed invalid UCI name bug in default OpenWRT renderer
31+
- `#118 <https://github.com/openwisp/netjsonconfig/issues/118>`_:
32+
[bugfix] Fixed ``TypeError: can only concatenate list (not "str") to list``
33+
- `#137 <https://github.com/openwisp/netjsonconfig/issues/137>`_:
34+
[tests] Migrated tests to nose2
835

936
Version 0.6.3 [2018-07-09]
1037
--------------------------

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ include LICENSE README.rst requirements.txt
22
recursive-include netjsonconfig *
33
recursive-exclude * *.pyc *.swp
44
recursive-exclude * __pycache__
5+
recursive-exclude tests *

README.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,23 @@ netjsonconfig
1111
:target: https://requires.io/github/openwisp/netjsonconfig/requirements/?branch=master
1212
:alt: Requirements Status
1313

14+
.. image:: https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=flat-square
15+
:target: https://gitter.im/openwisp/general
16+
1417
.. image:: https://badge.fury.io/py/netjsonconfig.svg
1518
:target: http://badge.fury.io/py/netjsonconfig
1619

17-
.. image:: https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=flat-square
18-
:target: https://gitter.im/openwisp/general
20+
.. image:: https://pepy.tech/badge/netjsonconfig
21+
:target: https://pepy.tech/project/netjsonconfig
22+
:alt: downloads
23+
24+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
25+
:target: https://pypi.org/project/black/
26+
:alt: code style: black
1927

2028
------------
2129

22-
Netjsonconfig is part of the `OpenWISP project <http://openwisp.org>`_ and it's the official
30+
Netjsonconfig is a part of the `OpenWISP project <http://openwisp.org>`_ and it's the official
2331
configuration engine of `OpenWISP 2 <https://github.com/openwisp/ansible-openwisp2>`_.
2432

2533
.. image:: http://netjsonconfig.openwisp.org/en/latest/_images/openwisp.org.svg
@@ -30,7 +38,7 @@ configuration engine of `OpenWISP 2 <https://github.com/openwisp/ansible-openwis
3038
on systems like `OpenWRT <http://openwrt.org>`_, `LEDE <https://www.lede-project.org/>`_
3139
or `OpenWisp Firmware <https://github.com/openwisp/OpenWISP-Firmware>`_.
3240

33-
Its main features are:
41+
Its main features are listed below for your reference:
3442

3543
* `OpenWRT <http://openwrt.org>`_ / `LEDE <https://www.lede-project.org/>`_ support
3644
* `OpenWisp Firmware <https://github.com/openwisp/OpenWISP-Firmware>`_ support

bin/netjsonconfig

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import os
55
import sys
66
import traceback
77

8-
import six
9-
108
import netjsonconfig
119

1210
description = """
@@ -146,12 +144,8 @@ def print_output(output):
146144
# if file object, get bytes
147145
if hasattr(output, 'getvalue'):
148146
output = output.getvalue()
149-
# python2: always print
150-
# python3: if string, just print
151-
if isinstance(output, six.string_types):
147+
if isinstance(output, str):
152148
print(output)
153-
# python2: never enters this block
154-
# python3: writes binary data to standard output
155149
else:
156150
sys.stdout.buffer.write(output)
157151

docs/source/_github.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. raw:: html
22

33
<p>
4-
<iframe src="https://nodeshot.org/github-btn.html?user=openwisp&amp;repo=netjsonconfig&amp;type=watch&amp;count=true&amp;size=large" frameborder="0" scrolling="0" width="130" height="33"></iframe>
5-
<iframe src="https://nodeshot.org/github-btn.html?user=openwisp&amp;repo=netjsonconfig&amp;type=fork&amp;count=true&amp;size=large" frameborder="0" scrolling="0" width="130" height="33"></iframe>
4+
<iframe src="http://openwisp.io/github-btn.html?user=openwisp&amp;repo=netjsonconfig&amp;type=watch&amp;count=true&amp;size=large" frameborder="0" scrolling="0" width="130" height="33"></iframe>
5+
<iframe src="http://openwisp.io/github-btn.html?user=openwisp&amp;repo=netjsonconfig&amp;type=fork&amp;count=true&amp;size=large" frameborder="0" scrolling="0" width="130" height="33"></iframe>
66
</p>

0 commit comments

Comments
 (0)