<commit_before># Package
if platform_family?("rhel")
  packages = %w{
    libicu-devel libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel
    libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git mysql-devel gcc-c++
    ImageMagick-devel ImageMagick
  }
else
  packages = %w{
    build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev
    curl openssh-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev python-docutils
    logrotate vim curl wget checkinstall
  }
end

default['gitlab']['packages'] = packages
default['gitlab']['ruby'] = "2.0.0-p353"

# GitLab shell
default['gitlab']['shell_repository'] = "https://github.com/gitlabhq/gitlab-shell.git"
default['gitlab']['shell_revision'] = "v1.8.0"

# GitLab hq
default['gitlab']['repository'] = "https://github.com/gitlabhq/gitlabhq.git"
default['gitlab']['deploy_key'] = "" # Optional. Private key used to connect to private GitLab repository.

# GitLab shell config
default['gitlab']['redis_path'] = "/usr/local/bin/redis-cli"
default['gitlab']['redis_host'] = "127.0.0.1"
default['gitlab']['redis_port'] = "6379"
default['gitlab']['namespace']  = "resque:gitlab"

# GitLab hq config
default['gitlab']['git_path'] = "/usr/local/bin/git"
default['gitlab']['host'] = "localhost"

default['gitlab']['email_from'] = "gitlab@localhost"
default['gitlab']['support_email'] = "support@localhost"

# Gems
default['gitlab']['bundle_install'] = "SSL_CERT_FILE=/opt/local/etc/certs/cacert.pem bundle install --path=.bundle --deployment"

# Assumed defaults
# database: mysql (option: postgresql)
# environment: production (option: development)

default['gitlab']['database_adapter'] = "mysql"
default['gitlab']['database_password'] = "<PASSWORD>"
default['gitlab']['database_user'] = "git"
default['gitlab']['env'] = "production"

default['mysql']['server_host'] = "localhost" # Host of the server that hosts the database.
default['mysql']['client_host'] = "localhost" # Host where user connections are allowed from.
default['mysql']['server_root_password'] = "<PASSWORD>"
default['mysql']['server_repl_password'] = "<PASSWORD>"
default['mysql']['server_debian_password'] = "<PASSWORD>"

# PostgreSQL attributes
include_attribute 'postgresql'

case node["platform_family"]
when "debian"
  default['postgresql']['enable_pgdg_apt'] = true
when "rhel"
  default['postgresql']['enable_pgdg_yum'] = true
end
default['postgresql']['version'] = "9.3"
default['postgresql']['client']['packages'] = %w{postgresql-client-9.3 libpq-dev}
default['postgresql']['server']['packages'] = %w{postgresql-9.3}
# due to the way attributes are organized we have to override the default paths too
default['postgresql']['dir'] = "/etc/postgresql/#{node['postgresql']['version']}/main"
default['postgresql']['config']['data_directory'] = "/var/lib/postgresql/#{node['postgresql']['version']}/main"
default['postgresql']['config']['hba_file'] = "/etc/postgresql/#{node['postgresql']['version']}/main/pg_hba.conf"
default['postgresql']['config']['ident_file'] = "/etc/postgresql/#{node['postgresql']['version']}/main/pg_ident.conf"
default['postgresql']['config']['external_pid_file'] = "/var/run/postgresql/#{node['postgresql']['version']}-main.pid"
default['postgresql']['config']['ssl'] = false
default['postgresql']['config']['unix_socket_directory'] = nil
default['postgresql']['config']['unix_socket_directories'] = '/var/run/postgresql'
default['postgresql']['password']['postgres'] = "<PASSWORD>"
default['postgresql']['server_host'] = "localhost"

# Postfix
default['postfix']['mail_type'] = "client"
default['postfix']['myhostname'] = "mail.localhost"
default['postfix']['mydomain'] = "localhost"
default['postfix']['myorigin'] = "mail.localhost"
default['postfix']['smtp_use_tls'] = "no"

# User
default['gitlab']['user'] = "git" # Do not change this attribute in production since some code from the GitLab repo such as init.d script assume it is git.
default['gitlab']['group'] = "git"
default['gitlab']['user_uid'] = nil # Use to specify user id.
default['gitlab']['user_gid'] = nil # Use to specify group id.
default['gitlab']['home'] = "/home/git"

# GitLab shell
default['gitlab']['shell_path'] = "/home/git/gitlab-shell"

# GitLab hq
default['gitlab']['path'] = "/home/git/gitlab" # Do not change this attribute in production since some code from the GitLab repo such as init.d assume this path.
default['gitlab']['signup_enabled'] = false
default['gitlab']['projects_limit'] = 10<commit_msg>Move the attribute overrides into the platform family case.<commit_after># Package
if platform_family?("rhel")
  packages = %w{
    libicu-devel libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel
    libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git mysql-devel gcc-c++
    ImageMagick-devel ImageMagick
  }
else
  packages = %w{
    build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev
    curl openssh-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev python-docutils
    logrotate vim curl wget checkinstall
  }
end

