diff options
author | Anton Aksola <anton.aksola@nebula.fi> | 2015-08-28 11:05:18 +0300 |
---|---|---|
committer | Anton Aksola <anton.aksola@nebula.fi> | 2015-08-28 11:05:18 +0300 |
commit | 0906e02a8538b698ed8bd7c72e6a09d3e809b67a (patch) | |
tree | d494ee43f71d41034efa98f5b5ab59ab5500207a /lib/oxidized/config.rb | |
parent | 18cf96b36e54cb52c678e4e6395e595b6f9b4159 (diff) |
Initial implementation of the hook feature
The current implementation is modular and allows users to define hooks
in several ways:
* Use one of the built-in hook types (currently only 'exec')
* Define their own Hook classes inside ~/.config/oxidized/hook
Exec hook type runs a user defined command with or without shell. It
populates a bunch of environment variables with metadata. The command
can either be run as synchronous or asynchronous. The default is
synchronous.
Diffstat (limited to 'lib/oxidized/config.rb')
-rw-r--r-- | lib/oxidized/config.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/oxidized/config.rb b/lib/oxidized/config.rb index 96c8fbf..f45004a 100644 --- a/lib/oxidized/config.rb +++ b/lib/oxidized/config.rb @@ -9,10 +9,11 @@ module Oxidized OutputDir = File.join Directory, %w(lib oxidized output) ModelDir = File.join Directory, %w(lib oxidized model) SourceDir = File.join Directory, %w(lib oxidized source) + HookDir = File.join Directory, %w(lib oxidized hook) Sleep = 1 end class << self - attr_accessor :mgr + attr_accessor :mgr, :Hooks end CFGS = Asetus.new :name=>'oxidized', :load=>false, :key_to_s=>true CFGS.default.username = 'username' |