summaryrefslogtreecommitdiff
path: root/tool/gem-unpack.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/gem-unpack.rb')
-rw-r--r--tool/gem-unpack.rb19
1 files changed, 0 insertions, 19 deletions
diff --git a/tool/gem-unpack.rb b/tool/gem-unpack.rb
deleted file mode 100644
index cb05719463..0000000000
--- a/tool/gem-unpack.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-require 'fileutils'
-require 'rubygems'
-require 'rubygems/package'
-
-# This library is used by "make extract-gems" to
-# unpack bundled gem files.
-
-def Gem.unpack(file, dir = nil)
- pkg = Gem::Package.new(file)
- spec = pkg.spec
- target = spec.full_name
- target = File.join(dir, target) if dir
- pkg.extract_files target
- spec_file = File.join(target, "#{spec.name}-#{spec.version}.gemspec")
- open(spec_file, 'wb') do |f|
- f.print spec.to_ruby
- end
- puts "Unpacked #{file}"
-end