devscript: check ruby version before execution

This commit is contained in:
Caleb Xu
2014-11-02 15:43:30 -05:00
parent 01efa8b9fd
commit d88385de32
+8
View File
@@ -20,6 +20,13 @@ $opt_test = nil
### methods
###
def check_ruby
if RUBY_VERSION.to_f < 1.9
print "You are currently using Ruby ", RUBY_VERSION, ", but version 1.9 or above is required."
exit 1
end
end
def usage
<<-EOS
list_running_app_ids [ -t <bundle-id> ]
@@ -97,6 +104,7 @@ end
### main
###
check_ruby
process_args
load_apps