Public: Add other strategies actions to the prerequisite run list.

 strategy_names - A list of other Strategy names.

 Examples

   @strategy.prerequisites(:my_other_strategy) # => nil

 Returns nil.
174261
def prerequisites(*strategy_names)
      if @prereq_run_list == []
        @prereq_run_list = [[@name, :action, :prepare_prerequisite]]
      end

      [*strategy_names].each do |strategy_name|
        if Arsenal.strategies[strategy_name]
          Arsenal.strategies[strategy_name].list(config).each do |action|
            # strategy_name, type, name
            if action[1] == :local_action
              raise InvalidActionError, 'Cant use prerequisite strategies that have local actions'
            end
            @prereq_run_list << [action[0], :prerequisite, action[2]]
          end
        end  
      end
    end
1289688
def define_per_project_scheme_builder_tasks
      
      projects.each do |project|
        project.schemes.each do |scheme|
          builder_actions.each do |action|
            
            description = "#{action.capitalize} #{project.name} #{scheme.name}"
            task_name = friendlyname("#{name}:#{project.name}:scheme:#{scheme.name}:#{action}")
            
            define_task_with description, task_name do
              scheme.builder.send(action)
            end
            
          end
        end
      end
      
    end
158704
def add_command_meta(name, command, is_alias=false) #:nodoc:
      syntax = command[:syntax]

      @commands[:meta][name] = {
        :syntax      => syntax.is_a?(Array) ? syntax : [syntax],
        :description => command[:description],
        :is_public   => command[:is_public] || false,
        :is_alias    => is_alias
      }
    end
80659
def _run_strategies_for(scope, args) #:nodoc:
      self.winning_strategy = @winning_strategies[scope]
      return if winning_strategy && winning_strategy.halted?

      # Do not run any strategy if locked
      return if @locked

      if args.empty?
        defaults   = @config[:default_strategies]
        strategies = defaults[scope] || defaults[:_all]
      end

      (strategies || args).each do |name|
        strategy = _fetch_strategy(name, scope)
        next unless strategy && !strategy.performed? && strategy.valid?

        strategy._run!
        self.winning_strategy = @winning_strategies[scope] = strategy
        break if strategy.halted?
      end
    end
692604
def __view_add_actions(self):
        

        self.__view.addAction(self.__container.engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|Search In Files|Replace All",
            slot=self.__view_replace_all_action__triggered))
        self.__view.addAction(self.__container.engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|Search In Files|Replace Selected",
            slot=self.__view_replace_selected_action__triggered))
        separator_action = QAction(self.__view)
        separator_action.setSeparator(True)
        self.__view.addAction(separator_action)
        self.__view.addAction(self.__container.engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|Search In Files|Save All",
            slot=self.__view_save_all_action__triggered))
        self.__view.addAction(self.__container.engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|Search In Files|Save Selected",
            slot=self.__view_save_selected_action__triggered))
635751
def add_task(self, name=None, desc=None):
        
        # A name is required to create a task
        for k in self.get_tasks():
            if name in keys_of(k):
                raise ValueError('Task already exists')

        if name is not None:
            # desc can be None, so we can just append whatever we have
            self.grindstone['tasks'].append( {name: desc} )
        else:
            # Raising errors is good, and makes tests easy.
            raise ValueError('Tasks `name` cannot be None')
1244464
def add_synonym(self, other):
        """"""
        self.synonyms.extend(other.synonyms)
        other.synonyms = self.synonyms
