Sha256: 6234c1bbb2b84567908a4d8b8f608064e22db2051fe102118b4717c452ebb44e

Contents?: true

Size: 965 Bytes

Versions: 12

Compression:

Stored size: 965 Bytes

Contents

module Serverspec::Type
  class User < Base
    def exists?
      @runner.check_user_exists(@name)
    end

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

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

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

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

    def has_login_shell?(shell)
      @runner.check_user_has_login_shell(@name, shell)
    end

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

    def minimum_days_between_password_change
      @runner.get_user_minimum_days_between_password_change(@name).stdout.to_i
    end

    def maximum_days_between_password_change
      @runner.get_user_maximum_days_between_password_change(@name).stdout.to_i
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
serverspec-2.23.1 lib/serverspec/type/user.rb
serverspec-2.23.0 lib/serverspec/type/user.rb
serverspec-2.22.0 lib/serverspec/type/user.rb
serverspec-2.21.1 lib/serverspec/type/user.rb
serverspec-2.21.0 lib/serverspec/type/user.rb
serverspec-2.20.0 lib/serverspec/type/user.rb
serverspec-2.19.0 lib/serverspec/type/user.rb
serverspec-2.18.0 lib/serverspec/type/user.rb
serverspec-2.17.1 lib/serverspec/type/user.rb
serverspec-2.17.0 lib/serverspec/type/user.rb
serverspec-2.16.0 lib/serverspec/type/user.rb
serverspec-2.15.0 lib/serverspec/type/user.rb