Skip to content

Commit 729ab6c

Browse files
committed
Merge pull request voxpupuli#146 from sp-guillem-anguera/master
Require rubygems to avoid uninitialized constant Gem
2 parents 56f470d + 82f49a5 commit 729ab6c

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

lib/facter/pip_version.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Make pip version available as a fact
22
# Works with pip loaded and without, pip installed using pip and package installed
33
require 'puppet'
4+
require 'rubygems'
45
if Gem::Version.new(Facter.value(:puppetversion)) >= Gem::Version.new('3.6')
56
pkg = Puppet::Type.type(:package).new(:name => 'python-pip', :allow_virtual => 'false')
67
else

lib/facter/python_version.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Make python versions available as facts
22
# In lists default python and system python versions
33
require 'puppet'
4+
require 'rubygems'
45
if Gem::Version.new(Facter.value(:puppetversion)) >= Gem::Version.new('3.6')
56
pkg = Puppet::Type.type(:package).new(:name => 'python', :allow_virtual => 'false')
67
else

lib/facter/virtualenv_version.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Make virtualenv version available as a fact
22
# Works with virualenv loaded and without, pip installed and package installed
33
require 'puppet'
4+
require 'rubygems'
45
if Gem::Version.new(Facter.value(:puppetversion)) >= Gem::Version.new('3.6')
56
pkg = Puppet::Type.type(:package).new(:name => 'virtualenv', :allow_virtual => 'false')
67
else

0 commit comments

Comments
 (0)