From b934c997f9b08357e59ee859e3aa6a693ed4d684 Mon Sep 17 00:00:00 2001 From: Mike Dirolf Date: Fri, 17 Jul 2009 13:29:38 -0400 Subject: [PATCH] minor: tool to check if extension is installed --- bin/fail_if_no_c.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 bin/fail_if_no_c.rb diff --git a/bin/fail_if_no_c.rb b/bin/fail_if_no_c.rb new file mode 100644 index 0000000..855c427 --- /dev/null +++ b/bin/fail_if_no_c.rb @@ -0,0 +1,11 @@ +# Fail if the C extension module isn't installed. +# +# Only really intended to be used by internal build scripts. + +require 'rubygems' +require 'mongo' +begin + require 'mongo_ext/cbson' +rescue LoadError + Process.exit 1 +end