Build an object representing the whole configuration of the server.
329758
function(user) {
        var config = _.cloneDeep($$config);

        var network = _.cloneDeep($$network.attributes);
        delete network.config;

        var persistence = _.cloneDeep($$persistence.attributes);
        delete persistence.config;

        var logging = _.cloneDeep($$logging.attributes);
        delete logging.config;
        delete logging.logCache;
        delete logging.eventCache;

        var permissions = user ? $$config.permissions[user] : null;

        return _.merge(_.cloneDeep($$config), {
            network: network,
            persistence: persistence,
            logging: logging,
            permissions: permissions
        });
    }
275357
def build_info():
    '''
    
    '''
    ret = {'info': []}
    out = __salt__['cmd.run']('{0} -V'.format(__detect_os()))

    for i in out.splitlines():
        if i.startswith('configure argument'):
            ret['build arguments'] = re.findall(r"(?:[^\s]*'.*')|(?:[^\s]+)", i)[2:]
            continue

        ret['info'].append(i)

    return ret
732458
def build_object(self, obj):
        """"""
        if not obj.exclude_from_static:
            super(ShowPage, self).build_object(obj)
294017
def build(port=8000, fixtures=None):
    
    extractor = Extractor()
    parser = Parser(extractor.url_details, fixtures)
    parser.parse()
    url_details = parser.results
    _store = get_store(url_details)
    store = json.dumps(_store)
    variables = str(Variable('let', 'store', store))
    functions = DATA_FINDER + GET_HANDLER + MODIFY_HANDLER + POST_HANDLER
    endpoints = []
    endpoint_uris = []
    for u in parser.results:
        endpoint = Endpoint()
        if u['method'].lower() in ['get', 'post']:
            method = u['method'].lower()
        else:
            method = 'modify'
        response = str(ResponseBody(method))

        # Check in store if the base url has individual instances
        u['url'], list_url = clean_url(u['full_url'], _store, u['method'].lower())
        if list_url is not None and u['method'].lower() == 'get':
            list_endpoint = Endpoint()
            list_endpoint.construct('get', list_url, response)
            if str(list_endpoint) not in endpoints:
                endpoints.append(str(list_endpoint))
            if list_endpoint.uri not in endpoint_uris:
                endpoint_uris.append(list_endpoint.uri)

        if method == 'modify':
            without_prefix = re.sub(r'\/(\w+)\_\_', '', u['url'])
            for k, v in _store.items():
                if without_prefix in k:
                    options = v.get('options', '{}')
                    options = ast.literal_eval(options)
                    modifiers = []
                    if options is not None:
                        modifiers = options.get('modifiers', [])
                    if modifiers:
                        for mod in modifiers:
                            if u['method'].lower() == mod:
                                mod_endpoint = Endpoint()
                                uri = without_prefix
                                if v.get('position') is not None and v['position'] == 'url':
                                    uri = re.sub(r'\/?\_\_key', '/:id', u['full_url'])
                                mod_endpoint.construct(u['method'].lower(), uri, response)
                                if str(mod_endpoint) not in endpoints:
                                    endpoints.append(str(mod_endpoint))
                                if mod_endpoint.uri not in endpoint_uris:
                                    endpoint_uris.append(mod_endpoint.uri)
        else:
            endpoint.construct(u['method'], u['url'], response)
            if str(endpoint) not in endpoints:
                endpoints.append(str(endpoint))
            if endpoint.uri not in endpoint_uris:
                endpoint_uris.append(endpoint.uri)

    endpoints = ''.join(endpoints)
    express = ExpressServer()
    express.construct(variables, functions, endpoints, port)
    return express
8195
def config(self):
        """"""
        return ", ".join('%s:%s' % (key, value) for key, value in self.conf.items())
417291
@SuppressWarnings("unchecked")
    private static void copyParamsToServerConfig() {
        ServerConfig.createInstance();
        for (String moduleName : INSTANCE.m_params.keySet()) {
            Object moduleParams = INSTANCE.m_params.get(moduleName);
            Map<String, Object> paramMap = (Map<String, Object>)moduleParams;
            for (String paramName : paramMap.keySet()) {
                ServerConfig.setParam(paramName, paramMap.get(paramName));
            }
        }
    }
