serverspec 0.6.27 → 0.6.28

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,13 +14,13 @@ module Serverspec
14
14
  end
15
15
 
16
16
  def check_listening(port)
17
- regexp = "\.#{port} "
18
- "netstat -an 2> /dev/null | egrep 'LISTEN|Idle' | grep -- #{escape(regexp)}"
17
+ regexp = "\\.#{port} "
18
+ "netstat -an 2> /dev/null | grep -- LISTEN | grep -- #{escape(regexp)}"
19
19
  end
20
20
 
21
21
  def check_listening_with_protocol(port, protocol)
22
- regexp = ".*\.#{port} "
23
- "netstat -an -P #{escape(protocol)} 2> /dev/null | egrep 'LISTEN|Idle' | grep -- #{escape(regexp)}"
22
+ regexp = ".*\\.#{port} "
23
+ "netstat -an -P #{escape(protocol)} 2> /dev/null | grep -- LISTEN | grep -- #{escape(regexp)}"
24
24
  end
25
25
 
26
26
  def check_running(service)
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "0.6.27"
2
+ VERSION = "0.6.28"
3
3
  end
@@ -4,7 +4,7 @@ include Serverspec::Helper::Solaris
4
4
 
5
5
  describe port(80) do
6
6
  it { should be_listening }
7
- its(:command) { should eq %q!netstat -an 2> /dev/null | egrep 'LISTEN|Idle' | grep -- .80\\ ! }
7
+ its(:command) { should eq %q!netstat -an 2> /dev/null | grep -- LISTEN | grep -- \\\\.80\\ ! }
8
8
  end
9
9
 
10
10
  describe port('invalid') do
@@ -13,12 +13,12 @@ end
13
13
 
14
14
  describe port(80) do
15
15
  it { should be_listening.with("tcp") }
16
- its(:command) { should eq %q!netstat -an -P tcp 2> /dev/null | egrep 'LISTEN|Idle' | grep -- .\\*.80\\ ! }
16
+ its(:command) { should eq %q!netstat -an -P tcp 2> /dev/null | grep -- LISTEN | grep -- .\\*\\\\.80\\ ! }
17
17
  end
18
18
 
19
19
  describe port(123) do
20
20
  it { should be_listening.with("udp") }
21
- its(:command) { should eq %q!netstat -an -P udp 2> /dev/null | egrep 'LISTEN|Idle' | grep -- .\\*.123\\ ! }
21
+ its(:command) { should eq %q!netstat -an -P udp 2> /dev/null | grep -- LISTEN | grep -- .\\*\\\\.123\\ ! }
22
22
  end
23
23
 
24
24
  describe port(80) do
@@ -4,7 +4,7 @@ include Serverspec::Helper::Solaris11
4
4
 
5
5
  describe port(80) do
6
6
  it { should be_listening }
7
- its(:command) { should eq %q!netstat -an 2> /dev/null | egrep 'LISTEN|Idle' | grep -- .80\\ ! }
7
+ its(:command) { should eq %q!netstat -an 2> /dev/null | grep -- LISTEN | grep -- \\\\.80\\ ! }
8
8
  end
9
9
 
10
10
  describe port('invalid') do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.27
4
+ version: 0.6.28
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: