serverspec 2.7.1 → 2.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8edd4963deb2e7b23ef335b950ebc792673e3e30
4
- data.tar.gz: bc1603d10231013079feffb6085856a9d47d6aee
3
+ metadata.gz: 2357bc882b39784c3e9f025f9491348e94b7ee36
4
+ data.tar.gz: 7e9d2f2dd860de370a1c9de63d8313cf650a418f
5
5
  SHA512:
6
- metadata.gz: 8840110f0a0c2b89162cbd7a07891ff3f09cae7e1fca05e24a4c7a537a2c684d4c3757d85767d4daca0e43ff56241998809a0440d172e7a53131666b915f40f2
7
- data.tar.gz: 32be2bb82ceba5b45cc5e4f877098bfb345d56789c784fd6223f0ad82ecb126bf15a12d6521929ad52ddbacfe021769c456bb4200c63d815aec98327c1eae7bb
6
+ metadata.gz: de6a83c920cadf8cc0eb71356ed4368304d4cbd7878919e1037851a28c9f6cb058980ff9b18cbeb344bbef0c957a9fe8b9ab8850d6694cc9a172550fbea473b6
7
+ data.tar.gz: 34d5a26c1c15f774bf893216237794d170531969f5d8e9bf67cb257a66fb3ec4187d65a5dd8b08600e9cf78c1c1f50fde084d50f5ab217688811af365ff20ad8
@@ -25,7 +25,7 @@ module Serverspec::Type
25
25
  attr_reader :epoch, :version
26
26
 
27
27
  def initialize(val)
28
- matches = val.match(/^(?:(\d+):)?(\d[0-9a-zA-Z.+:~-]*)$/)
28
+ matches = val.match(/^(?:(\d+):)?(\d[0-9a-zA-Z.+:~_-]*)$/)
29
29
  if matches.nil?
30
30
  raise ArgumentError, "Malformed version number string #{val}"
31
31
  end
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "2.7.1"
2
+ VERSION = "2.7.2"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -9,7 +9,7 @@ module Specinfra
9
9
  CommandResult.new({
10
10
  :stdout => ::Specinfra.configuration.stdout,
11
11
  :stderr => ::Specinfra.configuration.stderr,
12
- :exit_status => 0,
12
+ :exit_status => ::Specinfra.configuration.exit_status,
13
13
  :exit_signal => nil,
14
14
  })
15
15
  end
@@ -19,7 +19,7 @@ module Specinfra
19
19
  CommandResult.new({
20
20
  :stdout => ::Specinfra.configuration.stdout,
21
21
  :stderr => ::Specinfra.configuration.stderr,
22
- :exit_status => 0,
22
+ :exit_status => ::Specinfra.configuration.exit_status,
23
23
  :exit_signal => nil,
24
24
  })
25
25
  end
@@ -3,52 +3,28 @@ require 'spec_helper'
3
3
  set :os, :family => 'base'
4
4
 
5
5
  describe routing_table do
6
- let(:stdout) { "192.168.100.0/24 dev eth1 proto kernel scope link src 192.168.100.10 \r\ndefault via 192.168.100.1 dev eth0 \r\n" }
6
+ let(:stdout) { "192.168.100.0/24 dev eth1 proto kernel scope link src 192.168.100.10 \r\n" }
7
7
  it { should have_entry( :destination => '192.168.100.0/24' ) }
8
8
  end
9
9
 
10
10
  describe routing_table do
11
- let(:stdout) { "192.168.100.0/24 dev eth1 proto kernel scope link src 192.168.100.10 \r\ndefault via 192.168.100.1 dev eth0 \r\n" }
11
+ let(:exit_status) { 1 }
12
12
  it { should_not have_entry( :destination => '192.168.100.100/24' ) }
13
13
  end
14
14
 
15
15
  describe routing_table do
16
- let(:stdout) { "192.168.100.0/24 dev eth1 proto kernel scope link src 192.168.100.10 \r\ndefault via 192.168.100.1 dev eth0 \r\n" }
16
+ let(:stdout) { "192.168.100.0/24 dev eth1 proto kernel scope link src 192.168.100.10 \r\n" }
17
17
  it do
18
18
  should have_entry(
19
19
  :destination => '192.168.100.0/24',
20
- :gateway => '192.168.100.1'
21
- )
22
- end
23
-
24
- it do
25
- should have_entry(
26
- :destination => '192.168.100.0/24',
27
- :gateway => '192.168.100.1',
28
- :interface => 'eth1'
29
- )
30
- end
31
-
32
- it do
33
- should_not have_entry(
34
- :gateway => '192.168.100.1',
35
- :interface => 'eth1'
36
- )
37
- end
38
-
39
- it do
40
- should_not have_entry(
41
- :destination => '192.168.100.0/32',
42
- :gateway => '192.168.100.1',
43
20
  :interface => 'eth1'
44
21
  )
45
22
  end
46
23
  end
47
24
 
48
25
  describe routing_table do
49
- let(:stdout) { "192.168.200.0/24 via 192.168.200.1 dev eth0 \r\ndefault via 192.168.100.1 dev eth0 \r\n" }
50
- it { should have_entry( :destination => '192.168.200.0/24' ) }
51
- it { should_not have_entry( :destination => '192.168.200.200/24' ) }
26
+ let(:stdout) { "192.168.200.0/24 via 192.168.200.1 dev eth0 \r\n" }
27
+ it { should have_entry( :destination => '192.168.200.0/24' ) }
52
28
 
53
29
  it do
54
30
  should have_entry(
@@ -64,27 +40,11 @@ describe routing_table do
64
40
  :interface => 'eth0'
65
41
  )
66
42
  end
67
-
68
- it do
69
- should_not have_entry(
70
- :gateway => '192.168.200.1',
71
- :interface => 'eth0'
72
- )
73
- end
74
-
75
- it do
76
- should_not have_entry(
77
- :destination => '192.168.200.0/32',
78
- :gateway => '192.168.200.1',
79
- :interface => 'eth0'
80
- )
81
- end
82
43
  end
83
44
 
84
45
  describe routing_table do
85
46
  let(:stdout) { "default via 10.0.2.2 dev eth0 \r\n" }
86
47
  it { should have_entry( :destination => 'default' ) }
87
- it { should_not have_entry( :destination => 'defaulth' ) }
88
48
 
89
49
  it do
90
50
  should have_entry(
@@ -100,19 +60,4 @@ describe routing_table do
100
60
  :interface => 'eth0'
101
61
  )
102
62
  end
103
-
104
- it do
105
- should_not have_entry(
106
- :gateway => '10.0.2.2',
107
- :interface => 'eth0'
108
- )
109
- end
110
-
111
- it do
112
- should_not have_entry(
113
- :destination => 'default',
114
- :gateway => '10.0.2.1',
115
- :interface => 'eth0'
116
- )
117
- end
118
63
  end
@@ -19,6 +19,10 @@ describe service('sshd') do
19
19
  it { should be_running.under(:upstart) }
20
20
  end
21
21
 
22
+ describe service('sshd') do
23
+ it { should be_running.under(:daemontools) }
24
+ end
25
+
22
26
  describe service('sshd') do
23
27
  it {
24
28
  expect {
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.7.1
4
+ version: 2.7.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: 2014-12-11 00:00:00.000000000 Z
11
+ date: 2015-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec