serverspec 1.12.0 → 1.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serverspec/matchers.rb +5 -0
- data/lib/serverspec/matchers/have_site_application.rb +18 -0
- data/lib/serverspec/matchers/have_site_bindings.rb +22 -0
- data/lib/serverspec/matchers/have_virtual_dir.rb +14 -0
- data/lib/serverspec/type/iis_app_pool.rb +4 -0
- data/lib/serverspec/type/iis_website.rb +12 -0
- data/lib/serverspec/version.rb +1 -1
- data/serverspec.gemspec +1 -1
- data/wercker.yml +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4e5f89fc249eac0cdd6f17e5d89a1d0024bb536
|
4
|
+
data.tar.gz: 7b0ead74ce6410cd62c20cc5fa6370ef39a0a3fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ddce196467994b081526d5b82d90775aa89d2de31fc82db661c06464e786dcb7000a94a3dc065244119fab2aa3df04f5b5e9bba2175b905dc28d9b5ff5cf5c7
|
7
|
+
data.tar.gz: e85ea0dbeaf85abb9bb0380049e2843090a256ac49f027960df2b88c757987a25df6e1a2403c27850d064decb12f1669f971f9f7cc84433685b55b6a7ee5fe57
|
data/lib/serverspec/matchers.rb
CHANGED
@@ -34,3 +34,8 @@ require 'serverspec/matchers/have_rule'
|
|
34
34
|
|
35
35
|
# cron, routing_table
|
36
36
|
require 'serverspec/matchers/have_entry'
|
37
|
+
|
38
|
+
# iis_website
|
39
|
+
require 'serverspec/matchers/have_site_application'
|
40
|
+
require 'serverspec/matchers/have_site_bindings'
|
41
|
+
require 'serverspec/matchers/have_virtual_dir'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
RSpec::Matchers.define :have_site_application do |app|
|
2
|
+
match do |subject|
|
3
|
+
if subject.class.name == 'Serverspec::Type::IisWebsite'
|
4
|
+
subject.has_site_application?(app, @pool, @physicalPath)
|
5
|
+
else
|
6
|
+
className = subject.class.name
|
7
|
+
raise "not supported class #{className}"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
chain :with_pool do |pool|
|
12
|
+
@pool = pool
|
13
|
+
end
|
14
|
+
|
15
|
+
chain :with_physicalPath do |physicalPath|
|
16
|
+
@physicalPath = physicalPath
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
RSpec::Matchers.define :have_site_bindings do |port|
|
2
|
+
match do |subject|
|
3
|
+
if subject.class.name == 'Serverspec::Type::IisWebsite'
|
4
|
+
subject.has_site_bindings?(port, @protocol, @ipAddress, @hostHeader)
|
5
|
+
else
|
6
|
+
className = subject.class.name
|
7
|
+
raise "not supported class #{className}"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
chain :with_protocol do |protocol|
|
12
|
+
@protocol = protocol
|
13
|
+
end
|
14
|
+
|
15
|
+
chain :with_ipAddress do |ipAddress|
|
16
|
+
@ipAddress = ipAddress
|
17
|
+
end
|
18
|
+
|
19
|
+
chain :with_hostHeader do |hostHeader|
|
20
|
+
@hostHeader = hostHeader
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
RSpec::Matchers.define :have_virtual_dir do |vdir|
|
2
|
+
match do |subject|
|
3
|
+
if subject.class.name == 'Serverspec::Type::IisWebsite'
|
4
|
+
subject.has_virtual_dir?(vdir, @path)
|
5
|
+
else
|
6
|
+
className = subject.class.name
|
7
|
+
raise "not supported class #{className}"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
chain :with_path do |path|
|
12
|
+
@path = path
|
13
|
+
end
|
14
|
+
end
|
@@ -21,6 +21,18 @@ module Serverspec
|
|
21
21
|
def has_physical_path?(path)
|
22
22
|
backend.check_iis_website_path(@name, path)
|
23
23
|
end
|
24
|
+
|
25
|
+
def has_site_bindings?(port, protocol, ipAddress, hostHeader)
|
26
|
+
backend.check_iis_website_binding(@name, port, protocol, ipAddress, hostHeader)
|
27
|
+
end
|
28
|
+
|
29
|
+
def has_virtual_dir?(vdir, path)
|
30
|
+
backend.check_iis_website_virtual_dir(@name, vdir, path)
|
31
|
+
end
|
32
|
+
|
33
|
+
def has_site_application?(app, pool, physicalPath)
|
34
|
+
backend.check_iis_website_application(@name, app, pool, physicalPath)
|
35
|
+
end
|
24
36
|
|
25
37
|
def to_s
|
26
38
|
%Q[IIS Website "#{@name}"]
|
data/lib/serverspec/version.rb
CHANGED
data/serverspec.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_runtime_dependency "rspec", "~> 2.99"
|
23
23
|
spec.add_runtime_dependency "rspec-its"
|
24
24
|
spec.add_runtime_dependency "highline"
|
25
|
-
spec.add_runtime_dependency "specinfra", "~> 1.
|
25
|
+
spec.add_runtime_dependency "specinfra", "~> 1.25"
|
26
26
|
spec.add_development_dependency "bundler", "~> 1.3"
|
27
27
|
spec.add_development_dependency "rake", "~> 10.1.1"
|
28
28
|
end
|
data/wercker.yml
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.13.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-
|
11
|
+
date: 2014-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '1.
|
75
|
+
version: '1.25'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '1.
|
82
|
+
version: '1.25'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -149,6 +149,9 @@ files:
|
|
149
149
|
- lib/serverspec/matchers/contain.rb
|
150
150
|
- lib/serverspec/matchers/have_entry.rb
|
151
151
|
- lib/serverspec/matchers/have_rule.rb
|
152
|
+
- lib/serverspec/matchers/have_site_application.rb
|
153
|
+
- lib/serverspec/matchers/have_site_bindings.rb
|
154
|
+
- lib/serverspec/matchers/have_virtual_dir.rb
|
152
155
|
- lib/serverspec/matchers/match_md5checksum.rb
|
153
156
|
- lib/serverspec/matchers/match_sha256checksum.rb
|
154
157
|
- lib/serverspec/matchers/return_exit_status.rb
|