lib/berkshelf/formatters/human.rb in berkshelf-3.0.1 vs lib/berkshelf/formatters/human.rb in berkshelf-3.1.0
- old
+ new
@@ -75,10 +75,17 @@
# @param [String] destination
def package(destination)
Berkshelf.ui.info "Cookbook(s) packaged to #{destination}"
end
+ # Output the important information about a cookbook using {Berkshelf.ui}.
+ #
+ # @param [CachedCookbook] cookbook
+ def info(cookbook)
+ Berkshelf.ui.info(cookbook.pretty_print)
+ end
+
# Output a list of cookbooks using {Berkshelf.ui}
#
# @param [Array<Dependency>] list
def list(dependencies)
Berkshelf.ui.info "Cookbooks installed by your Berksfile:"
@@ -96,14 +103,15 @@
results.sort_by(&:name).each do |remote_cookbook|
Berkshelf.ui.info "#{remote_cookbook.name} (#{remote_cookbook.version})"
end
end
- # Output Cookbook info message using {Berkshelf.ui}
+ # Output Cookbook path using {Berkshelf.ui}
#
# @param [CachedCookbook] cookbook
def show(cookbook)
- Berkshelf.ui.info(cookbook.pretty_print)
+ path = File.expand_path(cookbook.path)
+ Berkshelf.ui.info(path)
end
# Output Cookbook vendor info message using {Berkshelf.ui}
#
# @param [CachedCookbook] cookbook