<commit_before>#
# Cookbook Name:: wp
# Recipe:: cli
#
# Author:: <NAME>
# License: MIT
#

include_recipe 'git'
include_recipe 'curl'

include_recipe 'php'
include_recipe 'php::module_mysql'
include_recipe 'mysql::server'
include_recipe 'database::mysql'

# create wpcli dir
directory node['wp']['wpcli-dir'] do
  recursive true
end

# download installer
remote_file "#{node['wp']['wpcli-dir']}/installer.sh" do
  source 'http://wp-cli.org/installer.sh'
  mode 0755
  action :create_if_missing
end

node['wp']['wpcli-bin'] = ::File.join(node['wp']['wpcli-dir'], 'bin', 'wp')

# run installer
bash 'install wp-cli' do
  code './installer.sh'
  cwd node['wp']['wpcli-dir']
  environment 'INSTALL_DIR' => node['wp']['wpcli-dir'],
              'VERSION' => node['wp']['wpcli-version']
  creates node['wp']['wpcli-bin']
end

# link wp bin
link node['wp']['wpcli-link'] do
  to node['wp']['wpcli-bin']
end if node['wp']['wpcli-link']

<commit_msg>require mysql::client instead of mysql::server<commit_after>#
# Cookbook Name:: wp
# Recipe:: cli
#
# Author:: <NAME>
# License: MIT
#

include_recipe 'git'
include_recipe 'curl'

include_recipe 'php'
include_recipe 'php::module_mysql'
include_recipe 'mysql::client'
include_recipe 'database::mysql'

# create wpcli dir
directory node['wp']['wpcli-dir'] do
  recursive true
end

# download installer
remote_file "#{node['wp']['wpcli-dir']}/installer.sh" do
  source 'http://wp-cli.org/installer.sh'
  mode 0755
  action :create_if_missing
end

node['wp']['wpcli-bin'] = ::File.join(node['wp']['wpcli-dir'], 'bin', 'wp')

# run installer
bash 'install wp-cli' do
  code './installer.sh'
  cwd node['wp']['wpcli-dir']
  environment 'INSTALL_DIR' => node['wp']['wpcli-dir'],
              'VERSION' => node['wp']['wpcli-version']
  creates node['wp']['wpcli-bin']
end

# link wp bin
link node['wp']['wpcli-link'] do
  to node['wp']['wpcli-bin']
end if node['wp']['wpcli-link']


{'fraction_non_alphanumeric': 0.1961398017736046, 'fraction_numerical': 0.004173187271778821, 'mean_word_length': 5.167202572347267, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5725136', 'n_tokens_mistral': 709, 'n_tokens_neox': 693, 'n_words': 156}