resque/resque-scheduler — pull request #421 by yaauie (2014-06-27 07:05:10+00:00)
Title: pidfile: ensure English is required in Env, where it is needed for $PROCESS_ID

As @mdahlstrand pointed out in #418, pidfile is broken unless using the rake task.

It looks like it [relies on `$PROCESS_ID`](https://github.com/resque/resque-scheduler/blob/v3.0.0/lib/resque/scheduler/env.rb#L40), which is provided by the `English` library in stdlib, but we only require it [in the rake task](https://github.com/resque/resque-scheduler/blob/v3.0.0/lib/resque/scheduler/tasks.rb#L3) :frowning:

~~~ irb
irb(main):001:0> $$
=> 34631
irb(main):002:0> $PROCESS_ID
=> nil
irb(main):003:0> require 'English'
=> true
irb(main):004:0> $PROCESS_ID
=> 34631
~~~

This patch fixes the issue on 3.x, and should be backported to 2.5.x as well; I'll gladly manage that legwork once someone reviews the fix.

Resolves #418