require 'rails_connector/rack_middlewares' require "rails_connector/errors" module RailsConnector def self.autoload_all_sources source_files = Dir.glob(File.expand_path("../rails_connector/*.rb", __FILE__)).map do |file| File.basename(file) end source_files.each do |file| name = file.gsub(".rb", "") autoload name.camelcase, "rails_connector/#{name}" end end autoload_all_sources end require "rails_connector/cloud_engine" if defined?(Rails)