Sha256: c1b5789a0904f0d0aa7be4d31c689bb828ea497f06169e8bb7be0a85280cb904

Contents?: true

Size: 366 Bytes

Versions: 1

Compression:

Stored size: 366 Bytes

Contents

function FindInstalledGem
{
  param($gemName, $gemVersion)

  $nameVer = $(Invoke-Expression "gem list --local" | Select-String "$gemName").Line
  if ($nameVer.StartsWith($gemName)) {
    if ($gemVersion) {
      if ($nameVer.EndsWith("$gemVersion)")) {
        $true
      } else {
        $false
      }
    } else {
      $true
    }
  } else {
    $false
  }
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
specinfra-2.82.19 lib/specinfra/backend/powershell/support/find_installed_gem.ps1