Sha256: eee86f06b380525e9e5386025014526909515b23f05ff4f0dce61cd13a175560
Contents?: true
Size: 1.26 KB
Versions: 6
Compression:
Stored size: 1.26 KB
Contents
module IronWorkerNG module Feature module Perl module MergeExec class Feature < IronWorkerNG::Feature::Base attr_reader :path def initialize(code, path) super(code) @path = path end def hash_string Digest::MD5.hexdigest(@path + File.mtime(rebase(@path)).to_i.to_s) end def bundle(container) IronCore::Logger.debug 'IronWorkerNG', "Bundling perl exec with path='#{@path}'" container_add(container, File.basename(@path), rebase(@path)) end end module InstanceMethods def merge_exec(path=nil) @exec ||= nil return @exec unless path unless @exec.nil? IronCore::Logger.warn 'IronWorkerNG', "Ignoring attempt to merge perl exec with path='#{path}'" return end @exec = IronWorkerNG::Feature::Perl::MergeExec::Feature.new(self, path) IronCore::Logger.info 'IronWorkerNG', "Merging perl exec with path='#{path}'" @features << @exec end alias :exec :merge_exec alias :merge_worker :merge_exec alias :worker :merge_worker end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems