lib/cockpit.rb in cockpit-0.0.1.7 vs lib/cockpit.rb in cockpit-0.1.1
- old
+ new
@@ -1,22 +1,16 @@
require 'rubygems'
-require 'active_support'
-require 'active_record'
this = File.expand_path(File.dirname(__FILE__))
-Dir["#{this}/cockpit/*"].each { |c| require c }
+Dir["#{this}/cockpit/*"].each { |c| require c unless File.directory?(c) }
+Dir["#{this}/cockpit/core/*"].each { |c| require c unless File.directory?(c) }
+Dir["#{this}/cockpit/adapters/*"].each { |c| require c unless File.directory?(c) }
-class Settings
- include Cockpit::Configuration
-end
-
ActiveRecord::Base.send(:include, Cockpit) if defined?(ActiveRecord::Base)
def Settings(*args, &block)
- Settings.define!(*args, &block)
+ Cockpit::Settings.define!(*args, &block)
end
def Cockpit(*args, &block)
Settings(*args, &block)
end
-
-require File.expand_path("#{this}/../app/models/setting.rb")