Class: Chef::Taste::Changelog
- Inherits:
-
Object
- Object
- Chef::Taste::Changelog
- Defined in:
- lib/chef/taste/changelog.rb
Overview
The Changelog class that computes the changelog if the current version being used and the latest version are different and the changelog is computable.
Defined Under Namespace
Classes: GithubChangelog
Class Method Summary collapse
-
.compute(dep) ⇒ String
Compute the changelog for the dependent cookbook if available.
Class Method Details
.compute(dep) ⇒ String
Compute the changelog for the dependent cookbook if available
41 42 43 44 45 46 47 48 49 |
# File 'lib/chef/taste/changelog.rb', line 41 def compute(dep) changelog_url = if dep.source_url =~ /^(https?:\/\/)?github.com\/(.*)\/(.*)$/ GithubChangelog.new("#{$2}/#{$3}", dep.version_used, dep.latest).compute else nil end Googl.shorten(changelog_url).short_url unless changelog_url.nil? end |