lib/serverspec/setup.rb in serverspec-0.2.7 vs lib/serverspec/setup.rb in serverspec-0.2.8

- old
+ new

@@ -26,24 +26,24 @@ prompt = <<-EOF Select OS type of target host: - 1) Red Hat - 2) Debian - 3) Gentoo - 4) Solaris - 5) None + 1) Auto Detect + 2) Red Hat + 3) Debian + 4) Gentoo + 5) Solaris Select number: EOF print prompt.chop num = gets.to_i - 1 puts - @os_type = [ 'RedHat', 'Debian', 'Gentoo', 'Solaris', nil ][num] + @os_type = [ 'DetectOS', 'RedHat', 'Debian', 'Gentoo', 'Solaris' ][num] [ 'spec', "spec/#{@hostname}" ].each { |dir| safe_mkdir(dir) } safe_create_spec safe_create_spec_helper safe_create_rakefile @@ -119,12 +119,12 @@ c.ssh.close if c.ssh c.host = host options = Net::SSH::Config.for(c.host) user = options[:user] || Etc.getlogin c.ssh = Net::SSH.start(c.host, user, options) + c.os = backend(Serverspec::Commands::Base).check_os end - end -") + end") when 'Puppet' content.gsub!(/### include requirements ###/, "require 'puppet'\nrequire 'serverspec/backend/puppet' ") end end