codegram/futuroscope — pull request #22 by CQQL (2014-09-07 17:24:08+00:00)
Title: A non-concurrent pool

This PR implements a non-concurrent pool under the name of `Futuroscope::Pools::NoPool`.

It is useful for testing. I am using [hyperclient](https://github.com/codegram/hyperclient) with [faradays rack adapter](https://github.com/lostisland/faraday/blob/master/lib/faraday/adapter/rack.rb) to test a HAL API. And from normal rails testing, I am used to the test server running in the same thread as the tests. This has the huge advantage, `ActiveRecord` in the tests and in the rack app share the same database connection, so that tests can run in a transaction and clean up is a simple rollback. This does not work anymore, when throwing threads in the mix, because ActiveRecord will reconnect and you have to actually write to the database and use `database_cleaner` for cleanup. The cleanup is really expensive though. A single integration test goes from 0.5 seconds to 4.5 seconds.

The last commit unifies the use of `'` and `"` by replacing all `'` with `"`. If you don't like it, you can of course omit it, but it kept catching my eye.