<commit_before>require "formula"

class Influxdb < Formula
  homepage "http://influxdb.org"
  url "http://get.influxdb.org/src/influxdb-0.0.7.tar.gz"
  sha1 "2ee3e88112a9f3f7fa4423acbdb686711bd42595"

  depends_on "leveldb"
  depends_on "protobuf" => :build
  depends_on "bison" => :build
  depends_on "flex" => :build
  depends_on "go" => :build

  fails_with :clang do
    cause "clang: error: argument unused during compilation: '-fno-eliminate-unused-debug-types'"
  end

  def install
    ENV["GOPATH"] = buildpath

    system "go build src/server/server.go"

    inreplace "config.json.sample" do |s|
      s.gsub! "/tmp/influxdb/development/db", "#{var}/influxdb/data"
      s.gsub! "/tmp/influxdb/development/raft", "#{var}/influxdb/raft"
      s.gsub! "./admin/", "#{share}/admin/"<commit_msg>influxdb: add bottles.<commit_after>require "formula"

class Influxdb < Formula
  homepage "http://influxdb.org"
  url "http://get.influxdb.org/src/influxdb-0.0.7.tar.gz"
  sha1 "2ee3e88112a9f3f7fa4423acbdb686711bd42595"

  bottle do
    sha1 '2cafb68bd52cf47adf03e1e42551342d0cbfe5cc' => :mavericks
    sha1 '98ef180c3577da468cba3843ff4608a3c6987746' => :mountain_lion
    sha1 'f59872ca4c0b77657e5adfe8c0c02a2b170f322b' => :lion
  end

  depends_on "leveldb"
  depends_on "protobuf" => :build
  depends_on "bison" => :build
  depends_on "flex" => :build
  depends_on "go" => :build

  fails_with :clang do
    cause "clang: error: argument unused during compilation: '-fno-eliminate-unused-debug-types'"
  end

  def install
    ENV["GOPATH"] = buildpath

    system "go build src/server/server.go"

    inreplace "config.json.sample" do |s|
      s.gsub! "/tmp/influxdb/development/db", "#{var}/influxdb/data"
      s.gsub! "/tmp/influxdb/development/raft", "#{var}/influxdb/raft"
      s.gsub! "./admin/", "#{share}/admin/"
{'fraction_non_alphanumeric': 0.14707490431930018, 'fraction_numerical': 0.07271733187534171, 'mean_word_length': 3.893048128342246, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, 'https://': 0, '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': '3682298', 'n_tokens_mistral': 804, 'n_tokens_neox': 740, 'n_words': 129}