specinfra 1.4.0 → 1.5.0
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd002869a5b2ac8aa39ebc0ace0eebc1be011c43
|
4
|
+
data.tar.gz: b0708483cde31a4427f95b5cd32f50dbc7d3e641
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 158103396176f08af8ea9ff270c9b154f501cafa5bba54386dcc57d98eba9de784500b20ecc6b83c8583197b688691eeea922a01a302cdc73133666ef7e1898d
|
7
|
+
data.tar.gz: 16afa2126298127a89d2c0424e69e17357995ff78fc537902a4258722bdf37b610eb6e3c2dd0ba3a89f034df98e21fb723eef7a166c469e550dab2b6c5c7db6e
|
@@ -0,0 +1,18 @@
|
|
1
|
+
function FindInstalledHotFix
|
2
|
+
{
|
3
|
+
param($description, $hotFixId)
|
4
|
+
|
5
|
+
Write-Host "Num Args:" $args.Length;
|
6
|
+
foreach ($arg in $args)
|
7
|
+
{
|
8
|
+
Write-Host "Arg: $arg";
|
9
|
+
}
|
10
|
+
|
11
|
+
Write-Host $description
|
12
|
+
Write-Host $hotFixId
|
13
|
+
|
14
|
+
$keys= (Get-WmiObject -Class WIN32_QuickFixEngineering)
|
15
|
+
|
16
|
+
@($keys | Where-Object {$_.HotFixID -like $hotFixId}).Length -gt 0
|
17
|
+
|
18
|
+
}
|
@@ -9,9 +9,9 @@ module SpecInfra
|
|
9
9
|
def check_installed(package, version=nil)
|
10
10
|
escaped_package = escape(package)
|
11
11
|
if version
|
12
|
-
cmd = "dpkg-query -f '${Status} ${Version}' -W #{escaped_package} | grep -E '
|
12
|
+
cmd = "dpkg-query -f '${Status} ${Version}' -W #{escaped_package} | grep -E '^(install|hold) ok installed #{escape(version)}$'"
|
13
13
|
else
|
14
|
-
cmd = "dpkg-query -f '${Status}' -W #{escaped_package} | grep '
|
14
|
+
cmd = "dpkg-query -f '${Status}' -W #{escaped_package} | grep '^(install|hold) ok installed$'"
|
15
15
|
end
|
16
16
|
cmd
|
17
17
|
end
|
@@ -235,6 +235,22 @@ module SpecInfra
|
|
235
235
|
end
|
236
236
|
end
|
237
237
|
|
238
|
+
def check_windows_hot_fix_installed(description, hot_fix_id=nil)
|
239
|
+
hot_fix_id_match = /(KB\d+)/i.match(description)
|
240
|
+
hot_fix_id = hot_fix_id_match ? hot_fix_id_match[1] : description if hot_fix_id.nil?
|
241
|
+
|
242
|
+
args = [
|
243
|
+
'-description', "'#{description}'",
|
244
|
+
'-hotFixId', "'#{hot_fix_id}'"
|
245
|
+
]
|
246
|
+
|
247
|
+
cmd = "(FindInstalledHotFix #{args.join(' ')})"
|
248
|
+
Backend::PowerShell::Command.new do
|
249
|
+
using 'find_installed_hot_fix.ps1'
|
250
|
+
exec "#{cmd} -eq $true"
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
238
254
|
def check_file_version(name,version)
|
239
255
|
cmd = "((Get-Command '#{name}').FileVersionInfo.ProductVersion -eq '#{version}') -or ((Get-Command '#{name}').FileVersionInfo.FileVersion -eq '#{version}')"
|
240
256
|
Backend::PowerShell::Command.new { exec cmd }
|
data/lib/specinfra/version.rb
CHANGED
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: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -109,6 +109,7 @@ files:
|
|
109
109
|
- lib/specinfra/backend/powershell/support/find_group.ps1
|
110
110
|
- lib/specinfra/backend/powershell/support/find_iis_component.ps1
|
111
111
|
- lib/specinfra/backend/powershell/support/find_installed_application.ps1
|
112
|
+
- lib/specinfra/backend/powershell/support/find_installed_hot_fix.ps1
|
112
113
|
- lib/specinfra/backend/powershell/support/find_service.ps1
|
113
114
|
- lib/specinfra/backend/powershell/support/find_user.ps1
|
114
115
|
- lib/specinfra/backend/powershell/support/find_usergroup.ps1
|