serverspec 0.10.11 → 0.10.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serverspec/type/port.rb +2 -2
- data/lib/serverspec/version.rb +1 -1
- data/spec/debian/port_spec.rb +11 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c970f69fc92db716e49100b80629b636dd04bca6
|
4
|
+
data.tar.gz: b3cc861040b552c1e0cf5baee05dea5fb501bde3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b81fc5e83cea88ce0c8f6b2884b08a6902cac5922f0590c8f2d31ce05d9402bacf918b5e9698da777e4d62d81e264751d1371759fc439059bff042b6ae57ff6a
|
7
|
+
data.tar.gz: 14ca86394006679f6cb0c88c31563c16ff2a0f037e33acce0f25c2cbfeeeedff5a6d495d842db5113e55b3f107cb6e9718f780643777125a85937b8be7f86c10
|
data/lib/serverspec/type/port.rb
CHANGED
@@ -2,9 +2,9 @@ module Serverspec
|
|
2
2
|
module Type
|
3
3
|
class Port < Base
|
4
4
|
def listening?(protocol)
|
5
|
-
if protocol
|
5
|
+
if protocol
|
6
6
|
protocol = protocol.to_s.downcase
|
7
|
-
unless ["udp", "tcp"].include?(protocol)
|
7
|
+
unless ["udp", "tcp", "tcp6", "udp6"].include?(protocol)
|
8
8
|
raise ArgumentError.new("`be_listening` matcher doesn't support #{protocol}")
|
9
9
|
end
|
10
10
|
|
data/lib/serverspec/version.rb
CHANGED
data/spec/debian/port_spec.rb
CHANGED
@@ -23,8 +23,18 @@ describe port(123) do
|
|
23
23
|
its(:command) { should eq 'netstat -tunl | grep -- \\^udp\\ .\\*:123\\ ' }
|
24
24
|
end
|
25
25
|
|
26
|
+
describe port(81) do
|
27
|
+
it { should be_listening.with("tcp6") }
|
28
|
+
its(:command) { should eq 'netstat -tunl | grep -- \\^tcp6\\ .\\*:81\\ ' }
|
29
|
+
end
|
30
|
+
|
31
|
+
describe port(1234) do
|
32
|
+
it { should be_listening.with("udp6") }
|
33
|
+
its(:command) { should eq 'netstat -tunl | grep -- \\^udp6\\ .\\*:1234\\ ' }
|
34
|
+
end
|
35
|
+
|
26
36
|
describe port(80) do
|
27
|
-
it {
|
37
|
+
it {
|
28
38
|
expect {
|
29
39
|
should be_listening.with('not implemented')
|
30
40
|
}.to raise_error(ArgumentError, %r/\A`be_listening` matcher doesn\'t support/)
|
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: 0.10.
|
4
|
+
version: 0.10.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|