Some of the following would be useful:

```ruby
  def routes
    Rails.version.starts_with?('2') ? ActionController::Routing::Routes.routes : Rails.application.routes.routes
  end

  def significant_keys(route)
    Rails.version.starts_with?('2') ? route.significant_keys : route.segment_keys
  end
```