<commit_before>class OsmiumTool < Formula
  desc "Libosmium-based command-line tool for processing OpenStreetMap data"
  homepage "http://osmcode.org/osmium-tool/"
  url "https://github.com/osmcode/osmium-tool/archive/v1.7.0.tar.gz"
  sha256 "344f9f2aa6b34807a7724e9443bfa7f716745bf132facdc0f440d0d57c2533e0"

  bottle do
    cellar :any
    sha256 "49b71d3333ab369aaebeff89105c79559e7bd3c743c5213ab7a0e04bc82b1787" => :sierra
    sha256 "1994ded450727df891726f316421d6f8956e0f757678446fea16ca76d7d0a9bb" => :el_capitan
    sha256 "b7949426174e8f4b18a15412bb588b9a698af0065e0e1d0e4e78752d2d02f171" => :yosemite
  end

  depends_on "cmake" => :build
  depends_on "libosmium" => :build
  depends_on "boost"

  def install
    system "cmake", ".", *std_cmake_args
    system "make", "install"
  end

  test do<commit_msg>osmium-tool: Reduce memory usage below 4 GB for Circle CI<commit_after>class OsmiumTool < Formula
  desc "Libosmium-based command-line tool for processing OpenStreetMap data"
  homepage "http://osmcode.org/osmium-tool/"
  url "https://github.com/osmcode/osmium-tool/archive/v1.7.0.tar.gz"
  sha256 "344f9f2aa6b34807a7724e9443bfa7f716745bf132facdc0f440d0d57c2533e0"

  bottle do
    cellar :any
    sha256 "49b71d3333ab369aaebeff89105c79559e7bd3c743c5213ab7a0e04bc82b1787" => :sierra
    sha256 "1994ded450727df891726f316421d6f8956e0f757678446fea16ca76d7d0a9bb" => :el_capitan
    sha256 "b7949426174e8f4b18a15412bb588b9a698af0065e0e1d0e4e78752d2d02f171" => :yosemite
  end

  depends_on "cmake" => :build
  depends_on "libosmium" => :build
  depends_on "boost"
  depends_on "expat" unless OS.mac?

  def install
    # Reduce memory usage below 4 GB for Circle CI.
    ENV["MAKEFLAGS"] = "-j8" if ENV["CIRCLECI"]

    system "cmake", ".", *std_cmake_args
    system "make", "install"
  end

  test do
{'fraction_non_alphanumeric': 0.09356081452944413, 'fraction_numerical': 0.20528343423225096, 'mean_word_length': 5.0198675496688745, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '3268925', 'n_tokens_mistral': 992, 'n_tokens_neox': 790, 'n_words': 125}