serverspec 2.36.1 → 2.37.0

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: a293a1d69fe4accf6d9e711d2cf87eea5fd71884
4
- data.tar.gz: 63abf7e1a41a7cb12aed1979c322bd0d1458e44f
3
+ metadata.gz: 3f1ce6d6e253f27744b26498c6730c6818915977
4
+ data.tar.gz: 1db713dd0164ec846d710541aa2605117a739fc5
5
5
  SHA512:
6
- metadata.gz: 561a5a3a9761cd871fcee288043dfb35407189becaeb555397d55a6e159b4db1c1cde655f7f0a4440c3af75429897c1e253f16cdfd6e18593bbb71de2a24c3c6
7
- data.tar.gz: 9e458574b493b93a411dbcac6662e9899744abf749e2c20f032a50e83bcd9acb4c64cb0f76c5bc00f28016f44e47d9abb7fb7837becabbee43aa65ae57bfb63d
6
+ metadata.gz: 86ba56aa545954465f66902d8c01be6e25d5e5973eeec176dcff19fce163e8ebce480a7026498af17e51f30dc9e20b4e5ba8495565ec5621e4767c982abdcd5c
7
+ data.tar.gz: 7d15c7f8283faac26c35bea52eddb4857eb989e8b3a51811294f54746b1657306f730202fc1fe156e14222ec8f36ed517df668e2de39d800358ec329e0b66ca8
data/appveyor.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  version: "{build}"
2
+ image: Previous Visual Studio 2015
2
3
 
3
- os: Windows Server 2012
4
4
  platform:
5
5
  - x64
6
6
 
@@ -43,6 +43,7 @@ install:
43
43
  - gem --version
44
44
  - appveyor DownloadFile -Url %bundler_url% -FileName bundler.gem
45
45
  - gem install --local bundler.gem --no-ri --no-rdoc ## appveyor often stops `gem install bundler`..?
46
+ - ps: $PSVersionTable
46
47
 
47
48
  build_script:
48
49
  - ruby -rfileutils -e 'FileUtils.rm_r(File.join(Gem.dir, "cache", "bundler")) if Dir.exists?(File.join(Gem.dir, "cache", "bundler"))'
@@ -9,6 +9,7 @@ RSpec::Matchers.define :be_enabled do
9
9
 
10
10
  description do
11
11
  message = 'be enabled'
12
+ message << " under #{@under}" if @under
12
13
  message << " with level #{@level}" if @level
13
14
  message
14
15
  end
@@ -16,4 +17,8 @@ RSpec::Matchers.define :be_enabled do
16
17
  chain :with_level do |level|
17
18
  @level = level
18
19
  end
20
+
21
+ chain :under do |under|
22
+ @under = under
23
+ end
19
24
  end
@@ -1,10 +1,12 @@
1
1
  module Serverspec::Type
2
2
  class Service < Base
3
- def enabled?(level)
3
+ def enabled?(level, under = nil)
4
+ check_method = "check_service_is_enabled" + (under ? "_#{under}" : '')
5
+
4
6
  if level
5
- @runner.check_service_is_enabled(@name, level)
7
+ @runner.send(check_method.to_sym, @name, level)
6
8
  else
7
- @runner.check_service_is_enabled(@name)
9
+ @runner.send(check_method.to_sym, @name)
8
10
  end
9
11
  end
10
12
 
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "2.36.1"
2
+ VERSION = "2.37.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: 2.36.1
4
+ version: 2.37.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: 2016-08-31 00:00:00.000000000 Z
11
+ date: 2016-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec