Action runner for executing actions in the context of this environment.

 @return [Action::Runner]
353887
def action_runner
      @action_runner ||= Action::Runner.new do
        {
          action_runner:  action_runner,
          box_collection: boxes,
          hook:           method(:hook),
          host:           host,
          machine_index:  machine_index,
          gems_path:      gems_path,
          home_path:      home_path,
          root_path:      root_path,
          tmp_path:       tmp_path,
          ui:             @ui,
          env:            self
        }
      end
    end
473328
def run
      # Like RuboCop itself, we'll lazy load so the task
      # doesn't substantially impact Rakefile load time.
      require 'ruumba'

      analyzer = Ruumba::Analyzer.new(@options)
      puts 'Running Ruumba...'

      exit(analyzer.run(@dir))
    end
293233
def run(task, scope_hash = {})
      Lumberjack.unit_of_work do
        items = Guard.state.scope.grouped_plugins(scope_hash || {})
        items.each do |_group, plugins|
          _run_group_plugins(plugins) do |plugin|
            _supervise(plugin, task) if plugin.respond_to?(task)
          end
        end
      end
    end
1053276
function createRunner(builderInstance) {
    
    var runnerInstance={
        name:builderInstance.name,
        builder:builderInstance,
        run: function (input,callback) {
            
            var context =
                createContext(null, (input==null) ? {} : input);
            
            exec(builderInstance.root, context, function(err,result){
                if (callback){
                    callback(err,result);
                }
            });
        },
    };
    
    return runnerInstance;
}
1056530
def run(self):
        '''
        
        '''
        self.utils = salt.loader.utils(self.opts, proxy=self.proxy)
        if salt.utils.platform.is_windows():
            # Calculate function references since they can't be pickled.
            if self.opts['__role'] == 'master':
                self.runners = salt.loader.runner(self.opts, utils=self.utils)
            else:
                self.runners = []
            self.funcs = salt.loader.minion_mods(self.opts, utils=self.utils, proxy=self.proxy)

        self.engine = salt.loader.engines(self.opts,
                                          self.funcs,
                                          self.runners,
                                          self.utils,
                                          proxy=self.proxy)
        kwargs = self.config or {}
        try:
            self.engine[self.fun](**kwargs)
        except Exception as exc:
            log.critical(
                'Engine \'%s\' could not be started!',
                self.fun.split('.')[0], exc_info=True
            )
896921
def run_work_unit
      begin
        result = nil
        action_class = CloudCrowd.actions[@unit['action']]
        action = action_class.new(@status, @unit['input'], enhanced_unit_options, @node.asset_store)
        Dir.chdir(action.work_directory) do
          result = case @status
          when PROCESSING then action.process
          when SPLITTING  then action.split
          when MERGING    then action.merge
          else raise Error::StatusUnspecified, "work units must specify their status"
          end
        end
        action.cleanup_work_directory if action
        complete_work_unit({'output' => result}.to_json)
      rescue Exception => e
        action.cleanup_work_directory if action
        fail_work_unit(e)
      end
      @node.resolve_work(@unit['id'])
    end
307898
def jobs(type=:running)
      results = case type
                when :running then call(:getRunningJobs) 
                when :completed then call(:getCompletedJobs)
                when :failed then call(:getFailedJobs)
                when :killed then call(:getKilledJobs)
                else call(:getAllJobs)
                end
      results.jobs.map { |j| Job.new(self, j) }
    end
552381
def execute(args=nil)
      args ||= EMPTY_TASK_ARGS
      if application.options.dryrun
        puts "** Execute (dry run) #{name}"
        return
      end
      if application.options.trace
        puts "** Execute #{name}"
      end
      application.enhance_with_matching_rule(name) if @actions.empty?
      @actions.each do |act|
        case act.arity
        when 1
          act.call(self)
        else
          act.call(self, args)
        end
      end
    end
929988
def run
      unless opts[:action]
        usage
        exit 255
      end

      @config = {}

      if opts[:config]
        @config = YAML.load_file(opts[:config])
        substitute_relative_paths!(@config, File.dirname(opts[:config]))
        load_plugins(@config["plugins"]) if @config.key?("plugins")
      end

      @config[:options] = {}
      opts.each do |k, v|
        if v.is_a?(Hash)
          @config[k.to_s] ||= {}
          v.each do |v_key, v_val|
            @config[k.to_s][v_key.to_s] = v_val
            @config[k.to_s].delete(v_key.to_s) if v_val.nil?
          end
        else
          @config[:options][k] = v
        end
      end

      return handle_action_bulk if opts[:action] == "bulk"
      return handle_action_facts if opts[:action] == "facts"
      return handle_action_bulk if opts[:action] == "reindex"

      usage
      exit 255
    end
397460
def run_action(self, unit_sentry, action,
                   _check_output=subprocess.check_output,
                   params=None):
        
        self.log.warn('charmhelpers.contrib.amulet.utils.run_action has been '
                      'deprecated for amulet.run_action')
        return unit_sentry.run_action(action, action_args=params)
1060185
def actions(*action_names)
      [*action_names].each do |name| 
        if Arsenal.actions[name]
          # strategy_name, type, name
          @run_list << [self.name, Arsenal.actions[name].type, name]
        end
      end
    end
342756
def run_auto_cmds(run_level)
      safely do
        auto_cmds_for(run_level).each { |cmd| cmd.new(self).execute }
      end
    end
697361
def run
      retval = @exp.expect(*@patterns.collect {|p| p.pattern})
      unless (retval.nil?)
        @exp.instance_eval(&@patterns[retval].block) unless (@patterns[retval].block.nil?)
      end
      return retval
    end
272424
def go(&stream_block)
      @status = :running
      @results = {}
      @hosts.each do |host|
        cmd_event = Chloride::Event.new(:action_progress, name)
        msg = if host.localhost
                "[localhost/#{host}] #{@cmd}\n\n"
              else
                "[#{host}] #{@cmd}\n\n"
              end
        cmd_event.add_message(Chloride::Event::Message.new(:info, host, msg))
        stream_block.call(cmd_event)
        @results[host.hostname] = host.execute(@cmd, @sudo, &update_proc(&stream_block))
      end

      @results
    end
890586
def execute(global_options,options,arguments) 
      get_action(arguments).call(global_options,options,arguments)
    end
919497
def runner_execute!(host, commands, options = {})
      result = host.execute commands, options
      if result && result[1] == :stdout
        Trooper.logger.info "#{result[2]}\n"
        true
      else 
        false
      end
    end
1166943
def run(self, context: ActionContext):
        
        iterator = itertools.count(start=self.start, step=self.step)
        for i in iterator:
            self.with_iteration(i)
            if self.stop is not None and i >= self.stop:
                break
            try:
                self._action(context)
            except Loop.Continue:
                continue
            except Loop.Break:
                break