lib/onering/util.rb in onering-client-0.0.29 vs lib/onering/util.rb in onering-client-0.0.30

- old
+ new

@@ -1,12 +1,14 @@ module Onering module Util - ENV['FACTERLIB'] = '/etc/facter' - require 'facter' - - class<<self - def fact(name, default=nil) - Facter.value(name) or default + module String + def nil_empty + return nil if (self.strip.chomp.empty? rescue true) + self.strip.chomp end end end end + +class String + include Onering::Util::String +end \ No newline at end of file