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)


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

def belongs_to_group?(group)
  @runner.check_user_belongs_to_group(@name, group)
end

#belongs_to_primary_group?(group) ⇒ Boolean

Returns:

  • (Boolean)


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

def belongs_to_primary_group?(group)
  @runner.check_user_belongs_to_primary_group(@name, group)
end

#exists?Boolean

Returns:

  • (Boolean)


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

def exists?
  @runner.check_user_exists(@name)
end

#has_authorized_key?(key) ⇒ Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/serverspec/type/user.rb', line 27

def has_authorized_key?(key)
  @runner.check_user_has_authorized_key(@name, key)
end

#has_home_directory?(path) ⇒ Boolean

Returns:

  • (Boolean)


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

def has_home_directory?(path)
  @runner.check_user_has_home_directory(@name, path)
end

#has_login_shell?(shell) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#has_uid?(uid) ⇒ Boolean

Returns:

  • (Boolean)


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

def has_uid?(uid)
  @runner.check_user_has_uid(@name, uid)
end