lib/bundle_info.rb in bundle_info-0.0.2 vs lib/bundle_info.rb in bundle_info-0.0.3
- old
+ new
@@ -18,11 +18,17 @@
puts "No Gemfile or .gemspec found in current directory"
exit
end
gems.dependencies.map do |dep|
info = Gems.info dep.name
- desc = info['info'].gsub(/\n/, '')
- puts "#{dep.name}:".green + " #{desc.truncate(80)}"
+ output = "#{dep.name}:".green
+ if info
+ desc = info['info'].gsub(/\n/, '')
+ output += " #{desc.truncate(80)}"
+ else
+ output += " Not found on rubygems.org"
+ end
+ puts output
end
end
end
end
\ No newline at end of file