diff --git a/.gitignore b/.gitignore index d7be4db..152fc1a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /ansible-review-0.7.2.tar.gz +/ansible-review-0.7.5.tar.gz diff --git a/0001-backport-to-ansible-lint-2.x.patch b/0001-backport-to-ansible-lint-2.x.patch deleted file mode 100644 index 66f0554..0000000 --- a/0001-backport-to-ansible-lint-2.x.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 55af6e76c3c2258dca11141d49852745361a5855 Mon Sep 17 00:00:00 2001 -From: Dan Callaghan -Date: Wed, 22 Jun 2016 14:13:12 +1000 -Subject: [PATCH] backport to ansible-lint 2.x - ---- - lib/ansiblereview/__init__.py | 5 ++++- - lib/ansiblereview/playbook.py | 2 +- - setup.py | 2 +- - 3 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/lib/ansiblereview/__init__.py b/lib/ansiblereview/__init__.py -index dbf8d54..fc1aa07 100644 ---- a/lib/ansiblereview/__init__.py -+++ b/lib/ansiblereview/__init__.py -@@ -1,4 +1,4 @@ --from ansiblelint import default_rulesdir, RulesCollection -+from ansiblelint import RulesCollection - import codecs - from functools import partial - import re -@@ -10,6 +10,9 @@ - except ImportError: - from ansible.utils import module_finder as module_loader - -+import pkg_resources -+default_rulesdir = pkg_resources.resource_filename('ansiblelint', 'rules') -+ - - class AnsibleReviewFormatter(object): - -diff --git a/lib/ansiblereview/playbook.py b/lib/ansiblereview/playbook.py -index facf011..3c0d003 100644 ---- a/lib/ansiblereview/playbook.py -+++ b/lib/ansiblereview/playbook.py -@@ -42,7 +42,7 @@ def review(playbook, settings): - - def repeated_names(playbook, settings): - with codecs.open(playbook['path'], mode='rb', encoding='utf-8') as f: -- yaml = ansiblelint.utils.parse_yaml_linenumbers(f, playbook['path']) -+ yaml = ansiblelint.utils.parse_yaml_linenumbers(f) - namelines = defaultdict(list) - errors = [] - if yaml: -diff --git a/setup.py b/setup.py -index 43aa3c3..97e3815 100644 ---- a/setup.py -+++ b/setup.py -@@ -19,7 +19,7 @@ - package_dir={'': 'lib'}, - packages=find_packages('lib'), - zip_safe=False, -- install_requires=['ansible-lint>=3.0.0rc11', 'pyyaml', 'appdirs', 'unidiff'], -+ install_requires=['ansible-lint<3', 'pyyaml', 'appdirs', 'unidiff'], - scripts=['bin/ansible-review'], - classifiers=[ - 'License :: OSI Approved :: MIT License', --- -2.4.11 - diff --git a/ansible-review.spec b/ansible-review.spec index dca50ef..af33baa 100644 --- a/ansible-review.spec +++ b/ansible-review.spec @@ -1,5 +1,5 @@ Name: ansible-review -Version: 0.7.2 +Version: 0.7.5 Release: 1%{?dist} Summary: Reviews Ansible playbooks, roles and inventory and suggests improvements License: MIT @@ -9,12 +9,15 @@ BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-nose BuildRequires: python-flake8 -Requires: ansible-lint +Requires: ansible-lint >= 3.0 Requires: python2-yaml Requires: python-appdirs Requires: python2-unidiff -# Only until ansible-lint 3.x lands in Fedora -Patch1: 0001-backport-to-ansible-lint-2.x.patch +# Runtime requirements also needed in the build to run tests: +BuildRequires: ansible-lint >= 3.0 +BuildRequires: python2-yaml +BuildRequires: python-appdirs +BuildRequires: python2-unidiff %description Tool to review Ansible playbooks, roles, and inventory and suggest improvements. @@ -23,7 +26,6 @@ Tool to review Ansible playbooks, roles, and inventory and suggest improvements. %setup -q rm -r lib/ansible_review.egg-info sed -e '1 { /^#!/d }' -i lib/ansiblereview/utils/yamlindent.py -%patch1 -p1 %build %py2_build @@ -32,9 +34,7 @@ sed -e '1 { /^#!/d }' -i lib/ansiblereview/utils/yamlindent.py %py2_install %check -# Tests fail due to missing test/test_cases/hosts: -# https://github.com/willthames/ansible-review/pull/2 -#nosetests -v test/ +nosetests -v test/ %files %doc README.md LICENSE @@ -43,5 +43,9 @@ sed -e '1 { /^#!/d }' -i lib/ansiblereview/utils/yamlindent.py %{python2_sitelib}/ansible_review*.egg-info %changelog +* Wed Jun 29 2016 Dan Callaghan - 0.7.5-1 +- updated to upstream release 0.7.5 +- depend on ansible-lint >= 3.0, removed patch for 2.x compatibility + * Wed Jun 22 2016 Dan Callaghan - 0.7.2-1 - initial version diff --git a/sources b/sources index 7a059c2..7db110f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6d6f66572564624da061f9bbf104edee ansible-review-0.7.2.tar.gz +c289a70de5a56bf0438c949a16b68210 ansible-review-0.7.5.tar.gz