I’ve written a LaunchAgent which is like a unix daemon but runs as a
user process, not a root/system process for OS X.
I’ve written some ruby code for working with the launch agent. A
collection of library routines, a few scripts and a collection of test
scripts for testing the launch agent. I’ve currently got no tests for
the ruby code itself. I’ve been using yard to generate documentation.
I’m still new to ruby, and am still at the stage that whenever I look at
code I wrote a couple of months ago I’m embarrassed.
My question relates to creating a ruby gem. I would like to create a gem
that can only be installed on OS X, and that can only be installed on
Mavericks and above. I want to keep the barrier to using my software as
low as sensibly possible so I’m not interested in installations of RVM
and the different versions of ruby that it provides access to. I want to
make sure everything works with the ruby 2.0.0 that comes installed with
Mavericks and not add complications.
I’ve been reading the documentation on gemspecs and it is not clear to
me how I can use the gemfile to limit to OS X Mavericks (or higher) the
gem can be installed on?
I know I’m not using ruby here in the way most people here are using it,
but when I looked at scripting languages to work with the LaunchAgent,
ruby looked really interesting as a new language to learn coming from an
Objective-C C++ background.
Some guidance would be appreciated.