def generate_temp_cookbook(arguments, reporter)
      opts = if arguments.length == 1
               { recipe_spec: arguments.shift,
                 cookbook_repo_paths: parsed_options[:cookbook_repo_paths] }
             else
               { resource_type: arguments.shift,
                 resource_name: arguments.shift,
                 resource_properties: properties_from_string(arguments) }
             end
      action = ChefApply::Action::GenerateTempCookbook.from_options(opts)
      action.run do |event, data|
        case event
        when :generating
          reporter.update(TS.generate_temp_cookbook.generating)
        when :success
          reporter.success(TS.generate_temp_cookbook.success)
        else
          handle_message(event, data, reporter)
        end
      end
      action.generated_cookbook
    end
def generate_temp_cookbook(arguments, reporter)
      opts = if arguments.length == 1
               { recipe_spec: arguments.shift,
                 cookbook_repo_paths: parsed_options[:cookbook_repo_paths] }
             else
               { resource_type: arguments.shift,
                 resource_name: arguments.shift,
                 resource_properties: properties_from_string(arguments) }
             end
      action = ChefApply::Action::GenerateTempCookbook.from_options(opts)
      action.run do |event, data|
        case event
        when :generating
          reporter.update(TS.generate_temp_cookbook.generating)
        when :success
          reporter.success(TS.generate_temp_cookbook.success)
        else
          handle_message(event, data, reporter)
        end
      end
      action.generated_cookbook
    end
Runs a GenerateCookbook action based on recipe/resource infoprovided
 and renders UI updates as the action reports back