alphagov/gds-sso — pull request #42 by heathd (2014-02-11 15:45:29+00:00)
Title: More robust detection of rails 4

Using `Rails.version` requires the `Rails` constant to exist. When
including `gds-sso` in the build of a non-rails gem (e.g.
`govuk_content_models`) that would cause the build to fail because `Rails`
would not be loaded in the tests.

This alternative way of checking the rails version is more robust to that scenario.

For an example of such a failure see:

https://travis-ci.org/alphagov/govuk_content_models/builds/18656006