Sha256: 66818119b8dbab89b0a2c3f54b78c2314d026ac5b76e5ea6a58a0f5a22f2dbdb
Contents?: true
Size: 1.51 KB
Versions: 4
Compression:
Stored size: 1.51 KB
Contents
#!/usr/bin/env ruby require "bundler" Bundler.setup(:default) require "ginatra" module Ginatra::Executable HELP = <<HELP Usage: ginatra [ version | server <options> <command> | daemon <command> | directory <command> <args> ] 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 @current_path = File.expand_path(File.dirname(__FILE__)) def self.daemon(*args) system("#{@current_path}/ginatra-daemon #{args.join(" ")}") end def self.directory(*args) system("#{@current_path}/ginatra-directory #{args.join(" ")}") end def self.server(*args) system("#{@current_path}/ginatra-server #{args.join(" ")}") end def self.version(*args) puts Ginatra::VERSION end end command, *args = ARGV[0], ARGV[1..-1] if command !~ /^(version|daemon|directory|server)$/ puts Ginatra::Executable::HELP exit end Ginatra::Executable.send(command, *args)
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ginatra-2.2.6 | bin/ginatra |
ginatra-2.2.5 | bin/ginatra |
ginatra-2.2.4 | bin/ginatra |
ginatra-2.2.3 | bin/ginatra |