<commit_before>require 'rbconfig'
require 'bundler/vendored_thor'
require 'bundler'
require 'rubygems/command'
require 'fileutils'
require 'pathname'
require 'tmpdir'

# Options:
#
#   name        - the gem name
#   uri         - git repo uri
#   repo        - path to local checkout
#   ref         - the commit hash
#   version     - gem version
#   build-flags - build arguments

ruby = File.join(ENV["ruby"], "bin", RbConfig::CONFIG['ruby_install_name'])
out = ENV["out"]
bin_dir = File.join(ENV["out"], "bin")

name        = ARGV[0]
uri         = ARGV[1]
REPO        = ARGV[2]
ref         = ARGV[3]
version     = ARGV[4]
build_flags = ARGV[5]

# options to pass to bundler
options = {
  "name"    => name,
  "uri"     => uri,
  "ref"     => ref,
  "version" => version,
}

# Monkey-patch Bundler to use our local checkout.
# I wish we didn't have to do this, but bundler does not expose an API to do<commit_msg>buildRubyGem: fixes gemspec UTF-8 loading issue<commit_after>require 'rbconfig'
require 'bundler/vendored_thor'
require 'bundler'
require 'rubygems/command'
require 'fileutils'
require 'pathname'
require 'tmpdir'

if defined?(Encoding.default_internal)
  Encoding.default_internal = Encoding::UTF_8
  Encoding.default_external = Encoding::UTF_8
end

# Options:
#
#   name        - the gem name
#   uri         - git repo uri
#   repo        - path to local checkout
#   ref         - the commit hash
#   version     - gem version
#   build-flags - build arguments

ruby = File.join(ENV["ruby"], "bin", RbConfig::CONFIG['ruby_install_name'])
out = ENV["out"]
bin_dir = File.join(ENV["out"], "bin")

name        = ARGV[0]
uri         = ARGV[1]
REPO        = ARGV[2]
ref         = ARGV[3]
version     = ARGV[4]
build_flags = ARGV[5]

# options to pass to bundler
options = {
  "name"    => name,
  "uri"     => uri,
  "ref"     => ref,
  "version" => version,
}

# Monkey-patch Bundler to use our local checkout.
# I wish we didn't have to do this, but bundler does not expose an API to do
{'fraction_non_alphanumeric': 0.12387612387612387, 'fraction_numerical': 0.007492507492507493, 'mean_word_length': 2.881782945736434, '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': '5625128', 'n_tokens_mistral': 714, 'n_tokens_neox': 682, 'n_words': 205}