<commit_before>#
#  JackerController.rb
#  JackerApp
#
#  Created by <NAME> on 9/23/08.
#  Copyright (c) 2008. All rights reserved.
#

require 'osx/cocoa'

require 'rubygems'
require 'jacker'

class JackerController < OSX::NSWindowController
  include OSX
  
  ib_outlet :theMenu
  ib_outlet :jackItem
  ib_outlet :statusItem
  
  ib_action :jackIt
  ib_action :startJacking
  
  def awakeFromNib
    statusbar = NSStatusBar.systemStatusBar
    item = statusbar.statusItemWithLength(NSVariableStatusItemLength)
    item.setTitle "J"
    
    item.setMenu(@theMenu)
    item.setEnabled(true)
    setMenuStatus
  end
  
  def jackIt(sender)
    if Jacker.running?
      self.stopJacking
    else
      showWindow(self)
    end
  end
  
  def startJacking(sender)
    close<commit_msg>set highlight mode on the menu<commit_after>#
#  JackerController.rb
#  JackerApp
#
#  Created by <NAME> on 9/23/08.
#  Copyright (c) 2008. All rights reserved.
#

require 'osx/cocoa'

require 'rubygems'
require 'jacker'

class JackerController < OSX::NSWindowController
  include OSX
  
  ib_outlet :theMenu
  ib_outlet :jackItem
  ib_outlet :statusItem
  
  ib_action :jackIt
  ib_action :startJacking
  
  def awakeFromNib
    statusbar = NSStatusBar.systemStatusBar
    item = statusbar.statusItemWithLength(NSVariableStatusItemLength)
    item.setTitle "J"
    item.setHighlightMode true
    
    item.setMenu(@theMenu)
    item.setEnabled(true)
    setMenuStatus
  end
  
  def jackIt(sender)
    if Jacker.running?
      self.stopJacking
    else
      showWindow(self)
    end
  end
  
  def startJacking(sender)
    close
{'fraction_non_alphanumeric': 0.0750620347394541, 'fraction_numerical': 0.011166253101736972, 'mean_word_length': 3.2785145888594163, 'pattern_counts': {'":': 0, '<': 7, '<?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': '7628099', 'n_tokens_mistral': 585, 'n_tokens_neox': 567, 'n_words': 124}