Sha256: e5d089d132f810fbcaee971bae94e1b06e1f1ecb941b9e620643ac8ce611948f

Contents?: true

Size: 417 Bytes

Versions: 9

Compression:

Stored size: 417 Bytes

Contents

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 os_name
        return 'windows' if ON_WINDOWS
        return 'macos' if ON_MAC
        return 'linux' if ON_LINUX

        'unknown'
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
capybara-screenshot-diff-0.15.1 lib/capybara/screenshot/diff/os.rb
capybara-screenshot-diff-0.15.0 lib/capybara/screenshot/diff/os.rb
capybara-screenshot-diff-0.14.2 lib/capybara/screenshot/diff/os.rb
capybara-screenshot-diff-0.14.1 lib/capybara/screenshot/diff/os.rb
capybara-screenshot-diff-0.14.0 lib/capybara/screenshot/diff/os.rb
capybara-screenshot-diff-0.13.1 lib/capybara/screenshot/diff/os.rb
capybara-screenshot-diff-0.13.0 lib/capybara/screenshot/diff/os.rb
capybara-screenshot-diff-0.12.2 lib/capybara/screenshot/diff/os.rb
capybara-screenshot-diff-0.12.1 lib/capybara/screenshot/diff/os.rb