~ubuntu-branches/ubuntu/raring/facter/raring

« back to all changes in this revision

Viewing changes to lib/facter/rubysitedir.rb

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman
  • Date: 2011-10-18 10:32:42 UTC
  • mfrom: (1.1.10 upstream) (3.1.10 sid)
  • Revision ID: package-import@ubuntu.com-20111018103242-vvgvfa9pf057xnmj
Tags: 1.6.1-1ubuntu1
* Merge from Debian unstable (LP: #877621). Remaining changes:
  - debian/rules: use what we had in natty; we dont want ruby-pkg-tools
    in main. (LP: #408402)
* debian/control: Continue using ruby + libopenssl-ruby as Build-Depends
  even tho Debian has moved to gem2deb (not in main). Move ruby-json to
  Suggests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Fact: rubysitedir
 
2
#
 
3
# Purpose: Returns Ruby's site library directory.
 
4
#
 
5
# Resolution: Works out the version to major/minor (1.8, 1.9, etc), then joins
 
6
# that with all the $: library paths.
 
7
#
 
8
# Caveats:
 
9
#
 
10
 
1
11
Facter.add :rubysitedir do
2
12
    setcode do
3
13
        version = RUBY_VERSION.to_s.sub(/\.\d+$/, '')