<commit_before>require "formula"

class Tup < Formula
  homepage "http://gittup.org/tup/"
  url "https://github.com/gittup/tup/archive/v0.7.3.tar.gz"
  sha1 "e817ab1888b8aab7f784efa7fb90e91c216fae8d"
  head "https://github.com/gittup/tup.git"

  bottle do
    cellar :any
    sha1 "5c27fa734b85b0f170bc0ecc6fd5678160f2e5c9" => :mavericks
    sha1 "d6b68541413f647c5902e8256b4e7e454a2b176c" => :mountain_lion
    sha1 "938305bff64f99d93e093919e0c808f5786de913" => :lion
  end

  depends_on "pkg-config" => :build
  depends_on :osxfuse

  # Fixes the renaming of functions on OS X 10.10
  # https://github.com/gittup/tup/issues/204
  if MacOS.version >= :yosemite
    patch do
      url "https://github.com/gittup/tup/pull/205.diff"
      sha1 "eebe8293b18096361130d0a97e0f10c524a716b3"
    end
  end

  def install
    ENV["TUP_LABEL"] = version<commit_msg>tup: fix compilation of HEAD version in Yosemite<commit_after>require "formula"

class Tup < Formula
  homepage "http://gittup.org/tup/"
  url "https://github.com/gittup/tup/archive/v0.7.3.tar.gz"
  sha1 "e817ab1888b8aab7f784efa7fb90e91c216fae8d"
  head "https://github.com/gittup/tup.git"

  bottle do
    cellar :any
    sha1 "5c27fa734b85b0f170bc0ecc6fd5678160f2e5c9" => :mavericks
    sha1 "d6b68541413f647c5902e8256b4e7e454a2b176c" => :mountain_lion
    sha1 "938305bff64f99d93e093919e0c808f5786de913" => :lion
  end

  depends_on "pkg-config" => :build
  depends_on :osxfuse

  # Backport Yosemite compilation fix
  stable do
    if MacOS.version >= :yosemite
      patch do
        url "https://github.com/gittup/tup/commit/9812548b4d3833644f0cf8f70f62628a75ffbb56.diff"
        sha1 "439fb1e1692c95e09703d6c41055c06855276307"
      end
    end
  end

  def install
    ENV["TUP_LABEL"] = version
{'fraction_non_alphanumeric': 0.10289937464468447, 'fraction_numerical': 0.18192154633314384, 'mean_word_length': 3.861878453038674, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 7, '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': '5472156', 'n_tokens_mistral': 949, 'n_tokens_neox': 794, 'n_words': 117}