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 +4 -4
 - data/lib/serverspec/type/package.rb +1 -1
 - data/lib/serverspec/version.rb +1 -1
 - data/spec/spec_helper.rb +2 -2
 - data/spec/type/base/routing_table_spec.rb +5 -60
 - data/spec/type/base/service_spec.rb +4 -0
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 2357bc882b39784c3e9f025f9491348e94b7ee36
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 7e9d2f2dd860de370a1c9de63d8313cf650a418f
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 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
         
     | 
    
        data/lib/serverspec/version.rb
    CHANGED
    
    
    
        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 =>  
     | 
| 
      
 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 =>  
     | 
| 
      
 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\ 
     | 
| 
      
 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(: 
     | 
| 
      
 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\ 
     | 
| 
      
 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\ 
     | 
| 
       50 
     | 
    
         
            -
              it { should 
     | 
| 
       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
         
     | 
    
        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. 
     | 
| 
      
 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:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2015-01-23 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rspec
         
     |