<commit_before>require 'formula'

class DnscryptProxy < Formula
  homepage 'http://dnscrypt.org'
  url 'http://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-proxy-1.3.3.tar.bz2'
  sha256 'd9aca5253b9fe0fd0bb756201e837d3b723c091e5be0eb3a81cf5432cedaec47'

  head 'https://github.com/opendns/dnscrypt-proxy.git', :branch => 'master'

  option "plugins", "Support plugins and install example plugins."

  if build.head?
    depends_on :automake
    depends_on :libtool
  end

  depends_on 'libsodium'

  def install
    system "autoreconf", "-if" if build.head?

    args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
    if build.include? "plugins"
      args << "--enable-plugins"
      args << "--enable-relaxed-plugins-permissions"
      args << "--enable-plugins-root"
    end
    system "./configure", *args
    system "make install"
  end

  def caveats; <<-EOS.undent
    Once dnscrypt-proxy is running, you will have to update your local
    DNS server to point to 127.0.0.1 in order for it to actually work.
    This is generally done under System Preferences > Network > Advanced.
    Once there, you will see a "DNS" tab where you can enter a list of DNS
    servers. You will want to make sure that 127.0.0.1 is listed there first.<commit_msg>dnscrypt-proxy: use spec deps<commit_after>require 'formula'

class DnscryptProxy < Formula
  homepage 'http://dnscrypt.org'
  url 'http://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-proxy-1.3.3.tar.bz2'
  sha256 'd9aca5253b9fe0fd0bb756201e837d3b723c091e5be0eb3a81cf5432cedaec47'

  head do
    url 'https://github.com/opendns/dnscrypt-proxy.git', :branch => 'master'

    depends_on :automake
    depends_on :libtool
  end

  option "plugins", "Support plugins and install example plugins."

  depends_on 'libsodium'

  def install
    system "autoreconf", "-if" if build.head?

    args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
    if build.include? "plugins"
      args << "--enable-plugins"
      args << "--enable-relaxed-plugins-permissions"
      args << "--enable-plugins-root"
    end
    system "./configure", *args
    system "make install"
  end

  def caveats; <<-EOS.undent
    Once dnscrypt-proxy is running, you will have to update your local
    DNS server to point to 127.0.0.1 in order for it to actually work.
    This is generally done under System Preferences > Network > Advanced.
    Once there, you will see a "DNS" tab where you can enter a list of DNS
    servers. You will want to make sure that 127.0.0.1 is listed there first.
{'fraction_non_alphanumeric': 0.11181102362204724, 'fraction_numerical': 0.04251968503937008, 'mean_word_length': 3.3067796610169493, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5416105', 'n_tokens_mistral': 908, 'n_tokens_neox': 841, 'n_words': 250}