lib/classiccms/cli.rb in classiccms-0.2.4.pre vs lib/classiccms/cli.rb in classiccms-0.3.0
- old
+ new
@@ -1,13 +1,16 @@
require 'fileutils'
+require 'classiccms/version'
module Classiccms
class Cli
def self.command(arguments)
case arguments[0]
when 'new' then self.new arguments[1]
when 'server' then self.server
+ when 's' then self.server
+ when '-v' then puts "version #{VERSION}"
else
puts "you are so smart! I don't know what you mean! (try using new or server)"
end
end
@@ -23,18 +26,9 @@
puts "#{app_name} created!"
end
end
def self.server
#first check if this is actualy an app
- if File.directory? 'config' and File.directory? 'models'
- puts 'Going to start server...'
-
- #Initialize app with application file
- require 'classiccms/application'
- Classiccms.boot
- else
- puts 'not an app! Try running:'
- puts 'classicCMS new [app name]'
- end
+ system('rackup')
end
end
end