Use strip instead of chomp

This commit is contained in:
Seth Vargo 2016-06-16 15:32:11 -04:00
parent 23b34bb6c0
commit add40534de
No known key found for this signature in database
GPG Key ID: 905A90C2949E8787
3 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ module VagrantPlugins
class InsertPublicKey
def self.insert_public_key(machine, contents)
comm = machine.communicate
contents = contents.chomp
contents = contents.strip << "\n"
remote_path = "/tmp/vagrant-authorized-keys-#{Time.now.to_i}"
Tempfile.open("vagrant-darwin-insert-public-key") do |f|

View File

@ -6,7 +6,7 @@ module VagrantPlugins
class InsertPublicKey
def self.insert_public_key(machine, contents)
comm = machine.communicate
contents = contents.chomp
contents = contents.strip << "\n"
remote_path = "/tmp/vagrant-authorized-keys-#{Time.now.to_i}"
Tempfile.open("vagrant-freebsd-insert-public-key") do |f|

View File

@ -4,7 +4,7 @@ module VagrantPlugins
class InsertPublicKey
def self.insert_public_key(machine, contents)
comm = machine.communicate
contents = contents.chomp << "\n"
contents = contents.strip << "\n"
remote_path = "/tmp/vagrant-authorized-keys-#{Time.now.to_i}"
Tempfile.open("vagrant-linux-insert-public-key") do |f|