specinfra 2.82.18 → 2.82.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd4b036255cf5aafd4a11a9e48572fb9a37dd3b3eb1164b0709c7c2cf9fbd845
4
- data.tar.gz: e1d9485748df7c5f3795fcb33b897b061406accaa6586d701b325d3dd1c358aa
3
+ metadata.gz: '0977a93ebe817fca71a2a1d98a37e0bf9db280913e86fe6817ac87a84e804435'
4
+ data.tar.gz: 5a9c576204f65744b2c276bb9238bd2d7c15ee1111be3ff7aa7b4301035c5947
5
5
  SHA512:
6
- metadata.gz: cd4efcf6f4a73749f41ec0e9a53376809ee9db4965524ccc3f0eefc5f7ab952c0644ea85df1124524b193a80e8c9d23461c497929d3864f0198c9aa28914c03d
7
- data.tar.gz: 87069e6caf693b955ee1fffb46d5fd6d2172895ca6d7bd40283f67aa397ada2a2b503e2885cca720cd7f1026ec4f77706ffcb28bb59870ac9928c8ece35a9c17
6
+ metadata.gz: 712afed966c8dfc740ac94c0bf5c0c825a35fbd9b1e622ada62f46bcec34efcc0a8cb0b3fc370c7b2548af83ad888b883f30b2c8032df9558fd5b31c5fdc90fa
7
+ data.tar.gz: 826c184a2ab8e072bfcc1f371d8a34834cb016bf5a123f16a529ad363fd25fbee33d7aea45d852870cde28b2d0ffb3ef1effe0fe89c5123b7fef06a377f9d7c6
@@ -0,0 +1,20 @@
1
+ function FindInstalledGem
2
+ {
3
+ param($gemName, $gemVersion)
4
+
5
+ $nameVer = $(Invoke-Expression "gem list --local" | Select-String "$gemName").Line
6
+ if ($nameVer.StartsWith($gemName)) {
7
+ if ($gemVersion) {
8
+ if ($nameVer.EndsWith("$gemVersion)")) {
9
+ $true
10
+ } else {
11
+ $false
12
+ }
13
+ } else {
14
+ $true
15
+ }
16
+ } else {
17
+ $false
18
+ }
19
+ }
20
+
@@ -7,5 +7,13 @@ class Specinfra::Command::Windows::Base::Package < Specinfra::Command::Windows::
7
7
  exec "(FindInstalledApplication -appName '#{package}' #{version_selection}) -eq $true"
8
8
  end
9
9
  end
10
+
11
+ def check_is_installed_by_gem(name, version=nil, gem_binary="gem")
12
+ version_selection = version.nil? ? "" : "-gemVersion '#{version}'"
13
+ Backend::PowerShell::Command.new do
14
+ using 'find_installed_gem.ps1'
15
+ exec "(FindInstalledGem -gemName '#{name}' #{version_selection}) -eq $true"
16
+ end
17
+ end
10
18
  end
11
19
  end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.82.18"
2
+ VERSION = "2.82.19"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.82.18
4
+ version: 2.82.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-06 00:00:00.000000000 Z
11
+ date: 2020-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-scp
@@ -135,6 +135,7 @@ files:
135
135
  - lib/specinfra/backend/powershell/support/find_group.ps1
136
136
  - lib/specinfra/backend/powershell/support/find_iis_component.ps1
137
137
  - lib/specinfra/backend/powershell/support/find_installed_application.ps1
138
+ - lib/specinfra/backend/powershell/support/find_installed_gem.ps1
138
139
  - lib/specinfra/backend/powershell/support/find_installed_hot_fix.ps1
139
140
  - lib/specinfra/backend/powershell/support/find_scheduled_task.ps1
140
141
  - lib/specinfra/backend/powershell/support/find_service.ps1