Ensure tempfile for the query sequence is not GCed before BLAST search is over

or the search would sometimes unpredictably fail for the users with an
`Errno::ENOENT`.

Close #95 which suggested another work-around to the "missing query file"
problem.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Invoke bundler setup before parsing CLI options

or `sequenceserver format-databases` fails:

`cannot load such file -- sequenceserver/database_formatter (LoadError)`

In any case, the application should be fully bootstrapped before it attempts to
perform any operation.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Fix error message issued by database_formatter if the databases directory ...

... couldn't be found (close #102).

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
update format-databases help english

Signed-off-by: Ben J Woodcroft <donttrustben@gmail.com>
Fix typo in database formatting

[ap: rebase over next]

Signed-off-by: Ben J Woodcroft <donttrustben@gmail.com>
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Revert "Add a switch to start SequenceServer in development mode."

This reverts commit 149b5da4357b48c91253d0fe01f5878802755ed4.

Being able to switch environment through a CLI switch requires that
`sequenceserver.rb` be loaded after CLI options have been processed.
However, existing options require `sequenceserver.rb` to be loaded
before CLI options have been processed.  So, let's put the new guy
on hold for now.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Default to running SequenceServer in development mode (reopen #94).

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Require 'sequenceserver.rb' before parsing CLI options.

This used to be the case till 5d88ea3bc970d98e6541f3081da57e946f76f7e1 which
broke processing of CLI options.  Let's make the CLI options happy.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
port should be specified through -p (or --port) command line option

So config file now contains BLAST specific settings only.  Whereas, port was
meant for the self hosting server.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Fix warnings raised by ruby interpreter for sequenceserver.rb.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Settings derived from configuration file are now local to an App object.

One process should be able to run multiple SS instances now.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
SequenceServer::App is not self-hosting anymore.

SequenceServer::App was trying to do too much.  Starting a server,
for sure, is not its responsibility.  Moved that bit of functionality
out to bin/sequenceserver.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Update gemspec to include Rack.

We use `Rack::Handler.default` now to pick a Rack handler instead of
(overriding) `Sinatra::Base.run!`.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Ensure -p and -c CLI options are passed an acceptable value.

If not, nudge the user and exit early.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>