case node[:platform_family]
when 'debian'
  # firefox runs at compile time and firefox package is not up to date on Ubuntu 14.04-1
  execute 'sudo apt-get update' do
    action :nothing
  end.run_action(:run)

  # selenium-webdriver includes ffi which requires the following dependencies
  package 'gcc' do
    action :nothing
  end.run_action(:install)
  package 'libffi-dev' do
    action :nothing
  end.run_action(:install)
when 'rhel'
  include_recipe 'yum'

  # selenium-webdriver includes ffi which requires the following dependencies
  package 'gcc'
  package 'libffi-devel'
end

case node[:platform_family]
when 'debian'
  # firefox runs at compile time and firefox package is not up to date on Ubuntu
  execute 'sudo apt-get update' do
    action :nothing
  end.run_action(:run)

  # selenium-webdriver includes ffi which requires the following dependencies
  package 'gcc' do
    action :nothing
  end.run_action(:install)
  package 'libffi-dev' do
    action :nothing
  end.run_action(:install)
when 'rhel'
  # firefox runs at compile time and firefox package is not up to date on CentOS
  execute 'yum update -y' do
    action :nothing
  end.run_action(:run)

  # selenium-webdriver includes ffi which requires the following dependencies
  package 'gcc'
  package 'libffi-devel'
end

Fix firefox undefined symbol: g_type_check_instance_is_fundamentally_a
Fix firefox undefined symbol: g_type_check_instance_is_fundamentally_a
