specinfra 0.5.4 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b8fdf955aacbd1a6cc6ef86114e1fcfc1fd1efb
4
- data.tar.gz: 5af1d3b6937c9973cca6d16723eb79b9a6516863
3
+ metadata.gz: 7217cd76bb32ea14d335ad1f82a572c5e5a67f82
4
+ data.tar.gz: d1fde8f39d7c4af54603e79275f595d0aaed0fd8
5
5
  SHA512:
6
- metadata.gz: e9468fa01ab2c7c1792bfdc8d3fb1d550445f5a97ba13d39d7218c6ec93bfe7f0e4b05a48e340a446e1c40bda90f0943d13262e6885c8f9416e89fdc9db79dcc
7
- data.tar.gz: 4809829241f4974e9a793fc2ca46b6c5220d881bafefa566f0d8de0eb508f40d15179c19cdc8c94ec6d20913f374b99326286cf88dd259706ee4123b22acff19
6
+ metadata.gz: 066e834d27e47eefe0e332808d529dd1bf1a48f845859edf31e9fd97b392add75c7058307f3b204b824af3448c191098c389330dbfa7a9dae4417ceff8a85567
7
+ data.tar.gz: d23345ce8d33603f067a107f559506058926a0a0ec0423c8837e5853c87cefd0ae31b9522971a18ea1d3f133d2f837142f8b70bf2018cc3fe2d854b95d50a164
@@ -1,5 +1,14 @@
1
1
  function ListWindowsFeatures
2
2
  {
3
+ $cachepath = "${env:temp}/ListWindowsFeatures.xml"
4
+ $maxAge = 2
5
+
6
+ $cache = Get-Item $cachepath -erroraction SilentlyContinue
7
+
8
+ if($cache -ne $null -and ((get-date) - $cache.LastWriteTime).minutes -lt $maxage){
9
+ return Import-Clixml $cachepath
10
+ }
11
+ else{
3
12
  try
4
13
  {
5
14
  $dism = DISM /Online /Get-Features /Format:List | Where-Object {$_}
@@ -21,6 +30,8 @@ function ListWindowsFeatures
21
30
  }
22
31
  }
23
32
 
33
+ $feature | Export-Clixml $cachepath
34
+
24
35
  return $feature
25
36
  }
26
37
  catch
@@ -28,4 +39,5 @@ function ListWindowsFeatures
28
39
  Throw
29
40
  }
30
41
 
42
+ }
31
43
  }
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "0.5.4"
2
+ VERSION = "0.5.5"
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: 0.5.4
4
+ version: 0.5.5
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-02-03 00:00:00.000000000 Z
11
+ date: 2014-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler