serverspec 2.30.1 → 2.31.0

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: 623ddb3992d4ac1a80f3da5bfc9317423c09b44d
4
- data.tar.gz: 1154a26c1b7ae3eeb45bf5d7b5a955bfce77034e
3
+ metadata.gz: 333b101c09d00060b9488398bac3cda113955f2f
4
+ data.tar.gz: f671996e2ee97892edabd2791fc3fcd0e56aa75a
5
5
  SHA512:
6
- metadata.gz: ed0a8a686c497fce29b98902e678bdb934d10b90f07490a37b24fb3c97401e7a566e89a4a62260d2cad09cd94545871816223d75550917289817d45add45339d
7
- data.tar.gz: 75e06ddc5151e34e395d429a68733cf05fa20785dd9ab53179c91e49940ab86ec1f0333386b310854fe6193d9ecf3605dbb0dd925a03724a27cca51a6729710e
6
+ metadata.gz: 6f4393e0301d51028b475b5abb74c9cfc7d5d8b43d232767d0ffc2dc1ad59d77febb74b75c5cc4635c794239b64a3bbdad624b547256ba0644117ae2d233679b
7
+ data.tar.gz: 63b9a3689c2c992a490845584a8e3af7a69167b2c4a4311515b7d094357f26d914c471c00106cec9229b0ae64e3949bdc904edc08580f061d4e7664aee1dca4e
@@ -22,6 +22,14 @@ module Serverspec::Type
22
22
  @runner.check_interface_has_ipv6_address(@name, ip_address)
23
23
  end
24
24
 
25
+ def ipv4_address
26
+ @runner.get_interface_ipv4_address(@name).stdout.strip
27
+ end
28
+
29
+ def ipv6_address
30
+ @runner.get_interface_ipv6_address(@name).stdout.strip
31
+ end
32
+
25
33
  def up?
26
34
  ret = @runner.get_interface_link_state(@name)
27
35
  ret.stdout.strip == 'up'
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "2.30.1"
2
+ VERSION = "2.31.0"
3
3
  end
data/serverspec.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_runtime_dependency "rspec", "~> 3.0"
22
22
  spec.add_runtime_dependency "rspec-its"
23
23
  spec.add_runtime_dependency "multi_json"
24
- spec.add_runtime_dependency "specinfra", "~> 2.48"
24
+ spec.add_runtime_dependency "specinfra", "~> 2.53"
25
25
  spec.add_development_dependency "bundler", "~> 1.3"
26
26
  spec.add_development_dependency("json", "~> 1.8") if RUBY_VERSION < "1.9"
27
27
  spec.add_development_dependency "rake", "~> 10.1.1"
@@ -24,6 +24,16 @@ describe interface('eth0') do
24
24
  it { should have_ipv6_address('2001:0db8:bd05:01d2:288a:1fc0:0001:10ee') }
25
25
  end
26
26
 
27
+ describe interface('eth1') do
28
+ let(:stdout) { "1.2.3.4/1\r\n" }
29
+ its(:ipv4_address) { should match(/^[\d.]+\/\d+$/) }
30
+ end
31
+
32
+ describe interface('eth1') do
33
+ let(:stdout) { "2001:db8::1234/1\r\n" }
34
+ its(:ipv6_address) { should match(/^[a-f\d:]+\/\d+$/i) }
35
+ end
36
+
27
37
  describe interface('eth0') do
28
38
  let(:stdout) { 'up' }
29
39
  it { should be_up }
@@ -38,4 +48,3 @@ describe interface('invalid-interface') do
38
48
  let(:stdout) { '9001' }
39
49
  its(:mtu) { should_not eq 1500 }
40
50
  end
41
-
@@ -15,6 +15,16 @@ describe interface('eth0') do
15
15
  it { should have_ipv4_address("192.168.10.10/24") }
16
16
  end
17
17
 
18
+ describe interface('eth1') do
19
+ let(:stdout) { "1.2.3.4/1\r\n" }
20
+ its(:ipv4_address) { should match(/^[\d.]+\/\d+$/) }
21
+ end
22
+
23
+ describe interface('eth1') do
24
+ let(:stdout) { "2001:db8::1234/1\r\n" }
25
+ its(:ipv6_address) { should match(/^[a-f\d:]+\/\d+$/i) }
26
+ end
27
+
18
28
  describe interface('invalid-interface') do
19
29
  let(:stdout) { '1000' }
20
30
  its(:speed) { should_not eq 100 }
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: 2.30.1
4
+ version: 2.31.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: 2016-03-07 00:00:00.000000000 Z
11
+ date: 2016-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '2.48'
61
+ version: '2.53'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '2.48'
68
+ version: '2.53'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement