UserShell is a tiny gem that uses the canonical approach to detect the shell for the current user, or a specified user.
Baris Balic
MIT