puppetlabs/marionette-collective — pull request #247 by richardc (2014-10-13 13:57:35+00:00)
Title: MCO-465 ensure service_manager.rb finds a ruby

Previous to this commit the code would use $RUBY or a search of $PATH to
attempt to find a ruby executable to form the service command line
(`ruby_path`). It was possible for $RUBY to contain a string that
wasn't a fully-qualified path ("ruby.exe"), but would still satisfy
a simple boolean test (to ruby all strings are true.)

Here we extract find_ruby_in_path and restructure the preamble a little so that
we can be more certain that ruby_path is resolved to a file that exists.