lib/httpimagestore/configuration/identify.rb in httpimagestore-1.8.0 vs lib/httpimagestore/configuration/identify.rb in httpimagestore-1.8.1

- old
+ new

@@ -1,21 +1,19 @@ require 'httpthumbnailer-client' require 'httpimagestore/ruby_string_template' require 'httpimagestore/configuration/handler' module Configuration - class Identify + class Identify < HandlerStatement include ClassLogging extend Stats def_stats( :total_identify_requests, :total_identify_requests_bytes ) - include ConditionalInclusion - def self.match(node) node.name == 'identify' end def self.parse(configuration, node) @@ -25,13 +23,14 @@ matcher = InclusionMatcher.new(image_name, if_image_name_on) if if_image_name_on configuration.processors << self.new(configuration.global, image_name, matcher) end + include ImageName + include ConditionalInclusion + def initialize(global, image_name, matcher = nil) - @global = global - @image_name = image_name - inclusion_matcher matcher if matcher + super(global, image_name, matcher) end def realize(request_state) client = @global.thumbnailer or fail 'thumbnailer configuration' image = request_state.images[@image_name]