serverspec 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serverspec.rb +2 -0
- data/lib/serverspec/power_assert.rb +14 -0
- data/lib/serverspec/type/base.rb +7 -1
- data/lib/serverspec/type/file.rb +2 -6
- data/lib/serverspec/type/package.rb +2 -1
- data/lib/serverspec/version.rb +1 -1
- data/serverspec.gemspec +1 -1
- data/spec/type/linux/file_spec.rb +1 -2
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f6d7aa27e722dbebd2e7c9052d267f2a790b4bc
|
4
|
+
data.tar.gz: c5dce829ed3872a406673ab8872c4dc6811374aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d45ded0ebc80ae93284eba93a1b1c47b37234aaa375312c0bc266f84afcad3a081a5551b4b5da95793f7b0985397299bbe1792730e238ecd0e927e0f337fe9cd
|
7
|
+
data.tar.gz: 798478850c32be2528c8bf14b7040f5d0c4869056241b06aa4f887bff4064ddfabf38d919cb8e862467b02afd65eaa2d5539fbe73df7d98d9a0e4b157d8babcc
|
data/lib/serverspec.rb
CHANGED
@@ -9,6 +9,8 @@ require 'serverspec/setup'
|
|
9
9
|
require 'serverspec/subject'
|
10
10
|
require 'serverspec/commands/base'
|
11
11
|
require 'rspec/core/formatters/base_formatter'
|
12
|
+
require 'specinfra/helper/set'
|
13
|
+
include Specinfra::Helper::Set
|
12
14
|
|
13
15
|
module RSpec::Core::Notifications
|
14
16
|
class FailedExampleNotification < ExampleNotification
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'specinfra'
|
3
|
+
|
4
|
+
require 'serverspec/helper/type'
|
5
|
+
|
6
|
+
PowerAssert.configure do |c|
|
7
|
+
c.lazy_inspection = true
|
8
|
+
end
|
9
|
+
|
10
|
+
class Serverspec::TestCase < Test::Unit::TestCase
|
11
|
+
extend Serverspec::Helper::Type
|
12
|
+
include Serverspec::Helper::Type
|
13
|
+
end
|
14
|
+
|
data/lib/serverspec/type/base.rb
CHANGED
data/lib/serverspec/type/file.rb
CHANGED
@@ -5,6 +5,8 @@ module Serverspec::Type
|
|
5
5
|
attr_accessor :content
|
6
6
|
|
7
7
|
def file?
|
8
|
+
cmd = Specinfra.command.get(:check_file_is_file, @name)
|
9
|
+
@inspection = Specinfra.backend.build_command(cmd)
|
8
10
|
@runner.check_file_is_file(@name)
|
9
11
|
end
|
10
12
|
|
@@ -105,9 +107,3 @@ module Serverspec::Type
|
|
105
107
|
end
|
106
108
|
end
|
107
109
|
end
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
@@ -1,7 +1,8 @@
|
|
1
1
|
module Serverspec::Type
|
2
2
|
class Package < Base
|
3
|
-
def installed?(provider, version)
|
3
|
+
def installed?(provider=nil, version=nil)
|
4
4
|
if provider.nil?
|
5
|
+
@inspection = Specinfra.command.get(:check_package_is_installed, @name, version)
|
5
6
|
@runner.check_package_is_installed(@name, version)
|
6
7
|
else
|
7
8
|
check_method = "check_package_is_installed_by_#{provider}".to_sym
|
data/lib/serverspec/version.rb
CHANGED
data/serverspec.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_runtime_dependency "rspec", "~> 3.0"
|
22
22
|
spec.add_runtime_dependency "rspec-its"
|
23
|
-
spec.add_runtime_dependency "specinfra", "~> 2.
|
23
|
+
spec.add_runtime_dependency "specinfra", "~> 2.3"
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.3"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.1.1"
|
26
26
|
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.
|
4
|
+
version: 2.2.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: 2014-10-
|
11
|
+
date: 2014-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '2.
|
47
|
+
version: '2.3'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '2.
|
54
|
+
version: '2.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,6 +121,7 @@ files:
|
|
121
121
|
- lib/serverspec/matcher/have_site_application.rb
|
122
122
|
- lib/serverspec/matcher/have_site_bindings.rb
|
123
123
|
- lib/serverspec/matcher/have_virtual_dir.rb
|
124
|
+
- lib/serverspec/power_assert.rb
|
124
125
|
- lib/serverspec/setup.rb
|
125
126
|
- lib/serverspec/subject.rb
|
126
127
|
- lib/serverspec/type/base.rb
|