Created
December 30, 2014 13:59
-
-
Save arika/38a8d7bc5ba456bf1829 to your computer and use it in GitHub Desktop.
homebrew groonga.rb: enable mruby support and add tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/Library/Formula/groonga.rb b/Library/Formula/groonga.rb | |
| index 386e7ca..94e0a41 100644 | |
| --- a/Library/Formula/groonga.rb | |
| +++ b/Library/Formula/groonga.rb | |
| @@ -39,7 +39,7 @@ class Groonga < Formula | |
| --prefix=#{prefix} | |
| --with-zlib | |
| --disable-zeromq | |
| - --with-mruby | |
| + --enable-mruby | |
| --without-libstemmer | |
| ] | |
| @@ -52,6 +52,20 @@ class Groonga < Formula | |
| system "make" | |
| system "make install" | |
| end | |
| + | |
| + test do | |
| + system %q{groonga -n test.db status | grep -q '^\[\[0,'} | |
| + system %q{printf 'register "ruby/eval"\nruby_eval "p :OK"\n' | groonga test.db | grep -q '^:OK'} | |
| + | |
| + if build.with? "mecab" | |
| + system %q{printf 'tokenizer_list\n' | groonga test.db | grep -q TokenMecab} | |
| + end | |
| + | |
| + if build.with? "lz4" | |
| + system %q{printf 'table_create Entries TABLE_HASH_KEY ShortText\n' | groonga test.db} | |
| + system %q{printf 'column_create Entries content COLUMN_SCALAR|COMPRESS_LZ4 Text\n' | groonga test.db} | |
| + end | |
| + end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment