3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/interpreters/ruby/bundler-env/package-1.8.rb
2015-01-21 22:23:37 -05:00

30 lines
485 B
Ruby

require 'rubygems/installer'
require 'rubygems/builder'
# Simulate RubyGems 2.0 behavior.
module Gem::Package
def self.new(gem)
@gem = gem
self
end
def self.extract_files(dir)
installer = Gem::Installer.new @gem
installer.unpack(dir)
end
def self.build(skip_validation=false)
builder = Gem::Builder.new(spec)
builder.build
end
def self.spec=(spec)
@spec = spec
end
def self.spec
@spec ||= Gem::Installer.new(@gem).spec
end
end