Run a Rockit configuration file and Rails dependency checks
 unless turned off by configuration.
353479
def run
      rockit_file = CONFIG_FILES.select { |f| File.exists?(f) }.first
      raise ArgumentError "No Rockitfile found (looking for: #{CONFIG_FILES.join(',')})" unless rockit_file
      Dsl.new(self).instance_eval(File.read(rockit_file), rockit_file)
    end
166518
def run(self):
        
        with open('src/lsqfit/__init__.py', 'a') as lsfile:
            lsfile.write("\n__version__ = '%s'\n" % LSQFIT_VERSION)
        _build_py.run(self)
810865
def check_bundler(self):
        

        def get_config(name):
            return name if self.config('bundler.' + name) else ''

        from pkg_resources import Requirement, resource_filename
        relative_path = os.path.join('PyGitUp', 'check-bundler.rb')
        bundler_script = resource_filename(Requirement.parse('git-up'),
                                           relative_path)
        assert os.path.exists(bundler_script), 'check-bundler.rb doesn\'t ' \
                                               'exist!'

        return_value = subprocess.call(
            ['ruby', bundler_script, get_config('autoinstall'),
             get_config('local'), get_config('rbenv')]
        )

        if self.testing:
            assert return_value == 0, 'Errors while executing check-bundler.rb'
108858
def ensure_config
      return if @config_found
      found = CONFIG_FILES.all? {|f| File.exists? "#{@options[:config_path]}/#{f}" }
      found ? @config_dir = true : config_not_found
    end
1058829
def execute(self):
        
        if not self.config.pr:
            raise NotPullRequestException

        logger.debug('Using the following configuration:')
        for name, value in self.config.as_dict().items():
            logger.debug('  - {}={}'.format(name, repr(value)))

        logger.info('Running Lintly against PR #{} for repo {}'.format(self.config.pr, self.project))

        parser = PARSERS.get(self.config.format)
        self._all_violations = parser.parse_violations(self.linter_output)
        logger.info('Lintly found violations in {} files'.format(len(self._all_violations)))

        diff = self.get_pr_diff()
        patch = self.get_pr_patch(diff)
        self._diff_violations = self.find_diff_violations(patch)
        logger.info('Lintly found diff violations in {} files'.format(len(self._diff_violations)))

        self.post_pr_comment(patch)
        self.post_commit_status()
514721
protected static function checkSupports()
    {
        if (is_callable('runkit_lint_file')) {
            self::$support[self::SUPPORT_RUNKIT_SANDBOX] = true;
        }

        if (is_callable('runkit_function_add')) {
            self::$support[self::SUPPORT_RUNKIT_MODIFY] = true;
        }

        if (is_callable('runkit_import')) {
            self::$support[self::SUPPORT_RUNKIT_IMPORT] = true;
        }

        if (self::supported(self::SUPPORT_RUNKIT_MODIFY) && ini_get('runkit.internal_override')) {
            self::$support[self::SUPPORT_RUNKIT_INTERNAL_MODIFY] = true;
        }
    }
1354278
def processAndSetDefaults(self):
        
        # INPUT, OUTPUT, GIVEN + BUILDABLE DEPS
        if not self.input:
            raise ValueError(NO_INPUT_FILE)

        if not self.output:
            # Build directory must exist, right?
            if not self.build_directory:
                File()
            pass  # Can it be built? / reference self.output_format for this
        else:
            pass  # if it is not congruent with other info provided

        if not self.build_directory:
            pass  # Initialize it

        for dependency in self.given_dependencies:
            pass  # Check if the dependcy exists

        if self.output_format != self.output.getType():
            raise ValueError("")
        # Given dependencies must actually exist!
        # output_name must be at a lower extenion level than input_name
        # The build directory
        return
165732
def check(modname):
    """"""
    for dependency in DEPENDENCIES:
        if dependency.modname == modname:
            return dependency.check()
    else:
        raise RuntimeError("Unkwown dependency %s" % modname)
1204675
def run_on_changes(paths)
      specs = Inspector.clean(paths)
      return false if specs.empty?

      specs += self.rerun_specs if options[:keep_failed]

      # RSpec reloads the files, so reload only non spec files
      (paths - specs).each { |path| Reloader.reload_file(path) }

      passed, failed_examples, passed_examples = Runner.run(specs, options)

      self.rerun_specs += failed_examples
      self.rerun_specs -= passed_examples

      run_all if passed && !self.last_run_passed && options[:all_after_pass]

      self.last_run_passed = passed

      throw :task_has_failed unless passed
    end
1161325
def rspec_options
      config = ::RSpec.configuration
      {}.tap do |opts|
        opts[:path] = config.dockerfile_path if config.dockerfile_path?
        opts[:rm] = config.rm_build if config.rm_build?
        opts[:log_level] = config.log_level if config.log_level?
      end
    end
929637
def perform
      return if @exit

      args, opts = @arguments, @options
      [:to, :from, :to_safe, :exclude, :schemas].each do |opt|
        opts[opt] ||= config[opt.to_s]
      end
      map_deprecations(args, opts)

      if opts[:init]
        setup(db_config_file(args[0]) || config_file || ".pgsync.yml")
      else
        sync(args, opts)
      end

      true
    end
