rubai 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rubai/cli.rb +7 -1
- data/version.rb +1 -1
- metadata +1 -1
data/lib/rubai/cli.rb
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
require "rack"
|
2
|
-
require "rubai"
|
3
2
|
require "optparse"
|
3
|
+
require "rubai"
|
4
|
+
require File.join(File.expand_path("../../../", __FILE__), "version.rb")
|
4
5
|
|
5
6
|
options = Hash[:app, Rubai::RackApp.new, :Port, 9292]
|
6
7
|
parser = OptionParser.new do |opts|
|
7
8
|
opts.on("-p", "--port PORT") { |p| options[:Port] = p }
|
9
|
+
opts.on_tail("-v", "--version", "show version") {
|
10
|
+
puts "Rubai #{Rubai::VERSION}"
|
11
|
+
puts "Rack #{Rack.version} (Release: #{Rack.release})"
|
12
|
+
exit
|
13
|
+
}
|
8
14
|
end
|
9
15
|
parser.parse!
|
10
16
|
|
data/version.rb
CHANGED