Sha256: c5ec9ed16e7721f82e26ddc5d12c4c22d10f17d41a3604f2f0d9728357f5e613

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

require 'monitor'
require 'singleton'
require 'set'

class NotDefined; end

# Core Classes, can't be excluded.
%w{
kernel module object class file
}.each{|n| require "RubyExt/#{n}"}

require 'RubyExt/assert'
require 'RubyExt/observable'

require 'RubyExt/resource'
require 'RubyExt/Resource/file_system_provider'

# Need this complex loading for correct work of 'raise_without_self''
module RubyExt
	#	libraries_in_working_dir = Dir.glob("*/**/lib").select{|f| File.directory? f}.collect{|f| File.expand_path f}
	#	specs_in_working_dir = Dir.glob("*/**/spec").select{|f| File.directory? f}.collect{|f| File.expand_path f}
	directories = lambda do 
		$LOAD_PATH.select{|f| ![/site_ruby/, /vendor_ruby/, /bin$/].any?{|re| f =~ re}}\
		.collect{|f| File.expand_path f}
		#		$LOAD_PATH.select{|dir| dir =~ /gems.+lib/}
		#		$LOAD_PATH.select{|dir| dir =~ /gems.+spec/} + 
		#		[Dir.getwd] + 
		#		libraries_in_working_dir
		#		specs_in_working_dir
	end
	Resource.add_resource_provider FileSystemProvider.new(directories)
	
	script = Resource.class_get "RubyExt::ClassLoader"
	eval script, TOPLEVEL_BINDING, Resource.class_to_virtual_file("RubyExt::ClassLoader")  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
RubyExt-0.1.1 lib/RubyExt/require_base.rb
RubyExt-0.1.2 lib/RubyExt/_require_base.rb