Sha256: e1543c378fe78f03b1eee786788af73364a8e867d7754c96a3839da12b6650a4
Contents?: true
Size: 409 Bytes
Versions: 2
Compression:
Stored size: 409 Bytes
Contents
# 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+$/, '') $:.find do |dir| dir =~ /#{File.join("site_ruby", version)}$/ end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
facter-1.6.1 | lib/facter/rubysitedir.rb |
facter-1.6.0 | lib/facter/rubysitedir.rb |