summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Buckner <nathan.buckner@rackspace.com>2015-09-28 16:18:25 -0500
committerNathan Buckner <nathan.buckner@rackspace.com>2015-10-19 18:31:38 -0500
commit11bb15178cb2bcf3aeaf11ad1e90d1854bb6e893 (patch)
treeae055816163260ca99eacf4400eeabdabe4d278a
parent93203f58108af9bb3d7c5c260a267336a9f88bce (diff)
Adding MANIFEST.in, test-requirements.txt, tox.ini to pass gate0.1.0
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Nathan Buckner <nathan.buckner@rackspace.com> Workflow+1: Nathan Buckner <nathan.buckner@rackspace.com> Submitted-by: Jenkins Submitted-at: Tue, 20 Oct 2015 05:58:17 +0000 Reviewed-on: https://review.openstack.org/228632 Project: openstack/syntribos Branch: refs/heads/master
-rw-r--r--.gitreview4
-rw-r--r--MANIFEST.in1
-rw-r--r--pip-requires2
-rw-r--r--setup.py10
-rw-r--r--syntribos/clients/http/parser.py2
-rw-r--r--syntribos/tests/fuzz/datagen.py2
-rw-r--r--test-requirements.txt2
-rw-r--r--tox.ini20
8 files changed, 36 insertions, 7 deletions
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..df9b98b
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,4 @@
1[gerrit]
2host=review.openstack.org
3port=29418
4project=openstack/syntribos
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..70a4fa7
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1 @@
include README.md LICENSE pip-requires HISTORY.rst
diff --git a/pip-requires b/pip-requires
index b0962bf..20558f1 100644
--- a/pip-requires
+++ b/pip-requires
@@ -1 +1 @@
opencafe opencafe>=0.2.1,<0.2.2
diff --git a/setup.py b/setup.py
index d09dcd3..1856956 100644
--- a/setup.py
+++ b/setup.py
@@ -14,22 +14,24 @@ See the License for the specific language governing permissions and
14limitations under the License. 14limitations under the License.
15""" 15"""
16from setuptools import setup, find_packages 16from setuptools import setup, find_packages
17import os
17 18
18 19
19requires = open('pip-requires').readlines() 20base_path = os.path.dirname(os.path.abspath(__file__))
21requires = open(os.path.join(base_path, 'pip-requires')).readlines()
20setup( 22setup(
21 name='syntribos', 23 name='syntribos',
22 version='0.0.1', 24 version='0.0.1',
23 description=('API Security Scanner'), 25 description=('API Security Scanner'),
24 long_description='{0}\n\n{1}'.format( 26 long_description='{0}\n\n{1}'.format(
25 open('README.md').read(), 27 open(os.path.join(base_path, 'README.md')).read(),
26 open('HISTORY.rst').read()), 28 open(os.path.join(base_path, 'HISTORY.rst')).read()),
27 author='Rackspace Cloud QE', 29 author='Rackspace Cloud QE',
28 author_email='nathan.buckner@rackspace.com', 30 author_email='nathan.buckner@rackspace.com',
29 packages=find_packages(), 31 packages=find_packages(),
30 include_package_data=True, 32 include_package_data=True,
31 install_requires=requires, 33 install_requires=requires,
32 license=open('LICENSE').read(), 34 license=open(os.path.join(base_path, 'LICENSE')).read(),
33 zip_safe=False, 35 zip_safe=False,
34 entry_points={'console_scripts': [ 36 entry_points={'console_scripts': [
35 'syntribos = syntribos.runner:entry_point']}, 37 'syntribos = syntribos.runner:entry_point']},
diff --git a/syntribos/clients/http/parser.py b/syntribos/clients/http/parser.py
index e716fd3..c83ba1b 100644
--- a/syntribos/clients/http/parser.py
+++ b/syntribos/clients/http/parser.py
@@ -40,7 +40,7 @@ class RequestCreator(object):
40 break 40 break
41 method, url, params, version = cls._parse_url_line(lines[0], endpoint) 41 method, url, params, version = cls._parse_url_line(lines[0], endpoint)
42 headers = cls._parse_headers(lines[1:index]) 42 headers = cls._parse_headers(lines[1:index])
43 data = cls._parse_data(lines[index+1:]) 43 data = cls._parse_data(lines[index + 1:])
44 return cls.request_model_type( 44 return cls.request_model_type(
45 method=method, url=url, headers=headers, params=params, data=data, 45 method=method, url=url, headers=headers, params=params, data=data,
46 action_field=action_field) 46 action_field=action_field)
diff --git a/syntribos/tests/fuzz/datagen.py b/syntribos/tests/fuzz/datagen.py
index 9d02c42..16ee976 100644
--- a/syntribos/tests/fuzz/datagen.py
+++ b/syntribos/tests/fuzz/datagen.py
@@ -49,7 +49,7 @@ class FuzzMixin(object):
49 start, stop = match.span() 49 start, stop = match.span()
50 yield "{0}{1}{2}".format( 50 yield "{0}{1}{2}".format(
51 cls.remove_braces(data[:start]), 51 cls.remove_braces(data[:start]),
52 string, cls.remove_braces(data[stop+1:])) 52 string, cls.remove_braces(data[stop + 1:]))
53 53
54 @classmethod 54 @classmethod
55 def _build_combinations(cls, stri, dic, skip_var): 55 def _build_combinations(cls, stri, dic, skip_var):
diff --git a/test-requirements.txt b/test-requirements.txt
new file mode 100644
index 0000000..191e0ea
--- /dev/null
+++ b/test-requirements.txt
@@ -0,0 +1,2 @@
1flake8>=2.2.4,<=2.4.1
2nose
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..c683c7f
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,20 @@
1[tox]
2envlist=pep8,py27,py34
3
4[testenv]
5setenv=VIRTUAL_ENV={envdir}
6deps=-r{toxinidir}/pip-requires
7 -r{toxinidir}/test-requirements.txt
8
9[testenv:py27]
10commands=nosetests
11
12[testenv:py34]
13commands=nosetests
14
15[testenv:pep8]
16commands=flake8
17
18[flake8]
19ignore=F401,E402
20