Skip to content

Commit

Permalink
Require rubygems to avoid uninitialized constant Gem
Browse files Browse the repository at this point in the history
  • Loading branch information
ganguera committed Nov 5, 2014
1 parent 56f470d commit 82f49a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/facter/pip_version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Make pip version available as a fact
# Works with pip loaded and without, pip installed using pip and package installed
require 'puppet'
require 'rubygems'
if Gem::Version.new(Facter.value(:puppetversion)) >= Gem::Version.new('3.6')
pkg = Puppet::Type.type(:package).new(:name => 'python-pip', :allow_virtual => 'false')
else
Expand Down
1 change: 1 addition & 0 deletions lib/facter/python_version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Make python versions available as facts
# In lists default python and system python versions
require 'puppet'
require 'rubygems'
if Gem::Version.new(Facter.value(:puppetversion)) >= Gem::Version.new('3.6')
pkg = Puppet::Type.type(:package).new(:name => 'python', :allow_virtual => 'false')
else
Expand Down
1 change: 1 addition & 0 deletions lib/facter/virtualenv_version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Make virtualenv version available as a fact
# Works with virualenv loaded and without, pip installed and package installed
require 'puppet'
require 'rubygems'
if Gem::Version.new(Facter.value(:puppetversion)) >= Gem::Version.new('3.6')
pkg = Puppet::Type.type(:package).new(:name => 'virtualenv', :allow_virtual => 'false')
else
Expand Down

0 comments on commit 82f49a5

Please sign in to comment.