Sha256: c54335cb0fd024a5948255bbd75baded0099e18b92996d32739c0f725e67cd5b

Contents?: true

Size: 450 Bytes

Versions: 6

Compression:

Stored size: 450 Bytes

Contents

# frozen_string_literal: true

module Capybara
  module Screenshot
    module Os
      ON_WINDOWS = !!(RbConfig::CONFIG["host_os"] =~ /mswin|mingw|cygwin/)
      ON_MAC = !!(RbConfig::CONFIG["host_os"] =~ /darwin/)
      ON_LINUX = !!(RbConfig::CONFIG["host_os"] =~ /linux/)

      def self.name
        return "windows" if ON_WINDOWS
        return "macos" if ON_MAC
        return "linux" if ON_LINUX

        "unknown"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
capybara-screenshot-diff-1.9.2 lib/capybara/screenshot/diff/os.rb
capybara-screenshot-diff-1.9.0 lib/capybara/screenshot/diff/os.rb
capybara-screenshot-diff-1.8.3 lib/capybara/screenshot/diff/os.rb
capybara-screenshot-diff-1.8.2 lib/capybara/screenshot/diff/os.rb
capybara-screenshot-diff-1.8.1 lib/capybara/screenshot/diff/os.rb
capybara-screenshot-diff-1.8.0 lib/capybara/screenshot/diff/os.rb