serverspec 0.13.4 → 0.13.5

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: 8cfe0b0f03cef8a61058d7b48a53da4cbf55a3f7
4
- data.tar.gz: 8d9d8657762f5fb4a92cdd50b74a1941adeb7c0f
3
+ metadata.gz: 38fe820736c3d3acae8f75fa1cabddb397b278bb
4
+ data.tar.gz: ca918843932de8e2364444c061f026f164d93c01
5
5
  SHA512:
6
- metadata.gz: 54d90b1c111146d960149565d1db9e193a14b7fdc20393e28e608f023480d5a889006fbf63c437864a13e8a335367c46e0d267ccf3d8beb02c7ac27db85d8280
7
- data.tar.gz: 46ac7b5a8ea0b1d9c53883b6f5841b786073588d2ee576093612afd81875be43052ce80e8874178ffe08a9e9882cfd4c98cd51b9d56da357c1dfba9343164568
6
+ metadata.gz: ae52d933b5a378722ee36ad8c3712476392a55db75d0455c741d7149ff867f307d20e05fe05fba3f7bff3a5bc58fca9e1e6e969fac529dcfca290dff17f48ba3
7
+ data.tar.gz: c91ff7550585936cd61873e251ad7b2c6acb97df47a299716cea9831bae023273312e6238b8770d946f92ff69708021fe38841b88813e5863a42984bf188ef7e
@@ -20,7 +20,14 @@ module Serverspec
20
20
  if ret.empty?
21
21
  nil
22
22
  else
23
- ret
23
+ Version.new(ret)
24
+ end
25
+ end
26
+
27
+ class Version < Gem::Version
28
+ def <=>(other)
29
+ other = Gem::Version.new(other) if other.is_a?(String)
30
+ super(other)
24
31
  end
25
32
  end
26
33
  end
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "0.13.4"
2
+ VERSION = "0.13.5"
3
3
  end
@@ -98,3 +98,11 @@ describe package('App::Ack') do
98
98
  it { should be_installed.by('cpan').with_version('2.04') }
99
99
  its(:command) { should eq "cpan -l | grep -w -- \\^App::Ack | grep -w -- 2.04" }
100
100
  end
101
+
102
+ describe package('httpd') do
103
+ let(:stdout) { "2.2.15\n" }
104
+ its(:version) { should eq '2.2.15' }
105
+ its(:version) { should > '2.2.14' }
106
+ its(:version) { should < '2.2.16' }
107
+ its(:command) { should eq "dpkg-query -f '${Status} ${Version}' -W httpd | sed -n 's/^install ok installed //p'" }
108
+ end
@@ -111,5 +111,7 @@ end
111
111
  describe package('httpd') do
112
112
  let(:stdout) { "2.2.15\n" }
113
113
  its(:version) { should eq '2.2.15' }
114
+ its(:version) { should > '2.2.14' }
115
+ its(:version) { should < '2.2.16' }
114
116
  its(:command) { should eq "rpm -qi httpd | grep Version | awk '{print $3}'" }
115
117
  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: 0.13.4
4
+ version: 0.13.5
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-12-16 00:00:00.000000000 Z
11
+ date: 2013-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh