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

class F < EmacsFormula
  desc "Emacs filesystem API"
  homepage "https://github.com/rejeep/f.el"
  url "https://github.com/rejeep/f.el/archive/v0.17.2.tar.gz"
  sha256 "9d4a6f59e4eeed6776440420eb41e65bfd20760a45bf2e4f9e950fe21a65afd8"
  head "https://github.com/rejeep/f.el.git"

  depends_on :emacs => "24.1"
  depends_on "homebrew/emacs/dash"
  depends_on "homebrew/emacs/s"

  def install
    # make test/compile requires emacs-parallel
    byte_compile "f.el"
    (share/"emacs/site-lisp/f").install "f.el", "f.elc"
    doc.install "README.md"
  end

  def caveats; <<-EOS.undent
    Add the following to your init file:

    (require 'f)
  EOS
  end

  test do
    (testpath/"test.el").write <<-EOS.undent
      (add-to-list 'load-path "#{share}/emacs/site-lisp/f")
      (add-to-list 'load-path "#{Formula["homebrew/emacs/dash"].share}/emacs/site-lisp/dash")
      (add-to-list 'load-path "#{Formula["homebrew/emacs/s"].share}/emacs/site-lisp/s")
      (load "f")
      (print (f-this-file))
    EOS
    assert_equal "\"#{testpath}/test.el\"",
                 shell_output("emacs -Q --batch -l #{testpath}/test.el").strip
  end
end<commit_msg>f 0.18.0<commit_after>require File.expand_path("../../Homebrew/emacs_formula", __FILE__)

class F < EmacsFormula
  desc "Emacs filesystem API"
  homepage "https://github.com/rejeep/f.el"
  url "https://github.com/rejeep/f.el/archive/v0.18.0.tar.gz"
  sha256 "38fae0e2288bb55bfb9d692ec3a4f295661e2456e8909927bc3ba034b1f282ec"
  head "https://github.com/rejeep/f.el.git"

  depends_on :emacs => "24.1"
  depends_on "homebrew/emacs/dash"
  depends_on "homebrew/emacs/s"

  def install
    # make test/compile requires emacs-parallel
    byte_compile "f.el"
    (share/"emacs/site-lisp/f").install "f.el", "f.elc"
  end

  test do
    (testpath/"test.el").write <<-EOS.undent
      (add-to-list 'load-path "#{share}/emacs/site-lisp/f")
      (add-to-list 'load-path "#{Formula["homebrew/emacs/dash"].share}/emacs/site-lisp/dash")
      (add-to-list 'load-path "#{Formula["homebrew/emacs/s"].share}/emacs/site-lisp/s")
      (load "f")
      (print (f-this-file))
    EOS
    assert_equal "\"#{testpath}/test.el\"",
                 shell_output("emacs -Q --batch -l #{testpath}/test.el").strip
  end
end
{'fraction_non_alphanumeric': 0.1753859348198971, 'fraction_numerical': 0.04373927958833619, 'mean_word_length': 3.1660714285714286, 'pattern_counts': {'":': 0, '<': 11, '<?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': '7605292', 'n_tokens_mistral': 1004, 'n_tokens_neox': 953, 'n_words': 144}