Cleaner verbosity

parent a7690cc3
......@@ -315,7 +315,8 @@ class GemDeps(object):
while True:
try:
current_gem = DetailedDependency(self.original_list[counter])
print("Current Gem: %s" % current_gem.name)
print("------------------------------------------------------")
print("Gem: %s" % current_gem.name)
if "rails-assets" in current_gem.name:
print("\tRails Assets Found. Skipping")
counter = counter + 1
......@@ -352,7 +353,6 @@ class GemDeps(object):
'''
Return dependencies of a gem.
'''
print("Getting Dependencies of %s" % gem.name)
api_url = 'https://rubygems.org/api/v1/dependencies.json'
parameters = 'gems=%s' % gem.name
fetch_url = api_url + '?' + parameters
......@@ -361,12 +361,13 @@ class GemDeps(object):
if serialized:
latest_gem = self.smallest_satisfiable(serialized, gem)
dependency_list = []
print(" Dependencies of %s" % gem.name)
for dependency in latest_gem['dependencies']:
n = GemfileParser.Dependency()
n.name = dependency[0]
n.requirement = dependency[1].split(',')
dependency_list.append(n)
print n.name, n.requirement
print("\t%s\t%s" % (n.name, " ".join(n.requirement)))
return dependency_list
else:
return []
......@@ -381,8 +382,8 @@ class GemDeps(object):
version_list[gem_version['number']] = gem_version
version_gem_list.append(gem_version['number'])
least = least_satisfiable_version(gem.requirement, version_gem_list)
print("Gem name: %s, Requirement: %s, Selected Version: %s" %
(gem.name, gem.requirement, least))
print(" Requirement: %s, \n Selected Version: %s" %
(" ".join(gem.requirement), least))
return version_list[least]
def write_output(self, path=None):
......
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