Sha256: c0639b88e18a896cfa80349734c00c42994825d87013f5e1b407654e5c96e9b1
Contents?: true
Size: 1.41 KB
Versions: 1
Compression:
Stored size: 1.41 KB
Contents
#!/usr/bin/env ruby require 'thor' require File.expand_path('../../lib/mad_chatter', __FILE__) module MadChatter class Cli < Thor include Thor::Actions def self.source_root File.expand_path('../../', __FILE__) end desc "new [name]", "Generates a new Mad Chatter chatroom application" def new(name) copy_file "templates/config.yml", "#{name}/config.yml" copy_file "templates/extensions.rb", "#{name}/extensions.rb" empty_directory "#{name}/extensions" copy_file "templates/web/index.html", "#{name}/web/index.html" copy_file "templates/web/javascript.js", "#{name}/web/javascript.js" copy_file "templates/web/stylesheets/reset.css", "#{name}/web/stylesheets/reset.css" copy_file "templates/web/stylesheets/styles.css", "#{name}/web/stylesheets/styles.css" end desc 'start', 'Starts the chat server' def start MadChatter.start end desc 'stop', 'Stops the chat server' def stop # stop the currently running daemon # not sure how to best implement this part yet end desc 'restart', 'Restarts the chat server' def restart # restarts the currently running daemon # not sure how to best implement this part yet end desc 'version', 'Displays the current version number' def version puts MadChatter::VERSION end end end MadChatter::Cli.start(ARGV)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mad_chatter-0.1.0 | bin/mad_chatter |