This commit does two things:
1. Synchronizes `Gemfile.rails5.lock` with the latest changes in `Gemfile`
2. Adds a monkey patch for active record to avoid type casting in uniqueness
validator.
In Rails 5.0 there was introduced a bug [1] that causes to problems like
this:
```
1) API::Users POST /user/:id/gpg_keys/:key_id/revoke when authenticated revokes existing key
Failure/Error: let(:gpg_key) { create(:gpg_key, user: user) }
TypeError:
can't cast Hash
```
This bug was fixed in Rails 5.1 [2].
[1]: 811a4fa8eb
[2]: aa062318c4
1. Add support for `RAILS5=1|true` for the `bin/spinach` command.
2. Synchronize used spinach versions both for rails4 and rails5.
For rails5 it was accidently used spinach 0.10.1 instead of 0.8.10.
That brought some problems on running spinach tests.
Example of failure message:
NoMethodError: undefined method `line' for #<Spinach::Scenario:0x000000000c86ba80>
Did you mean? lines
/builds/gitlab-org/gitlab-ce/features/support/env.rb:52:in `before_scenario_run'
In Rails 5.0 `assert_template` and `assigns()` have been extracted to
the `rails-controller-testing` gem.
https://github.com/rails/rails/pull/20138/files
This commit adds this gem for rails5.
1. Synchronize used version of `parser` gem for both versions of rails: 4 and 5.
2. Fix broken CI pipelines for rails5 branches.
The 2.5.0.4 version is removed from rubygems, so it's skipped.
https://github.com/whitequark/parser/issues/478