summaryrefslogtreecommitdiff
path: root/lib/facter/virtualenv_version.rb
diff options
context:
space:
mode:
authorJarl Stefansson <jarl@sdelements.com>2013-11-05 10:44:38 -0500
committerJarl Stefansson <jarl@sdelements.com>2013-11-05 10:44:38 -0500
commit669e62ca668255b179d93644101fd4e534f02bcb (patch)
tree4671003cc880b6e1f6eb5ca81399c1b6acfbba51 /lib/facter/virtualenv_version.rb
parent42e0f436f08778374bc44aa6a0b81d6fd48d6f43 (diff)
Improve python version and virtualenv version facts
Diffstat (limited to 'lib/facter/virtualenv_version.rb')
-rw-r--r--lib/facter/virtualenv_version.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/facter/virtualenv_version.rb b/lib/facter/virtualenv_version.rb
index 327b2ca..c923b09 100644
--- a/lib/facter/virtualenv_version.rb
+++ b/lib/facter/virtualenv_version.rb
@@ -1,5 +1,5 @@
-# Show the virtualenv version
-# works with virualenv loaded and without, pip installed and package installed
+# Make virtualenv version available as a fact
+# Works with virualenv loaded and without, pip installed and package installed
require 'puppet'
pkg = Puppet::Type.type(:package).new(:name => "virtualenv")
Facter.add("virtualenv_version") do
@@ -10,7 +10,7 @@ Facter.add("virtualenv_version") do
end
Facter.add("virtualenv_version") do
- has_eight 50
+ has_weight 50
setcode do
if pkg.retrieve[pkg.property(:ensure)] != 'purged'
/^.*(\d+\.\d+\.\d+).*$/.match(pkg.retrieve[pkg.property(:ensure)])[1]