<commit_before>#
# Cookbook Name:: jetty
# Attributes:: default
#
# Copyright 2010, Chef Software, Inc.
#
# 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.

default['jetty']['host'] = '0.0.0.0'
default['jetty']['port'] = 8080
default['jetty']['no_start'] = 0
default['jetty']['jetty_args'] = ''
default['jetty']['java_options'] = '-Xmx256m -Djava.awt.headless=true'
default['jetty']['cargo']['username'] = 'cargo'
default['jetty']['cargo']['jetty6']['source']['url'] = 'http://repo1.maven.org/maven2/org/codehaus/cargo/cargo-jetty-6-and-earlier-deployer/1.2.2/cargo-jetty-6-and-earlier-deployer-1.2.2.war'
default['jetty']['cargo']['jetty6']['source']['checksum'] = '34ea6285c48c31e579aee69ba138cf94015070aacafc1a993f37a9e6534fe064'

case platform
when 'centos', 'redhat', 'fedora', 'amazon', 'scientific'
  set['jetty']['user'] = 'root'
  set['jetty']['group'] = 'root'
  set['jetty']['home'] = '/usr/share/jetty6'
  set['jetty']['config_dir'] = '/etc/jetty6'
  set['jetty']['log_dir'] = '/var/log/jetty6'
  set['jetty']['tmp_dir'] = '/var/cache/jetty/data'
  set['jetty']['context_dir'] = '/srv/jetty6/contexts'
  set['jetty']['webapp_dir'] = '/srv/jetty6/webapps'
when 'debian', 'ubuntu'
  set['jetty']['user'] = 'jetty'
  set['jetty']['group'] = 'jetty'
  set['jetty']['home'] = '/usr/share/jetty'
  set['jetty']['config_dir'] = '/etc/jetty'
  set['jetty']['log_dir'] = '/var/log/jetty'
  set['jetty']['tmp_dir'] = '/var/cache/jetty/data'
  set['jetty']['context_dir'] = '/etc/jetty/contexts'
  set['jetty']['webapp_dir'] = '/var/lib/jetty/webapps'
else
  set['jetty']['user'] = 'jetty'
  set['jetty']['group'] = 'jetty'
  set['jetty']['home'] = '/usr/share/jetty'
  set['jetty']['config_dir'] = '/etc/jetty'
  set['jetty']['log_dir'] = '/var/log/jetty'
  set['jetty']['tmp_dir'] = '/var/cache/jetty/data'
  set['jetty']['context_dir'] = '/etc/jetty/contexts'
  set['jetty']['webapp_dir'] = '/var/lib/jetty/webapps'
end
<commit_msg>Use platform family for attributes<commit_after>#
# Cookbook Name:: jetty
# Attributes:: default
#
# Copyright 2010-2015, Chef Software, Inc.
#
# 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.

default['jetty']['host'] = '0.0.0.0'
default['jetty']['port'] = 8080
default['jetty']['no_start'] = 0
default['jetty']['jetty_args'] = ''
default['jetty']['java_options'] = '-Xmx256m -Djava.awt.headless=true'
default['jetty']['cargo']['username'] = 'cargo'
default['jetty']['cargo']['jetty6']['source']['url'] = 'http://repo1.maven.org/maven2/org/codehaus/cargo/cargo-jetty-6-and-earlier-deployer/1.2.2/cargo-jetty-6-and-earlier-deployer-1.2.2.war'
default['jetty']['cargo']['jetty6']['source']['checksum'] = '34ea6285c48c31e579aee69ba138cf94015070aacafc1a993f37a9e6534fe064'

case node.platform_family
when 'rhel', 'fedora'
  set['jetty']['user'] = 'root'
  set['jetty']['group'] = 'root'
  set['jetty']['home'] = '/usr/share/jetty6'
  set['jetty']['config_dir'] = '/etc/jetty6'
  set['jetty']['log_dir'] = '/var/log/jetty6'
  set['jetty']['tmp_dir'] = '/var/cache/jetty/data'
  set['jetty']['context_dir'] = '/srv/jetty6/contexts'
  set['jetty']['webapp_dir'] = '/srv/jetty6/webapps'
when 'debian'
  set['jetty']['user'] = 'jetty'
  set['jetty']['group'] = 'jetty'
  set['jetty']['home'] = '/usr/share/jetty'
  set['jetty']['config_dir'] = '/etc/jetty'
  set['jetty']['log_dir'] = '/var/log/jetty'
  set['jetty']['tmp_dir'] = '/var/cache/jetty/data'
  set['jetty']['context_dir'] = '/etc/jetty/contexts'
  set['jetty']['webapp_dir'] = '/var/lib/jetty/webapps'
else
  set['jetty']['user'] = 'jetty'
  set['jetty']['group'] = 'jetty'
  set['jetty']['home'] = '/usr/share/jetty'
  set['jetty']['config_dir'] = '/etc/jetty'
  set['jetty']['log_dir'] = '/var/log/jetty'
  set['jetty']['tmp_dir'] = '/var/cache/jetty/data'
  set['jetty']['context_dir'] = '/etc/jetty/contexts'
  set['jetty']['webapp_dir'] = '/var/lib/jetty/webapps'
end

{'fraction_non_alphanumeric': 0.21970321516900249, 'fraction_numerical': 0.0325638911788953, 'mean_word_length': 5.49665327978581, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, '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': '6234538', 'n_tokens_mistral': 1883, 'n_tokens_neox': 1797, 'n_words': 332}