<commit_before>require 'rubygems'
require 'appscript'

module RubyAMP
  module Launcher
    def open_controller_terminal    
      term = Appscript::app("Terminal")
      term.activate
      term.do_script "cd #{ENV['TM_PROJECT_DIRECTORY'].to_s.inspect} && rdebug -c; exit"
    end

    def open_debug_process_in_terminal(file_to_run)
      term = Appscript::app("Terminal")
      term.activate
      term.do_script "cd #{ENV['TM_PROJECT_DIRECTORY'].to_s.inspect} && rdebug -s #{file_to_run}; exit"
    end

    def open_debug_process_in_html_dialog(file_to_run)
      require 'ruby-debug'
      term = Appscript::app("Terminal")
      term.activate
      term.do_script "cd #{ENV['TM_PROJECT_DIRECTORY'].to_s.inspect} && rdebug -s #{file_to_run}; exit"
    end
    extend self
  end
end<commit_msg>added quarter second sleep on launching terminal debug client to prevent it from trying to connect before the server is setup<commit_after>require 'rubygems'
require 'appscript'

module RubyAMP
  module Launcher
    def open_controller_terminal    
      term = Appscript::app("Terminal")
      term.activate
      term.do_script "cd #{ENV['TM_PROJECT_DIRECTORY'].to_s.inspect} && sleep 0.25 && rdebug -c; exit"
    end

    def open_debug_process_in_terminal(file_to_run)
      term = Appscript::app("Terminal")
      term.activate
      term.do_script "cd #{ENV['TM_PROJECT_DIRECTORY'].to_s.inspect} && rdebug -s #{file_to_run}; exit"
    end

    def open_debug_process_in_html_dialog(file_to_run)
      require 'ruby-debug'
      term = Appscript::app("Terminal")
      term.activate
      term.do_script "cd #{ENV['TM_PROJECT_DIRECTORY'].to_s.inspect} && rdebug -s #{file_to_run}; exit"
    end
    extend self
  end
end
{'fraction_non_alphanumeric': 0.10846867749419954, 'fraction_numerical': 0.0017401392111368909, 'mean_word_length': 3.6747967479674797, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4489872', 'n_tokens_mistral': 587, 'n_tokens_neox': 571, 'n_words': 125}