puma/puma — pull request #327 by lmarburger (2013-07-17 00:18:05+00:00)
Title: Convert thread pool sizes to integers

This commit centralizes the code that's responsible for converting the min and max thread pool sizes into `ThreadPool#initialize`. It came up when pulling min and max from `ENV` in a config file:

```
threads ENV['MIN_THREADS'], ENV['MAX_THREADS']
```

This would raise an exception because `DSL#threads` doesn't convert args to an integer like the `--thread` CLI flag. Instead of requiring that client code provide integers or calling `Intger()` or `#to_i` in `DSL#threads`, I moved all that into `ThreadPool#initialize`.

The second commit removes the obviated `Intger()` and `#to_i` calls.

One word of warning, I used `Integer()` instead of `#to_i`. This will now cause an exception when starting with `--threads 0.5:1.5`. I only know my use case. If you think this would cause problems, I could switch to `#to_i`.