Sha256: e1bca4ec71eb29c6afd67b144ed47f7f93222806cf24bf4c95315534f43c0c40
Contents?: true
Size: 1.95 KB
Versions: 1
Compression:
Stored size: 1.95 KB
Contents
require 'fileutils' require 'pathname' require 'yaml' require 'json' require 'extlib/inflection' module ExtJS module MVC VERSION = "0.4.0" ROOT = File.dirname(__FILE__) ## # Do autoloads here # require 'extjs-mvc/settings' autoload :UI, 'extjs-mvc/ui' autoload :Generator, 'extjs-mvc/generator' autoload :BuilderManager, 'extjs-mvc/builder' autoload :Plugin, 'extjs-mvc/plugin' autoload :Stats, 'extjs-mvc/stats' autoload :Update, 'extjs-mvc/update' autoload :Text, 'extjs-mvc/test' class Error < StandardError def self.status_code(code = nil) return @code unless code @code = code end def status_code self.class.status_code end end class ArgumentError < Error; status_code(1) ; end class AppNotFound < Error; status_code(2) ; end class AppAlreadyExists < Error; status_code(3) ; end class FileExists < Error; status_code(4) ; end class BuilderError < Error; status_code(5) ; end ## # Add more error classes here # #class GemfileNotFound < BundlerError; status_code(10) ; end #class GemNotFound < BundlerError; status_code(7) ; end class << self attr_writer :ui def configure @configured ||= begin ## # perform some config here? # #configure_gem_home_and_path true end end ## # Ensure we're running within a rails app unless generating a new app ($ xmvc generate app foo) # def ensure_in_app unless ARGV.empty? || ARGV.first == 'help' || (File.exists?('app') && File.exists?('config') && File.exists?('config/environment.json')) raise ExtJS::MVC::AppNotFound.new("This command must be executed from the root of an extjs-mvc application") end end def ui @ui ||= UI.new end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
extjs-mvc-0.4.0.b | lib/extjs-mvc.rb |