injects workflo framework into global context config: workflo.conf.js config
179209
function inject(config) {
    const context = global;
    // setup variables
    // safeAdd( context, 'steps', {} )
    safeAddAll(context, [Functions]);
    context.Workflo = {
        Object: {},
        Array: {},
        String: {},
        Class: {},
        Util: {},
    };
    safeAddAll(context.Workflo.Object, [objectFunctions]);
    safeAddAll(context.Workflo.Array, [arrayFunctions]);
    safeAddAll(context.Workflo.Class, [classFunctions]);
    safeAddAll(context.Workflo.Util, [utilFunctions]);
    context.expectElement = matchers_1.expectElement;
    context.expectList = matchers_1.expectList;
    context.expectMap = matchers_1.expectMap;
    context.expectGroup = matchers_1.expectGroup;
    context.expectPage = matchers_1.expectPage;
    // add enum definitions
    context.Workflo.WaitType = enums_1.WaitType;
    context.Workflo.Comparator = enums_1.Comparator;
}
895094
def func_globals_inject(func, **overrides):
    '''
    
    '''
    # recognize methods
    if hasattr(func, 'im_func'):
        func = func.__func__

    # Get a reference to the function globals dictionary
    func_globals = func.__globals__
    # Save the current function globals dictionary state values for the
    # overridden objects
    injected_func_globals = []
    overridden_func_globals = {}
    for override in overrides:
        if override in func_globals:
            overridden_func_globals[override] = func_globals[override]
        else:
            injected_func_globals.append(override)

    # Override the function globals with what's passed in the above overrides
    func_globals.update(overrides)

    # The context is now ready to be used
    yield

    # We're now done with the context

    # Restore the overwritten function globals
    func_globals.update(overridden_func_globals)

    # Remove any entry injected in the function globals
    for injected in injected_func_globals:
        del func_globals[injected]
489934
function (framework) {
                var targetDir = framework.targetDir || '';
                var dest = path.join(cordovaProjectWindowsPlatformDir, 'plugins', dummyPluginInfo.id, targetDir, path.basename(framework.src));
                var copiedSuccessfully = fs.existsSync(path.resolve(dest));
                expect(copiedSuccessfully).toBe(true);
            }
1362360
function setConfigToLS(configObj) {
    var configStr = JSON.stringify(configObj);
    window.localStorage[getFullBSKey(browser_storage_config_1.browserStorageConfig.DB_CONFIG_KEY)] = configStr;
}
188104
function configure(
// tslint:disable-next-line:ban-types
frameworkConfig, callback) {
    // the fluent rule definition API needs the parser to translate messages
    // to interpolation expressions.
    const messageParser = frameworkConfig.container.get(ValidationMessageParser);
    const propertyParser = frameworkConfig.container.get(PropertyAccessorParser);
    ValidationRules.initialize(messageParser, propertyParser);
    // configure...
    const config = new AureliaValidationConfiguration();
    if (callback instanceof Function) {
        callback(config);
    }
    config.apply(frameworkConfig.container);
    // globalize the behaviors.
    if (frameworkConfig.globalResources) {
        frameworkConfig.globalResources(ValidateBindingBehavior, ValidateManuallyBindingBehavior, ValidateOnBlurBindingBehavior, ValidateOnChangeBindingBehavior, ValidateOnChangeOrBlurBindingBehavior, ValidationErrorsCustomAttribute, ValidationRendererCustomAttribute);
    }
}
1321785
function FbFloBrunch(config) {
  this.setOptions(config);

  // This plugin only makes sense if we're in watcher mode
  // (`config.persistent`).  Also, we honor the plugin-specific `enabled`
  // setting, so users don't need to strip the plugin or its config to
  // disable it: just set `enabled` to `false`.
  if (!config || !config.persistent || false === this.config.enabled) {
    return;
  }

  this.resolver = this.resolver.bind(this);
  this.startServer();
}
153034
function (factoryOpts) {
    var Vue = factoryOpts && factoryOpts.Vue ? factoryOpts.Vue : require('vue/dist/vue.common.js');

    var instance = Vue.extend();

    // clone global APIs
    Object.keys(Vue).forEach(function (key) {
        if (!instance.hasOwnProperty(key)) {
            var original = Vue[key];
            instance[key] = (typeof original === 'undefined' ? 'undefined' : _typeof(original)) === 'object' ? cloneDeep(original) : original;
        }
    });

    // config is not enumerable
    instance.config = cloneDeep(Vue.config);

    // instance.config.errorHandler = errorHandler

    // option merge strategies need to be exposed by reference
    // so that merge strats registered by plguins can work properly
    instance.config.optionMergeStrategies = Vue.config.optionMergeStrategies;

    // make sure all extends are based on this instance.
    // this is important so that global components registered by plugins,
    // e.g. router-link are created using the correct base constructor
    instance.options._base = instance;

    // compat for vue-router < 2.7.1 where it does not allow multiple installs
    if (instance._installedPlugins && instance._installedPlugins.length) {
        instance._installedPlugins.length = 0;
    }

    var use = instance.use;

    instance.use = function (plugin) {
        for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
            rest[_key - 1] = arguments[_key];
        }

        if (plugin.installed === true) {
            plugin.installed = false;
        }

        if (plugin.install && plugin.install.installed === true) {
            plugin.install.installed = false;
        }

        use.call.apply(use, [instance, plugin].concat(rest));
    };

    return instance;
}
1358392
protected Map<String, Map<String, String>> createStepItemDataContext(final Framework framework,
                                                                         final String project,
                                                                         final Map<String, Map<String, String>> context,
                                                                         final Map<String, Object> configuration) {

        final Map<String, Map<String, String>> localDataContext = createScriptDataContext(framework, project, context);

        final HashMap<String, String> configMap = new HashMap<String, String>();
        //convert values to string
        for (final Map.Entry<String, Object> entry : configuration.entrySet()) {
            configMap.put(entry.getKey(), entry.getValue().toString());
        }
        localDataContext.put("config", configMap);
        return localDataContext;
    }
