Sha256: 559c5cd07c5bb144e0f1d66422fe050ef84acf60803b55552e4f5b7d77170708
Contents?: true
Size: 538 Bytes
Versions: 2
Compression:
Stored size: 538 Bytes
Contents
require 'rubygems' require 'gem_plugin' require 'mongrel' class Console < GemPlugin::Plugin "/commands" include Mongrel::Command::Base def configure options [ ['-c', '--chdir DIR', "Change to directory before running", :@dir, "."] ] end def validate valid_dir? @dir, "Directory is not valid" return @valid end def run begin Dir.chdir @dir load File.join(File.dirname(__FILE__), "console.rb") rescue Object STDERR.puts "Cannot run the console script: #$!" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mongrel_console-0.2 | lib/mongrel_console/init.rb |
mongrel_console-0.2.1 | lib/mongrel_console/init.rb |