<commit_before>action :install do
  directory "#{node["qmailtoaster"]["workspace"]}/SRPMS" do
    recursive true
  end
  Chef::Log.info("Compiling #{new_resource.name} at version #{new_resource.version} #{node["qmailtoaster"]["rpmbuild"]["distro"]}")
  remote_file "#{node["qmailtoaster"]["workspace"]}/SRPMS/#{new_resource.name}-#{new_resource.version}.src.rpm" do
    source "http://mirrors.qmailtoaster.com/current/SRPMS/#{new_resource.name}-#{new_resource.version}.src.rpm"
    mode 640
    not_if "test -f #{node["qmailtoaster"]["workspace"]}/SRPMS/#{new_resource.name}-#{new_resource.version}.src.rpm"
  end
  execute "build_#{new_resource.name}" do
    command "rpmbuild --rebuild --with #{node["qmailtoaster"]["rpmbuild"]["with"]} #{node["qmailtoaster"]["workspace"]}/SRPMS/#{new_resource.name}-#{new_resource.version}.src.rpm"
    not_if "rpm -qi #{new_resource.name}"
  end

  # Install it
  package new_resource.name do
    action :install
    source "#{node["qmailtoaster"]["workspace"]}/RPMS/#{new_resource.arch}/#{new_resource.name}-#{new_resource.version}.#{new_resource.arch}.rpm"
    provider Chef::Provider::Package::Rpm
    not_if "rpm -qi #{new_resource.name}"
  end
end<commit_msg>make rpmbuild pass foodcritic checks<commit_after>action :install do
  directory "#{node["qmailtoaster"]["workspace"]}/SRPMS" do
    recursive true
  end
  Chef::Log.info("Compiling #{new_resource.name} at version #{new_resource.version} #{node["qmailtoaster"]["rpmbuild"]["distro"]}")
  remote_file "#{node["qmailtoaster"]["workspace"]}/SRPMS/#{new_resource.name}-#{new_resource.version}.src.rpm" do
    source "http://mirrors.qmailtoaster.com/current/SRPMS/#{new_resource.name}-#{new_resource.version}.src.rpm"
    mode "640"
    not_if "test -f #{node["qmailtoaster"]["workspace"]}/SRPMS/#{new_resource.name}-#{new_resource.version}.src.rpm"
  end
  r = execute "build_#{new_resource.name}" do
    command "rpmbuild --rebuild --with #{node["qmailtoaster"]["rpmbuild"]["with"]} #{node["qmailtoaster"]["workspace"]}/SRPMS/#{new_resource.name}-#{new_resource.version}.src.rpm"
    not_if "rpm -qi #{new_resource.name}"
  end
  new_resource.updated_by_last_action(true) if r.updated_by_last_action?
  # Install it
  r = package new_resource.name do
    action :install
    source "#{node["qmailtoaster"]["workspace"]}/RPMS/#{new_resource.arch}/#{new_resource.name}-#{new_resource.version}.#{new_resource.arch}.rpm"
    provider Chef::Provider::Package::Rpm
    not_if "rpm -qi #{new_resource.name}"
  end
  new_resource.updated_by_last_action(true) if r.updated_by_last_action?
end
{'fraction_non_alphanumeric': 0.18435321456235476, 'fraction_numerical': 0.0023237800154918666, 'mean_word_length': 5.86968085106383, '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': '5178156', 'n_tokens_mistral': 914, 'n_tokens_neox': 940, 'n_words': 127}