<commit_before>#!/usr/bin/env ruby
require 'fileutils'
include FileUtils

def root_dir
  @root_dir ||= File.expand_path(File.dirname(__FILE__) + '/../..')
end

def rake(*tasks)
  tasks.each do |task|
    return false unless system("rake", task, 'RAILS_ENV=test')
  end
end

build_results = {}

cd root_dir do
  build_results[:bundle] = system 'bundle install' # bundling here, rather than in a task (not in Rails context)
  build_results[:spec] = rake 'cruise'
end

failures = build_results.select { |key, value| value == false }

if failures.empty?
  exit(0)
else
  exit(-1)
end<commit_msg>regenerate application.yml on every build<commit_after>#!/usr/bin/env ruby
require 'fileutils'
include FileUtils

def root_dir
  @root_dir ||= File.expand_path(File.dirname(__FILE__) + '/../..')
end

def rake(*tasks)
  tasks.each do |task|
    return false unless system("rake", task, 'RAILS_ENV=test')
  end
end

build_results = {}

cd root_dir do
  build_results[:bundle] = system 'bundle install' # bundling here, rather than in a task (not in Rails context)
  system "cp config/application.yml.example config/application.yml"
  build_results[:spec] = rake 'cruise'
end

failures = build_results.select { |key, value| value == false }

if failures.empty?
  exit(0)
else
  exit(-1)
end
{'fraction_non_alphanumeric': 0.1298904538341158, 'fraction_numerical': 0.003129890453834116, 'mean_word_length': 4.4425531914893615, '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': '5481310', 'n_tokens_mistral': 448, 'n_tokens_neox': 435, 'n_words': 125}