default['gitlab']['packages'] = packages
default['gitlab']['ruby'] = "2.0.0-p353"

# GitLab shell
default['gitlab']['shell_repository'] = "https://github.com/gitlabhq/gitlab-shell.git"
default['gitlab']['shell_revision'] = "v1.8.0"

# GitLab hq
default['gitlab']['repository'] = "https://github.com/gitlabhq/gitlabhq.git"
default['gitlab']['deploy_key'] = "" # Optional. Private key used to connect to private GitLab repository.

# GitLab shell config
default['gitlab']['redis_path'] = "/usr/local/bin/redis-cli"
default['gitlab']['redis_host'] = "127.0.0.1"
default['gitlab']['redis_port'] = "6379"
default['gitlab']['namespace']  = "resque:gitlab"

# GitLab hq config
default['gitlab']['git_path'] = "/usr/local/bin/git"
default['gitlab']['host'] = "localhost"

default['gitlab']['email_from'] = "<EMAIL>"
default['gitlab']['support_email'] = "<EMAIL>"

# Gems
default['gitlab']['bundle_install'] = "SSL_CERT_FILE=/opt/local/etc/certs/cacert.pem bundle install --path=.bundle --deployment"

# Assumed defaults
# database: mysql (option: postgresql)
# environment: production (option: development)

default['gitlab']['database_adapter'] = "mysql"
default['gitlab']['database_password'] = "<PASSWORD>"
default['gitlab']['database_user'] = "git"
default['gitlab']['env'] = "production"

default['mysql']['server_host'] = "localhost" # Host of the server that hosts the database.
default['mysql']['client_host'] = "localhost" # Host where user connections are allowed from.
default['mysql']['server_root_password'] = "<PASSWORD>"
default['mysql']['server_repl_password'] = "<PASSWORD>"
default['mysql']['server_debian_password'] = "<PASSWORD>"

# PostgreSQL attributes
include_attribute 'postgresql'

default['postgresql']['version'] = "9.3"
case node["platform_family"]
when "debian"
  default['postgresql']['enable_pgdg_apt'] = true
  default['postgresql']['client']['packages'] = %w{postgresql-client-9.3 libpq-dev}
  default['postgresql']['server']['packages'] = %w{postgresql-9.3}
  # due to the way attributes are organized we have to override the default paths too
  default['postgresql']['dir'] = "/etc/postgresql/#{node['postgresql']['version']}/main"
  default['postgresql']['config']['data_directory'] = "/var/lib/postgresql/#{node['postgresql']['version']}/main"
  default['postgresql']['config']['hba_file'] = "/etc/postgresql/#{node['postgresql']['version']}/main/pg_hba.conf"
  default['postgresql']['config']['ident_file'] = "/etc/postgresql/#{node['postgresql']['version']}/main/pg_ident.conf"
  default['postgresql']['config']['external_pid_file'] = "/var/run/postgresql/#{node['postgresql']['version']}-main.pid"
  default['postgresql']['config']['ssl'] = false
  default['postgresql']['config']['unix_socket_directory'] = nil
  default['postgresql']['config']['unix_socket_directories'] = '/var/run/postgresql'
when "rhel"
  default['postgresql']['enable_pgdg_yum'] = true
  default['postgresql']['client']['packages'] = ["postgresql#{node['postgresql']['version'].split('.').join}-devel"]
  default['postgresql']['server']['packages'] = ["postgresql#{node['postgresql']['version'].split('.').join}-server"]
  default['postgresql']['contrib']['packages'] = ["postgresql#{node['postgresql']['version'].split('.').join}-contrib"]
  default['postgresql']['dir'] = "/var/lib/pgsql/data"
end
default['postgresql']['password']['postgres'] = "<PASSWORD>"
default['postgresql']['server_host'] = "localhost"

# Postfix
default['postfix']['mail_type'] = "client"
default['postfix']['myhostname'] = "mail.localhost"
default['postfix']['mydomain'] = "localhost"
default['postfix']['myorigin'] = "mail.localhost"
default['postfix']['smtp_use_tls'] = "no"

# User
default['gitlab']['user'] = "git" # Do not change this attribute in production since some code from the GitLab repo such as init.d script assume it is git.
default['gitlab']['group'] = "git"
default['gitlab']['user_uid'] = nil # Use to specify user id.
default['gitlab']['user_gid'] = nil # Use to specify group id.
default['gitlab']['home'] = "/home/git"

# GitLab shell
default['gitlab']['shell_path'] = "/home/git/gitlab-shell"

# GitLab hq
default['gitlab']['path'] = "/home/git/gitlab" # Do not change this attribute in production since some code from the GitLab repo such as init.d assume this path.
default['gitlab']['signup_enabled'] = false
default['gitlab']['projects_limit'] = 10
{'fraction_non_alphanumeric': 0.1943370598683523, 'fraction_numerical': 0.006686866576115349, 'mean_word_length': 7.195205479452055, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '5732793', 'n_tokens_mistral': 3159, 'n_tokens_neox': 3068, 'n_words': 593}