alphagov/gds-api-adapters — pull request #131 by bradleywright (2014-03-25 15:40:19+00:00)
Title: Fix constant warnings in Ruby 2.0.0 and above

Since some of our projects upgraded to Ruby 2.x we've started seeing warnings like:

```
/home/deploy/project/shared/bundle/ruby/2.0.0/gems/gds-api-adapters-7.20.0/lib/gds_api/response.rb:27: warning: already initialized constant GdsApi::Response::WEB_URL_KEYS
/data/vhost/project/shared/bundle/ruby/2.0.0/gems/gds-api-adapters-7.20.0/lib/gds_api/response.rb:27:
warning: previous definition of WEB_URL_KEYS was here
```

in our logs. This is apparently due to Ruby 2.x's behaviour when [using `require` within a symlinked path](https://bugs.ruby-lang.org/issues/4403).

One workaround would be to [turn off `$VERBOSE` logging](http://stackoverflow.com/questions/9236264/how-to-disable-warning-for-redefining-a-constant-when-loading-a-file), but that means we'd miss out on legitimate warnings.

Given that this constant was only used in this single place (I couldn't find it in any other projects), and contained a single value, I've simply refactored it out.