<commit_before>require 'bundler/setup'
if RUBY_ENGINE == "ruby"
  # no need for additional coverage reports on other Rubies. Doesn't seem to
  # work on JRuby anyway.
  require 'coveralls'
  Coveralls.wear!
end
require 'rspec'
require 'rspec/given'

require_relative 'czmq_helper'
require_relative '../lib/cztop'

RSpec.configure do |config|
  config.expect_with :minitest
  include CZMQHelper
end
<commit_msg>increase rlimit for number of open FD if it's lower than 1024 (like on OSX), so test suite can pass<commit_after>require 'bundler/setup'
if RUBY_ENGINE == "ruby"
  # no need for additional coverage reports on other Rubies. Doesn't seem to
  # work on JRuby anyway.
  require 'coveralls'
  Coveralls.wear!
end
require 'rspec'
require 'rspec/given'

require_relative 'czmq_helper'
require_relative '../lib/cztop'

RSpec.configure do |config|
  config.expect_with :minitest
  include CZMQHelper
end

# NOTE: as of January 28, 2016, the test suite needs opens about ~650 file
# descriptors. Some OS (like OSX) has a very low default limit of 256. Let's
# raise it to a more sane 1024, like on Linux.
soft_limit, hard_limit = Process.getrlimit(:NOFILE)
if soft_limit < 1024
  Process.setrlimit(:NOFILE, 1024, hard_limit)
end

{'fraction_non_alphanumeric': 0.08536585365853659, 'fraction_numerical': 0.022764227642276424, 'mean_word_length': 4.621004566210046, 'pattern_counts': {'":': 0, '<': 4, '<?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': '3906124', 'n_tokens_mistral': 448, 'n_tokens_neox': 396, 'n_words': 149}