bin/clockworkd in clockwork-2.0.2 vs bin/clockworkd in clockwork-2.0.3

- old
+ new

@@ -2,10 +2,11 @@ STDERR.sync = STDOUT.sync = true require 'clockwork' require 'optparse' +require 'pathname' begin require 'daemons' rescue LoadError raise "You need to add gem 'daemons' to your Gemfile or Rubygems if you wish to use it." @@ -43,10 +44,10 @@ opts.on('-m', '--monitor', 'Start monitor process.') do @options[:monitor] = true end opts.on('-c', '--clock=FILE',"Clock .rb file. Default is #{@options[:file]}.") do |clock_file| @options[:file] = clock_file - @options[:file] = "./#{@options[:file]}" unless @options[:file].match(/^[\/.]/) + @options[:file] = "./#{@options[:file]}" unless Pathname.new(@options[:file]).absolute? @options[:file] = File.expand_path(@options[:file]) end opts.on('-d', '--dir=DIR', 'Directory to change to once the process starts') do |dir| @options[:current_dir] = File.expand_path(dir) end