Sha256: 929c524fd0799d18734a7b9306a2d8f07cec78d36c02105dd16872729eaf6eb6

Contents?: true

Size: 680 Bytes

Versions: 30

Compression:

Stored size: 680 Bytes

Contents

module Alula
  class DummyProcessor < Processor
    
    def process
      super
        
      asset_name = self.attachments.asset_name(item.name)
      output = File.join(self.site.storage.path(:cache, "attachments"), asset_name)
      # Make sure our directory exists
      output_dir = self.site.storage.path(:cache, "attachments", File.dirname(asset_name))
      
      # Skip processing if output already exists...
      unless File.exists?(output)
        # Just simply copy attachement
        FileUtils.cp(item.filepath, output)
      end
      
      # Cleanup ourself
      cleanup
    end
  end
end

Alula::AttachmentProcessor.register('dummy', Alula::DummyProcessor)

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
alula-0.4.27 lib/alula/processors/dummy.rb
alula-0.4.26 lib/alula/processors/dummy.rb
alula-0.4.25 lib/alula/processors/dummy.rb
alula-0.4.24 lib/alula/processors/dummy.rb
alula-0.4.23 lib/alula/processors/dummy.rb
alula-0.4.22 lib/alula/processors/dummy.rb
alula-0.4.21 lib/alula/processors/dummy.rb
alula-0.4.20 lib/alula/processors/dummy.rb
alula-0.4.19 lib/alula/processors/dummy.rb
alula-0.4.18 lib/alula/processors/dummy.rb
alula-0.4.17 lib/alula/processors/dummy.rb
alula-0.4.16 lib/alula/processors/dummy.rb
alula-0.4.15 lib/alula/processors/dummy.rb
alula-0.4.14 lib/alula/processors/dummy.rb
alula-0.4.13 lib/alula/processors/dummy.rb
alula-0.4.12 lib/alula/processors/dummy.rb
alula-0.4.11 lib/alula/processors/dummy.rb
alula-0.4.11a lib/alula/processors/dummy.rb
alula-0.4.10 lib/alula/processors/dummy.rb
alula-0.4.9 lib/alula/processors/dummy.rb