lib/minimart/cookbook.rb in minimart-1.1.3 vs lib/minimart/cookbook.rb in minimart-1.1.6

- old
+ new

@@ -17,11 +17,11 @@ def self.from_path(path) path = Minimart::Utils::FileHelper.cookbook_path_in_directory(path) new (Ridley::Chef::Cookbook.from_path(path)) end - # @param [Ridley::Chef::Cookbok] raw_cookbook + # @param [Ridley::Chef::Cookbook] raw_cookbook def initialize(raw_cookbook) @raw_cookbook = raw_cookbook end # Get the name of the cookbook @@ -52,10 +52,22 @@ # @return [String] def maintainer metadata.maintainer end + # Get the source url of the cookbook + # @return [String] + def source_url + metadata.source_url + end + + # Get the issues url of the cookbook + # @return [String] + def issues_url + metadata.issues_url + end + # Get the path to the cookbook on the file system # @return [String] def path raw_cookbook.path end @@ -110,10 +122,12 @@ maintainer: maintainer, download_url: cookbook_download_path(self), url: cookbook_path(self), downloaded_at: downloaded_at, download_date: download_date, - platforms: normalized_platforms + platforms: normalized_platforms, + source_url: source_url, + issues_url: issues_url } end def to_json(opts = {}) to_hash.to_json