Thrift-1286: Modernize the Thrift Ruby Library Dev Environment
Client: Ruby
Patch: jfarrell

Updates to ruby build process with the following changes:
 - Removes dependency on echoe for spec generation
 - Adds gemfile for bulider and uses thrift.gemspec for dependency management.
 - Adds checks in configure for builder and only calls if available (make check-local on ci servers)
 - Adds checks in configure for Ruby and rake (bundler as well but this is optional for check-local and auto dependency management)
 - Still allows for rake to do its thing if all dependencies are in place
 - Removed Manifest and setup.rb
 - Adds a install task which will generate a gem and then install that gem to locally configured ruby path (no more prefix or destdir with this client)



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1163341 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/Makefile.am b/lib/rb/Makefile.am
index 39c04d9..a3ea975 100644
--- a/lib/rb/Makefile.am
+++ b/lib/rb/Makefile.am
@@ -20,8 +20,8 @@
 EXTRA_DIST = \
 	CHANGELOG \
 	Rakefile \
-	Manifest \
-	setup.rb \
+	Gemfile \
+	thrift.gemspec \
 	lib \
 	ext \
 	benchmark \
@@ -31,19 +31,17 @@
 DESTDIR ?= /
 
 all-local:
-	if [ -n "$(RUBY_PREFIX)" ] ; then $(RUBY) setup.rb config --prefix=$(DESTDIR)$(RUBY_PREFIX) --rbdir='$$libdir/ruby' --sodir='$$libdir/ruby' ; elif [ -n "$(DESTDIR)" ] ; then $(RUBY) setup.rb config --prefix=$(DESTDIR) ; else $(RUBY) setup.rb config ; fi
-	$(RUBY) setup.rb setup
+	$(RAKE) build_ext
 
 install-exec-hook:
-	$(RUBY) setup.rb install --prefix=$(DESTDIR)
+	$(RAKE) install
 
-# Make sure this doesn't fail if Ruby is not configured.
 clean-local:
-	RUBY=$(RUBY) ; if test -z "$$RUBY" ; then RUBY=: ; fi ; \
-	$$RUBY setup.rb clean
+	$(RAKE) clean
 
 check-local: all
-if HAVE_RSPEC
-	rake spec
+if HAVE_BUNDLER
+	$(BUNDLER) install
+	$(BUNDLER) exec rake
 endif