specinfra 1.23.1 → 1.24.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: a7e81466bcbe16d7bd11f3a91f628896fc9f4880
4
- data.tar.gz: f47722719e30fc55b283dd893f5808d69e3636dc
3
+ metadata.gz: de086eeffea5fc8b227863dd31f5fa0de93d1897
4
+ data.tar.gz: 5171079ee7006748cb98bbbd0eca833936624800
5
5
  SHA512:
6
- metadata.gz: b6e9b5343023c1517a871e7e6c9c9753021cd73ed62fcc368543d686574a702a39ce7f9454de53cc117d9def086b3e2ffc970e043a7924b39a88bf18d7afba8e
7
- data.tar.gz: 5ce6b56a5f8ae7235a47b6740106bb88e2af275d2680f5374c5743033670962cb513c53e4f277608125bfdbd5d67a541b00764bfa96c6c0f95f119ac5c699880
6
+ metadata.gz: cb20c76bf0aa9b6576cadfaff5e8a84a7e521da2d51b4055eb96f6376a9a6625635508b8749f1a2e7695ed1b2016f5192ea25772d0a5920744fdc3d1f9e32c49
7
+ data.tar.gz: 259f78a004ab4280099002c9720533b7c25e752aa29dc4bab95ca781d9d7a27476f8771ac83efe68de25511dccdd34f4c63d8e606c8ec69ed993f038d2820a1d
@@ -1,8 +1,14 @@
1
1
  function FindIISWebsite
2
2
  {
3
3
  param($name)
4
- import-module WebAdministration
5
- Get-Website | Where { $_.name -match $name }
4
+ Import-Module WebAdministration
5
+
6
+ Try {
7
+ Get-Item "IIS:\Sites\$name" -Erroraction silentlycontinue
8
+ }
9
+ Catch [System.IO.FileNotFoundException] {
10
+ Get-Item "IIS:\Sites\$name" -Erroraction silentlycontinue
11
+ }
6
12
  }
7
13
 
8
14
  function FindIISAppPool
@@ -58,6 +58,12 @@ module SpecInfra
58
58
  end
59
59
  cmd
60
60
  end
61
+ alias :check_installed_by_homebrew :check_installed
62
+
63
+ def check_installed_by_pkgutil(package, version=nil)
64
+ cmd = "pkgutil --pkg-info #{package}"
65
+ cmd = "#{cmd} | grep '^version: #{escape(version)}'" if version
66
+ end
61
67
 
62
68
  def install(package)
63
69
  cmd = "brew install '#{package}'"
@@ -305,6 +305,48 @@ module SpecInfra
305
305
  end
306
306
  end
307
307
 
308
+ def check_32bit_enabled(name)
309
+ Backend::PowerShell::Command.new do
310
+ using 'find_iis_component.ps1'
311
+ exec "(FindIISAppPool -name '#{name}').enable32BitAppOnWin64 -eq $true"
312
+ end
313
+ end
314
+
315
+ def check_idle_timeout(name, minutes)
316
+ Backend::PowerShell::Command.new do
317
+ using 'find_iis_component.ps1'
318
+ exec "(FindIISAppPool -name '#{name}').processModel.idleTimeout.Minutes -eq #{minutes}"
319
+ end
320
+ end
321
+
322
+ def check_identity_type(name, type)
323
+ Backend::PowerShell::Command.new do
324
+ using 'find_iis_component.ps1'
325
+ exec "(FindIISAppPool -name '#{name}').processModel.identityType -eq '#{type}'"
326
+ end
327
+ end
328
+
329
+ def check_user_profile(name)
330
+ Backend::PowerShell::Command.new do
331
+ using 'find_iis_component.ps1'
332
+ exec "(FindIISAppPool -name '#{name}').processModel.loadUserProfile -eq $true"
333
+ end
334
+ end
335
+
336
+ def check_username(name, username)
337
+ Backend::PowerShell::Command.new do
338
+ using 'find_iis_component.ps1'
339
+ exec "(FindIISAppPool -name '#{name}').processModel.username -eq '#{username}'"
340
+ end
341
+ end
342
+
343
+ def check_periodic_restart(name, minutes)
344
+ Backend::PowerShell::Command.new do
345
+ using 'find_iis_component.ps1'
346
+ exec "(FindIISAppPool -name '#{name}').recycling.periodicRestart.time.TotalMinutes -eq #{minutes}"
347
+ end
348
+ end
349
+
308
350
  def check_scheduled_task(name)
309
351
  Backend::PowerShell::Command.new do
310
352
  using 'find_scheduled_task.ps1'
@@ -1,3 +1,3 @@
1
1
  module SpecInfra
2
- VERSION = "1.23.1"
2
+ VERSION = "1.24.0"
3
3
  end
data/specinfra.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.version = SpecInfra::VERSION
9
9
  spec.authors = ["Gosuke Miyashita"]
10
10
  spec.email = ["gosukenator@gmail.com"]
11
- spec.description = %q{Common layer for serverspec and lightchef}
12
- spec.summary = %q{Common layer for serverspec and lightchef}
11
+ spec.description = %q{Common layer for serverspec and itamae}
12
+ spec.summary = %q{Common layer for serverspec and itamae}
13
13
  spec.homepage = ""
14
14
  spec.license = "MIT"
15
15
 
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.23.1
4
+ version: 1.24.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-08-04 00:00:00.000000000 Z
11
+ date: 2014-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: Common layer for serverspec and lightchef
55
+ description: Common layer for serverspec and itamae
56
56
  email:
57
57
  - gosukenator@gmail.com
58
58
  executables: []
@@ -160,7 +160,7 @@ rubyforge_project:
160
160
  rubygems_version: 2.2.2
161
161
  signing_key:
162
162
  specification_version: 4
163
- summary: Common layer for serverspec and lightchef
163
+ summary: Common layer for serverspec and itamae
164
164
  test_files:
165
165
  - spec/backend/exec/build_command_spec.rb
166
166
  - spec/backend/ssh/build_command_spec.rb