diff -ur rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/CHANGELOG rubyscript2exe-0.4.3.tar.gz/rubyscript2exe/CHANGELOG
--- rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/CHANGELOG 2006-03-08 17:57:17.000000000 +0100
+++ rubyscript2exe-0.4.3.tar.gz/rubyscript2exe/CHANGELOG 2006-06-27 21:00:39.000000000 +0200
@@ -1,5 +1,12 @@
----------------------------------------------------------------
+0.4.3 - 27.06.2006
+
+* Enhanced the support for RubyGems, again... I now use the
+ real RubyGems, instead of a fake one.
+
+----------------------------------------------------------------
+
0.4.2 - 08.03.2006
* Got rid of warning "Insecure world writable dir".
diff -ur rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/init.rb rubyscript2exe-0.4.3.tar.gz/rubyscript2exe/init.rb
--- rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/init.rb 2006-02-04 00:55:33.000000000 +0100
+++ rubyscript2exe-0.4.3.tar.gz/rubyscript2exe/init.rb 2006-06-27 20:24:25.000000000 +0200
@@ -221,9 +221,15 @@
f.puts " ARGV.concat(RUBYSCRIPT2EXE_PARMSLIST.split(/\000/))"
f.puts "end"
- f.puts "# Requirements"
+ f.puts "# Set the RubyGems environment."
- f.puts "require 'rubygems'" if RUBYSCRIPT2EXE_RUBYGEMS
+ if RUBYSCRIPT2EXE_RUBYGEMS
+ f.puts "ENV.keys.each do |key|"
+ f.puts " ENV.delete[key] if key =~ /^gem_/i"
+ f.puts "end"
+ f.puts "ENV['GEM_PATH']=lib+'/rubyscript2exe.gems'"
+ f.puts "require 'rubygems'"
+ end
f.puts "# Start the application"
diff -ur rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/require2lib.rb rubyscript2exe-0.4.3.tar.gz/rubyscript2exe/require2lib.rb
--- rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/require2lib.rb 2006-03-08 18:29:17.000000000 +0100
+++ rubyscript2exe-0.4.3.tar.gz/rubyscript2exe/require2lib.rb 2006-06-27 21:02:19.000000000 +0200
@@ -45,7 +45,7 @@
if RUBYGEMS
begin
- Gem::dir
+ Gem.dir
rubygems = true
rescue NameError
rubygems = false
@@ -57,42 +57,28 @@
pureruby = true
if rubygems
- autorequire = {}
- dependencies = {}
- requirelibs = []
requireablefiles = []
+ Dir.mkdir(File.expand_path("rubyscript2exe.gems", LIBDIR))
+ Dir.mkdir(File.expand_path("rubyscript2exe.gems/gems", LIBDIR))
+ Dir.mkdir(File.expand_path("rubyscript2exe.gems/specifications", LIBDIR))
+
Gem::Specification.list.each do |gem|
if gem.loaded?
$stderr.puts "Found gem #{gem.name} (#{gem.version})." if VERBOSE
- fromdir = gem.full_gem_path
- todir = File.expand_path(File.join("rubyscript2exe.gems", gem.full_name), LIBDIR)
-
- Dir.copy(fromdir, todir)
+ fromdir = File.join(gem.installation_path, "specifications")
+ todir = File.expand_path("rubyscript2exe.gems/specifications", LIBDIR)
- autorequire[gem.name] = gem.autorequire if gem.autorequire
+ fromfile = File.join(fromdir, "#{gem.full_name}.gemspec")
+ tofile = File.join(todir, "#{gem.full_name}.gemspec")
- dependencies[gem.name] = []
- gem.dependencies.each do |dep|
- dependencies[gem.name] << dep.name
- end
+ File.copy(fromfile, tofile)
- #gem.require_paths << gem.bindir if gem.bindir
- #gem.require_paths.each do |lib|
- #lib = File.join("rubyscript2exe.gems", gem.full_name, lib)
- #requirelibs << lib unless requirelibs.include?(lib)
- #end
-
- $:.reverse.each do |lib|
- gemdir = File.join(Gem.dir, "gems")
- if lib =~ /^#{gemdir}/
- lib = lib[(gemdir.size+1)..-1]
- lib = File.join("rubyscript2exe.gems", lib)
+ fromdir = gem.full_gem_path
+ todir = File.expand_path(File.join("rubyscript2exe.gems/gems", gem.full_name), LIBDIR)
- requirelibs << lib unless requirelibs.include?(lib)
- end
- end
+ Dir.copy(fromdir, todir)
Dir.find(todir).each do |file|
if File.file?(file)
@@ -108,64 +94,38 @@
end
end
end
-
- File.open(File.expand_path("rubygems.rb", LIBDIR), "w") do |f|
- f.puts "module Kernel"
- f.puts " def require_gem(file, version=nil)"
- f.puts " autorequire = %s" % autorequire.inspect
- f.puts " dependencies = %s" % dependencies.inspect
- f.puts ""
- f.puts " (dependencies[file] or []).each do |dep|"
- f.puts " require_gem(dep)"
- f.puts " end"
- f.puts ""
- f.puts " if autorequire.include?(file)"
- f.puts " file = autorequire[file]"
- f.puts " require(file)"
- f.puts " end"
- f.puts " end"
- f.puts "end"
- f.puts ""
- f.puts "requirelibs = %s" % requirelibs.inspect
- f.puts ""
- f.puts "requirelibs.each do |lib|"
- f.puts " $:.unshift(File.expand_path(lib, File.expand_path(File.dirname(__FILE__))))"
- f.puts "end"
- end
end
($" + $require2lib_loaded).each do |req|
- unless req =~ /^rubygems[\.\/]/
- catch :found do
- $:.each do |lib|
- fromfile = File.expand_path(req, lib)
- tofile = File.expand_path(req, LIBDIR)
-
- if File.file?(fromfile)
- unless fromfile == tofile or fromfile == THISFILE
- unless (rubygems and requireablefiles.include?(req)) # ??? requireablefiles might be a little dangerous.
- if (not JUSTRUBYLIB and not JUSTSITELIB) or
- (JUSTRUBYLIB and fromfile.include?(RUBYLIBDIR)) or
- (JUSTSITELIB and fromfile.include?(SITELIBDIR))
- $stderr.puts "Found #{fromfile} ." if VERBOSE
-
- File.makedirs(File.dirname(tofile)) unless File.directory?(File.dirname(tofile))
- File.copy(fromfile, tofile)
-
- pureruby = false unless req =~ /\.(rbw?|ruby)$/i
- else
- $stderr.puts "Skipped #{fromfile} ." if VERBOSE
- end
+ catch :found do
+ $:.each do |lib|
+ fromfile = File.expand_path(req, lib)
+ tofile = File.expand_path(req, LIBDIR)
+
+ if File.file?(fromfile)
+ unless fromfile == tofile or fromfile == THISFILE
+ unless (rubygems and requireablefiles.include?(req)) # ??? requireablefiles might be a little dangerous.
+ if (not JUSTRUBYLIB and not JUSTSITELIB) or
+ (JUSTRUBYLIB and fromfile.include?(RUBYLIBDIR)) or
+ (JUSTSITELIB and fromfile.include?(SITELIBDIR))
+ $stderr.puts "Found #{fromfile} ." if VERBOSE
+
+ File.makedirs(File.dirname(tofile)) unless File.directory?(File.dirname(tofile))
+ File.copy(fromfile, tofile)
+
+ pureruby = false unless req =~ /\.(rbw?|ruby)$/i
+ else
+ $stderr.puts "Skipped #{fromfile} ." if VERBOSE
end
end
-
- throw :found
end
- end
- #$stderr.puts "Can't find #{req} ." unless req =~ /^ev\// or QUIET
- #$stderr.puts "Can't find #{req} ." unless req =~ /^(\w:)?[\/\\]/ or QUIET
+ throw :found
+ end
end
+
+ #$stderr.puts "Can't find #{req} ." unless req =~ /^ev\// or QUIET
+ #$stderr.puts "Can't find #{req} ." unless req =~ /^(\w:)?[\/\\]/ or QUIET
end
end
diff -ur rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/VERSION rubyscript2exe-0.4.3.tar.gz/rubyscript2exe/VERSION
--- rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/VERSION 2006-03-08 18:29:17.000000000 +0100
+++ rubyscript2exe-0.4.3.tar.gz/rubyscript2exe/VERSION 2006-06-27 21:02:18.000000000 +0200
@@ -1 +1 @@
-0.4.2
+0.4.3