1102785
public function build()
    {
        $settings = [];
        foreach ($this->settings as $name => $options) {
            if (isset($options['dsn'])) {
                unset(
                    $options['scheme'],
                    $options['host'],
                    $options['port'],
                    $options['path']
                );

                $parsedDsn = parse_url($options['dsn']);
                unset($options['dsn']);
                if ($parsedDsn) {
                    $options['scheme'] = isset($parsedDsn['scheme']) ? $parsedDsn['scheme'] : 'http';
                    if (isset($parsedDsn['host'])) {
                        $options['host'] = $parsedDsn['host'];
                    }
                    if (isset($parsedDsn['user'])) {
                        $auth = $parsedDsn['user'] . (isset($parsedDsn['pass']) ? ':' . $parsedDsn['pass'] : '');
                        $options['host'] = $auth . '@' . $options['host'];
                    }
                    $options['port'] = isset($parsedDsn['port']) ? $parsedDsn['port'] : 80;
                    $options['path'] = isset($parsedDsn['path']) ? $parsedDsn['path'] : '';
                }
            }

            $settings[$name] = $options;
        }

        $solariumClient = new Client(array('endpoint' => $settings), $this->eventDispatcher);
        foreach ($this->plugins as $pluginName => $plugin) {
            $solariumClient->registerPlugin($pluginName, $plugin);
        }

        return $solariumClient;
    }
192450
function buildConfig (_config) {
  _config.datastore = Object.assign({}, defaultDatastore, _get(_config, 'datastore', {}))

  return _config
}
831810
def make_server(
        server_class, handler_class, authorizer_class, filesystem_class,
        host_port, file_access_user=None, **handler_options):
    
    from . import compat
    if isinstance(handler_class, compat.string_type):
        handler_class = import_class(handler_class)

    if isinstance(authorizer_class, compat.string_type):
        authorizer_class = import_class(authorizer_class)

    if isinstance(filesystem_class, compat.string_type):
        filesystem_class = import_class(filesystem_class)

    authorizer = authorizer_class(file_access_user)
    handler = handler_class
    for key, value in handler_options.items():
        setattr(handler, key, value)
    handler.authorizer = authorizer
    if filesystem_class is not None:
        handler.abstracted_fs = filesystem_class
    return server_class(host_port, handler)
1044875
def build(template='/', host=None, scheme=None, port=None, **template_vars):
        
        # TODO: refactor to build_absolute and build_relative instead of handling based on params
        parsed_host = urlparse.urlparse(host if host is not None else '')
        host_has_scheme = bool(parsed_host.scheme)

        if host_has_scheme:
            host = parsed_host.netloc
            # Prioritize scheme parameter, but if not specified, use scheme implied from host
            scheme = parsed_host.scheme if scheme is None else scheme

        port = port or parsed_host.port  # Default to port override

        unparsed_path = urlparse.urlparse(template.format(**template_vars)).geturl()

        # If a host was specified, try to return a full url
        if host:
            if not scheme:
                raise ValueError('No scheme supplied and scheme could not be inferred from the host: {}'.format(host))
            if port:
                host_no_port = host.partition(':')[0]  # Extract the host with no port supplied
                host = '{host_no_port}:{port}'.format(host_no_port=host_no_port, port=port)
            constructed_url = '//' + host + unparsed_path
            url = urlparse.urlparse(constructed_url, scheme=scheme).geturl()
        else:
            url = unparsed_path

        # Remove trailing parameter characters
        url = url[:-1] if url[-1] == '?' else url
        url = url[:-1] if url[-1] == '&' else url
        return url
1081013
def build():
    
    try:
        cloud_config = CloudConfig()
        config_data = cloud_config.config_data('cluster')
        cloud_init = CloudInit()
        print(cloud_init.build(config_data))
    except CloudComposeException as ex:
        print(ex)
1333412
def _build_server_url(server_host, server_path) -> str:
        """"""
        server_url = urljoin(server_host, server_path)
        if server_url[-1] == '/':
            return server_url
        return '{}/'.format(server_url)
1167405
def build(self):
        

        if self.json['sys']['type'] == 'Array':
            return self._build_array()
        return self._build_item(self.json)
