Sha256: dc67db2fbab02490903a30c8af0bd7c34cb6552f08a275ff77eaacceeca26680

Contents?: true

Size: 552 Bytes

Versions: 12

Compression:

Stored size: 552 Bytes

Contents

# frozen_string_literal: true

module Capybara
  module Screenshot
    module Diff
      module Utils
        def self.detect_available_drivers
          result = []
          begin
            result << :vips if defined?(Vips) || require("vips")
          rescue LoadError
            # vips not present
          end
          begin
            result << :chunky_png if defined?(ChunkyPNG) || require("chunky_png")
          rescue LoadError
            # chunky_png not present
          end
          result
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
capybara-screenshot-diff-1.6.2 lib/capybara/screenshot/diff/drivers/utils.rb
capybara-screenshot-diff-1.6.1 lib/capybara/screenshot/diff/drivers/utils.rb
capybara-screenshot-diff-1.6.0 lib/capybara/screenshot/diff/drivers/utils.rb
capybara-screenshot-diff-1.5.5 lib/capybara/screenshot/diff/drivers/utils.rb
capybara-screenshot-diff-1.5.4 lib/capybara/screenshot/diff/drivers/utils.rb
capybara-screenshot-diff-1.5.3 lib/capybara/screenshot/diff/drivers/utils.rb
capybara-screenshot-diff-1.5.2 lib/capybara/screenshot/diff/drivers/utils.rb
capybara-screenshot-diff-1.5.1 lib/capybara/screenshot/diff/drivers/utils.rb
capybara-screenshot-diff-1.5.0 lib/capybara/screenshot/diff/drivers/utils.rb
capybara-screenshot-diff-1.4.2 lib/capybara/screenshot/diff/drivers/utils.rb
capybara-screenshot-diff-1.4.1 lib/capybara/screenshot/diff/drivers/utils.rb
capybara-screenshot-diff-1.4.0 lib/capybara/screenshot/diff/drivers/utils.rb