Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
d87830e1
Commit
d87830e1
authored
Aug 22, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'galaxy_github_archive' of
git://github.com/willthames/ansible
into devel
Conflicts: lib/ansible/utils/__init__.py
parents
311ec543
85096379
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
lib/ansible/utils/__init__.py
+4
-5
test/units/TestUtils.py
+11
-1
No files found.
lib/ansible/utils/__init__.py
View file @
d87830e1
...
...
@@ -385,12 +385,11 @@ def role_spec_parse(role_spec):
if
role_spec
==
""
or
role_spec
.
startswith
(
"#"
):
return
(
None
,
None
,
None
,
None
)
# FIXME: coding guidelines want this as a list comprehension
tokens
=
map
(
lambda
s
:
s
.
strip
(),
role_spec
.
split
(
','
))
tokens
=
[
s
.
strip
()
for
s
in
role_spec
.
split
(
','
)]
# assume https://github.com URLs are git+https:// URLs and not
# tarballs
if
'github.com/'
in
tokens
[
0
]
and
not
tokens
[
0
]
.
startswith
(
"git+"
):
# tarballs
unless they end in '.zip'
if
'github.com/'
in
tokens
[
0
]
and
not
tokens
[
0
]
.
startswith
(
"git+"
)
and
not
tokens
[
0
]
.
endswith
(
'.tar.gz'
)
:
tokens
[
0
]
=
'git+'
+
tokens
[
0
]
if
'+'
in
tokens
[
0
]:
...
...
@@ -408,7 +407,7 @@ def role_spec_parse(role_spec):
def
role_yaml_parse
(
role
):
if
'github.com'
in
role
[
"src"
]
and
'http'
in
role
[
"src"
]
and
'+'
not
in
role
[
"src"
]:
if
'github.com'
in
role
[
"src"
]
and
'http'
in
role
[
"src"
]
and
'+'
not
in
role
[
"src"
]
and
not
role
[
"src"
]
.
endswith
(
'.tar.gz'
)
:
role
[
"src"
]
=
"git+"
+
role
[
"src"
]
if
'+'
in
role
[
"src"
]:
(
scm
,
src
)
=
role
[
"src"
]
.
split
(
'+'
)
...
...
test/units/TestUtils.py
View file @
d87830e1
...
...
@@ -824,7 +824,7 @@ class TestUtils(unittest.TestCase):
}
),
(
# test that http://github URLs are assumed git+http://
# test that http://github URLs are assumed git+http://
unless they end in .tar.gz
"http://github.com/ansible/fakerole/fake"
,
{
'scm'
:
'git'
,
...
...
@@ -832,6 +832,16 @@ class TestUtils(unittest.TestCase):
'version'
:
''
,
'name'
:
'fake'
}
),
(
# test that http://github URLs are assumed git+http:// unless they end in .tar.gz
"http://github.com/ansible/fakerole/fake/archive/master.tar.gz"
,
{
'scm'
:
None
,
'src'
:
'http://github.com/ansible/fakerole/fake/archive/master.tar.gz'
,
'version'
:
''
,
'name'
:
'master'
}
)
]
for
(
spec
,
result
)
in
tests
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment