Class: User

Inherits:
Object show all
Includes:
DataMapper::Resource
Defined in:
lib/fabric/user.rb

Instance Method Summary collapse

Instance Method Details

#authorized_keys_fileObject



13
14
15
16
17
18
# File 'lib/fabric/user.rb', line 13

def authorized_keys_file  
  authorized_keys = self.keys.collect(&:public_key).join
      
  raise "User #{self.name} has a blank SSH key - this is not permitted" if authorized_keys.blank?
  authorized_keys  
end

#authorized_keys_file_pathObject



20
21
22
# File 'lib/fabric/user.rb', line 20

def authorized_keys_file_path
  "/home/#{self.name}/.ssh/authorized_keys"
end

#home_directory_pathObject



24
25
26
# File 'lib/fabric/user.rb', line 24

def home_directory_path
  "/home/#{self.name}/"
end

#ssh_config_directory_pathObject



28
29
30
# File 'lib/fabric/user.rb', line 28

def ssh_config_directory_path
  "/home/#{self.name}/.ssh/"
end