<commit_before>$:.unshift File.expand_path('../vendor', __FILE__)
require 'thor'
require 'bundler'
require 'rubygems/config_file'

# Work around a RubyGems bug
Gem.configuration

module Bundler
  class CLI < Thor
    ARGV = ::ARGV.dup

    desc "init", "Generates a Gemfile into the current working directory"
    def init
      if File.exist?("Gemfile")
        puts "Gemfile already exists at #{Dir.pwd}/Gemfile"
      else
        puts "Writing new Gemfile to #{Dir.pwd}/Gemfile"
        FileUtils.cp(File.expand_path('../templates/Gemfile', __FILE__), 'Gemfile')
      end
    end

    def initialize(*)
      super
      Bundler.ui = UI::Shell.new(shell)
      Gem::DefaultUserInteraction.ui = UI::RGProxy.new(Bundler.ui)
    end

    desc "check", "Checks if the dependencies listed in Gemfile are satisfied by currently installed gems"
    def check
      env = Bundler.load
      # Check top level dependencies
      missing = env.dependencies.select { |d| env.index.search(d).empty? }
      if missing.any?
        puts "The following dependencies are missing"
        missing.each do |d|
          puts "  * #{d}"
        end
      else
        env.specs
        puts "The Gemfile's dependencies are satisfied"
      end
    end

    desc "install", "Install the current environment to the system"
    method_option :without, :type => :array, :banner => "Exclude gems thar are part of the specified named group"
    def install(path = nil)
      opts = options.dup
      opts[:without] ||= []
      opts[:without].map! { |g| g.to_sym }

      Bundler.settings[:path] = path if path

      Installer.install(Bundler.root, Bundler.definition, opts)
    end

    desc "lock", "Locks the bundle to the current set of dependencies, including all child dependencies."<commit_msg>Typo: thar -> that<commit_after>$:.unshift File.expand_path('../vendor', __FILE__)
require 'thor'
require 'bundler'
require 'rubygems/config_file'

# Work around a RubyGems bug
Gem.configuration

module Bundler
  class CLI < Thor
    ARGV = ::ARGV.dup

    desc "init", "Generates a Gemfile into the current working directory"
    def init
      if File.exist?("Gemfile")
        puts "Gemfile already exists at #{Dir.pwd}/Gemfile"
      else
        puts "Writing new Gemfile to #{Dir.pwd}/Gemfile"
        FileUtils.cp(File.expand_path('../templates/Gemfile', __FILE__), 'Gemfile')
      end
    end

    def initialize(*)
      super
      Bundler.ui = UI::Shell.new(shell)
      Gem::DefaultUserInteraction.ui = UI::RGProxy.new(Bundler.ui)
    end

    desc "check", "Checks if the dependencies listed in Gemfile are satisfied by currently installed gems"
    def check
      env = Bundler.load
      # Check top level dependencies
      missing = env.dependencies.select { |d| env.index.search(d).empty? }
      if missing.any?
        puts "The following dependencies are missing"
        missing.each do |d|
          puts "  * #{d}"
        end
      else
        env.specs
        puts "The Gemfile's dependencies are satisfied"
      end
    end

    desc "install", "Install the current environment to the system"
    method_option :without, :type => :array, :banner => "Exclude gems that are part of the specified named group"
    def install(path = nil)
      opts = options.dup
      opts[:without] ||= []
      opts[:without].map! { |g| g.to_sym }

      Bundler.settings[:path] = path if path

      Installer.install(Bundler.root, Bundler.definition, opts)
    end

    desc "lock", "Locks the bundle to the current set of dependencies, including all child dependencies."
{'fraction_non_alphanumeric': 0.10557266872024643, 'fraction_numerical': 0.0, 'mean_word_length': 2.7481636935991607, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '2596287', 'n_tokens_mistral': 1084, 'n_tokens_neox': 1069, 'n_words': 339}