73188
def should_run(self):
        
        should_run = True
        config = self.target or self.source
        if config.has('systems'):
            should_run = False
            valid_systems = [s.lower() for s in config.get('systems').split(",")]
            for system_type, param in [('is_osx', 'osx'),
                                       ('is_debian', 'debian')]:
                if param in valid_systems and getattr(system, system_type)():
                    should_run = True
        return should_run
882094
def set_default_configuration
      ActiveSupport::Deprecation.warn("The environment variable RAILS_DATAROOT will be deprecated in an upcoming release, please use OOD_DATAROOT instead.") if ENV['RAILS_DATAROOT']
      self.dataroot = ENV['OOD_DATAROOT'] || ENV['RAILS_DATAROOT']
      self.dataroot ||= "~/#{ENV['OOD_PORTAL'] || "ondemand"}/data/#{ENV['APP_TOKEN']}" if ENV['APP_TOKEN']

      # Add markdown template support
      self.markdown = Redcarpet::Markdown.new(
        Redcarpet::Render::HTML,
        autolink: true,
        tables: true,
        strikethrough: true,
        fenced_code_blocks: true,
        no_intra_emphasis: true
      )

      # Initialize URL handlers for system apps
      self.public    = Urls::Public.new(
        title:    ENV['OOD_PUBLIC_TITLE'] || 'Public Assets',
        base_url: ENV['OOD_PUBLIC_URL']   || '/public'
      )
      self.dashboard = Urls::Dashboard.new(
        title:    ENV['OOD_DASHBOARD_TITLE'] || 'Open OnDemand',
        base_url: ENV['OOD_DASHBOARD_URL']   || '/pun/sys/dashboard'
      )
      self.shell     = Urls::Shell.new(
        title:    ENV['OOD_SHELL_TITLE'] || 'Shell',
        base_url: ENV['OOD_SHELL_URL']   || '/pun/sys/shell'
      )
      self.files     = Urls::Files.new(
        title:    ENV['OOD_FILES_TITLE'] || 'Files',
        base_url: ENV['OOD_FILES_URL']   || '/pun/sys/files'
      )
      self.editor    = Urls::Editor.new(
        title:    ENV['OOD_EDITOR_TITLE'] || 'Editor',
        base_url: ENV['OOD_EDITOR_URL']   || '/pun/sys/file-editor'
      )

      # Add routes for useful features
      self.routes = OpenStruct.new(
        files_rack_app: true,
        wiki: true
      )

      # Override Bootstrap SASS variables
      self.bootstrap = OpenStruct.new(
        navbar_inverse_bg: '#53565a',
        navbar_inverse_link_color: '#fff',
        navbar_inverse_color: '$navbar-inverse-link-color',
        navbar_inverse_link_hover_color: 'darken($navbar-inverse-link-color, 20%)',
        navbar_inverse_brand_color: '$navbar-inverse-link-color',
        navbar_inverse_brand_hover_color: '$navbar-inverse-link-hover-color'
      )
      ENV.each {|k, v| /^BOOTSTRAP_(?<name>.+)$/ =~ k ? self.bootstrap[name.downcase] = v : nil}

      self.enable_log_formatter = ::Rails.env.production?
    end
1266780
def run(self):
        '''
        
        '''
        import salt.key
        self.parse_args()

        self.setup_logfile_logger()
        verify_log(self.config)

        key = salt.key.KeyCLI(self.config)
        if check_user(self.config['user']):
            key.run()
91854
def run_specs(options = nil)
      options ||= {}
      files = options.fetch(:files, 'spec')
      rspec_options = options.fetch(:options, '--color')
      # We need to override the gemfile explicitely, since we have a default Gemfile in the project root
      gemfile = options.fetch(:gemfile, Gemika::Env.gemfile)
      fatal = options.fetch(:fatal, true)
      runner = binary(:gemfile => gemfile)
      bundle_exec = options.fetch(:bundle_exec) ? 'bundle exec' : nil
      command = [bundle_exec, runner, rspec_options, files].compact.join(' ')
      result = shell_out(command)
      if result
        true
      elsif fatal
        raise RSpecFailed, "RSpec failed: #{command}"
      else
        false
      end
    end
612772
def main() -> None:
    """"""
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--json",
        help="output in JSON format",
        action="store_true",
        default=False)
    parser.add_argument(
        "--config-file", help="Select config file to use", default=".snekrc")
    parser.add_argument(
        'files',
        metavar='file',
        nargs='*',
        default=[],
        help='Files to run checks against')
    parser.add_argument(
        "--init", help="generate snekrc", action="store_true", default=False)

    args = parser.parse_args()

    run_main(args)
295479
def execute!
      files_to_check = parse_options.leftovers

      YamlLint.logger.level = Logger::DEBUG if opts.debug

      no_yamls_to_check_msg = "Error: need at least one YAML file to check.\n"\
                              'Try --help for help.'
      abort(no_yamls_to_check_msg) if files_to_check.empty?
      lint(files_to_check)
    end