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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 09176ca7951fbb308e0a4e66d0c1454bb9bb3671
4
- data.tar.gz: 9f9ca03c65d5f22212b424a6ea29026069b3606c
3
+ metadata.gz: c970f69fc92db716e49100b80629b636dd04bca6
4
+ data.tar.gz: b3cc861040b552c1e0cf5baee05dea5fb501bde3
5
5
  SHA512:
6
- metadata.gz: b25dad604254a0ee914e79794b90337a0e17290930093dd453c663ef6d9b0ba8e5db66c5192f5c20e5d3b053df0d14a93e8f57ce1ffb739ef4bf3f3de6d9a36b
7
- data.tar.gz: a6bbd7d3933f7adf815c2b878a35e729186047bfc96ccc64b9e1a49c7a41a95c09205e54a8b2861bf854ef6ce840768ba158d7df70d17dab74540557a9ad17dd
6
+ metadata.gz: b81fc5e83cea88ce0c8f6b2884b08a6902cac5922f0590c8f2d31ce05d9402bacf918b5e9698da777e4d62d81e264751d1371759fc439059bff042b6ae57ff6a
7
+ data.tar.gz: 14ca86394006679f6cb0c88c31563c16ff2a0f037e33acce0f25c2cbfeeeedff5a6d495d842db5113e55b3f107cb6e9718f780643777125a85937b8be7f86c10
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "0.10.11"
2
+ VERSION = "0.10.12"
3
3
  end
@@ -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.11
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-26 00:00:00.000000000 Z
11
+ date: 2013-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh