Sha256: 7484902bfa009311f0d25fb86f80cb306b47f530a0b82131f6ae1289b75c3497

Contents?: true

Size: 445 Bytes

Versions: 23

Compression:

Stored size: 445 Bytes

Contents

function FindInstalledGem
{
  param($gemName, $gemVersion)

  $nameVer = $(Invoke-Expression "gem list --local" | Select-String "^$gemName").Line
  if ($nameVer.StartsWith($gemName)) {
    if ($gemVersion) {
      $versions = ($nameVer -split { $_ -eq "(" -or $_ -eq ")"})[1].split(", ")
      if ($versions.Contains($gemVersion)) {
        $true
      } else {
        $false
      }
    } else {
      $true
    }
  } else {
    $false
  }
}

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
specinfra-2.91.0 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.90.1 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.90.0 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.89.0 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.88.2 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.88.1 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.88.0 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.87.2 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.87.1 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.87.0 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.86.0 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.85.1 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.85.0 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.84.1 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.84.0 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.83.4 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.83.3 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.83.2 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.83.1 lib/specinfra/backend/powershell/support/find_installed_gem.ps1
specinfra-2.83.0 lib/specinfra/backend/powershell/support/find_installed_gem.ps1