serverspec 0.9.6 → 0.9.7

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: 7effb0731d9b7b511e2951f11f49e9a4d3f0f2c0
4
- data.tar.gz: 1a780c76172907c163f4cd9f902e4679e20c164c
3
+ metadata.gz: a52eb25a3bfc9d4be5218ea9d580488f4b25b36b
4
+ data.tar.gz: 6aedd1f9331a001dab115cef2e21582aa13e8231
5
5
  SHA512:
6
- metadata.gz: e954621afd75a597dc5364c6967345a4bd2c5f09909143d6b0e3a0dd256a9ab5b85c55e1e40bba0960b363c2482d40ed9e80f3b64bc24dc1c7698cb71d5b76e7
7
- data.tar.gz: 06e810b9dca453fd13a14855da7c4decc19f63e1563b26df323a84650bbd4700c6ae8202055689934436c344b77d98d947f1753bc82559bfbf77cb625d037741
6
+ metadata.gz: fa754a7d31353711232856190abd8fc89b482fb27e97ae0b517572821fba2478a56804702e575e820e2594e456a2164286c05b81ed35a0c10c006153120a2aa2
7
+ data.tar.gz: 2b2c0875c5c0ad842c8c118714de8869c222df3f5501dfffaf859cd1ec1c05e11e8a0e6a2c3ba2a2520fb9c3b0d76326985e7deec9fb1a51453d7333fe4dde0f
data/Gemfile CHANGED
@@ -1,8 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- group :test do
4
- gem 'coveralls', :require => false
5
- end
6
-
7
3
  # Specify your gem's dependencies in serverspec.gemspec
8
4
  gemspec
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) [![Coverage Status](https://coveralls.io/repos/serverspec/serverspec/badge.png)](https://coveralls.io/r/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)
2
2
 
3
3
  RSpec tests for your servers configured by Puppet, Chef or anything else
4
4
 
@@ -192,6 +192,13 @@ module Serverspec
192
192
  cmd
193
193
  end
194
194
 
195
+ def check_installed_by_pear(name, version=nil)
196
+ regexp = "^#{name}"
197
+ cmd = "pear list | grep -w -- #{escape(regexp)}"
198
+ cmd = "#{cmd} | grep -w -- #{escape(version)}" if version
199
+ cmd
200
+ end
201
+
195
202
  def check_installed_by_pip(name, version=nil)
196
203
  regexp = "^#{name}"
197
204
  cmd = "pip list | grep -w -- #{escape(regexp)}"
@@ -199,6 +206,13 @@ module Serverspec
199
206
  cmd
200
207
  end
201
208
 
209
+ def check_installed_by_cpan(name, version=nil)
210
+ regexp = "^#{name}"
211
+ cmd = "cpan -l | grep -w -- #{escape(regexp)}"
212
+ cmd = "#{cmd} | grep -w -- #{escape(version)}" if version
213
+ cmd
214
+ end
215
+
202
216
  def check_belonging_group(user, group)
203
217
  "id #{escape(user)} | awk '{print $3}' | grep -- #{escape(group)}"
204
218
  end
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "0.9.6"
2
+ VERSION = "0.9.7"
3
3
  end
@@ -81,6 +81,11 @@ describe package('mongo') do
81
81
  it { should_not be_installed.by('pecl').with_version('invalid-version') }
82
82
  end
83
83
 
84
+ describe package('XML_Util') do
85
+ it { should be_installed.by('pear').with_version('1.2.1') }
86
+ its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
87
+ end
88
+
84
89
  describe package('supervisor') do
85
90
  it { should be_installed.by('pip').with_version('3.0') }
86
91
  its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
@@ -89,3 +94,13 @@ end
89
94
  describe package('invalid-pip') do
90
95
  it { should_not be_installed.by('pip').with_version('invalid-version') }
91
96
  end
97
+
98
+ describe package('App::Ack') do
99
+ it { should be_installed.by('cpan') }
100
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
101
+ end
102
+
103
+ describe package('App::Ack') do
104
+ it { should be_installed.by('cpan').with_version('2.04') }
105
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
106
+ end
@@ -59,6 +59,11 @@ describe package('mongo') do
59
59
  it { should_not be_installed.by('pecl').with_version('invalid-version') }
60
60
  end
61
61
 
62
+ describe package('XML_Util') do
63
+ it { should be_installed.by('pear').with_version('1.2.1') }
64
+ its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
65
+ end
66
+
62
67
  describe package('supervisor') do
63
68
  it { should be_installed.by('pip').with_version('3.0') }
64
69
  its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
@@ -67,3 +72,13 @@ end
67
72
  describe package('invalid-pip') do
68
73
  it { should_not be_installed.by('pip').with_version('invalid-version') }
69
74
  end
75
+
76
+ describe package('App::Ack') do
77
+ it { should be_installed.by('cpan') }
78
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
79
+ end
80
+
81
+ describe package('App::Ack') do
82
+ it { should be_installed.by('cpan').with_version('2.04') }
83
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
84
+ end
@@ -77,6 +77,11 @@ describe package('mongo') do
77
77
  it { should_not be_installed.by('pecl').with_version('invalid-version') }
78
78
  end
79
79
 
80
+ describe package('XML_Util') do
81
+ it { should be_installed.by('pear').with_version('1.2.1') }
82
+ its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
83
+ end
84
+
80
85
  describe package('supervisor') do
81
86
  it { should be_installed.by('pip').with_version('3.0') }
82
87
  its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
@@ -85,3 +90,13 @@ end
85
90
  describe package('invalid-pip') do
86
91
  it { should_not be_installed.by('pip').with_version('invalid-version') }
87
92
  end
93
+
94
+ describe package('App::Ack') do
95
+ it { should be_installed.by('cpan') }
96
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
97
+ end
98
+
99
+ describe package('App::Ack') do
100
+ it { should be_installed.by('cpan').with_version('2.04') }
101
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
102
+ end
@@ -73,6 +73,11 @@ describe package('mongo') do
73
73
  it { should_not be_installed.by('pecl').with_version('invalid-version') }
74
74
  end
75
75
 
76
+ describe package('XML_Util') do
77
+ it { should be_installed.by('pear').with_version('1.2.1') }
78
+ its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
79
+ end
80
+
76
81
  describe package('supervisor') do
77
82
  it { should be_installed.by('pip').with_version('3.0') }
78
83
  its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
@@ -81,3 +86,13 @@ end
81
86
  describe package('invalid-pip') do
82
87
  it { should_not be_installed.by('pip').with_version('invalid-version') }
83
88
  end
89
+
90
+ describe package('App::Ack') do
91
+ it { should be_installed.by('cpan') }
92
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
93
+ end
94
+
95
+ describe package('App::Ack') do
96
+ it { should be_installed.by('cpan').with_version('2.04') }
97
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
98
+ end
@@ -68,6 +68,11 @@ describe package('mongo') do
68
68
  it { should_not be_installed.by('pecl').with_version('invalid-version') }
69
69
  end
70
70
 
71
+ describe package('XML_Util') do
72
+ it { should be_installed.by('pear').with_version('1.2.1') }
73
+ its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
74
+ end
75
+
71
76
  describe package('supervisor') do
72
77
  it { should be_installed.by('pip').with_version('3.0') }
73
78
  its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
@@ -76,3 +81,13 @@ end
76
81
  describe package('invalid-pip') do
77
82
  it { should_not be_installed.by('pip').with_version('invalid-version') }
78
83
  end
84
+
85
+ describe package('App::Ack') do
86
+ it { should be_installed.by('cpan') }
87
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
88
+ end
89
+
90
+ describe package('App::Ack') do
91
+ it { should be_installed.by('cpan').with_version('2.04') }
92
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
93
+ end
@@ -86,6 +86,11 @@ describe package('mongo') do
86
86
  it { should_not be_installed.by('pecl').with_version('invalid-version') }
87
87
  end
88
88
 
89
+ describe package('XML_Util') do
90
+ it { should be_installed.by('pear').with_version('1.2.1') }
91
+ its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
92
+ end
93
+
89
94
  describe package('supervisor') do
90
95
  it { should be_installed.by('pip').with_version('3.0') }
91
96
  its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
@@ -94,3 +99,13 @@ end
94
99
  describe package('invalid-pip') do
95
100
  it { should_not be_installed.by('pip').with_version('invalid-version') }
96
101
  end
102
+
103
+ describe package('App::Ack') do
104
+ it { should be_installed.by('cpan') }
105
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
106
+ end
107
+
108
+ describe package('App::Ack') do
109
+ it { should be_installed.by('cpan').with_version('2.04') }
110
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
111
+ end
@@ -75,6 +75,11 @@ describe package('mongo') do
75
75
  it { should_not be_installed.by('pecl').with_version('invalid-version') }
76
76
  end
77
77
 
78
+ describe package('XML_Util') do
79
+ it { should be_installed.by('pear').with_version('1.2.1') }
80
+ its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
81
+ end
82
+
78
83
  describe package('supervisor') do
79
84
  it { should be_installed.by('pip').with_version('3.0') }
80
85
  its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
@@ -83,3 +88,13 @@ end
83
88
  describe package('invalid-pip') do
84
89
  it { should_not be_installed.by('pip').with_version('invalid-version') }
85
90
  end
91
+
92
+ describe package('App::Ack') do
93
+ it { should be_installed.by('cpan') }
94
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
95
+ end
96
+
97
+ describe package('App::Ack') do
98
+ it { should be_installed.by('cpan').with_version('2.04') }
99
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
100
+ end
@@ -77,6 +77,11 @@ describe package('mongo') do
77
77
  it { should_not be_installed.by('pecl').with_version('invalid-version') }
78
78
  end
79
79
 
80
+ describe package('XML_Util') do
81
+ it { should be_installed.by('pear').with_version('1.2.1') }
82
+ its(:command) { should eq "pear list | grep -w -- \\^XML_Util | grep -w -- 1.2.1" }
83
+ end
84
+
80
85
  describe package('supervisor') do
81
86
  it { should be_installed.by('pip').with_version('3.0') }
82
87
  its(:command) { should eq "pip list | grep -w -- \\^supervisor | grep -w -- 3.0" }
@@ -85,3 +90,13 @@ end
85
90
  describe package('invalid-pip') do
86
91
  it { should_not be_installed.by('pip').with_version('invalid-version') }
87
92
  end
93
+
94
+ describe package('App::Ack') do
95
+ it { should be_installed.by('cpan') }
96
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack" }
97
+ end
98
+
99
+ describe package('App::Ack') do
100
+ it { should be_installed.by('cpan').with_version('2.04') }
101
+ its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
102
+ end
data/spec/spec_helper.rb CHANGED
@@ -2,9 +2,6 @@ require 'serverspec'
2
2
  require 'pathname'
3
3
  require 'rspec/mocks/standalone'
4
4
 
5
- require 'coveralls'
6
- Coveralls.wear!
7
-
8
5
  include Serverspec::Helper::Exec
9
6
  include Serverspec::Helper::DetectOS
10
7
 
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: 0.9.6
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-25 00:00:00.000000000 Z
11
+ date: 2013-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh