Sha256: 333496e599b34fe01dcdfac90ac10adfc145cefdf161e1f201bb276fc3aed312

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

module Dragonfly
  module Minimagick

    # Minimagick is a saved configuration for Dragonfly apps, which does the following:
    # - registers an minimagick analyser
    # - registers an minimagick processor
    # - registers an minimagick encoder
    # - registers an minimagick generator
    # - adds thumb shortcuts like '280x140!', etc.
    # Look at the source code for apply_configuration to see exactly how it configures the app.
    module Config
      def self.apply_configuration(app, opts={})
        app.configure do |c|
          c.analyser.register(Analyser) do |a|
          end
          c.processor.register(Processor) do |p|
          end
          c.encoder.register(Encoder) do |e|
          end
          c.generator.register(Generator) do |g|
          end
          c.job :thumb do |geometry, format|
            process :thumb, geometry
            encode format if format
          end
          c.job :gif do
            encode :gif
          end
          c.job :jpg do
            encode :jpg
          end
          c.job :png do
            encode :png
          end
        end
      end
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dragonfly-minimagick-0.0.1 lib/dragonfly-minimagick/config.rb