<commit_before>include_recipe "opsworks-capstorm::_common"
package "mysql-connector-java"

directory node[:capstorm][:install_dir] do
  action :create
  recursive true
end

remote_file "#{Chef::Config[:file_cache_path]}/CopyStorm.zip" do
  source node[:capstorm][:copystorm][:package_url]
  action :create
end

execute "unzip #{Chef::Config[:file_cache_path]}/CopyStorm.zip -d #{node[:capstorm][:install_dir]}"
execute "chmod +x #{node[:capstorm][:install_dir]}/CopyStorm/CopyStorm.sh"


cookbook_file node[:capstorm][:copystorm][:session_file][:name] do
  cookbook node[:capstorm][:copystorm][:session_file][:cookbook]
  path "#{node[:capstorm][:config_dir]}/session.copyStorm"
end

#TODO credentials?
#TODO cron?
<commit_msg>Linking mysql java connector.<commit_after>include_recipe "opsworks-capstorm::_common"
package "mysql-connector-java"

directory node[:capstorm][:install_dir] do
  action :create
  recursive true
end

remote_file "#{Chef::Config[:file_cache_path]}/CopyStorm.zip" do
  source node[:capstorm][:copystorm][:package_url]
  action :create
end

execute "unzip #{Chef::Config[:file_cache_path]}/CopyStorm.zip -d #{node[:capstorm][:install_dir]}"
execute "chmod +x #{node[:capstorm][:install_dir]}/CopyStorm/CopyStorm.sh"

link "#{node[:capstorm][:install_dir]}/CopyStorm/lib/mysql-connector-java.jar" do
  to "/usr/share/java/mysql-connector-java.jar"
end

cookbook_file node[:capstorm][:copystorm][:session_file][:name] do
  cookbook node[:capstorm][:copystorm][:session_file][:cookbook]
  path "#{node[:capstorm][:config_dir]}/session.copyStorm"
end

#TODO credentials?
#TODO cron?

{'fraction_non_alphanumeric': 0.16521197007481297, 'fraction_numerical': 0.0, 'mean_word_length': 8.441176470588236, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2056801', 'n_tokens_mistral': 580, 'n_tokens_neox': 573, 'n_words': 91}