The next cog spec will execute in a fresh copy of the given home fixture
 Home fixture directories are stored in <tt>spec/home_fixtures</tt>
 @param name [String] name of the home fixture
 @return [nil]
187628
def use_home_fixture(name)
      path = File.join spec_root, 'home_fixtures', name.to_s
      copy_fixture path, active_home_fixture_dir
      nil
    end
1079087
def spawn(name)
      if all_services.include?(name)
        name = name.to_s
        require "geocoder/lookups/#{name}"
        Geocoder::Lookup.const_get(classify_name(name)).new
      else
        valids = all_services.map(&:inspect).join(", ")
        raise ConfigurationError, "Please specify a valid lookup for Geocoder " +
          "(#{name.inspect} is not one of: #{valids})."
      end
    end
496157
function(name) {
    this.profile = trait(Object.create(this.schema), {
      context: this.context
    });

    var profile_dir = this.profile_dir = node_path.join(this.path, name);

    if (!fs.isDir(profile_dir)) {
      fs.mkdir(profile_dir);
    }

    var profile_file = this.profile_file = node_path.join(profile_dir, 'config');

    if (!fs.isFile(profile_file)) {
      fs.write(profile_file, '');

    } else {
      this.reload();
    }
  }
1036488
def get_config_data(name)
      logger.debug "get_config_data(#{name.inspect})"

      name = name.to_s
      unless result = self.cache_hash[name]
        result = self.cache_hash[name] =
            make_indifferent(
                merge_hashes(
                    load_config_files(name)
                )
            )
        logger.debug "get_config_data(#{name.inspect}): reloaded"
      end

      result
    end
855759
def define(name, &blk)
      name = name.to_sym
      raise "SimpleCov Profile '#{name}' is already defined" unless self[name].nil?
      self[name] = blk
    end
170786
def spawn_unless_exists title, opts={}
    new =
      if @name_map.member? title
        raise_to_front @name_map[title] unless opts[:hidden]
        false
      else
        mode = yield
        spawn title, mode, opts
        true
      end
    [@name_map[title], new]
  end
1093635
def lookup_in_scope(name, scope)
      loop do
        tn = scope.path_with_task_name(name)
        task = @tasks[tn]
        return task if task
        break if scope.empty?
        scope = scope.tail
      end
      nil
    end
344470
def generator(name):
		
		name = name.upper()
		if name not in WHash.__hash_map__.keys():
			raise ValueError('Hash generator "%s" not available' % name)
		return WHash.__hash_map__[name]
162590
def _getCacheEntry(self, name):
        
        return next((x for x in self._uploadCache if x['name'] == name), None)
1157025
def push(name)
      @logger.info("Getting push: #{name}")

      name = name.to_sym

      pushes = self.vagrantfile.config.push.__compiled_pushes
      if !pushes.key?(name)
        raise Vagrant::Errors::PushStrategyNotDefined,
          name: name,
          pushes: pushes.keys
      end

      strategy, config = pushes[name]
      push_registry = Vagrant.plugin("2").manager.pushes
      klass, _ = push_registry.get(strategy)
      if klass.nil?
        raise Vagrant::Errors::PushStrategyNotLoaded,
          name: strategy,
          pushes: push_registry.keys
      end

      klass.new(self, config).push
    end
361376
def feature(name = nil)
      if !name
        self.class.features.keys
      else
        if self.class.features.key?(name)
          self.class.features[name]
        else
          fail "Feature #{name} does not exist!"
        end
      end
    end
1358597
def copy(self, name=None):
        
        return Struct.copy(self, deep=True, name=name)
258591
function(name) {
    name = name || '';

    var state = null;

    // Only use valid state queries
    if(!_validateStateName(name)) {
      return null;
    
    // Use cache if exists
    } else if(_stateCache[name]) {
      return _stateCache[name];
    }

    var nameChain = _getNameChain(name);
    var stateChain = nameChain
      .map(function(name, i) {
        var item = angular.copy(_stateLibrary[name]);
        return item;
      })
      .filter(function(parent) {
        return !!parent;
      });

    // Walk up checking inheritance
    for(var i=stateChain.length-1; i>=0; i--) {
      if(stateChain[i]) {
        var nextState = stateChain[i];
        state = angular.merge(nextState, state || {});
      }

      if(state && state.inherit === false) break;
    }

    // Store in cache
    _stateCache[name] = state;

    return state;
  }
583421
function namedLevelStore (name) {
  assert.equal(typeof name, 'string', 'named-level-store: name should be a string')
  const location = path.join(process.env.HOME, '.leveldb', name)
  mkdirp.sync(location)
  const db = level(location)
  db.location = location
  return db
}
1298275
def load_by_name name
      path = self.locate_definition name
      raise TargetLoadError.new("Target definition file does not exist for #{name}") if path.nil?
      config = YAML::load_file(path)
      raise TargetLoadError.new("Target definition file #{path} is not valid YAML") if config.nil?
      config = config.deep_symbolize
      self.store_config config
      self.check_constructor name
      self.load_constructor
    end
105631
function (name, pkgDir) {
    if (!isString(name) || !isString(pkgDir) ||
         S(name).isEmpty() || S(pkgDir).isEmpty() || !isDirectory.sync(pkgDir)) {
      return 1
    }
    var scope = utils(name, pkgDir)
    try {
      scope.validateIsUnityRoot()
      scope.createModulesDirectoryInAssets()
      scope.createModuleDirectory()
      scope.copyModuleResources()
    } catch (err) {
      scope.cleanupOnPostInstallError()
      scope.printError(err)
      return 1
    }
    return 0
  }
673607
function(name) {
    return {
      // the key
      key: name + '._index_',
      // returns the index
      all: function() {
        var a  = storage.getItem(this.key)
        if (a) {
          a = JSON.parse(a)
        }
        if (a === null) storage.setItem(this.key, JSON.stringify([])) // lazy init
        return JSON.parse(storage.getItem(this.key))
      },
      // adds a key to the index
      add: function (key) {
        var a = this.all()
        a.push(key)
        storage.setItem(this.key, JSON.stringify(a))
      },
      // deletes a key from the index
      del: function (key) {
        var a = this.all(), r = []
        // FIXME this is crazy inefficient but I'm in a strata meeting and half concentrating
        for (var i = 0, l = a.length; i < l; i++) {
          if (a[i] != key) r.push(a[i])
        }
        storage.setItem(this.key, JSON.stringify(r))
      },
      // returns index for a key
      find: function (key) {
        var a = this.all()
        for (var i = 0, l = a.length; i < l; i++) {
          if (key === a[i]) return i
        }
        return false
      }
    }
  }