class Kraken::App
This class are used for load and create kraken applications!
Public Class Methods
create_app(name)
click to toggle source
# File lib/kraken/core/app.rb, line 15 def self.create_app(name) { name.to_s => PROJECT_TREE }.create_project exit 0 end
load_app()
click to toggle source
# File lib/kraken/core/app.rb, line 9 def self.load_app require_all 'app/validators' if File.exist? 'app/validators' require_all 'app' if File.exist? 'app' require_all 'config' if File.exist? 'config' end
print_help()
click to toggle source
# File lib/kraken/core/app.rb, line 26 def self.print_help print_version puts 'kraken -n app_name: Create a new kraken app' puts 'kraken -s: start the created app' puts 'kraken -v: show the version' puts 'kraken -d: start a console' puts '' puts 'rake db:* for migrations operations. See more about ActiveRecord' end
print_version()
click to toggle source
# File lib/kraken/core/app.rb, line 20 def self.print_version puts 'KrakenLab' puts "-v #{Kraken::VERSION}" exit 0 end
start_console()
click to toggle source
# File lib/kraken/core/app.rb, line 37 def self.start_console IRB.start(__FILE__) exit 0 end
start_server()
click to toggle source
# File lib/kraken/core/app.rb, line 42 def self.start_server Kraken::Listener.new.join end