<commit_before>#
# Cookbook Name:: yum
# Recipe:: postgresql91
#
# Copyright 2012, Cogini
#
# All rights reserved - Do Not Redistribute
#

key = "#{node.platform}#{node.platform_version.to_i}"

case key
when 'centos6'
    url = 'http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64/pgdg-centos91-9.1-4.noarch.rpm'
else
    raise NotImplementedError
end

rpm_file = "#{Chef::Config[:file_cache_path]}/#{File.basename(url)}"


package 'pgdg-centos91' do
    action :remove
end

remote_file rpm_file do
    source url
    action :create_if_missing
end

execute 'install pgdg-centos91' do
    command "yum install -y #{rpm_file}"
end


template '/etc/yum.repos.d/CentOS-Base.repo' do
    source 'postgresql-CentOS-Base.repo.erb'
    mode '0644'
end<commit_msg>overcome keycheck by using rpm instead<commit_after>#
# Cookbook Name:: yum
# Recipe:: postgresql91
#
# Copyright 2012, Cogini
#
# All rights reserved - Do Not Redistribute
#

key = "#{node.platform}#{node.platform_version.to_i}"

case key
when 'centos6'
    url = 'http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64/pgdg-centos91-9.1-4.noarch.rpm'
else
    raise NotImplementedError
end

rpm_file = "#{Chef::Config[:file_cache_path]}/#{File.basename(url)}"


package 'pgdg-centos91' do
    action :remove
end

remote_file rpm_file do
    source url
    action :create_if_missing
end

execute 'install pgdg-centos91' do
    command "rpm -i #{rpm_file}"
end


template '/etc/yum.repos.d/CentOS-Base.repo' do
    source 'postgresql-CentOS-Base.repo.erb'
    mode '0644'
end
{'fraction_non_alphanumeric': 0.13245901639344262, 'fraction_numerical': 0.03540983606557377, 'mean_word_length': 4.036303630363037, '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': '6116883', 'n_tokens_mistral': 638, 'n_tokens_neox': 595, 'n_words': 125}