Sha256: 008bfe812e4f81d183ef2f7c2dd277f1335a031fa486e571d8dd97de109e42d8
Contents?: true
Size: 699 Bytes
Versions: 2
Compression:
Stored size: 699 Bytes
Contents
if ARGV.first == '--help' || ARGV.first == '-h' puts File.open(File.join(PAK_PATH, 'commands/USAGE-SERVER')).read else $:.unshift(Dir.pwd) require 'app' valid_args = true if port_arg = ARGV.index("-p") if ARGV[port_arg + 1] =~ /^\d{1,5}$/ Pakyow::Config::Server.port = ARGV[port_arg + 1] ARGV.delete_at(port_arg + 1) ARGV.delete_at(port_arg) else valid_args = false end elsif port_arg = ARGV.index {|a| a =~ /^--port=\d{1,5}$/} Pakyow::Config::Server.port = ARGV[port_arg].gsub(/--port=/, '') ARGV.delete_at(port_arg) end if valid_args Pakyow::App.run(ARGV.first) else puts File.open(File.join(PAK_PATH, 'commands/USAGE-SERVER')).read end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pakyow-0.8.0 | lib/commands/server.rb |
pakyow-0.8.rc4 | lib/commands/server.rb |