specinfra 2.63.1 → 2.63.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/specinfra/command/openbsd/base/port.rb +7 -0
- data/lib/specinfra/version.rb +1 -1
- data/spec/command/openbsd/port_spec.rb +16 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dcf4cfdd8c61c1b9668b4292cde1f465908abf5
|
4
|
+
data.tar.gz: af075d3310b9dc5fad5b6010d5b6c32591bfe278
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ecae1b5fa9d13ed92e2491688961c1ead11e15eeccf874abb4d2b1bcaea3431eede7291b7dd7547e2222745e4258a846cf93a4d90b4ce3538401300889267c3
|
7
|
+
data.tar.gz: 1ac9d69762cf1ed9e85778ecf89304cf633f127ca9234374ad0e939ef5c1207ec44bfce5600bec8d6d0ec86c6f004cf9007154aa875b0883e79590b87ced9f18
|
@@ -1,6 +1,13 @@
|
|
1
1
|
class Specinfra::Command::Openbsd::Base::Port < Specinfra::Command::Base::Port
|
2
2
|
class << self
|
3
3
|
def check_is_listening(port, opts={})
|
4
|
+
protocol = opts[:protocol]
|
5
|
+
case protocol
|
6
|
+
when 'tcp'
|
7
|
+
return "netstat -nat -f inet | egrep '(tcp.*.#{port}.*LISTEN$)'"
|
8
|
+
when 'udp'
|
9
|
+
return "netstat -nat -f inet | egrep '(udp.*.#{port}.*$)'"
|
10
|
+
end
|
4
11
|
"netstat -nat -f inet | egrep '((tcp|udp).*\.#{port}.*LISTEN$)'"
|
5
12
|
end
|
6
13
|
end
|
data/lib/specinfra/version.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
property[:os] = nil
|
4
|
+
set :os, :family => 'openbsd'
|
5
|
+
|
6
|
+
describe get_command(:check_port_is_listening, '80') do
|
7
|
+
it { should eq "netstat -nat -f inet | egrep '((tcp|udp).*.80.*LISTEN$)'" }
|
8
|
+
end
|
9
|
+
|
10
|
+
describe get_command(:check_port_is_listening, '22', :protocol => 'tcp') do
|
11
|
+
it { should eq "netstat -nat -f inet | egrep '(tcp.*.22.*LISTEN$)'" }
|
12
|
+
end
|
13
|
+
|
14
|
+
describe get_command(:check_port_is_listening, '514', :protocol => 'udp') do
|
15
|
+
it { should eq "netstat -nat -f inet | egrep '(udp.*.514.*$)'" }
|
16
|
+
end
|
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.63.
|
4
|
+
version: 2.63.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-scp
|
@@ -561,6 +561,7 @@ files:
|
|
561
561
|
- spec/command/openbsd/host_spec.rb
|
562
562
|
- spec/command/openbsd/interface_spec.rb
|
563
563
|
- spec/command/openbsd/mail_alias_spec.rb
|
564
|
+
- spec/command/openbsd/port_spec.rb
|
564
565
|
- spec/command/openbsd/service_spec.rb
|
565
566
|
- spec/command/openbsd57/service_spec.rb
|
566
567
|
- spec/command/redhat/package_spec.rb
|
@@ -680,6 +681,7 @@ test_files:
|
|
680
681
|
- spec/command/openbsd/host_spec.rb
|
681
682
|
- spec/command/openbsd/interface_spec.rb
|
682
683
|
- spec/command/openbsd/mail_alias_spec.rb
|
684
|
+
- spec/command/openbsd/port_spec.rb
|
683
685
|
- spec/command/openbsd/service_spec.rb
|
684
686
|
- spec/command/openbsd57/service_spec.rb
|
685
687
|
- spec/command/redhat/package_spec.rb
|