Configures the xunit plugin.
547375
def configure(self, options, config):
        """"""
        Plugin.configure(self, options, config)
        self.config = config
        if self.enabled:
            self.jinja = Environment(
                loader=FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')),
                trim_blocks=True,
                lstrip_blocks=True
            )
            self.stats = {'errors': 0, 'failures': 0, 'passes': 0, 'skipped': 0}
            self.report_data = defaultdict(Group)
            self.report_file = codecs.open(options.html_file, 'w', self.encoding, 'replace')
561584
def configure(self, options, conf):
        
        super(ProgressivePlugin, self).configure(options, conf)
        if (getattr(options, 'verbosity', 0) > 1 and
            getattr(options, 'enable_plugin_id', False)):
            # TODO: Can we forcibly disable the ID plugin?
            print ('Using --with-id and --verbosity=2 or higher with '
                   'nose-progressive causes visualization errors. Remove one '
                   'or the other to avoid a mess.')
        if options.with_bar:
            options.with_styling = True
768850
def configure(self, **kwargs):
        ''' 
        '''
        for kwarg in kwargs:
            value = kwargs[kwarg]

            if kwarg == 'level':
                self.set_level(value)

            elif kwarg == 'default_level':
                self.default_level = level_map.get(value, value)

            elif kwarg == 'datefmt':
                self.handlers[0].formatter.datefmt = value

            elif kwarg == 'msgfmt':
                self.handlers[0].formatter._style._fmt = value

            elif kwarg == 'stream':
                global fg, fx, _CHOSEN_PALETTE
                self.handlers[0].stream = value
                fg, fx, _CHOSEN_PALETTE = _find_palettes(value)

            elif kwarg == 'theme':
                if type(value) is str:
                    theme = _themes[value]
                    if value == 'plain':
                        fmtr =  logging.Formatter(style='{', **theme)
                    elif value == 'json':
                        fmtr =  _JSONFormatter(**theme)
                    else:
                        fmtr =  _ColorFormatter(tty=_is_a_tty, **theme)
                elif type(value) is dict:
                    if 'style' in value or 'icons' in value:
                        fmtr =  _ColorFormatter(tty=_is_a_tty, **theme)
                    else:
                        fmtr =  logging.Formatter(style='{', **theme)
                self.handlers[0].setFormatter(fmtr)

            elif kwarg == 'icons':
                if type(value) is str:
                    value = _icons[value]
                self.handlers[0].formatter._theme_icons = value

            elif kwarg == 'style':
                if type(value) is str:
                    value = _styles[value]
                self.handlers[0].formatter._theme_style = value

            elif kwarg == 'lexer':
                try:
                    self.handlers[0].formatter.set_lexer(value)
                except AttributeError as err:
                    self.error('lexer: ColorFormatter not available.')
            else:
                raise NameError('unknown keyword argument: %s' % kwarg)
182528
@Override
    protected void configure() {
        bind(MessagingService.class).to(MessagingServiceImpl.class);

        bind(BounceProxyLifecycleMonitor.class).to(MonitoringServiceClient.class);
        bind(BounceProxyInformation.class).toProvider(BounceProxyInformationProvider.class);
    }
1173044
public function configure()
    {
        parent::configure();

        /** @var \Symfony\Component\HttpFoundation\Session\Session $session */
        $session = $this->get('session');

        switch (strtolower($this->container->getParameter('networking_init_cms.db_driver'))) {
            case 'monodb':
                $lastEditedSubscriber = new ODMLastEditedListener($session);
                break;
            case 'orm':
                $lastEditedSubscriber = new ORMLastEditedListener($session);
                break;
            default:
                $lastEditedSubscriber = false;
                break;
        }

        if ($lastEditedSubscriber) {
            $this->dispatcher->addSubscriber($lastEditedSubscriber);
        }
    }
814699
protected function configure() : void
    {
        $this->setName($this->name)
             ->setDescription('Run git ' . $this->name . ' hook.')
             ->setHelp('This command executes the ' . $this->name . ' hook.');
    }
1134176
public function loadPluginConfiguration(): void
	{
		$builder = $this->getContainerBuilder();
		$global = $this->compiler->getExtension()->getConfig();
		$config = $this->getConfig();

		if ($config['tracy'] === true) {
			$builder->addDefinition($this->prefix('tracy'))
				->setFactory(TracyMiddleware::class . '::factory', [$global['debug']])
				->addTag(MiddlewaresExtension::MIDDLEWARE_TAG, ['priority' => 100]);
		}

		if ($config['autobasepath'] === true) {
			$builder->addDefinition($this->prefix('autobasepath'))
				->setFactory(AutoBasePathMiddleware::class)
				->addTag(MiddlewaresExtension::MIDDLEWARE_TAG, ['priority' => 200]);
		}

		$builder->addDefinition($this->prefix('api'))
			->setFactory(ApiMiddleware::class)
			->addTag(MiddlewaresExtension::MIDDLEWARE_TAG, ['priority' => 500]);
	}
1121449
def configure(self, options, conf):
        """"""
        super(PerfDumpPlugin, self).configure(options, conf)
        if not self.enabled:
            return
        try:
            self.html_output_file = options.perfdump_html_file
        except:
            pass
        self.db = SqliteConnection.get(self.database_name)
1289584
protected function configure()
    {
        $this->packages['invoice'] = 'Concordat\Invoice\InvoiceConsole';
        $this->packages['payment'] = 'Concordat\Payment\PaymentConsole';
        $this->packages['pricing'] = 'Concordat\Pricing\PricingConsole';
        $this->packages['profiling'] = 'Concordat\Profiling\ProfilingConsole';
        $this->packages['publisher'] = 'Concordat\Publisher\PublisherConsole';

        $this->paths['default'] = sprintf('app/database/%s/', $this->type);
        $this->paths['laravel'] = sprintf('database/%s/', $this->type);

        $default = class_exists('Illuminate\Foundation\Application') ? 'laravel' : 'default';

        $this->addArgument('name', InputArgument::REQUIRED, 'Name of the Concordat package.');
        $this->addOption('path', null, $this->optional, 'Path for the files to be created.');
        $this->addOption('type', null, $this->optional, 'Type of template to be used.', $default);
    }
649491
public function loadPluginConfiguration(): void
	{
		$builder = $this->getContainerBuilder();
		$global = $this->compiler->getExtension()->getConfig();
		$config = $this->getConfig();

		$builder->addDefinition($this->prefix('entityAdapter'))
			->setFactory(EntityAdapter::class);

		$entityDefinition = $builder->addDefinition($this->prefix('entityDefinition'))
			->setFactory(EntityDefinition::class);

		$coreDefinition = $builder->addDefinition($this->prefix('coreDefinition'))
			->setFactory(CoreDefinition::class);

		$schemaBuilder = $builder->addDefinition($this->prefix('schemaBuilder'))
			->setFactory(SchemaBuilder::class);

		if ($config['definitions'] === null) {
			$schemaBuilder
				->addSetup('addDefinition', [new BaseDefinition()])
				->addSetup('addDefinition', [$entityDefinition])
				->addSetup('addDefinition', [$coreDefinition]);
			foreach ($config['files'] as $file) {
				if (Strings::endsWith($file, '.neon')) {
					$schemaBuilder->addSetup('addDefinition', [new NeonDefinition($file)]);
				} elseif (Strings::endsWith($file, '.yaml') || Strings::endsWith($file, '.yml')) {
					$schemaBuilder->addSetup('addDefinition', [new YamlDefinition($file)]);
				} elseif (Strings::endsWith($file, '.json')) {
					$schemaBuilder->addSetup('addDefinition', [new JsonDefinition($file)]);
				} else {
					throw new InvalidArgumentException(sprintf(
						'We cant parse file "%s" - unsupported file type',
						$file
					));
				}
			}

			$schemaBuilder->addSetup('addDefinition', [new ArrayDefinition($config['definition'])]);
		} else {
			foreach ($config['definitions'] as $customDefinition) {
				$schemaBuilder->addSetup('addDefinition', [$customDefinition]);
			}
		}

		if ($global['debug'] !== true) {
			return;
		}

		if ($config['swaggerUi']['panel']) {
			$builder->addDefinition($this->prefix('swaggerUi.panel'))
				->setFactory(SwaggerUIPanel::class)
				->addSetup('setUrl', [$config['swaggerUi']['url']])
				->addSetup('setExpansion', [$config['swaggerUi']['expansion']])
				->addSetup('setFilter', [$config['swaggerUi']['filter']])
				->addSetup('setTitle', [$config['swaggerUi']['title']])
				->setAutowired(false);
		}
	}
757983
def configure(self, options, conf):
        """"""
        super(FlakyPlugin, self).configure(options, conf)
        if not self.enabled:
            return
        is_multiprocess = int(getattr(options, 'multiprocess_workers', 0)) > 0
        self._stream = self._get_stream(is_multiprocess)
        self._flaky_result = TextTestResult(self._stream, [], 0)
        self._flaky_report = options.flaky_report
        self._flaky_success_report = options.flaky_success_report
        self._force_flaky = options.force_flaky
        self._max_runs = options.max_runs
        self._min_passes = options.min_passes
286121
def configure(self, options, config):
        """"""
        super(TimerPlugin, self).configure(options, config)
        self.config = config
        if self.enabled:
            self.timer_top_n = int(options.timer_top_n)
            self.timer_ok = self._parse_time(options.timer_ok)
            self.timer_warning = self._parse_time(options.timer_warning)
            self.timer_filter = self._parse_filter(options.timer_filter)
            self.timer_fail = options.timer_fail
            self.timer_no_color = True
            self.json_file = options.json_file

            # Windows + nosetests does not support colors (even with colorama).
            if not IS_NT:
                self.timer_no_color = options.timer_no_color

            # determine if multiprocessing plugin enabled
            self.multiprocessing_enabled = bool(getattr(options, 'multiprocess_workers', False))
362393
@Override
  protected void configure() {

    // Bind and expose LogWriter (a bit hacky, but needed by MapReduce for now)
    bind(LogWriter.class).to(LocalLogWriter.class);
    expose(LogWriter.class);

    // Bind ServiceAnnouncer for procedure.
    bind(ServiceAnnouncer.class).to(DiscoveryServiceAnnouncer.class);

    // For Binding queue stuff
    bind(QueueReaderFactory.class).in(Scopes.SINGLETON);

    // Bind ProgramRunner
    MapBinder<ProgramRunnerFactory.Type, ProgramRunner> runnerFactoryBinder =
      MapBinder.newMapBinder(binder(), ProgramRunnerFactory.Type.class, ProgramRunner.class);
    runnerFactoryBinder.addBinding(ProgramRunnerFactory.Type.FLOW).to(FlowProgramRunner.class);
    runnerFactoryBinder.addBinding(ProgramRunnerFactory.Type.FLOWLET).to(FlowletProgramRunner.class);

    bind(ProgramRunnerFactory.class).to(InMemoryFlowProgramRunnerFactory.class).in(Scopes.SINGLETON);
    // Note: Expose for test cases. Need to refactor test cases.
    expose(ProgramRunnerFactory.class);

    // For binding DataSet transaction stuff
    install(new DataFabricFacadeModule());
  }
376781
@Override
    protected void configure() {

        bind(ChannelService.class).to(ChannelServiceImpl.class);
        bind(MonitoringService.class).to(MonitoringServiceImpl.class);

        bind(TimestampProvider.class).to(SystemTimeProvider.class);

        bind(ChannelAssignmentStrategy.class).to(RoundRobinAssignmentStrategy.class);
    }
280929
public function loadPluginConfiguration(): void
	{
		$builder = $this->getContainerBuilder();
		$global = $this->compiler->getExtension()->getConfig();
		$config = $this->getConfig();

		if ($global['debug'] !== true && $config['debug'] !== true) return;

		$builder->addDefinition($this->prefix('panel'))
			->setFactory(ApiPanel::class);

		$this->loadNegotiationDebugConfiguration();

		// BueScreen - runtime
		ApiBlueScreen::register(Debugger::getBlueScreen());
		ValidationBlueScreen::register(Debugger::getBlueScreen());
	}
1266094
protected function configure()
    {
        $this->addArgument(
            'stage',
            InputArgument::OPTIONAL,
            'Stage or hostname'
        );
        $this->addOption(
            'parallel',
            'p',
            Option::VALUE_NONE,
            'Run tasks in parallel'
        );
        $this->addOption(
            'limit',
            'l',
            Option::VALUE_REQUIRED,
            'How many host to run in parallel?'
        );
        $this->addOption(
            'no-hooks',
            null,
            Option::VALUE_NONE,
            'Run task without after/before hooks'
        );
        $this->addOption(
            'log',
            null,
            Option::VALUE_REQUIRED,
            'Log to file'
        );
        $this->addOption(
            'roles',
            null,
            Option::VALUE_REQUIRED,
            'Roles to deploy'
        );
        $this->addOption(
            'hosts',
            null,
            Option::VALUE_REQUIRED,
            'Host to deploy, comma separated, supports ranges [:]'
        );
        $this->addOption(
            'option',
            'o',
            Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY,
            'Sets configuration option'
        );
    }
1290176
protected function configure(): void
    {
        $this->createDefinition()
            ->setExample($this->parseCommentsVars('{script} {command} john male 43 --opt1 value1'))
            ->addArgument('name', Input::ARG_REQUIRED, 'description for the argument [name], is required')
            ->addArgument('sex', Input::ARG_OPTIONAL, 'description for the argument [sex], is optional')
            ->addArgument('age', Input::ARG_OPTIONAL, 'description for the argument [age], is optional')
            ->addOption('yes', 'y', Input::OPT_BOOLEAN, 'description for the option [yes], is boolean')
            ->addOption('opt1', null, Input::OPT_REQUIRED, 'description for the option [opt1], is required')
            ->addOption('opt2', null, Input::OPT_OPTIONAL, 'description for the option [opt2], is optional')
            ;
    }