Commit 6e44c727 by Johan Wirén

Removed urlparsing of gemsource. Not needed

parent 637210be
......@@ -62,7 +62,6 @@ examples:
author: Johan Wiren
'''
import re
from urlparse import urlparse
def getinstalledversions(module, remote=False):
cmd = [ module.get_bin_path('gem', True) ]
......@@ -149,13 +148,7 @@ def main():
if module.params['gemsource'] and module.params['state'] == 'latest':
module.fail_json(msg="Cannot maintain state=latest when installing from local source")
if module.params['gemsource']:
url=urlparse(module.params['gemsource'])
if url.scheme in [ '', 'file' ] :
module.params['gemsource'] = url.path
else:
module.fail_json(msg="Installation using url scheme %s is not supported." % url.scheme)
else:
if module.params['gemsource'] is not 'null':
module.params['gemsource'] = module.params['name']
changed = False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment