rubocop:disable all
190420
def execute(call, out_file, prefix: ' ')
      rakefile = call.path
      
      profile = *call.profile.map(&:to_s)

      if Grably.export_path
        data = [ rakefile, out_file, { 'target' => call.task, 'profile' => profile, 'params' => params } ]
        puts "remote_grably_request:#{JSON.generate(data)}"
        $stdout.flush
        $stdin.each do |l|
          raise "error in remote (slave) grably" unless l.strip == 'remote_grab_finished'
          break
        end
      else
        key = { rakefile: rakefile, profile: profile }
        
        process = @child_processes[key]
        
        unless process
          env = { 'config' => nil }
          cmd = [
            RbConfig.ruby,
            File.expand_path(File.join(__dir__, 'runner.rb')),
            '-f',
            File.basename(rakefile),
            "mp=#{profile.join(',')}"
          ]
          cmd << "--trace" if Rake.application.options.trace
          
          stdin, stdout, thread = Open3.popen2(*[env, cmd, { :err => [ :child, :out], :chdir => File.dirname(rakefile) }].flatten)
          stdout.sync = true
          stdin.sync = true
          
          process = { stdin: stdin, stdout: stdout, thread: thread }
          @child_processes[key] = process
        end
        
        process[:stdin].puts("build|#{out_file}|#{[call.task].flatten.join('|')}")
        
        ok = false
        process[:stdout].each do |l|
          ls = l.strip
          if ls == 'remote_grab_finished'
            ok = true
            break
          end
          
          if ls.start_with?('remote_grab_request:')
            data = JSON.parse(ls['remote_grab_request:'.size..-1])
            execute(data[0], data[1], "#{prefix}  ", { target: data[2]['target'], profile: data[2]['profile'], params: data[2]['params']})
            process[:stdin].puts('remote_grab_finished')
          else
            log_msg "#{prefix}#{l}"
          end
        end
        
        raise 'error in remote grab' unless ok
      end
    end
6881
def index
      validate_arguments!

      plugins = ::Heroku::Plugin.list

      if plugins.length > 0
        styled_header("Installed Plugins")
        styled_array(plugins)
      end
      ::Heroku::JSPlugin.list
    end
155986
def method_missing(method_sym, *args, &block) # rubocop:disable Style/MethodMissingSuper
      return nil.__send__(method_sym, *args, &block) if nil.respond_to?(method_sym)

      self
    end
155109
def exec
      update_rubocop!
      before_version, after_version = regenerate_rubocop_todo!
      corrected_rule = rubocop_challenge!(before_version, after_version)
      regenerate_rubocop_todo!
      add_to_ignore_list_if_challenge_is_incomplete(corrected_rule)
      create_pull_request!(corrected_rule)
    end
1079803
def stop
      if(@runner.nil? && @stop)
        raise NotRunning.new
      elsif(@runner.nil? || !@runner.alive?)
        @stop = true
        @runner = nil
      else
        @stop = true
        if(@runner)
          @runner.raise Resync.new if @runner.alive? && @runner.stop?
          @runner.join(0.05) if @runner
          @runner.kill if @runner && @runner.alive?
        end
        @runner = nil
      end
      nil
    end
97666
function helper(app, file, key, re) {
  var h = get(app._.asyncHelpers, key);
  var a = get(app._.helpers, key);

  if (!h && !a) {
    set(file.data, key, function () {
      return comment(key, 'helper');
    });

    if (re.test(file.content)) {
      var message = 'MISSING helper: "' + key + '".\n';
      // rethrow (or actually throw) the error
      var err = new SyntaxError(message);
      if (app.disabled('silent')) {
        rethrow(err, file.path, file.content, re);
      }
    }
  }
}
268907
def disable(self, name=None):
        """"""
        if name is None:
            for name in self._actions_dict:
                self.disable(name)
            return
        self._actions_dict[name].qaction.setEnabled(False)
1266007
def abort_current_edit
      ensure_active_edit!

      call_google_api { client.delete_edit(current_package_name, current_edit.id) }

      self.current_edit = nil
      self.current_package_name = nil
    end
1061357
def start
      check_ruby_verison
      check_default_handlers

      begin
        Bundler.require
      rescue Bundler::GemfileNotFound
        say I18n.t("lita.cli.no_gemfile_warning"), :red
        abort
      end

      Lita.run(options[:config])
    end
716990
def reset!
      self.debug   = ENV['DEBUG']
      self.logger  = Logger.new(STDOUT)
      self.bin_dir = nil
      self.tmp_dir = '/tmp/audio_monster'
      self.file    = 'file'
      self.ffmpeg  = 'ffmpeg'
      self.ffprobe = 'ffprobe'
      self.lame    = 'lame'
      self.mp3val  = 'mp3val'
      self.sox     = 'sox'
      self.soxi    = 'soxi'
      self.twolame = 'twolame'
      self
    end
123893
def format
      if @destroy
        text = ""
      else
        text = "[#{name}]\n"
        @entries.each do |entry|
          if entry.is_a?(Array)
            key, value = entry
            text << "#{key}=#{value}\n" unless value.nil?
          else
            text << entry
          end
        end
      end
      text
    end
1174709
def attr_event(*names)
      args = (names[-1].is_a? Hash) ? names.pop : {}
      names.each {|n| define_event(n, args) }
      return nil
    end
183709
def define # :nodoc:

      actual_name = Hash === name ? name.keys.first : name
      unless ::Rake.application.last_comment
        desc "Run JShint"
      end
      task name do
        unless js_file_list.empty?
          result = Jshintrb::report(js_file_list, @options, @globals, STDERR)
          if result.size > 0
            abort("JSHint check failed") if fail_on_error
          end
        end
      end

      self
    end
129193
def set_opts(opts)
      opts.on('-s', '--stdin', 'Read input from standard input instead of an input file') do
        @options[:input] = $stdin
      end

      opts.on('--trace', 'Show a full traceback on error') do
        @options[:trace] = true
      end

      opts.on('-c', '--compile', 'Compile only but do not run') do
        @options[:compile] = true
      end

      opts.on('-e', '--erb', 'Convert to ERB') do
        @options[:erb] = true
      end

      opts.on('--rails', 'Generate rails compatible code (Implies --compile)') do
        Engine.set_options disable_capture: true, generator: Temple::Generators::RailsOutputBuffer
        @options[:compile] = true
      end

      opts.on('-r', '--require library', "Load library or plugin with -r slim/plugin") do |lib|
        require lib.strip
      end

      opts.on('-p', '--pretty', 'Produce pretty html') do
        Engine.set_options pretty: true
      end

      opts.on('-o', '--option name=code', String, 'Set slim option') do |str|
        parts = str.split('=', 2)
        Engine.options[parts.first.gsub(/\A:/, '').to_sym] = eval(parts.last)
      end

      opts.on('-l', '--locals Hash|YAML|JSON', String, 'Set local variables') do |locals|
        @options[:locals] =
          if locals =~ /\A\s*\{\s*\p{Word}+:/
            eval(locals)
          else
            require 'yaml'
            if RUBY_ENGINE == 'rbx'
              begin
                require 'psych'
              rescue LoadError
                $stderr.puts 'Please install psych gem as Rubunius ships with an old YAML engine.'
              end
            end
            YAML.load(locals)
          end
      end

      opts.on_tail('-h', '--help', 'Show this message') do
        puts opts
        exit
      end

      opts.on_tail('-v', '--version', 'Print version') do
        puts "Slim #{VERSION}"
        exit
      end
    end
954514
def fix_headers!(env)
      env.keys.select { |k| k =~ /^HTTP_X_/ }.each do |k|
        env[k.gsub("HTTP_", "")] = env[k]
        env.delete(k)
      end
      env
    end
841236
def push_silent(text, can_suppress = false)
      flush_merged_text
      return if can_suppress && @options.suppress_eval?
      newline = (text == "end") ? ";" : "\n"
      @temple << [:code, "#{resolve_newlines}#{text}#{newline}"]
      @output_line = @output_line + text.count("\n") + newline.count("\n")
    end
1246801
def drop kwargs={}
      force = kwargs.arg :force, false

      cmd = 'aptly snapshot drop'
      cmd += ' -force' if force
      cmd += " #{@name.quote}"

      Aptly::runcmd cmd
    end