<commit_before>#!/usr/bin/env ruby

require "rubygems/specification"
require "rubygems/commands/install_command"

gemspec = ARGV.shift

spec = Gem::Specification.load(gemspec)
deps = [spec.development_dependencies, spec.runtime_dependencies].flatten

# target for now
target = "vendor/bundle/jruby/1.9/"

deps.each do |dep|
  #cmd = "gem install --install-dir #{target} #{dep.name} -v '#{dep.requirement}'"
  installer = Gem::Commands::InstallCommand.new
  installer.options[:generate_rdoc] = false
  installer.options[:generate_ri] = false
  installer.options[:version] = dep.requirement
  installer.options[:args] = [dep.name]
  begin
    installer.execute
  rescue Gem::SystemExitException => e
    if e.exit_code != 0
      puts "Installation of #{dep.to_s} failed"
      raise
    end
  end
end


<commit_msg>set install_dir<commit_after>#!/usr/bin/env ruby

require "rubygems/specification"
require "rubygems/commands/install_command"

gemspec = ARGV.shift

spec = Gem::Specification.load(gemspec)
deps = [spec.development_dependencies, spec.runtime_dependencies].flatten

# target for now
target = "vendor/bundle/jruby/1.9/"

deps.each do |dep|
  #cmd = "gem install --install-dir #{target} #{dep.name} -v '#{dep.requirement}'"
  installer = Gem::Commands::InstallCommand.new
  installer.options[:generate_rdoc] = false
  installer.options[:generate_ri] = false
  installer.options[:version] = dep.requirement
  installer.options[:args] = [dep.name]
  installer.options[:install_dir] = target
  begin
    installer.execute
  rescue Gem::SystemExitException => e
    if e.exit_code != 0
      puts "Installation of #{dep.to_s} failed"
      raise
    end
  end
end



{'fraction_non_alphanumeric': 0.13090257023311416, 'fraction_numerical': 0.0035863717872086074, 'mean_word_length': 4.4, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7261922', 'n_tokens_mistral': 575, 'n_tokens_neox': 561, 'n_words': 115}