serverspec 0.9.8 → 0.10.0

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: e70443b28a5c968d0d7814879410cdb4850b7fac
4
- data.tar.gz: 6cd2eb9bd900bf0f507db7f2962daf95fb58a54c
3
+ metadata.gz: 4151c1dd14ac7c8a41825e4b8659d98a3426ff94
4
+ data.tar.gz: 3d105167edd74f57dc71e321eee26b3d2fbd67fb
5
5
  SHA512:
6
- metadata.gz: f41872a5029629142de6bec1a7d894b5e1fbd67fde913460e6143f0a32d10d38c26663309fc7349aa7a50645e701f6963e5abbe98a5d71016c7589b862e69b13
7
- data.tar.gz: 2573a39e198b873fa67d09150228515b504312c719d931a0038676a077a94161f3efabcc7c8a834f926774174c5d6c9c6dcd5d56e6a86668b98c61dfbcfa066c
6
+ metadata.gz: ad0007d48da6d56116f418b20fbdca90ea825a374646da93e839cfa29a904f5632473ff55f1e5a5390fb40fb96b53ba2677353a273d10b099b1f59140a9f5c43
7
+ data.tar.gz: ae7fd0c2aca5b57ffd61917f820b93973634afc1632c4aee6538987b7188fa68c8616e0da9fd61febe6554233553e75620241210444d0074035e9165c50b06f0
@@ -41,9 +41,17 @@ module Serverspec
41
41
 
42
42
  def check_running(process)
43
43
  ret = run_command(commands.check_running(process))
44
- if ret[:exit_status] == 1 || ret[:stdout] =~ /stopped/
44
+
45
+ # In Ubuntu, some services are under upstart and "service foo status" returns
46
+ # exit status 0 even though they are stopped.
47
+ # So return false if stdout contains "stopped/waiting".
48
+ return false if ret[:stdout] =~ /stopped\/waiting/
49
+
50
+ # If the service is not registered, check by ps command
51
+ if ret[:exit_status] == 1
45
52
  ret = run_command(commands.check_process(process))
46
53
  end
54
+
47
55
  ret[:exit_status] == 0
48
56
  end
49
57
 
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "0.9.8"
2
+ VERSION = "0.10.0"
3
3
  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.9.8
4
+ version: 0.10.0
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-10-08 00:00:00.000000000 Z
11
+ date: 2013-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh