Sha256: 9dfbe703dc5930b3b91d721ff09ceb48291ea1ddb3d4a373bac23950e4f2de0c

Contents?: true

Size: 464 Bytes

Versions: 849

Compression:

Stored size: 464 Bytes

Contents

class UserAttr
  def self.get_attributes_by_name(name)
    attributes = nil

    File.readlines('/etc/user_attr').each do |line|
      next if line =~ /^#/

      token = line.split(':')

      if token[0] == name
        attributes = {:name => name}
        token[4].split(';').each do |attr|
          key_value = attr.split('=')
          attributes[key_value[0].intern] = key_value[1].strip
        end
        break
      end
    end
    attributes
  end
end

Version data entries

849 entries across 849 versions & 6 rubygems

Version Path
puppet-7.34.0 lib/puppet/util/user_attr.rb
puppet-7.34.0-x86-mingw32 lib/puppet/util/user_attr.rb
puppet-7.34.0-x64-mingw32 lib/puppet/util/user_attr.rb
puppet-7.34.0-universal-darwin lib/puppet/util/user_attr.rb
puppet-7.33.0 lib/puppet/util/user_attr.rb
puppet-7.33.0-x86-mingw32 lib/puppet/util/user_attr.rb
puppet-7.33.0-x64-mingw32 lib/puppet/util/user_attr.rb
puppet-7.33.0-universal-darwin lib/puppet/util/user_attr.rb
puppet-7.32.1 lib/puppet/util/user_attr.rb
puppet-7.32.1-x86-mingw32 lib/puppet/util/user_attr.rb
puppet-7.32.1-x64-mingw32 lib/puppet/util/user_attr.rb
puppet-7.32.1-universal-darwin lib/puppet/util/user_attr.rb
puppet-7.31.0 lib/puppet/util/user_attr.rb
puppet-7.31.0-x86-mingw32 lib/puppet/util/user_attr.rb
puppet-7.31.0-x64-mingw32 lib/puppet/util/user_attr.rb
puppet-7.31.0-universal-darwin lib/puppet/util/user_attr.rb
puppet-7.30.0 lib/puppet/util/user_attr.rb
puppet-7.30.0-x86-mingw32 lib/puppet/util/user_attr.rb
puppet-7.30.0-x64-mingw32 lib/puppet/util/user_attr.rb
puppet-7.30.0-universal-darwin lib/puppet/util/user_attr.rb