<commit_before>#
# Copyright 2019 <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# On FreeBSD remove package curl first, if it should be installed
package 'curl' do
  action :remove
  only_if { node['platform_family'].eql?('freebsd') && node['pyload']['packages'].include?('curl') }
end

# Install all configured packages
node['pyload']['packages'].each do |pkg|
  package pkg
end

# On FreeBSD symlink python executeable in /usr/local/bin after python package
# has been installed
link '/usr/local/bin/python' do
  to '/usr/local/bin/python2.7'
  only_if { node['platform_family'].eql?('freebsd') }
end<commit_msg>fixes missing java dependency on rhel and suse<commit_after>#
# Copyright 2019 <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# On FreeBSD remove package curl first, if it should be installed
package 'curl' do
  action :remove
  only_if { platform_family?('freebsd') && node['pyload']['packages'].include?('curl') }
end

# Install all configured packages
node['pyload']['packages'].each do |pkg|
  package pkg
end

# When rhino has been installed (as specified in attrbiutes), ensure that
# java is installed as dependency of rhino on RHEL and SUSE unless java has
# already been installed
package 'install java-headless dependency for rhino' do
  case node['platform_family']
  when 'rhel'
    package_name 'java-headless'
  when 'suse'
    package_name 'java-1_8_0-openjdk-headless'
  end
  only_if { platform_family?('rhel', 'suse') && node['pyload']['packages'].include?('rhino') }
  not_if 'command -v java >/dev/null 2>&1 || exit 1'
end

# On FreeBSD symlink python executeable in /usr/local/bin after python package
# has been installed
link '/usr/local/bin/python' do
  to '/usr/local/bin/python2.7'
  only_if { platform_family?('freebsd') }
end
{'fraction_non_alphanumeric': 0.1037329504666188, 'fraction_numerical': 0.00933237616654702, 'mean_word_length': 4.551792828685259, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3581941', 'n_tokens_mistral': 824, 'n_tokens_neox': 803, 'n_words': 331}