<commit_before>require 'rake'

# We clear the Beaker rake tasks from spec_helper as they assume
# rspec-puppet and a certain filesystem layout
Rake::Task[:beaker_nodes].clear
Rake::Task[:beaker].clear

PE_RELEASES = {
  '3.8.1' => 'http://pe-releases.puppetlabs.lan/3.8.1/',
  '2015.2' => 'http://enterprise.delivery.puppetlabs.net/2015.2/preview/',
}

namespace :acceptance do
  {
    :vagrant => [
      'ubuntu1404',
      'centos7',
      'centos6',
      'ubuntu1404m_debian7a',
      'ubuntu1404m_ubuntu1404a',
      'centos7m_centos7a',
      'centos6m_centos6a',
    ],
    :pooler => [
      'ubuntu1404',
      'centos7',
      'centos6',
      'ubuntu1404m_debian7a',
      'ubuntu1404m_ubuntu1404a',
      'centos7m_centos7a',
      'centos6m_centos6a',
      'rhel7',
      'rhel7m_scientific7a',
    ]
  }.each do |ns, configs|
    namespace ns.to_sym do
      configs.each do |config|
        PE_RELEASES.each do |version, pe_dir|
          ENV['BEAKER_PE_DIR'] = pe_dir
          ENV['BEAKER_set'] = "acceptance/nodesets/#{ns}/#{config}.yml"
          desc "Run accpetance tests for #{config} on #{ns} with PE #{version}"
          RSpec::Core::RakeTask.new("#{config}_#{version}".to_sym) do |t|
            t.pattern = 'spec/acceptance'
          end
        end
      end
    end
  end
end

desc "Run acceptance tests"
RSpec::Core::RakeTask.new(:acceptance) do |t|
  ENV['BEAKER_PE_DIR'] = ENV['BEAKER_PE_DIR'] || PE_RELEASES['2015.2']
  ENV['BEAKER_set'] = ENV['BEAKER_set'] || 'acceptance/nodesets/vagrant/ubuntu1404.yml'
  t.pattern = 'spec/acceptance'
end
<commit_msg>(MAINT) Fix issue with running rake acceptance<commit_after>require 'rake'

# We clear the Beaker rake tasks from spec_helper as they assume
# rspec-puppet and a certain filesystem layout
Rake::Task[:beaker_nodes].clear
Rake::Task[:beaker].clear

PE_RELEASES = {
  '3.8.1' => 'http://pe-releases.puppetlabs.lan/3.8.1/',
  '2015.2' => 'http://enterprise.delivery.puppetlabs.net/2015.2/preview/',
}

desc "Run acceptance tests"
RSpec::Core::RakeTask.new(:acceptance) do |t|
  ENV['BEAKER_PE_DIR'] = ENV['BEAKER_PE_DIR'] || PE_RELEASES['2015.2']
  ENV['BEAKER_set'] = ENV['BEAKER_set'] || 'vagrant/ubuntu1404'
  t.pattern = 'spec/acceptance'
end

namespace :acceptance do
  {
    :vagrant => [
      'ubuntu1404',
      'centos7',
      'centos6',
      'ubuntu1404m_debian7a',
      'ubuntu1404m_ubuntu1404a',
      'centos7m_centos7a',
      'centos6m_centos6a',
    ],
    :pooler => [
      'ubuntu1404',
      'centos7',
      'centos6',
      'ubuntu1404m_debian7a',
      'ubuntu1404m_ubuntu1404a',
      'centos7m_centos7a',
      'centos6m_centos6a',
      'rhel7',
      'rhel7m_scientific7a',
    ]
  }.each do |ns, configs|
    namespace ns.to_sym do
      configs.each do |config|
        PE_RELEASES.each do |version, pe_dir|
          desc "Run accpetance tests for #{config} on #{ns} with PE #{version}"
          RSpec::Core::RakeTask.new("#{config}_#{version}".to_sym) do |t|
            ENV['BEAKER_PE_DIR'] = pe_dir
            ENV['BEAKER_set'] = "#{ns}/#{config}"
            t.pattern = 'spec/acceptance'
          end
        end
      end
    end
  end
end



{'fraction_non_alphanumeric': 0.15011037527593818, 'fraction_numerical': 0.04667297382529171, 'mean_word_length': 2.9403726708074536, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4191730', 'n_tokens_mistral': 1346, 'n_tokens_neox': 1237, 'n_words': 212}