serverspec 2.0.0.beta1 → 2.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -9
- data/lib/serverspec/commands/base.rb +1 -1
- data/lib/serverspec/helper/backend.rb +1 -1
- data/lib/serverspec/helper/os.rb +1 -1
- data/lib/serverspec/helper/properties.rb +1 -1
- data/lib/serverspec/setup.rb +3 -3
- data/lib/serverspec/version.rb +1 -1
- data/serverspec.gemspec +1 -1
- data/spec/spec_helper.rb +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 465a1c6497f6fcbfbd8aca4dc535bbf3890c19c5
|
4
|
+
data.tar.gz: 70ee36b9d8c6c1480eb3fcf52ed6a088fee2b653
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6a57a9ad0210c1d1b727455d01b9505c5d1ca94679e6bffce72b8061fc55ab1d4e068ff2eefec46e7c8f3d1d59074ec66ca932b9e1f7e7422da26410a93b88a
|
7
|
+
data.tar.gz: a2454dc1bed38660a0ac84812383b83586e9accd1572260cc31bac85cbdd415ed0d3a2bc867a37b1f5c91dbe23bd6b105ff7e45ebb9a9a2066134292c50eeb1e
|
data/README.md
CHANGED
@@ -101,7 +101,7 @@ Serverspec supports Darwin based OS, Red Hat based OS, Debian based OS, Gentoo,
|
|
101
101
|
|
102
102
|
Serverspec can detect target host's OS automatically.
|
103
103
|
|
104
|
-
If you'd like to set target host's OS explicitly, you should include `
|
104
|
+
If you'd like to set target host's OS explicitly, you should include `Specinfra::Helper::OSName` in `spec/spec_helper.rb` like this.
|
105
105
|
|
106
106
|
|
107
107
|
```ruby
|
@@ -109,8 +109,8 @@ require 'serverspec'
|
|
109
109
|
require 'pathname'
|
110
110
|
require 'net/ssh'
|
111
111
|
|
112
|
-
include
|
113
|
-
include
|
112
|
+
include Specinfra::Helper::Ssh
|
113
|
+
include Specinfra::Helper::Debian
|
114
114
|
|
115
115
|
RSpec.configure do |c|
|
116
116
|
# Add SSH before hook in case you use the SSH backend
|
@@ -130,12 +130,12 @@ end
|
|
130
130
|
|
131
131
|
You can select from:
|
132
132
|
|
133
|
-
*
|
134
|
-
*
|
135
|
-
*
|
136
|
-
*
|
137
|
-
*
|
138
|
-
*
|
133
|
+
* Specinfra::Helper::RedHat
|
134
|
+
* Specinfra::Helper::Debian
|
135
|
+
* Specinfra::Helper::Gentoo
|
136
|
+
* Specinfra::Helper::Solaris
|
137
|
+
* Specinfra::Helper::Darwin
|
138
|
+
* Specinfra::Helper::Arch
|
139
139
|
|
140
140
|
## Vagrant support
|
141
141
|
|
@@ -3,7 +3,7 @@ module Serverspec
|
|
3
3
|
['Exec', 'Ssh', 'Cmd', 'WinRM'].each do |backend|
|
4
4
|
eval <<-EOF
|
5
5
|
module #{backend}
|
6
|
-
include self.class.const_get('
|
6
|
+
include self.class.const_get('Specinfra').const_get('Helper').const_get('#{backend}')
|
7
7
|
end
|
8
8
|
EOF
|
9
9
|
end
|
data/lib/serverspec/helper/os.rb
CHANGED
data/lib/serverspec/setup.rb
CHANGED
@@ -226,11 +226,11 @@ require 'net/ssh'
|
|
226
226
|
require 'winrm'
|
227
227
|
<% end -%>
|
228
228
|
|
229
|
-
include
|
229
|
+
include Specinfra::Helper::<%= @backend_type %>
|
230
230
|
<% if @os_type == 'UN*X' -%>
|
231
|
-
include
|
231
|
+
include Specinfra::Helper::DetectOS
|
232
232
|
<% else -%>
|
233
|
-
include
|
233
|
+
include Specinfra::Helper::Windows
|
234
234
|
<% end -%>
|
235
235
|
|
236
236
|
<% if @os_type == 'UN*X' -%>
|
data/lib/serverspec/version.rb
CHANGED
data/serverspec.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_runtime_dependency "net-ssh"
|
22
22
|
spec.add_runtime_dependency "rspec", "~> 2.13"
|
23
23
|
spec.add_runtime_dependency "highline"
|
24
|
-
spec.add_runtime_dependency "specinfra", "~> 2.0.0.
|
24
|
+
spec.add_runtime_dependency "specinfra", "~> 2.0.0.beta2"
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.3"
|
26
26
|
spec.add_development_dependency "rake", "~> 10.1.1"
|
27
27
|
spec.add_development_dependency "octokit", "~> 2.7.2"
|
data/spec/spec_helper.rb
CHANGED
@@ -2,14 +2,14 @@ require 'serverspec'
|
|
2
2
|
require 'pathname'
|
3
3
|
require 'rspec/mocks/standalone'
|
4
4
|
|
5
|
-
include
|
5
|
+
include Specinfra::Helper::Exec
|
6
6
|
|
7
7
|
PROJECT_ROOT = (Pathname.new(File.dirname(__FILE__)) + '..').expand_path
|
8
8
|
|
9
9
|
Dir[PROJECT_ROOT.join("spec/support/**/*.rb")].each { |file| require(file) }
|
10
10
|
|
11
11
|
|
12
|
-
module
|
12
|
+
module Specinfra
|
13
13
|
module Backend
|
14
14
|
module TestCommandRunner
|
15
15
|
def do_run cmd
|
@@ -18,8 +18,8 @@ module SpecInfra
|
|
18
18
|
end
|
19
19
|
|
20
20
|
CommandResult.new({
|
21
|
-
:stdout => ::
|
22
|
-
:stderr => ::
|
21
|
+
:stdout => ::Specinfra.configuration.stdout,
|
22
|
+
:stderr => ::Specinfra.configuration.stderr,
|
23
23
|
:exit_status => cmd =~ /invalid/ ? 1 : 0,
|
24
24
|
:exit_signal => nil,
|
25
25
|
})
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.0.0.
|
61
|
+
version: 2.0.0.beta2
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 2.0.0.
|
68
|
+
version: 2.0.0.beta2
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|