lib/sprout/executable.rb in sprout-1.0.26.pre vs lib/sprout/executable.rb in sprout-1.0.29.pre

- old
+ new

@@ -13,11 +13,11 @@ require 'sprout/executable/parameter_factory' module Sprout ## - # The Sprout::Executable module is a Domain Specific Language + # The Sprout::Executable module exposes a Domain Specific Language # for describing Command Line Interface (CLI) applications. # # This module can be included by any class, and depending on how that class # is used, one can either parse command line arguments into meaningful, # structured data, or delegate ruby code and configuration to an existing, @@ -406,22 +406,23 @@ ## # This method will generally be overridden # by subclasses and they can do whatever customization # is necessary for a particular library type. - def library_added library + # + # It's important to note that this value can be + # a String path to a file (or folder), or it can + # be an Array of paths to files (or folders). + def library_added path_or_paths end private def handle_library_prerequisites items - items.each do |item| - t = Rake.application[item] - if(t.sprout_type == :library) - lib = Sprout::Library.load nil, item.to_s - lib.project_paths.each do |path| - library_added path - end unless lib.project_paths.nil? + items.each do |task_name| + t = Rake.application[task_name] + if(!t.sprout_entity.nil?) + library_added t.sprout_entity.installed_project_path end end end def help_requested? options