lib/chef/taste/changelog.rb in chef-taste-1.1.0 vs lib/chef/taste/changelog.rb in chef-taste-1.1.1
- old
+ new
@@ -37,9 +37,12 @@
# @param dep [Dependency] the dependent cookbook
#
# @return [String] the goo.gl shortened URL for the changelog
#
def compute(dep)
+ # Skip dependent cookbook which has no source url
+ return '' if dep.source_url.nil?
+
# The source url is of the form https://HOSTING_PROVIDER/USER/REPO
matched = dep.source_url.match(%r(^(https?:\/\/)?(.*?)\/(.*?)\/(.*?)$))
changelog_url =
if matched[2] == 'github.com'
GithubChangelog.new("#{matched[3]}/#{matched[4]}", dep.version_used, dep.latest).compute