[macruby-changes] [4291] ControlTower/trunk/bin/control_tower
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jun 25 23:25:18 PDT 2010
Revision: 4291
http://trac.macosforge.org/projects/ruby/changeset/4291
Author: lsansonetti at apple.com
Date: 2010-06-25 23:25:14 -0700 (Fri, 25 Jun 2010)
Log Message:
-----------
better error messaging
Modified Paths:
--------------
ControlTower/trunk/bin/control_tower
Modified: ControlTower/trunk/bin/control_tower
===================================================================
--- ControlTower/trunk/bin/control_tower 2010-06-26 03:06:02 UTC (rev 4290)
+++ ControlTower/trunk/bin/control_tower 2010-06-26 06:25:14 UTC (rev 4291)
@@ -31,15 +31,15 @@
end
end.parse!
-unless File.exist? File.expand_path(@options[:rackup])
- puts "We only know how to deal with Rack-up configs for now"
+unless File.exist?(@options[:rackup])
+ $stderr.puts "Rack-up config file `#{@options[:rackup]}' doesn't exist!"
exit 1
end
# Under construction...everything is development!
ENV['RACK_ENV'] = 'development'
-rackup_config = File.read(File.expand_path(@options[:rackup]))
+rackup_config = File.read(@options[:rackup])
app = eval("Rack::Builder.new { #{rackup_config} }").to_app
# Let's get to business!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100625/3b05baba/attachment.html>
More information about the macruby-changes
mailing list