def self.run
ask_os_type
if @os_type == 'UN*X'
ask_unix_backend
else
ask_windows_backend
end
if @backend_type == 'Ssh'
print 'Vagrant instance y/n: '
@vagrant = $stdin.gets.chomp
if @vagrant =~ (/(true|t|yes|y|1)$/i)
@vagrant = true
print 'Auto-configure Vagrant from Vagrantfile? y/n: '
auto_config = $stdin.gets.chomp
if auto_config =~ (/(true|t|yes|y|1)$/i)
auto_vagrant_configuration
else
print("Input vagrant instance name: ")
@hostname = $stdin.gets.chomp
end
else
@vagrant = false
print("Input target host name: ")
@hostname = $stdin.gets.chomp
end
else
@hostname = 'localhost'
end
['spec', "spec/#{@hostname}"].each { |dir| safe_mkdir(dir) }
safe_create_spec
safe_create_spec_helper
safe_create_rakefile
end