761245
function validateGlobals(globalsConfig, source = null) {
    if (!globalsConfig) {
        return;
    }

    Object.entries(globalsConfig)
        .forEach(([configuredGlobal, configuredValue]) => {
            try {
                ConfigOps.normalizeConfigGlobal(configuredValue);
            } catch (err) {
                throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\n${err.message}`);
            }
        });
}
123684
function F1 (config) {
  var valErrors = jjv.validate(configSchema, config)
  if (valErrors && valErrors.validation) {
    throw new Error('Validation errors: ' +
      JSON.stringify(valErrors.validation, null, 3))
  }

  this.config = config
}
1131720
function(configPath, configNames, config) {
	var configsUsed = [];

	config = config || projectConfig;

	// work with the raw configuration object
	if (config && config.root) {
		config = config.root();
	}

	config = convict(config);
	configPath = path.resolve(appPath, configPath);
	configNames = configNames || [];

	configNames.forEach(function(configName) {
		var file;

		// Ignore local config in production mode
		if (configName == 'local' && nodeEnv === 'production') { return; }

		file = path.join(configPath, 'config-'+configName);
		file += configName === 'default' ? '.js' : '.json';

		if (fs.existsSync(file)) {

			if (configName === 'default') {
				config = convict( require(file) );
				config.load(dynamicDefaults);
			}
			else {
				config.loadFile( file );
			}

			// logging
			configName === 'default' ? configsUsed.push('xtc defaults') : configsUsed.push(configName);
		}
	});

	// be informative
	!process.env.testRun
		&& configsUsed.push('env', 'args')
		&& console.log('configuration:', configsUsed.join(' < '));

	return config;
}
332328
def context_factory(apply_globally=False, api=None):
    """"""
    def decorator(context_factory_):
        if apply_globally:
            hug.defaults.context_factory = context_factory_
        else:
            apply_to_api = hug.API(api) if api else hug.api.from_object(context_factory_)
            apply_to_api.context_factory = context_factory_
        return context_factory_
    return decorator
72745
function _createSandbox(config) {
  if (proxiedGlobal && proxiedGlobal) return workspaces.get(...makeArray(config.workspace));

  const sandbox = {};
  if (config.includeGlobals && (!proxiedGlobal || !config.proxyGlobal)) Object.assign(sandbox, global);

  return vm.createContext(sandbox);
}
1342516
function injectGlobals() {
    inject(function($injector) {
      $rootScope = $injector.get('$rootScope');
      $compile = $injector.get('$compile');
      $material = $injector.get('$material');
      $$mdInput = $injector.get('$$mdInput');
      $window = $injector.get('$window');
      $animate = $injector.get('$animate');
      $rootElement = $injector.get('$rootElement');
      $document = $injector.get('$document');

      // Grab our input animations (we MUST use the injector to setup dependencies)
      invalidAnimation = $injector.get('mdInputInvalidAnimation');
      messagesAnimation = $injector.get('mdInputMessagesAnimation');
      messageAnimation = $injector.get('mdInputMessageAnimation');
    });
  }
1209966
function setupOriginJS(config){
  const web3Provider = new Web3.providers.HttpProvider(config.web3Url)
  // global
  web3 = new Web3(web3Provider)
  console.log(`Web3 URL: ${config.web3Url}`)

  const ipfsUrl = urllib.parse(config.ipfsUrl)
  // global
  o = new Origin({
    ipfsDomain: ipfsUrl.hostname,
    ipfsGatewayProtocol: ipfsUrl.protocol.replace(':',''),
    ipfsGatewayPort: ipfsUrl.port,
    web3
  })
  console.log(`IPFS URL: ${config.ipfsUrl}`)
}
1091025
function XTemplateRuntime(fn, config) {
  var self = this;
  self.fn = fn;
  self.config = util.merge(XTemplateRuntime.globalConfig, config);
  this.subNameResolveCache = {};
}
1294285
def load_environment(global_conf, app_conf):
    
    # Pylons paths
    root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    paths = dict(root=root,
                 controllers=os.path.join(root, 'controllers'),
                 static_files=os.path.join(root, 'public'),
                 templates=[os.path.join(root, 'templates')])

    # Initialize config with the basic options
    config.init_app(global_conf, app_conf, package='studio', paths=paths)

    # Defines custom config parameters
    config['resources_dir'] = os.path.join(root, 'resources')
    # path to mapserver dir containing default fonts and symbols
    config['mapserver_dir'] = os.path.join(config['resources_dir'], 'mapserver')
    # path to default directory datastore
    config['default_datastore_dir'] = os.path.join(config['resources_dir'], 'default_datastore')
    # path to the template including the <script> tags
    config['js_tmpl'] = os.path.join(paths['templates'][0], 'index.html')

    # Convert the debug variable from the config to a boolean value
    config['debug'] = asbool(config['debug'])

    config['routes.map'] = make_map()
    config['pylons.app_globals'] = app_globals.Globals()
    config['pylons.h'] = studio.lib.helpers

    # Create the Mako TemplateLookup, with the default auto-escaping
    config['pylons.app_globals'].mako_lookup = TemplateLookup(
        directories=paths['templates'],
        error_handler=handle_mako_error,
        module_directory=os.path.join(app_conf['cache_dir'], 'templates'),
        input_encoding='utf-8', output_encoding='utf-8',
        imports=['from webhelpers.html import escape'],
        default_filters=['escape'])
    
    # Setup SQLAlchemy database engine
    engine = engine_from_config(config, 'sqlalchemy.')
    init_model(engine)