puppetlabs/facter — pull request #693 by joshcooper (2014-06-17 00:45:34+00:00)
Title: (FACT-570) Remove windows-pr gem dependency

This commit depends on https://github.com/puppetlabs/facter/pull/692 being merged first.

Previously, when running on Windows 2003 (and related), we would delegate to `win32-security` to determine if we were running with elevated privileges or not. This amounts to checking if the user is a member of the local Administrators group or not.

When running on Vista and above (kernel major version >= 6.0), we would check if the `WinBuiltinAdministratorsSid` was in the current process token.

Starting in `win32-security` version 0.2.x, the `elevated_privileges?` method now handles the Vista and above check. The logic is slightly different but yields the correct results. https://github.com/djberg96/win32-security/blob/win32-security-0.2.0/lib/win32/security.rb#L36

This commit (aaee81cf712a7d43efe087369e8efa723c46a965) switching to using `win32-security` exclusively, and removes the dependency on `windows-pr` (and it's dependency on `win32-api`).