Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 486096
Collapse All | Expand All

(-)file_not_specified_in_diff (-4 / +17 lines)
Line  Link Here
0
-- vagrant-1.3.4/plugins/commands/plugin/action/install_gem.rb
0
++ vagrant-1.3.4/plugins/commands/plugin/action/install_gem.rb
Lines 1-6 Link Here
1
require "rubygems"
1
require "rubygems"
2
require "rubygems/dependency_installer"
2
require "rubygems/dependency_installer"
3
require "rubygems/format"
3
begin
4
  require "rubygems/format"
5
rescue LoadError
6
  # rubygems 2.0
7
end
4
8
5
require "log4r"
9
require "log4r"
6
10
Lines 26-33 module VagrantPlugins Link Here
26
          if plugin_name =~ /\.gem$/
30
          if plugin_name =~ /\.gem$/
27
            # If we're installing from a gem file, determine the name
31
            # If we're installing from a gem file, determine the name
28
            # based on the spec in the file.
32
            # based on the spec in the file.
29
            pkg = Gem::Format.from_file_by_path(plugin_name)
33
            pkg = if defined?(Gem::Format)
34
              Gem::Format.from_file_by_path(plugin_name)
35
            else
36
              Gem::Package.new(plugin_name)
37
            end
30
            find_plugin_name = pkg.spec.name
38
            find_plugin_name = pkg.spec.name
39
            version = pkg.spec.version
31
          end
40
          end
32
41
33
          # Install the gem
42
          # Install the gem
34
-- vagrant-1.3.4/plugins/commands/plugin/action/prune_gems.rb
43
++ vagrant-1.3.4/plugins/commands/plugin/action/prune_gems.rb
Lines 126-131 module VagrantPlugins Link Here
126
126
127
          if prune_specs.length > 0
127
          if prune_specs.length > 0
128
            env[:gem_helper].with_environment do
128
            env[:gem_helper].with_environment do
129
130
              # due to a bug in rubygems 2.0, we need to load the specifications before removing any
131
              Gem::Specification.to_a
132
129
              prune_specs.each do |prune_spec|
133
              prune_specs.each do |prune_spec|
130
                uninstaller = Gem::Uninstaller.new(prune_spec.name, {
134
                uninstaller = Gem::Uninstaller.new(prune_spec.name, {
131
                  :all         => true,
135
                  :all         => true,

Return to bug 486096