<commit_before>require File.expand_path("../../Homebrew/emacs_formula", __FILE__)

class GroovyMode < EmacsFormula
  desc "Modes for Groovy and Groovy-related technology"
  homepage "https://github.com/Groovy-Emacs-Modes/groovy-emacs-modes"
  url "https://github.com/Groovy-Emacs-Modes/groovy-emacs-modes/archive/1.0.1.tar.gz"
  sha256 "a7a498d47ee6d2eef2fb1e6d484bbba9354d0fd4176437819ce5474f86b611bc"
  head "https://github.com/Groovy-Emacs-Modes/groovy-emacs-modes.git"

  depends_on :emacs => "22.1"

  def install
    el_array = %w[groovy-mode.el groovy-electric.el inf-groovy.el]
    byte_compile el_array
    elisp.install el_array, Dir["*.elc"]

    prefix.install "gpl-3.0.txt"
  end

  def caveats; <<-EOS.undent
    Grails mode was not installed, as it currently has additional dependencies
    not available in Homebrew.
  EOS
  end

  test do
    (testpath/"test.el").write <<-EOS.undent
      (add-to-list 'load-path "#{elisp}")
      (load "groovy-mode")
      (print (minibuffer-prompt-width))
    EOS
    assert_equal "0", shell_output("emacs -Q --batch -l #{testpath}/test.el").strip
  end
end<commit_msg>groovy-mode 1.0.2<commit_after>require File.expand_path("../../Homebrew/emacs_formula", __FILE__)

class GroovyMode < EmacsFormula
  desc "Modes for Groovy and Groovy-related technology"
  homepage "https://github.com/Groovy-Emacs-Modes/groovy-emacs-modes"
  url "https://github.com/Groovy-Emacs-Modes/groovy-emacs-modes/archive/1.0.2.tar.gz"
  sha256 "4888b6ec93bec53a4b6fd4e706dec209679c0d17ba3371fc5e4cd4fea28861e1"
  head "https://github.com/Groovy-Emacs-Modes/groovy-emacs-modes.git"

  depends_on :emacs => "22.1"

  def install
    el_array = %w[groovy-mode.el groovy-electric.el inf-groovy.el]
    byte_compile el_array
    elisp.install el_array, Dir["*.elc"]

    prefix.install "gpl-3.0.txt"
  end

  def caveats; <<-EOS.undent
    Grails mode was not installed, as it currently has additional dependencies
    not available in Homebrew.
  EOS
  end

  test do
    (testpath/"test.el").write <<-EOS.undent
      (add-to-list 'load-path "#{elisp}")
      (load "groovy-mode")
      (print (minibuffer-prompt-width))
    EOS
    assert_equal "0", shell_output("emacs -Q --batch -l #{testpath}/test.el").strip
  end
end
{'fraction_non_alphanumeric': 0.13644444444444445, 'fraction_numerical': 0.04533333333333334, 'mean_word_length': 3.5659229208924947, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 5, 'https://': 6, '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': '1319926', 'n_tokens_mistral': 955, 'n_tokens_neox': 862, 'n_words': 158}