Sha256: 75550d2a0feb14803316c7fab38fce9af43d1bdd7a37e20d5992d802911e0756
Contents?: true
Size: 571 Bytes
Versions: 2
Compression:
Stored size: 571 Bytes
Contents
require 'rubygems' class SlashPort::Component class Puppet < SlashPort::Component attribute :name => "freshness", :handler => :freshness, :doc => "Freshness according to puppet's localconfig.yaml" def freshness begin tuple = SlashPort::Tuple.new age = Time.now - File.stat("/var/puppet/state/state.yaml").mtime tuple.data["freshness"] = age.to_f return tuple rescue Errno::ENOENT return nil end end # def freshness end # class Puppet end # class SlashPort::Component
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
slashport-0.15.12 | app/models/components/puppet.rb |
slashport-0.15.10 | app/models/components/puppet.rb |