<commit_before>require 'formula'

class NginxFull < Formula

  homepage 'http://nginx.org/'
  url 'http://nginx.org/download/nginx-1.4.4.tar.gz'
  sha1 '304d5991ccde398af2002c0da980ae240cea9356'

  devel do
    url 'http://nginx.org/download/nginx-1.5.8.tar.gz'
    sha1 '5c02b293a59c32172d2d5b3c52da7fe0afc179ef'
  end

  head 'http://hg.nginx.org/nginx/', :using => :hg

  env :userpaths

  depends_on 'pcre'
  # SPDY needs openssl >= 1.0.1 for NPN; see:
  # https://tools.ietf.org/agenda/82/slides/tls-3.pdf
  # http://www.openssl.org/news/changelog.html
  depends_on 'openssl' if build.with? 'spdy'
  depends_on 'geoip' if build.with? 'geoip'
  depends_on 'libxml2' if build.with? 'xslt'
  depends_on 'libxslt' if build.with? 'xslt'
  depends_on 'gd' if build.with? 'image-filter'
  # 3rd party modules
  depends_on 'ngx-devel-kit' if build.include? 'with-lua-module' or build.include? 'with-array-var-module'
  depends_on 'lua-nginx-module' if build.include? 'with-lua-module'
  depends_on 'echo-nginx-module' if build.include? 'with-echo-module'
  depends_on 'auth-digest-nginx-module' if build.include? 'with-auth-digest'
  depends_on 'set-misc-nginx-module' if build.include? 'with-set-misc-module'
  depends_on 'redis2-nginx-module' if build.include? 'with-redis2-module'
  depends_on 'array-var-nginx-module' if build.include? 'with-array-var-module'
  depends_on 'accept-language-nginx-module' if build.include? 'with-accept-language'
  depends_on 'accesskey-nginx-module' if build.include? 'with-accesskey-module'
  depends_on 'auth-ldap-nginx-module' if build.include? 'with-auth-ldap'
  depends_on 'auth-pam-nginx-module' if build.include? 'with-auth-pam'
  depends_on 'cache-purge-nginx-module' if build.include? 'with-cache-purge'
  depends_on 'ctpp2-nginx-module' if build.include? 'with-ctpp2-module'
  depends_on 'headers-more-nginx-module' if build.include? 'with-headers-more-module'
  depends_on 'tcp-proxy-nginx-module' if build.include? 'with-tcp-proxy-module'
  depends_on 'dav-ext-nginx-module' if build.include? 'with-webdav'
  depends_on 'eval-nginx-module' if build.include? 'with-eval-module'
  depends_on 'fancyindex-nginx-module' if build.include? 'with-fancyindex-module'
  depends_on 'mogilefs-nginx-module' if build.include? 'with-mogilefs-module'
  depends_on 'mp4-h264-nginx-module' if build.include? 'with-mp4-h264-module'
  depends_on 'notice-nginx-module' if build.include? 'with-notice-module'
  depends_on 'subs-filter-nginx-module' if build.include? 'with-subs-filter-module'
  depends_on 'upload-nginx-module' if build.include? 'with-upload-module'
  depends_on 'upload-progress-nginx-module' if build.include? 'with-upload-progress-module'

  skip_clean 'logs'

  # Options
  def options_array
    option_data = [
      # 3rd party modules
      ['with-passenger',          nil,                           'Compile with support for Phusion Passenger module'],
      ['with-lua-module',         nil,                           'Compile with support for LUA module'],
      ['with-echo-module',        nil,                           'Compile with support for Echo Module'],
      ['with-auth-digest',        nil,                           'Compile with support for Auth Digest Module'],
      ['with-set-misc-module',    nil,                           'Compile with support for Set Misc Module'],
      ['with-redis2-module',      nil,                           'Compile with support for Redis2 Module'],
      ['with-array-var-module',   nil,                           'Compile with support for Array Var Module'],
      ['with-accept-language',    nil,                           'Compile with support for Accept Language Module'],
      ['with-accesskey-module',   nil,                           'Compile with support for HTTP Access Key Module'],
      ['with-auth-ldap',          nil,                           'Compile with support for Auth LDAP Module'],
      ['with-auth-pam',           nil,                           'Compile with support for Auth PAM Module'],
      ['with-cache-purge',        nil,                           'Compile with support for Cache Purge Module'],
      ['with-ctpp2-module',       nil,                           'Compile with support for CT++ Module'],
      ['with-headers-more-module',nil,                           'Compile with support for Headers More Module'],
      ['with-tcp-proxy-module',   nil,                           'Compile with support for TCP proxy'],
      ['with-dav-ext-module',     nil,                           'Compile with support for HTTP WebDav Extended Module'],
      ['with-eval-module',        nil,                           'Compile with support for Eval Module'],
      ['with-fancyindex-module',  nil,                           'Compile with support for Fancy Index Module'],
      ['with-mogilefs-module',    nil,                           'Compile with support for HTTP MogileFS Module'],
      ['with-mp4-h264-module',    nil,                           'Compile with support for HTTP MP4/H264 Module'],
      ['with-notice-module',      nil,                           'Compile with support for HTTP Notice Module'],
      ['with-subs-filter',        nil,                           'Compile with support for Substitutions Filter Module'],
      ['with-upload-module',      nil,                           'Compile with support for Upload module'],
      ['with-upload-progress-module', nil,                       'Compile with support for Upload Progrress module'],
      # Internal modules
      ['with-webdav',            'with-http_dav_module',         'Compile with support for WebDAV module'],<commit_msg>Fix prefix "Substitutions Filter Module"<commit_after>require 'formula'

class NginxFull < Formula

  homepage 'http://nginx.org/'
  url 'http://nginx.org/download/nginx-1.4.4.tar.gz'
  sha1 '304d5991ccde398af2002c0da980ae240cea9356'

  devel do
    url 'http://nginx.org/download/nginx-1.5.8.tar.gz'
    sha1 '5c02b293a59c32172d2d5b3c52da7fe0afc179ef'
  end

  head 'http://hg.nginx.org/nginx/', :using => :hg

  env :userpaths

  depends_on 'pcre'
  # SPDY needs openssl >= 1.0.1 for NPN; see:
  # https://tools.ietf.org/agenda/82/slides/tls-3.pdf
  # http://www.openssl.org/news/changelog.html
  depends_on 'openssl' if build.with? 'spdy'
  depends_on 'geoip' if build.with? 'geoip'
  depends_on 'libxml2' if build.with? 'xslt'
  depends_on 'libxslt' if build.with? 'xslt'
  depends_on 'gd' if build.with? 'image-filter'
  # 3rd party modules
  depends_on 'ngx-devel-kit' if build.include? 'with-lua-module' or build.include? 'with-array-var-module'
  depends_on 'lua-nginx-module' if build.include? 'with-lua-module'
  depends_on 'echo-nginx-module' if build.include? 'with-echo-module'
  depends_on 'auth-digest-nginx-module' if build.include? 'with-auth-digest'
  depends_on 'set-misc-nginx-module' if build.include? 'with-set-misc-module'
  depends_on 'redis2-nginx-module' if build.include? 'with-redis2-module'
  depends_on 'array-var-nginx-module' if build.include? 'with-array-var-module'
  depends_on 'accept-language-nginx-module' if build.include? 'with-accept-language'
  depends_on 'accesskey-nginx-module' if build.include? 'with-accesskey-module'
  depends_on 'auth-ldap-nginx-module' if build.include? 'with-auth-ldap'
  depends_on 'auth-pam-nginx-module' if build.include? 'with-auth-pam'
  depends_on 'cache-purge-nginx-module' if build.include? 'with-cache-purge'
  depends_on 'ctpp2-nginx-module' if build.include? 'with-ctpp2-module'
  depends_on 'headers-more-nginx-module' if build.include? 'with-headers-more-module'
  depends_on 'tcp-proxy-nginx-module' if build.include? 'with-tcp-proxy-module'
  depends_on 'dav-ext-nginx-module' if build.include? 'with-webdav'
  depends_on 'eval-nginx-module' if build.include? 'with-eval-module'
  depends_on 'fancyindex-nginx-module' if build.include? 'with-fancyindex-module'
  depends_on 'mogilefs-nginx-module' if build.include? 'with-mogilefs-module'
  depends_on 'mp4-h264-nginx-module' if build.include? 'with-mp4-h264-module'
  depends_on 'notice-nginx-module' if build.include? 'with-notice-module'
  depends_on 'subs-filter-nginx-module' if build.include? 'with-subs-filter-module'
  depends_on 'upload-nginx-module' if build.include? 'with-upload-module'
  depends_on 'upload-progress-nginx-module' if build.include? 'with-upload-progress-module'

  skip_clean 'logs'

  # Options
  def options_array
    option_data = [
      # 3rd party modules
      ['with-passenger',          nil,                           'Compile with support for Phusion Passenger module'],
      ['with-lua-module',         nil,                           'Compile with support for LUA module'],
      ['with-echo-module',        nil,                           'Compile with support for Echo Module'],
      ['with-auth-digest',        nil,                           'Compile with support for Auth Digest Module'],
      ['with-set-misc-module',    nil,                           'Compile with support for Set Misc Module'],
      ['with-redis2-module',      nil,                           'Compile with support for Redis2 Module'],
      ['with-array-var-module',   nil,                           'Compile with support for Array Var Module'],
      ['with-accept-language',    nil,                           'Compile with support for Accept Language Module'],
      ['with-accesskey-module',   nil,                           'Compile with support for HTTP Access Key Module'],
      ['with-auth-ldap',          nil,                           'Compile with support for Auth LDAP Module'],
      ['with-auth-pam',           nil,                           'Compile with support for Auth PAM Module'],
      ['with-cache-purge',        nil,                           'Compile with support for Cache Purge Module'],
      ['with-ctpp2-module',       nil,                           'Compile with support for CT++ Module'],
      ['with-headers-more-module',nil,                           'Compile with support for Headers More Module'],
      ['with-tcp-proxy-module',   nil,                           'Compile with support for TCP proxy'],
      ['with-dav-ext-module',     nil,                           'Compile with support for HTTP WebDav Extended Module'],
      ['with-eval-module',        nil,                           'Compile with support for Eval Module'],
      ['with-fancyindex-module',  nil,                           'Compile with support for Fancy Index Module'],
      ['with-mogilefs-module',    nil,                           'Compile with support for HTTP MogileFS Module'],
      ['with-mp4-h264-module',    nil,                           'Compile with support for HTTP MP4/H264 Module'],
      ['with-notice-module',      nil,                           'Compile with support for HTTP Notice Module'],
      ['with-subs-filter-module', nil,                           'Compile with support for Substitutions Filter Module'],
      ['with-upload-module',      nil,                           'Compile with support for Upload module'],
      ['with-upload-progress-module', nil,                       'Compile with support for Upload Progrress module'],
      # Internal modules
      ['with-webdav',            'with-http_dav_module',         'Compile with support for WebDAV module'],
{'fraction_non_alphanumeric': 0.12068812627471845, 'fraction_numerical': 0.01560698767402678, 'mean_word_length': 2.3083015547081254, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '4365286', 'n_tokens_mistral': 3597, 'n_tokens_neox': 3457, 'n_words': 833}