
I decided it was time to learn how to make a Ruby gem. Turns outs it was far easier than I was expecting, with the help of bundler and good documentation on RubyGems.org.
The result is Marshmallow. A Ruby Gem for MacAdmins. It provides an easy way to get basic information about a machine, like serial number, os version, or hard drive size. Plus an easy way to report back some helpful information, like who’s in the local admin group? How many users are on the machine, what system LaunchAgents are installed.
Usage is pretty simple. To install run:
sudo gem install marshmallow
To verify, you can pull up the interactive ruby prompt.
irb require 'Marshmallow' Marshmallow.serial
To see a full list of options:
puts Marshmallow.methods(false)
It’s simple in concept. With plenty of ideas of what I can add to make it more functional. Want to see what profiles are installed? What’s the Filevault status? What LaunchAgents are in each user account on the machine?