<commit_before>case node[:platform]
when "rhel", "fedora", "suse", "centos", "amazon"
  # uninstall php
  script "uninstall_php" do
    interpreter "bash"
    user "root"
    cwd "/"
    code <<-EOH
    yum remove php*
    EOH
  end

  # install yum repo
  script "install_yum_repo" do
    interpreter "bash"
    user "root"
    cwd "/"
    code <<-EOH
    rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
    EOH
  end

  # install php54
  script "install_php54" do
    interpreter "bash"
    user "root"
    cwd "/"
    code <<-EOH
    yum install php54w php54w-cli php54w-common php54w-gd php54w-ldap php54w-mbstring php54w-mcrypt php54w-mysql php54w-pdo
    EOH
  end
end<commit_msg>Update PHP<commit_after>case node[:platform]
when "rhel", "fedora", "suse", "centos", "amazon"

  bad_packages =  ["php*"]

  bad_packages.each do |pkg|
    package pkg do
      action :remove
    end
  end

  remote_file "#{Chef::Config[:file_cache_path]}/webtatic_repo_latest.rpm" do
    source "http://mirror.webtatic.com/yum/el6/latest.rpm"
    action :create
  end

  rpm_package "jmxtrans" do
    source "#{Chef::Config[:file_cache_path]}/webtatic_repo_latest.rpm"
    action :install
  end


  good_packages =  ["php54w", "php54w-cli", "php54w-common", "php54w-gd", "php54w-ldap", "php54w-mbstring", "php54w-mcrypt", "php54w-mysql", "php54w-pdo"]

  good_packages.each do |pkg|
    package pkg do
      action :install
    end
  end



  # uninstall php
  # script "uninstall_php" do
  #   interpreter "bash"
  #   user "root"
  #   cwd "/"
  #   code <<-EOH
  #   yum remove php*
  #   EOH
  # end

  # install yum repo
  # script "install_yum_repo" do
  #   interpreter "bash"
  #   user "root"
  #   cwd "/"
  #   code <<-EOH
  #   rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
  #   EOH
  # end

  # install php54
  # script "install_php54" do
  #   interpreter "bash"
  #   user "root"
  #   cwd "/"
  #   code <<-EOH
  #   yum install php54w php54w-cli php54w-common php54w-gd php54w-ldap php54w-mbstring php54w-mcrypt php54w-mysql php54w-pdo
  #   EOH
  # end
end
{'fraction_non_alphanumeric': 0.12987012987012986, 'fraction_numerical': 0.031265031265031266, 'mean_word_length': 2.7681159420289854, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1756974', 'n_tokens_mistral': 925, 'n_tokens_neox': 837, 'n_words': 186}