Tidied up a little, added tests

Moved repo_url_to_role_name to common method in ansible.utils
Added unit test for repo_url_to_role_name
Added integration tests for galaxy
This commit is contained in:
Will Thames 2014-08-14 20:20:10 +10:00 committed by Michael DeHaan
commit c2fe33f9f4
7 changed files with 38 additions and 7 deletions

View file

@ -181,7 +181,7 @@ class Play(object):
if '+' in orig_path and '://' in orig_path:
# dependency name pointing to SCM URL
# assume role name is last part of the URL
orig_path = orig_path.split('/')[-1]
orig_path = utils.repo_url_to_role_name(orig_path)
role_vars = {}
if type(orig_path) == dict:
@ -417,7 +417,7 @@ class Play(object):
else:
role_name = role
if '+' in role_name and '://' in role_name:
role_name = role_name.split('/')[-1]
role_name = utils.repo_url_to_role_name(role_name)
role_names.append(role_name)
if os.path.isfile(task):