specinfra 2.0.0.beta21 → 2.0.0.beta22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/specinfra/backend/powershell/support/find_iis_component.ps1 +8 -2
- data/lib/specinfra/command/base/mail_alias.rb +7 -3
- data/lib/specinfra/command/darwin/base/package.rb +8 -0
- data/lib/specinfra/command/windows/base/iis_app_pool.rb +42 -0
- data/lib/specinfra/version.rb +1 -1
- data/specinfra.gemspec +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af4a68d6d01873c8664f1c83ac8f7c289e75e464
|
4
|
+
data.tar.gz: 16d14837e40deafac88963b220a574d79e848b6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e39f5729523c1c5471ead0d6329f39bcdcff400a2e3a7afbcc05a39801f7d4615aaf217d479b512cdd6622af7be37dccbe659fa4bde8e4f9191990c25b690f48
|
7
|
+
data.tar.gz: 396d4ceb881da5e204228bdb5340d1e32a51719ea7c9789269ab257889ba53128505aa8fe8ea0a0a57b13412df957ef881b13c283946476459224f4cc75471d7
|
@@ -1,8 +1,14 @@
|
|
1
1
|
function FindIISWebsite
|
2
2
|
{
|
3
3
|
param($name)
|
4
|
-
|
5
|
-
|
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
|
@@ -1,8 +1,12 @@
|
|
1
1
|
class Specinfra::Command::Base::MailAlias < Specinfra::Command::Base
|
2
2
|
class << self
|
3
|
-
def check_is_aliased_to(
|
4
|
-
|
5
|
-
"getent aliases #{escape(
|
3
|
+
def check_is_aliased_to(mail_alias, recipient)
|
4
|
+
recipient = "[[:space:]]#{recipient}"
|
5
|
+
"getent aliases #{escape(mail_alias)} | grep -- #{escape(recipient)}$"
|
6
|
+
end
|
7
|
+
|
8
|
+
def add(mail_alias, recipient)
|
9
|
+
"echo #{mail_alias}: #{recipient} >> /etc/aliases"
|
6
10
|
end
|
7
11
|
end
|
8
12
|
end
|
@@ -10,8 +10,16 @@ class Specinfra::Command::Darwin::Base::Package < Specinfra::Command::Base::Pack
|
|
10
10
|
cmd
|
11
11
|
end
|
12
12
|
|
13
|
+
alias :check_is_installed_by_homebrew :check_is_installed
|
14
|
+
|
15
|
+
def check_is_installed_by_pkgutil(package, version=nil)
|
16
|
+
cmd = "pkgutil --pkg-info #{package}"
|
17
|
+
cmd = "#{cmd} | grep '^version: #{escape(version)}'" if version
|
18
|
+
end
|
19
|
+
|
13
20
|
def install(package)
|
14
21
|
cmd = "brew install '#{package}'"
|
15
22
|
end
|
16
23
|
end
|
17
24
|
end
|
25
|
+
|
@@ -13,5 +13,47 @@ class Specinfra::Command::Windows::Base::IisAppPool < Specinfra::Command::Window
|
|
13
13
|
exec "(FindIISAppPool -name '#{name}').managedRuntimeVersion -match 'v#{dotnet}'"
|
14
14
|
end
|
15
15
|
end
|
16
|
+
|
17
|
+
def check_has_32bit_enabled(name)
|
18
|
+
Backend::PowerShell::Command.new do
|
19
|
+
using 'find_iis_component.ps1'
|
20
|
+
exec "(FindIISAppPool -name '#{name}').enable32BitAppOnWin64 -eq $true"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def check_has_idle_timeout(name, minutes)
|
25
|
+
Backend::PowerShell::Command.new do
|
26
|
+
using 'find_iis_component.ps1'
|
27
|
+
exec "(FindIISAppPool -name '#{name}').processModel.idleTimeout.Minutes -eq #{minutes}"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def check_has_identity_type(name, type)
|
32
|
+
Backend::PowerShell::Command.new do
|
33
|
+
using 'find_iis_component.ps1'
|
34
|
+
exec "(FindIISAppPool -name '#{name}').processModel.identityType -eq '#{type}'"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def check_has_user_profile(name)
|
39
|
+
Backend::PowerShell::Command.new do
|
40
|
+
using 'find_iis_component.ps1'
|
41
|
+
exec "(FindIISAppPool -name '#{name}').processModel.loadUserProfile -eq $true"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def check_has_username(name, username)
|
46
|
+
Backend::PowerShell::Command.new do
|
47
|
+
using 'find_iis_component.ps1'
|
48
|
+
exec "(FindIISAppPool -name '#{name}').processModel.username -eq '#{username}'"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def check_has_periodic_restart(name, minutes)
|
53
|
+
Backend::PowerShell::Command.new do
|
54
|
+
using 'find_iis_component.ps1'
|
55
|
+
exec "(FindIISAppPool -name '#{name}').recycling.periodicRestart.time.TotalMinutes -eq #{minutes}"
|
56
|
+
end
|
57
|
+
end
|
16
58
|
end
|
17
59
|
end
|
data/lib/specinfra/version.rb
CHANGED
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
|
12
|
-
spec.summary = %q{Common layer for serverspec and
|
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: 2.0.0.
|
4
|
+
version: 2.0.0.beta22
|
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-
|
11
|
+
date: 2014-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
description: Common layer for serverspec and
|
97
|
+
description: Common layer for serverspec and itamae
|
98
98
|
email:
|
99
99
|
- gosukenator@gmail.com
|
100
100
|
executables: []
|
@@ -356,7 +356,7 @@ rubyforge_project:
|
|
356
356
|
rubygems_version: 2.2.2
|
357
357
|
signing_key:
|
358
358
|
specification_version: 4
|
359
|
-
summary: Common layer for serverspec and
|
359
|
+
summary: Common layer for serverspec and itamae
|
360
360
|
test_files:
|
361
361
|
- spec/backend/exec/build_command_spec.rb
|
362
362
|
- spec/backend/exec/env_spec.rb
|