<commit_before>include_recipe "hhvm"

phpenv_path = "#{node.travis_build_environment.home}/.phpenv"
hhvm_path   = "#{phpenv_path}/versions/hhvm"

directory "#{hhvm_path}/bin" do
  owner     node.travis_build_environment.user
  group     node.travis_build_environment.group
  action    :create
  recursive true
end

file "#{hhvm_path}/bin/php" do
  owner  node.travis_build_environment.user
  group  node.travis_build_environment.group
  mode   00755
  content <<-CONTENT
#!/usr/bin/env bash
hhvm "$@"
  CONTENT
end<commit_msg>Install phpunit for HHVM.<commit_after>include_recipe "hhvm"

phpenv_path = "#{node.travis_build_environment.home}/.phpenv"
hhvm_path   = "#{phpenv_path}/versions/hhvm"

directory "#{hhvm_path}/bin" do
  owner     node.travis_build_environment.user
  group     node.travis_build_environment.group
  action    :create
  recursive true
end

file "#{hhvm_path}/bin/php" do
  owner  node.travis_build_environment.user
  group  node.travis_build_environment.group
  mode   00755
  content <<-CONTENT
#!/usr/bin/env bash
hhvm "$@"
  CONTENT
end


remote_file "#{hhvm_path}/bin/phpunit.phar" do
  source "https://phar.phpunit.de/phpunit.phar"
  owner  node.travis_build_environment.user
  group  node.travis_build_environment.group
end

file "#{hhvm_path}/bin/phpunit" do
  owner  node.travis_build_environment.user
  group  node.travis_build_environment.group
  mode   00755
  content <<-CONTENT
#!/usr/bin/env bash
hhvm "#{hhvm_path}/bin/phpunit.phar" "$@"
  CONTENT
end
{'fraction_non_alphanumeric': 0.11200536552649229, 'fraction_numerical': 0.01006036217303823, 'mean_word_length': 4.445255474452555, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '2471639', 'n_tokens_mistral': 577, 'n_tokens_neox': 566, 'n_words': 97}