Skip to content

Releases: whazzmaster/guard-redis

Updates pidfile tracking

15 Mar 17:22
Compare
Choose a tag to compare

This gem incurred a major version bump because of a potentially non-backwards compatible change in how it tracks the pidfile created by the redis-server process. See the README for more information on pidfile tracking.

Redis gem version support

The gem had been inadvertently bound to a specific version number of the redis gem. This has now been removed.

Pidfile tracking

Due to an oversight in how the pidfile is tracked by the gem, it was possible that if the pidfile location via configuration (or the default pidfile location of /tmp/redis.pid) wasn't writable because of permissions or the directory didn't exist, then guard-redis could not function because there was no way to shutdown the existing process and restart.

The code used to store the pid returned by IO.open call and use that as a fallback, but sometime between when the gem was written and now the redis-server process stopped returning the pid of the daemonized process, instead returning the pid of the spawning process (note: this may have never worked and been an oversight the whole time).

With this release we now ignore the pid returned by the spawning process and instead wait for the pidfile to get the canonical pid written by redis-server itself. This means that we take extra precautions to ensure that (a) the pidfile is writable and (b) that it was written after the redis-server process started. If either is false then we refuse to proceed because we have no way of controlling the start/stop process at that point.

Update to Guard 2.x

29 Dec 21:29
Compare
Choose a tag to compare

Per issue #5, the Guard library has deprecated usage of Guard::Guardas of 2.8 and so this library needed to update to subclass Guard::Plugin instead.

This release also includes:

  • Updates specs to RSpec 3
  • Removes Growl as a dependency- no need for it
  • Removes support for Guard at the lib level- no need for it

There should be no functional changes, but due to the the underlying dependencies crossing major version boundaries I felt it safer to update this lib past 1.0 to ensure no breakages due to dependency changes.