Convert the gem.

 @see BaseLocation#install
765960
def install
      cache_path.rmtree if cache_path.exist?
      cache_path.mkpath
      Halite.convert(gem_name, cache_path)
      validate_cached!(cache_path)
    end
893327
function install()
    {
        if (!$this->brew->hasInstalledNginx()) {
            $this->brew->installOrFail('nginx', []);
        }

        $this->installConfiguration();
        $this->installServer();
        $this->installNginxDirectory();
    }
795555
def convert(self, value, *args, **kwargs):  # pylint: disable=arguments-differ
        """"""
        value = os.path.expanduser(value)
        return super(ExpandPath, self).convert(value, *args, **kwargs)
825395
def convert(path)
      case path
      when ActionView::OptimizedFileSystemResolver, Pathname, String
        CellResolver.new path.to_s
      else
        path
      end
    end
177192
def convert(key, block = nil)
      if block.nil? or block.call(key)
        img_tag(key)
      else
        ":#{key}:"
      end
    end
368581
def convert
      old = @hashes
      @hashes = Hash.new

      puts 'Warning: old JSON format detected, converting.'
      old.each {|i| add_hash(i[:id], i[:deletehash], 'unknown') }
      save
    end
1245702
public function convert() {

        $resource = $file = \tao_helpers_Http::getUploadedFile('content');

        $base64Converter = new Base64ConverterModel($resource);

        $this -> returnJson($base64Converter->convertToBase64());
    }
1311527
public function convert() {

        try {
            $this->log('creating the target directory', backup::LOG_DEBUG);
            $this->create_workdir();

            $this->log('executing the conversion', backup::LOG_DEBUG);
            $this->execute();

            $this->log('replacing the source directory with the converted version', backup::LOG_DEBUG);
            $this->replace_tempdir();
        } catch (Exception $e) {
        }

        // clean-up stuff if needed
        $this->destroy();

        // eventually re-throw the execution exception
        if (isset($e) and ($e instanceof Exception)) {
            throw $e;
        }
    }
1203326
def dependency_to_spec(dep)
      # #to_spec doesn't allow prereleases unless the requirement is
      # for a prerelease. Just use the last valid spec if possible.
      spec = dep.to_spec || dep.to_specs.last
      raise Error.new("Cannot find a gem to satisfy #{dep}") unless spec
      spec
    rescue ::Gem::LoadError => ex
      raise Error.new("Cannot find a gem to satisfy #{dep}: #{ex}")
    end
1113226
def fetch_gem(gem, version)
      filename = gem.filename(version)
      satisfied = if gem.only_latest?
                    true
                  else
                    gem.requirement.satisfied_by?(version)
                  end
      name = gem.name

      if gem_exists?(filename) || ignore_gem?(name, version, gem.platform) ||
         !satisfied
        Utils.logger.debug("Skipping #{filename}")
        return
      end

      Utils.configuration.ignore_gem(gem.name, version, gem.platform)
      Utils.logger.info("Fetching #{filename}")

      fetch_from_source(filename, gem, version)
    end
1098590
def convert(jkf)
      jkf = jkf.is_a?(Hash) ? jkf : JSON.parse(jkf)
      convert_root(jkf)
    end
324625
public function install()
    {
        if (file_exists($this->destination . '/' . $this->filename)
            || !$this->isBitbucket()
        ) {
            return;
        }


        $files = [
            __DIR__ . '/../../templates/mapping/files',
            sprintf(
                __DIR__ . '/../../templates/mapping/pipelines/%s',
                $this->typeResolver->resolve()
            )
        ];

        $reader = new UnixFileMappingReader(
            __DIR__ . '/../../templates/files',
            getcwd(),
            ...$files
        );
        
        foreach ($reader as $mapping) {
            $this->fileInstaller->installFile($mapping);
            $this->io->write(
                sprintf(
                    '<info>Installed:</info> %s',
                    $mapping->getRelativeDestination()
                )
            );
        }
    }
1237373
def to_risc(compiler)
      transfer = SlotLoad.new([:message , :next_message , :receiver] , @receiver, self).to_risc(compiler)
      compiler.reset_regs
      @arguments.each do |arg|
        arg.to_risc(compiler)
        compiler.reset_regs
      end
      transfer
    end
1033396
def unpack(&bl)
      dir = nil
      pkg = ::Gem::Installer.new gem_path, :unpack => true

      if bl
        Dir.mktmpdir do |tmpdir|
          pkg.unpack tmpdir
          bl.call tmpdir
        end
      else
        dir = Dir.mktmpdir
        pkg.unpack dir
      end

      dir
    end
787367
def install(cls):
        """"""
        [os.makedirs('{}/{}'.format(cls.home, cls.dirs[d])) for d in cls.dirs]
882439
def fetch
      @source.gems.each do |gem|
        versions_for(gem).each do |versions|
          gem.platform = versions[1] if versions
          version = versions[0] if versions
          if gem.gemspec?
            gemfile = fetch_gemspec(gem, version)
            if gemfile
              Utils.configuration.mirror_gemspecs_directory
                   .add_file(gem.gemspec_filename(version), gemfile)
            end
          else
            gemfile = fetch_gem(gem, version)
            if gemfile
              Utils.configuration.mirror_gems_directory
                   .add_file(gem.filename(version), gemfile)
            end
          end
        end
      end
    end
556461
def init(gem)
      super(gem.name, gem.version)
      @gem_spec = gem
      @package_files += gem_spec.files if gem_spec.files
    end