I am working on writing a rake build scrip which will work cross platform ( Mac OSX, Linux , Windows ). The build script will be consumed by a CI server.

I want the logic of my script to be as follows:

  1. If the path is determined to be relative, make it absolute by making output_path = FOO_HOME + user_supplied_relative_path
  2. If the path is determined to be absolute, take it as-is

I'm currently using Pathname.new(location).absolute? but it's not working correctly on windows.

What approach would you suggest for this?

Edit
Report