Service
Use this plugin to create your own “quicky” service.
This is a useful alternative to writing a full-blown plugin class when the need is simple.
Default pipeline(s) in which this plugin operates.
Instantiate new custom plugin.
FIXME: Custom#initialize seems to be running twice at startup. Why?
This works by interpreting the service configuration as a hash of phase names => ruby code.
# File lib/plugins/syckle/custom.rb, line 35 def initialize(context, key, options) super options.each do |phase, script| # skip specific names used for configuration next if phase == 'service' next if phase == 'pipeline' or key == 'pipelines' next if phase == 'active' next if phase == 'priority' # remaining options are names of pipeline phases pipelines.each do |pipe| src = %{ def #{pipe}_#{phase} #{script} end } (class << self; self; end).module_eval(src) end end end
Generated with the Darkfish Rdoc Generator 2.