Sha256: a8fdc17be6412b466fb40c30198cc232cb194aae51d5de57ecf1e9d1d6dc50d3
Contents?: true
Size: 1.91 KB
Versions: 1
Compression:
Stored size: 1.91 KB
Contents
$:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) require 'eventmachine' require 'log4r' require 'nokogiri' require 'yaml' require 'fileutils' require 'babylon/xmpp_connection' require 'babylon/component_connection' require 'babylon/client_connection' require 'babylon/router' require 'babylon/runner' require "babylon/xpath_helper" require 'babylon/base/controller' require 'babylon/base/view' # Babylon is a XMPP Component Framework based on EventMachine. It uses the Nokogiri GEM, which is a Ruby wrapper for Libxml2. # It implements the MVC paradigm. # You can create your own application by running : # $> babylon app_name # This will generate some folders and files for your application. Please see README for further instructions module Babylon def self.environment=(_env) @@env = _env end def self.environment unless self.class_variable_defined?("@@env") @@env = "development" end @@env end ## # Caches the view files to improve performance. def self.cache_views @@cached_views= {} Dir.glob('app/views/*/*').each do |f| @@cached_views[f] = File.read(f) end end def self.cached_views unless self.class_variable_defined?("@@cached_views") @@cached_views= {} end @@cached_views end ## # Returns a shared logger for this component. def self.logger unless self.class_variable_defined?("@@logger") @@logger = Log4r::Logger.new("BABYLON") @@logger.add(Log4r::Outputter.stderr) end @@logger end ## # Set the configuration for this component. def self.config=(conf) @@config = conf end ## # Return the configuration for this component. def self.config @@config end ## # Authentication Error (wrong password/jid combination). Used for Clients and Components class AuthenticationError < Exception end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
julien51-babylon-0.0.8 | lib/babylon.rb |