Class: Serverspec::Type::User

Inherits:
Base
  • Object
show all
Defined in:
lib/serverspec/type/user.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #to_ary, #to_s

Constructor Details

This class inherits a constructor from Serverspec::Type::Base

Instance Method Details

#belongs_to_group?(group) ⇒ Boolean

Returns:

  • (Boolean)

8
9
10
# File 'lib/serverspec/type/user.rb', line 8

def belongs_to_group?(group)
  backend.check_belonging_group(@name, group)
end

#exists?Boolean

Returns:

  • (Boolean)

4
5
6
# File 'lib/serverspec/type/user.rb', line 4

def exists?
  backend.check_user(@name)
end

#has_authorized_key?(key) ⇒ Boolean

Returns:

  • (Boolean)

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

def has_authorized_key?(key)
  backend.check_authorized_key(@name, key)
end

#has_home_directory?(path) ⇒ Boolean

Returns:

  • (Boolean)

16
17
18
# File 'lib/serverspec/type/user.rb', line 16

def has_home_directory?(path)
  backend.check_home_directory(@name, path)
end

#has_login_shell?(shell) ⇒ Boolean

Returns:

  • (Boolean)

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

def (shell)
  backend.(@name, shell)
end

#has_uid?(uid) ⇒ Boolean

Returns:

  • (Boolean)

12
13
14
# File 'lib/serverspec/type/user.rb', line 12

def has_uid?(uid)
  backend.check_uid(@name, uid)
end