summaryrefslogtreecommitdiffstats
path: root/lib/facter/rubysitedir.rb
diff options
context:
space:
mode:
authorBen H <git@mumble.org.uk>2011-03-13 14:07:37 +1100
committerAdrien Thebo <adrien.thebo@gmail.com>2011-04-01 18:19:11 -0700
commitd31e3f9ee6b36e707a189569132bcdcea79f20f6 (patch)
tree2a1eea877715b67963b9f48de93c6fc73dab9838 /lib/facter/rubysitedir.rb
parentaf4947c603b8f6610d861f303a7813cbc5ecf5e7 (diff)
downloadfacter-d31e3f9ee6b36e707a189569132bcdcea79f20f6.tar.gz
facter-d31e3f9ee6b36e707a189569132bcdcea79f20f6.tar.xz
facter-d31e3f9ee6b36e707a189569132bcdcea79f20f6.zip
(#5394) Document each Facter fact.
Document all the builtin Facter facts in puppetdoc/rdoc format. This is laying the ground work for using a tool like puppet doc, or puppet describe but for facter, so you can see what a fact is for and how it resolves this. This is the "leg work" of documenting the actual facts, and the syntax of them may change in future.
Diffstat (limited to 'lib/facter/rubysitedir.rb')
-rw-r--r--lib/facter/rubysitedir.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/facter/rubysitedir.rb b/lib/facter/rubysitedir.rb
index c205322..9973329 100644
--- a/lib/facter/rubysitedir.rb
+++ b/lib/facter/rubysitedir.rb
@@ -1,3 +1,13 @@
+# Fact: rubysitedir
+#
+# Purpose: Returns Ruby's site library directory.
+#
+# Resolution: Works out the version to major/minor (1.8, 1.9, etc), then joins
+# that with all the $: library paths.
+#
+# Caveats:
+#
+
Facter.add :rubysitedir do
setcode do
version = RUBY_VERSION.to_s.sub(/\.\d+$/, '')