Sha256: 945e032ce3078ab994766bdc3a8bc4b0a299c69277cd3724a50443babeae89cb
Contents?: true
Size: 1.56 KB
Versions: 2
Compression:
Stored size: 1.56 KB
Contents
#!/usr/bin/env ruby require "ginatra" module Ginatra::Executable HELP = <<HELP Usage: ginatra [ version | server <options> <command> | daemon <command> | directory <command> <globs> ] Ginatra Commands: version - Pretty Self explanatory. Print version number and exit Ginatra Server Commands: start - Start the Ginatra HTTP Server. stop - Stop the Ginatra Server. status - How's your Ginatra Server holding up? Ginatra Daemon Commands: start - Starts the Git Daemon servimg Ginatra's Repositories stop - Stops the Git Daemon restart - Restarts the Git Daemon status - Is the Git Daemon on or off? Ginatra Directory Commands: add - Adds the <globs> to the array of dirs that Ginatra looks in for repositories. remove - Removes the <globs> from the aforementioned array. list - Lists the globs Ginatra looks in for repositories HELP def self.daemon path = File.expand_path(File.dirname(__FILE__)) load "#{path}/ginatra-daemon" end def self.directory path = File.expand_path(File.dirname(__FILE__)) load "#{path}/ginatra-directory" end def self.server path = File.expand_path(File.dirname(__FILE__)) load("#{path}/ginatra-server") end def self.execute(command, args) case command when "version" puts Ginatra::VERSION when "daemon" daemon when "directory" directory when "server" server else puts Ginatra::Executable::HELP end end end Ginatra::Executable.execute ARGV.shift, ARGV
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ginatra-2.3.0 | bin/ginatra |
ginatra-2.2.7 | bin/ginatra |