<commit_before>require 'formula'

class Redis <Formula
  url 'http://redis.googlecode.com/files/redis-2.0.1.tar.gz'
  head 'git://github.com/antirez/redis.git'
  homepage 'http://code.google.com/p/redis/'
  sha1 '364665c966c90eb5ab7d16065734a2b713d4b8eb'

  def install
    fails_with_llvm "Breaks with LLVM"

    # Head and stable have different code layouts
    src = File.exists?('src/Makefile') ? 'src' : '.'
    system "make -C #{src}"

    %w( redis-benchmark redis-cli redis-server redis-check-dump redis-check-aof ).each { |p|
      bin.install "#{src}/#{p}" rescue nil
    }

    %w( run db/redis log ).each { |p| (var+p).mkpath }

    # Fix up default conf file to match our paths
    inreplace "redis.conf" do |s|
      s.gsub! "/var/run/redis.pid", "#{var}/run/redis.pid"
      s.gsub! "dir ./", "dir #{var}/db/redis/"
    end

    doc.install Dir["doc/*"]
    etc.install "redis.conf"
    (prefix+'io.redis.redis-server.plist').write startup_plist<commit_msg>updated redis to version 2.0.2<commit_after>require 'formula'

class Redis <Formula
  url 'http://redis.googlecode.com/files/redis-2.0.2.tar.gz'
  head 'git://github.com/antirez/redis.git'
  homepage 'http://code.google.com/p/redis/'
  sha1 '1c958ac736a70e642ca8915ae8ac3119a202ae4e'

  def install
    fails_with_llvm "Breaks with LLVM"

    # Head and stable have different code layouts
    src = File.exists?('src/Makefile') ? 'src' : '.'
    system "make -C #{src}"

    %w( redis-benchmark redis-cli redis-server redis-check-dump redis-check-aof ).each { |p|
      bin.install "#{src}/#{p}" rescue nil
    }

    %w( run db/redis log ).each { |p| (var+p).mkpath }

    # Fix up default conf file to match our paths
    inreplace "redis.conf" do |s|
      s.gsub! "/var/run/redis.pid", "#{var}/run/redis.pid"
      s.gsub! "dir ./", "dir #{var}/db/redis/"
    end

    doc.install Dir["doc/*"]
    etc.install "redis.conf"
    (prefix+'io.redis.redis-server.plist').write startup_plist
{'fraction_non_alphanumeric': 0.16624171341152474, 'fraction_numerical': 0.03212646608873024, 'mean_word_length': 3.0122699386503067, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4962419', 'n_tokens_mistral': 803, 'n_tokens_neox': 760, 'n_words': 161}