<commit_before>class Syncthing < Formula
  desc "Open source continuous file synchronization application"
  homepage "https://syncthing.net/"
  url "https://github.com/syncthing/syncthing.git",
    :tag => "v0.11.12", :revision => "57a5d13c470269160416a286aecd9cc98ad68c8f"

  head "https://github.com/syncthing/syncthing.git"

  bottle do
    cellar :any
    sha256 "4c16a6b44549501b81730298426ce8d97f51c23951a658c3ba61e9f44bb13a27" => :yosemite
    sha256 "3be6b5da6b85676bdfadd622828860443d9132623cba01c963aa77b90bac347d" => :mavericks
    sha256 "bcdca4554d27a10ac7e729beff8ddb209032513fd7107ff50cb7a2d54d4ec2cc" => :mountain_lion
  end

  depends_on "go" => :build
  depends_on :hg => :build

  def install
    ENV["GOPATH"] = cached_download/".gopath"
    ENV.append_path "PATH", "#{ENV["GOPATH"]}/bin"

    # FIXTHIS: do this without mutating the cache!
    hack_dir = cached_download/".gopath/src/github.com/syncthing"
    rm_rf hack_dir
    mkdir_p hack_dir
    ln_s cached_download, "#{hack_dir}/syncthing"

    system "./build.sh", "noupgrade"
    bin.install "syncthing"
  end

  def plist; <<-EOS.undent
    <?xml version="1.0" encoding="UTF-8"?><commit_msg>syncthing 0.11.13<commit_after>class Syncthing < Formula
  desc "Open source continuous file synchronization application"
  homepage "https://syncthing.net/"
  url "https://github.com/syncthing/syncthing.git",
    :tag => "v0.11.13", :revision => "1da3a57fe798ca7347431d61ed8e83f1b2d2eb52"

  head "https://github.com/syncthing/syncthing.git"

  bottle do
    cellar :any
    sha256 "4c16a6b44549501b81730298426ce8d97f51c23951a658c3ba61e9f44bb13a27" => :yosemite
    sha256 "3be6b5da6b85676bdfadd622828860443d9132623cba01c963aa77b90bac347d" => :mavericks
    sha256 "bcdca4554d27a10ac7e729beff8ddb209032513fd7107ff50cb7a2d54d4ec2cc" => :mountain_lion
  end

  depends_on "go" => :build
  depends_on :hg => :build

  def install
    ENV["GOPATH"] = cached_download/".gopath"
    ENV.append_path "PATH", "#{ENV["GOPATH"]}/bin"

    # FIXTHIS: do this without mutating the cache!
    hack_dir = cached_download/".gopath/src/github.com/syncthing"
    rm_rf hack_dir
    mkdir_p hack_dir
    ln_s cached_download, "#{hack_dir}/syncthing"

    system "./build.sh", "noupgrade"
    bin.install "syncthing"
  end

  def plist; <<-EOS.undent
    <?xml version="1.0" encoding="UTF-8"?>
{'fraction_non_alphanumeric': 0.12020460358056266, 'fraction_numerical': 0.1402387041773231, 'mean_word_length': 4.509389671361502, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 2, '>': 19, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7349863', 'n_tokens_mistral': 1144, 'n_tokens_neox': 967, 'n_words': 150}