lib/berkshelf/formatters/json.rb in berkshelf-3.0.0.beta4 vs lib/berkshelf/formatters/json.rb in berkshelf-3.0.0.beta5

- old
+ new

@@ -107,19 +107,10 @@ cookbooks[name][:sources][source] = cookbook end end end - # Add a Cookbook package entry to delayed output - # - # @param [String] cookbook - # @param [String] destination - def package(cookbook, destination) - cookbooks[cookbook] ||= {} - cookbooks[cookbook][:destination] = destination - end - # Output a list of cookbooks to delayed output # # @param [Hash<Dependency, CachedCookbook>] list def list(list) list.each do |dependency, cookbook| @@ -157,9 +148,16 @@ # Add an error message entry to delayed output # # @param [String] message def error(message) output[:errors] << message + end + + # Add a warning message entry to delayed output + # + # @param [String] message + def warn(message) + output[:warnings] << message end private attr_reader :output