serverspec 2.23.0 → 2.23.1

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: 705b4d622f116fbfed3b96df2f953bc6ee30a6bd
4
- data.tar.gz: 2256ecca97ef36a6f2a3d66e991cfcb88cc56dd0
3
+ metadata.gz: ba3ecfb90a2f60059e60a15f37d203ccc1c7fbfc
4
+ data.tar.gz: 459c61b6332695ea2682b48984fc04d4d21acf3e
5
5
  SHA512:
6
- metadata.gz: 2a835bf90047183d9856594134f4bb78afc6c84c3f5916fcb53e487cc4e237645d285161c0b0b7d1af9d1daf7fb69b3d37dd15c3695588fac181eff3a6264a43
7
- data.tar.gz: 8d905cfe1827b3cf0b1901efbe0001b38ae1b758e11f2910f801b2a5a5b91f82bd8daed0b9ee2a0c6db9fcf80af23bdf8a2c7ee4a63f65f8bd550b9ca63cc61c
6
+ metadata.gz: 6bb96ac5352cad40d8c95abb1cfc7fd48784a6abcb62bf1dd75ee3960ef99a7fb483f1486a253fcb8014bd5ca8ccc6851287daadeb128ad54398e50ca7472716
7
+ data.tar.gz: f316a743bcaeac8d47919d1effcdba4014ce31697f2d912f67e56039d2ac2e23344e997db47ec66983e3e24ddc85cec9b231075dae2f13e9d319f2c8992d93d4
@@ -1,7 +1,7 @@
1
1
  module Serverspec::Type
2
2
  class DockerContainer < DockerBase
3
3
  def running?
4
- inspection['State']['Running']
4
+ inspection['State']['Running'] && !inspection['State']['Restarting']
5
5
  end
6
6
 
7
7
  def has_volume?(container_path, host_path)
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "2.23.0"
2
+ VERSION = "2.23.1"
3
3
  end
data/serverspec.gemspec CHANGED
@@ -23,5 +23,6 @@ Gem::Specification.new do |spec|
23
23
  spec.add_runtime_dependency "multi_json"
24
24
  spec.add_runtime_dependency "specinfra", "~> 2.43"
25
25
  spec.add_development_dependency "bundler", "~> 1.3"
26
+ spec.add_development_dependency("json", "~> 1.8") if RUBY_VERSION < "1.9"
26
27
  spec.add_development_dependency "rake", "~> 10.1.1"
27
28
  end
@@ -1,5 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  require 'spec_helper'
3
+ require 'json'
3
4
 
4
5
  property[:os] = nil
5
6
  set :os, {:family => 'linux'}
@@ -16,6 +17,16 @@ describe docker_container('c1') do
16
17
  its(['Config.Cmd']) { should include '/bin/sh' }
17
18
  end
18
19
 
20
+ describe docker_container('restarting') do
21
+ let(:stdout) do
22
+ attrs = JSON.parse(inspect_container)
23
+ attrs.first['State']['Restarting'] = true
24
+ attrs.to_json
25
+ end
26
+
27
+ it { should_not be_running }
28
+ end
29
+
19
30
  def inspect_container
20
31
  <<'EOS'
21
32
  [{
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.23.0
4
+ version: 2.23.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: 2015-08-29 00:00:00.000000000 Z
11
+ date: 2015-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -446,3 +446,4 @@ test_files:
446
446
  - spec/type/windows/scheduled_task_spec.rb
447
447
  - spec/type/windows/service_spec.rb
448
448
  - spec/type/windows/user_spec.rb
449
+ has_rdoc: