summaryrefslogtreecommitdiffstats
path: root/patches.rb
diff options
context:
space:
mode:
authorVít Ondruch <vondruch@redhat.com>2015-01-21 13:34:36 +0100
committerVít Ondruch <vondruch@redhat.com>2015-01-21 13:35:49 +0100
commit15c0557a2220d7b2000cb5f8a6b83f968b60ca1e (patch)
tree768f890cb5d0b984c4b4228d25304beafe3230bb /patches.rb
parent188ee79aa1bc977639ac3058bf36a28698719f29 (diff)
downloadfedora-vagrant-15c0557a2220d7b2000cb5f8a6b83f968b60ca1e.tar.gz
fedora-vagrant-15c0557a2220d7b2000cb5f8a6b83f968b60ca1e.tar.xz
fedora-vagrant-15c0557a2220d7b2000cb5f8a6b83f968b60ca1e.zip
Initial import (#1020456).
Diffstat (limited to 'patches.rb')
-rw-r--r--patches.rb34
1 files changed, 0 insertions, 34 deletions
diff --git a/patches.rb b/patches.rb
index 7fd8972..ddf817a 100644
--- a/patches.rb
+++ b/patches.rb
@@ -1,39 +1,5 @@
# Monkey-patching for RubyGems and Bundler to play nicely with Vagrant
-# Don't touch the binary when not needed.
-# https://github.com/rubygems/rubygems/pull/1057
-class Gem::Installer
- def generate_bin # :nodoc:
- return if spec.executables.nil? or spec.executables.empty?
-
- Dir.mkdir @bin_dir unless File.exist? @bin_dir
- raise Gem::FilePermissionError.new(@bin_dir) unless File.writable? @bin_dir
-
- spec.executables.each do |filename|
- filename.untaint
- bin_path = File.join gem_dir, spec.bindir, filename
-
- unless File.exist? bin_path then
- # TODO change this to a more useful warning
- warn "#{bin_path} maybe `gem pristine #{spec.name}` will fix it?"
- next
- end
-
- mode = File.stat(bin_path).mode
- FileUtils.chmod mode | 0111, bin_path unless (mode | 0111) == mode
-
- check_executable_overwrite filename
-
- if @wrappers then
- generate_bin_script filename, @bin_dir
- else
- generate_bin_symlink filename, @bin_dir
- end
-
- end
- end
-end
-
# Fix rubygems 2.2 compatibility
# https://github.com/bundler/bundler/pull/3237
module Bundler