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

require_relative 'core'

# require 'rubygems'

# grem('update --system')
# grem('update bundler')

# grundler('install --gemfile=Gemfile.stub')

require 'bundler/cli'
Bundler::CLI.new.invoke(:install, [], :gemfile => 'Gemfile.stub', :deployment => true, :verbose => true)

# grash('mkdir -p ~/.gem/jruby/1.9/ && cd ~/.gem/jruby/1.9 && ln -s /usr/share/ruby/gems/cache')

# puts 'Installing bundler'
# cmd = "install bundler"
# grem(cmd)

# See https://gist.github.com/adamjmurray/3154437
# puts 'Installing grache'
# cmd = "install --verbose grache"
# grem(cmd)

begin
  require 'grache'
rescue LoadError => e
  puts e.inspect
  raise e
end

puts "Using grache version #{Grache::VERSION}"

# Fetch grache pack
Grache::Packer.new.install()
Bundler::CLI.new.invoke(:install, [], :gemfile => 'Gemfile.stub', :deployment => true, :verbose => true)

# Show installed gems
Bundler::CLI.new.invoke(:show, [], :verbose => true)

puts `find #{$GEM_PATH}`

# require_relative './main.rb'

# gruby('./main.rb')
# Run main.rb
# Bundler::CLI.new.invoke(:exec, [$JAVA_CMD, '-jar', $RUBY_CMD, './main.rb'], :verbose => true)
# grundler('exec ruby main.rb')<commit_msg>Somehow almost working stub.rb<commit_after>#! /usr/bin/env ruby

require_relative 'core'

# require 'rubygems'

# grem('update --system')
# grem('update bundler')

# grundler('install --gemfile=Gemfile.stub')

require 'bundler/cli'
Bundler::CLI.new.invoke(:install, [], :gemfile => 'Gemfile.stub', :deployment => true, :verbose => true)
require 'bundler/setup'

grash('cat .bundle/config')

# grash('mkdir -p ~/.gem/jruby/1.9/ && cd ~/.gem/jruby/1.9 && ln -s /usr/share/ruby/gems/cache')

# puts 'Installing bundler'
# cmd = "install bundler"
# grem(cmd)

# See https://gist.github.com/adamjmurray/3154437
# puts 'Installing grache'
# cmd = "install --verbose grache"
# grem(cmd)

begin
  require 'grache'
rescue LoadError => e
  puts e.inspect
  raise e
end

puts "Using grache version #{Grache::VERSION}"

# Fetch grache pack
Grache::Packer.new.install()
Bundler::CLI.new.invoke(:install, [], :gemfile => 'Gemfile.stub', :deployment => true, :verbose => true)

# Show installed gems
Bundler::CLI.new.invoke(:show, [], :verbose => true)

# puts `find #{$GEM_PATH}`

# require_relative './main.rb'

# gruby('./main.rb')
# Run main.rb
# Bundler::CLI.new.invoke(:exec, [$JAVA_CMD, '-jar', $RUBY_CMD, './main.rb'], :verbose => true)
# grundler('exec ruby main.rb')
{'fraction_non_alphanumeric': 0.1969820554649266, 'fraction_numerical': 0.00897226753670473, 'mean_word_length': 4.575, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 2, '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': '5943066', 'n_tokens_mistral': 976, 'n_tokens_neox': 947, 'n_words': 202}