481890
@Override
	public void addActions(String nodeID, Tree config) {
		Tree actions = config.get("actions");
		String serviceName = config.get("name", "");
		int actionCounter = 0;

		final long stamp = lock.writeLock();
		try {
			if (actions != null && actions.isMap()) {
				for (Tree actionConfig : actions) {
					actionConfig = actionConfig.clone();
					actionConfig.putObject("nodeID", nodeID, true);
					String actionName = actionConfig.get("name", "");

					// Register remote action
					RemoteActionEndpoint endpoint = new RemoteActionEndpoint(this, transporter, nodeID, actionConfig,
							actionName);
					Strategy<ActionEndpoint> actionStrategy = strategies.get(actionName);
					if (actionStrategy == null) {
						actionStrategy = strategyFactory.create();
						strategies.put(actionName, actionStrategy);
					}
					actionStrategy.addEndpoint(endpoint);

					// Apply middlewares
					for (Middleware middleware : middlewares) {
						endpoint.use(middleware);
					}

					// Write log about this action
					logger.info("Action \"" + actionName + "\" on node \"" + nodeID + "\" registered.");
					actionCounter++;
				}
			}
			names.add(serviceName);
		} finally {
			lock.unlockWrite(stamp);
		}

		// Write log about this service
		StringBuilder msg = new StringBuilder(64);
		msg.append("Remote service \"");
		msg.append(serviceName);
		msg.append("\" registered ");
		if (actionCounter == 0) {
			msg.append("without any actions");
		} else if (actionCounter == 1) {
			msg.append("with 1 action");
		} else {
			msg.append("with ");
			msg.append(actionCounter);
			msg.append(" actions");
		}
		msg.append(" on node \"");
		msg.append(nodeID);
		msg.append("\".");
		logger.info(msg.toString());

		// Notify local listeners about the new REMOTE service
		broadcastServicesChanged(false);
	}
1219710
def runlist_add_app(name, app, profile, force, **kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('runlist:add-app', **{
        'storage': ctx.repo.create_secure_service('storage'),
        'name': name,
        'app': app,
        'profile': profile,
        'force': force
    })
1150049
def method_missing(method_sym, *arguments, &_block)
      # We have to go inside the fastlane directory
      # since in the fastlane runner.rb we do the following
      #   custom_dir = ".."
      #   Dir.chdir(custom_dir) do
      # this goes one folder up, since we're inside the "fastlane"
      # folder at that point
      # Since we call an action from an action we need to go inside
      # the fastlane folder too

      self.runner.trigger_action_by_name(method_sym,
                                         FastlaneCore::FastlaneFolder.path,
                                         true,
                                         *arguments)
    end
694997
def add_prerequisite(self, prerequisite):
        """"""
        if self.prerequisites is None:
            self.prerequisites = SCons.Util.UniqueList()
        self.prerequisites.extend(prerequisite)
        self._children_reset()
262267
public void addStrategy(MappingStrategy strategy)
    {
        if (strategies == null)
        {
            strategies = new ArrayList<>();
        }
        strategies.add(strategy);
    }
233500
def add_dependencies(step, action)
      action.required_step_ids.each do |required_step_id|
        @graph[step.id] << required_step_id
      end
    end
884709
def inherit_strategy(strategy)
      AvoDeploy::Deployment.instance.log.debug "Loading deployment strategy #{strategy.to_s}..."

      strategy_file_path = File.dirname(__FILE__) + "/strategy/#{strategy.to_s}.rb"

      if File.exist?(strategy_file_path)
        require strategy_file_path
      else
        raise RuntimeError, "The requested strategy '#{strategy.to_s}' does not exist"
      end
    end
873097
def default_strategies(*strategies)
      opts  = Hash === strategies.last ? strategies.pop : {}
      hash  = self[:default_strategies]
      scope = opts[:scope] || :_all

      hash[scope] = strategies.flatten unless strategies.empty?
      hash[scope] || hash[:_all] || []
    end
555207
def add_aliases(self_or_cls, **kwargs):
        
        self_or_cls.aliases.update({v:k for k,v in kwargs.items()})
225996
def create_strategy(name=None):
    
    import logging
    from bonobo.execution.strategies.base import Strategy

    if isinstance(name, Strategy):
        return name

    if name is None:
        name = DEFAULT_STRATEGY

    logging.debug("Creating execution strategy {!r}...".format(name))

    try:
        factory = STRATEGIES[name]
    except KeyError as exc:
        raise RuntimeError(
            "Invalid strategy {}. Available choices: {}.".format(repr(name), ", ".join(sorted(STRATEGIES.keys())))
        ) from exc

    return factory()