Sha256: 614a59f3590b806960788601754866874c8ac290cb16d1077b9eb71886ddf03d

Contents?: true

Size: 475 Bytes

Versions: 1

Compression:

Stored size: 475 Bytes

Contents

require 'dragonfly_chrome_headless/processors/rasterize'

module DragonflyChromeHeadless
  class Plugin
    def call(app, options={})
      app.env[:node_command] = options[:node_command] || 'node'
      app.env[:host] = options[:host]
      app.env[:port] = options[:port]

      app.add_processor :rasterize, DragonflyChromeHeadless::Processors::Rasterize.new
    end
  end
end

Dragonfly::App.register_plugin(:chrome_headless) do
  DragonflyChromeHeadless::Plugin.new
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dragonfly_chrome_headless-0.2.0 lib/dragonfly_chrome_headless/plugin.rb