serverspec 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,9 @@ module Serverspec
|
|
2
2
|
module Helper
|
3
3
|
module Exec
|
4
4
|
def backend(commands_object=nil)
|
5
|
+
if commands_object.nil? && ! respond_to?(:commands)
|
6
|
+
commands_object = Serverspec::Commands::Base.new
|
7
|
+
end
|
5
8
|
instance = Serverspec::Backend::Exec.instance
|
6
9
|
instance.set_commands(commands_object || commands)
|
7
10
|
instance
|
@@ -2,6 +2,9 @@ module Serverspec
|
|
2
2
|
module Helper
|
3
3
|
module Ssh
|
4
4
|
def backend(commands_object=nil)
|
5
|
+
if ! respond_to?(:commands)
|
6
|
+
commands_object = Serverspec::Commands::Base.new
|
7
|
+
end
|
5
8
|
instance = Serverspec::Backend::Ssh.instance
|
6
9
|
instance.set_commands(commands_object || commands)
|
7
10
|
instance
|
data/lib/serverspec/setup.rb
CHANGED
@@ -124,7 +124,6 @@ EOF
|
|
124
124
|
user = options[:user] || Etc.getlogin
|
125
125
|
### include vagrant conf ###
|
126
126
|
c.ssh = Net::SSH.start(c.host, user, options)
|
127
|
-
c.os = backend.check_os
|
128
127
|
end
|
129
128
|
end")
|
130
129
|
if @vagrant
|
@@ -149,7 +148,6 @@ EOF
|
|
149
148
|
end
|
150
149
|
when 'Exec'
|
151
150
|
content.gsub!(/### include backend conf ###/, "c.before :all do
|
152
|
-
c.os = backend.check_os
|
153
151
|
end")
|
154
152
|
when 'Puppet'
|
155
153
|
content.gsub!(/### include requirements ###/, "require 'puppet'\nrequire 'serverspec/backend/puppet'
|
data/lib/serverspec/version.rb
CHANGED