22386
function buildServer() {
  console.log();
  console.log(`${chalk.cyan('SERVER-SIDE')}`);
  console.log('===========================================================');
  fs.emptyDirSync(paths.appServerBuild);
  console.log('Creating a server-side production build...');

  let compiler = webpack(serverlize(paths, config));
  return new Promise((resolve, reject) => {
    compiler.run((err, stats) => {
      if (err) {
        return reject(err);
      } 
      const messages = formatWebpackMessages(stats.toJson({}, true));
      if (messages.errors.length) {
        // Only keep the first error. Others are often indicative
        // of the same problem, but confuse the reader with noise.
        if (messages.errors.length > 1) {
          messages.errors.length = 1;
        }
        return reject(new Error(messages.errors.join('\n\n')));
      }
      if (
        process.env.CI &&
        (typeof process.env.CI !== 'string' ||
          process.env.CI.toLowerCase() !== 'false') &&
        messages.warnings.length
      ) {
        console.log(
          chalk.yellow(
            '\nTreating warnings as errors because process.env.CI = true.\n' +
              'Most CI servers set it automatically.\n'
          )
        );
        return reject(new Error(messages.warnings.join('\n\n')));
      }
      return resolve({
        stats,
        warnings: messages.warnings,
      });
    });
  }).then(
    ({ stats, warnings }) => {
      if (warnings.length) {
        console.log(chalk.yellow('Compiled with warnings.\n'));
        console.log(warnings.join('\n\n'));
        console.log(
          '\nSearch for the ' +
            chalk.underline(chalk.yellow('keywords')) +
            ' to learn more about each warning.'
        );
        console.log(
          'To ignore, add ' +
            chalk.cyan('// eslint-disable-next-line') +
            ' to the line before.\n'
        );
      } else {
        console.log(chalk.green('Compiled successfully.\n'));
      }
      console.log(`The ${chalk.cyan(path.relative(process.cwd(), paths.appServerBuild))} folder is ready.`);
      console.log(`You may run it in ${chalk.cyan('node')} environment`);
      console.log();
      console.log(`  ${chalk.cyan('node')} ${chalk.cyan(path.relative(process.cwd(), paths.appServerBuild))}`);
      console.log();
    },
    err => {
      console.log(chalk.red('Failed to compile.\n'));
      printBuildError(err);
      process.exit(1);
    }
  );
}
797198
def build(
        cls,
        *,
        scheme="",
        user="",
        password=None,
        host="",
        port=None,
        path="",
        query=None,
        query_string="",
        fragment="",
        encoded=False
    ):
        """"""

        if not host and scheme:
            raise ValueError('Can\'t build URL with "scheme" but without "host".')
        if port and not host:
            raise ValueError('Can\'t build URL with "port" but without "host".')
        if query and query_string:
            raise ValueError('Only one of "query" or "query_string" should be passed')
        if path is None or query_string is None or fragment is None:
            raise TypeError('NoneType is illegal for "path", "query_string" and '
                            '"fragment" args, use string values instead.')

        if not user and not password and not host and not port:
            netloc = ""
        else:
            netloc = cls._make_netloc(user, password, host, port, encode=not encoded)
        if not encoded:
            path = cls._PATH_QUOTER(path)
            if netloc:
                path = cls._normalize_path(path)

            cls._validate_authority_uri_abs_path(host=host, path=path)
            query_string = cls._QUERY_QUOTER(query_string)
            fragment = cls._FRAGMENT_QUOTER(fragment)

        url = cls(
            SplitResult(scheme, netloc, path, query_string, fragment), encoded=True
        )

        if query:
            return url.with_query(query)
        else:
            return url
703552
def settings(instance):
    """"""
    with open(instance.root_dir + '/Config/config.yml') as config:
        config = yaml.load(config)
        instance.name = config['name']
        instance.port = config['web']['port']
        # default host
        instance.host = "http://localhost"
        if 'host' in config['web']:
            instance.host = config['web']['host']
        instance.debug = config['debug']
    return instance
987492
def build(self, builder):
        """"""
        params = dict(
            OID=self.oid,
            Active=bool_to_true_false(self.active),
            BypassDuringMigration=bool_to_true_false(self.bypass_during_migration),
            NeedsRetesting=bool_to_true_false(self.needs_retesting),
        )

        if self.variable_oid is not None:
            params["VariableOID"] = self.variable_oid

        if self.field_oid is not None:
            params["FieldOID"] = self.field_oid

        if self.form_oid is not None:
            params["FormOID"] = self.form_oid

        if self.folder_oid is not None:
            params["FolderOID"] = self.folder_oid

        if self.record_position is not None:
            params["RecordPosition"] = str(self.record_position)

        if self.form_repeat_number is not None:
            params["FormRepeatNumber"] = str(self.form_repeat_number)

        if self.folder_repeat_number is not None:
            params["FolderRepeatNumber"] = str(self.folder_repeat_number)

        if self.all_variables_in_folders is not None:
            params["AllVariablesInFolders"] = bool_to_true_false(
                self.all_variables_in_folders
            )

        if self.all_variables_in_fields is not None:
            params["AllVariablesInFields"] = bool_to_true_false(
                self.all_variables_in_fields
            )

        if self.logical_record_position is not None:
            params["LogicalRecordPosition"] = self.logical_record_position.value

        builder.start("mdsol:DerivationDef", params)
        for step in self.derivation_steps:
            step.build(builder)
        builder.end("mdsol:DerivationDef")