serverspec 1.4.0 → 1.4.1

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: a9f502abc758e26c7cfb76742374fdf0db5642bf
4
- data.tar.gz: a0a70007cdc068ab6ade47ef33fea5bafbe9eaf9
3
+ metadata.gz: ad379a62eebf7068f9f41a32b0557edbdf3c04ea
4
+ data.tar.gz: 4a67c75a8da7a3364d58a5e1505a9c2ccaaff27d
5
5
  SHA512:
6
- metadata.gz: 0bdeb0cec5793191834f45f3b232bb869ca39434cb56cbc45b67e3d966d8c0b5057af3b978fcb9c20c746adf89f09d3146a3e3f4c159b8f6111c911111605051
7
- data.tar.gz: c4dd76983de73726cf79e3042522071057191c4dfc133c3e5e78f55f0bb06c5cb4eb289b8b6c6ba50587ababb92733431b0cc66ffb65bf3572b710bb3947c3f8
6
+ metadata.gz: d67fafaa7283fcf224a2a48317dd9215a3ee7ffa44e1778d80a276affe3306f00592fd91a5047fe3481c5ca60631d3704275722de42793a2a742920ade190f3f
7
+ data.tar.gz: 270af033cdf46ae4e01e1d756e356d48ac3c740f05e2f433349eef64ebfba3c5ace429d1104a4948ee238ef1a23f2c596a14bf067f574907e96d1fa99e213157
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Serverspec [![Gem Version](https://badge.fury.io/rb/serverspec.png)](http://badge.fury.io/rb/serverspec) [![BuildStatus](https://secure.travis-ci.org/serverspec/serverspec.png)](http://travis-ci.org/serverspec/serverspec) [![Code Climate](https://codeclimate.com/github/serverspec/serverspec.png)](https://codeclimate.com/github/serverspec/serverspec)
1
+ # Serverspec [![Gem Version](https://badge.fury.io/rb/serverspec.png)](http://badge.fury.io/rb/serverspec) [![BuildStatus](https://secure.travis-ci.org/serverspec/serverspec.png)](http://travis-ci.org/serverspec/serverspec) [![Code Climate](https://codeclimate.com/github/serverspec/serverspec.png)](https://codeclimate.com/github/serverspec/serverspec) [![wercker status](https://app.wercker.com/status/526d1ff4df6eadaa793dca1affcaed35/s/ "wercker status")](https://app.wercker.com/project/bykey/526d1ff4df6eadaa793dca1affcaed35)
2
2
 
3
3
  RSpec tests for your servers configured by Puppet, Chef or anything else
4
4
 
@@ -3,7 +3,11 @@ require 'serverspec/helper/backend'
3
3
 
4
4
  # Subject type helper
5
5
  require 'serverspec/helper/type'
6
- include Serverspec::Helper::Type
6
+ extend Serverspec::Helper::Type
7
+ class RSpec::Core::ExampleGroup
8
+ extend Serverspec::Helper::Type
9
+ include Serverspec::Helper::Type
10
+ end
7
11
 
8
12
  require 'serverspec/helper/properties'
9
13
 
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.1"
3
3
  end
@@ -4,7 +4,7 @@ include SpecInfra::Helper::AIX
4
4
 
5
5
  describe cron do
6
6
  it { should have_entry '* * * * * /usr/local/bin/batch.sh' }
7
- its(:command) { should eq 'crontab -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
7
+ its(:command) { should eq 'crontab -l | grep -v "#" -- | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
8
8
  end
9
9
 
10
10
  describe cron do
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  describe cron do
15
15
  it { should have_entry('* * * * * /usr/local/bin/batch.sh').with_user('root') }
16
- its(:command) { should eq 'crontab -u root -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
16
+ its(:command) { should eq 'crontab -u root -l | grep -v "#" | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
17
17
  end
18
18
 
19
19
  describe cron do
@@ -4,7 +4,7 @@ include SpecInfra::Helper::Darwin
4
4
 
5
5
  describe cron do
6
6
  it { should have_entry '* * * * * /usr/local/bin/batch.sh' }
7
- its(:command) { should eq 'crontab -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
7
+ its(:command) { should eq 'crontab -l | grep -v "#" -- | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
8
8
  end
9
9
 
10
10
  describe cron do
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  describe cron do
15
15
  it { should have_entry('* * * * * /usr/local/bin/batch.sh').with_user('root') }
16
- its(:command) { should eq 'crontab -u root -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
16
+ its(:command) { should eq 'crontab -u root -l | grep -v "#" | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
17
17
  end
18
18
 
19
19
  describe cron do
@@ -4,7 +4,7 @@ include SpecInfra::Helper::Debian
4
4
 
5
5
  describe cron do
6
6
  it { should have_entry '* * * * * /usr/local/bin/batch.sh' }
7
- its(:command) { should eq 'crontab -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
7
+ its(:command) { should eq 'crontab -l | grep -v "#" -- | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
8
8
  end
9
9
 
10
10
  describe cron do
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  describe cron do
15
15
  it { should have_entry('* * * * * /usr/local/bin/batch.sh').with_user('root') }
16
- its(:command) { should eq 'crontab -u root -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
16
+ its(:command) { should eq 'crontab -u root -l | grep -v "#" | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
17
17
  end
18
18
 
19
19
  describe cron do
@@ -4,7 +4,7 @@ include SpecInfra::Helper::Debian
4
4
 
5
5
  describe package('apache2') do
6
6
  it { should be_installed }
7
- its(:command) { should eq "dpkg-query -f '${Status}' -W apache2 | grep '^install ok installed$'" }
7
+ its(:command) { should eq "dpkg-query -f '${Status}' -W apache2 | grep -E '^(install|hold) ok installed$'" }
8
8
  end
9
9
 
10
10
  describe package('invalid-package') do
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  describe package('apache2') do
15
15
  it { should be_installed.with_version('1.1.1') }
16
- its(:command) { should eq "dpkg-query -f '${Status} ${Version}' -W apache2 | grep -E '^install ok installed 1.1.1$'" }
16
+ its(:command) { should eq "dpkg-query -f '${Status} ${Version}' -W apache2 | grep -E '^(install|hold) ok installed 1.1.1$'" }
17
17
  end
18
18
 
19
19
  describe package('invalid-package') do
@@ -4,7 +4,7 @@ include SpecInfra::Helper::FreeBSD
4
4
 
5
5
  describe cron do
6
6
  it { should have_entry '* * * * * /usr/local/bin/batch.sh' }
7
- its(:command) { should eq 'crontab -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
7
+ its(:command) { should eq 'crontab -l | grep -v "#" -- | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
8
8
  end
9
9
 
10
10
  describe cron do
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  describe cron do
15
15
  it { should have_entry('* * * * * /usr/local/bin/batch.sh').with_user('root') }
16
- its(:command) { should eq 'crontab -u root -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
16
+ its(:command) { should eq 'crontab -u root -l | grep -v "#" | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
17
17
  end
18
18
 
19
19
  describe cron do
@@ -4,7 +4,7 @@ include SpecInfra::Helper::Gentoo
4
4
 
5
5
  describe cron do
6
6
  it { should have_entry '* * * * * /usr/local/bin/batch.sh' }
7
- its(:command) { should eq 'crontab -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
7
+ its(:command) { should eq 'crontab -l | grep -v "#" -- | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
8
8
  end
9
9
 
10
10
  describe cron do
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  describe cron do
15
15
  it { should have_entry('* * * * * /usr/local/bin/batch.sh').with_user('root') }
16
- its(:command) { should eq 'crontab -u root -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
16
+ its(:command) { should eq 'crontab -u root -l | grep -v "#" | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
17
17
  end
18
18
 
19
19
  describe cron do
@@ -0,0 +1,6 @@
1
+ require 'spec_helper'
2
+
3
+ describe String do
4
+ subject { String.new }
5
+ it { should_not respond_to :host }
6
+ end
@@ -4,7 +4,7 @@ include SpecInfra::Helper::Plamo
4
4
 
5
5
  describe cron do
6
6
  it { should have_entry '* * * * * /usr/local/bin/batch.sh' }
7
- its(:command) { should eq 'crontab -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
7
+ its(:command) { should eq 'crontab -l | grep -v "#" -- | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
8
8
  end
9
9
 
10
10
  describe cron do
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  describe cron do
15
15
  it { should have_entry('* * * * * /usr/local/bin/batch.sh').with_user('root') }
16
- its(:command) { should eq 'crontab -u root -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
16
+ its(:command) { should eq 'crontab -u root -l | grep -v "#" | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
17
17
  end
18
18
 
19
19
  describe cron do
@@ -4,7 +4,7 @@ include SpecInfra::Helper::RedHat
4
4
 
5
5
  describe cron do
6
6
  it { should have_entry '* * * * * /usr/local/bin/batch.sh' }
7
- its(:command) { should eq 'crontab -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
7
+ its(:command) { should eq 'crontab -l | grep -v "#" -- | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
8
8
  end
9
9
 
10
10
  describe cron do
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  describe cron do
15
15
  it { should have_entry('* * * * * /usr/local/bin/batch.sh').with_user('root') }
16
- its(:command) { should eq 'crontab -u root -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
16
+ its(:command) { should eq 'crontab -u root -l | grep -v "#" | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
17
17
  end
18
18
 
19
19
  describe cron do
data/wercker.yml CHANGED
@@ -1,4 +1,4 @@
1
- box: wercker/ruby
1
+ box: mizzy/serverspec-base
2
2
  build:
3
3
  steps:
4
4
  - script:
@@ -30,11 +30,23 @@ build:
30
30
  name: Run rake spec:centos65
31
31
  code: rake spec:centos65
32
32
  cwd: $WORKING_DIR
33
+ - script:
34
+ name: Run vagrant up ubuntu1310
35
+ code: vagrant up ubuntu1310 --provider=digital_ocean
36
+ cwd: $WORKING_DIR
37
+ - script:
38
+ name: Run rake spec:ubuntu1310
39
+ code: rake spec:ubuntu1310
40
+ cwd: $WORKING_DIR
33
41
 
34
42
  after-steps:
35
43
  - script:
36
- name: Run vagrant destroy
44
+ name: Run vagrant destroy centos65
37
45
  code: vagrant destroy centos65 --force
38
46
  cwd: $WORKING_DIR
47
+ - script:
48
+ name: Run vagrant destroy ubuntu1310
49
+ code: vagrant destroy ubuntu1310 --force
50
+ cwd: $WORKING_DIR
39
51
  - 1syo/idobata-notify@0.1.1:
40
52
  token: $IDOBATA_TOKEN
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: 1.4.0
4
+ version: 1.4.1
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-04-24 00:00:00.000000000 Z
11
+ date: 2014-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh
@@ -296,6 +296,7 @@ files:
296
296
  - spec/gentoo/user_spec.rb
297
297
  - spec/gentoo/zfs_spec.rb
298
298
  - spec/helper/properties_spec.rb
299
+ - spec/helper/type_spec.rb
299
300
  - spec/plamo/cgroup_spec.rb
300
301
  - spec/plamo/command_spec.rb
301
302
  - spec/plamo/cron_spec.rb
@@ -514,6 +515,7 @@ test_files:
514
515
  - spec/gentoo/user_spec.rb
515
516
  - spec/gentoo/zfs_spec.rb
516
517
  - spec/helper/properties_spec.rb
518
+ - spec/helper/type_spec.rb
517
519
  - spec/plamo/cgroup_spec.rb
518
520
  - spec/plamo/command_spec.rb
519
521
  - spec/plamo/cron_spec.rb