Permalink
Browse files

Add support for -I and -r options to bin/sequel

These options work just like the options for ruby itself.
  • Loading branch information...
1 parent b143db8 commit 8ff96bc6906cff1c950bd2ce6e881f3411e673f8 @jeremyevans committed Feb 14, 2011
Showing with 10 additions and 0 deletions.
  1. +2 −0 CHANGELOG
  2. +8 −0 bin/sequel
View
@@ -1,5 +1,7 @@
=== HEAD
+* Add support for -I and -r options to bin/sequel (jeremyevans)
+
* Sequel::Model.plugin can now be overridden just like the other Model methods (jeremyevans)
* Add tinytds adapter, the best way to connect to MSSQL from a C based ruby running on *nix (jeremyevans)
View
@@ -53,6 +53,10 @@ opts = OptionParser.new do |opts|
echo = true
end
+ opts.on("-I", "--include dir", "specify $LOAD_PATH directory") do |v|
+ $: << v
+ end
+
opts.on("-l", "--log logfile", "log SQL statements to log file") do |v|
logfile = v
end
@@ -73,6 +77,10 @@ opts = OptionParser.new do |opts|
db_opts[:test] = false
end
+ opts.on("-r", "--require lib", "require the library, before executing your script") do |v|
+ require v
+ end
+
opts.on("-t", "--trace", "Output the full backtrace if an exception is raised") do
backtrace = true
end

0 comments on commit 8ff96bc

Please sign in to comment.