gitlab-org--gitlab-foss/config/initializers
blackst0ne ddcce35c28 [Rails5] Avoid type casting in uniqueness validator
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
2018-04-19 13:31:11 +11:00
..
0_acts_as_taggable.rb
0_as_concern.rb
0_inflections.rb
0_post_deployment_migrations.rb
1_settings.rb
2_app.rb
5_backend.rb
6_validations.rb
7_prometheus_metrics.rb
7_redis.rb
8_gitaly.rb
8_metrics.rb
active_record_array_type_casting.rb
active_record_avoid_type_casting_in_uniqueness_validator.rb
active_record_data_types.rb
active_record_locking.rb
active_record_mysql_timestamp.rb
active_record_preloader.rb
active_record_schema_ignore_tables.rb
active_record_table_definition.rb
additional_headers_interceptor.rb
application_controller_renderer.rb
ar5_batching.rb
ar5_pg_10_support.rb
ar_native_database_types.rb
ar_speed_up_migration_checking.rb
artifacts_direct_upload_support.rb
asset_sync.rb
attr_encrypted_no_db_connection.rb
backtrace_silencers.rb
batch_loader.rb
bootstrap_form.rb
bullet.rb
carrierwave.rb
chronic_duration.rb
connection_fix.rb
cookies_serializer.rb
date_time_formats.rb
default_url_options.rb
deprecations.rb
devise.rb
devise_password_length.rb.example
disable_email_interceptor.rb
doorkeeper.rb
doorkeeper_openid_connect.rb
email_template_interceptor.rb
etag_caching.rb
fast_gettext.rb
fix_local_cache_middleware.rb
flipper.rb
fog_google_https_private_urls.rb
forbid_sidekiq_in_transactions.rb
gettext_rails_i18n_patch.rb
gitlab_shell_secret_token.rb
gitlab_workhorse_secret.rb
go_get.rb
gollum.rb
grape_route_helpers_fix.rb
grpc.rb
hamlit.rb
health_check.rb
kaminari_config.rb
lograge.rb
mime_types.rb
mysql_ignore_postgresql_options.rb
mysql_set_length_for_binary_indexes.rb
new_framework_defaults.rb
omniauth.rb
peek.rb
postgresql_cte.rb
postgresql_limit_fix.rb
postgresql_opclasses_support.rb
premailer.rb
query_limiting.rb
rack_attack.rb.example
rack_attack_git_basic_auth.rb
rack_attack_global.rb
rack_attack_logging.rb
rack_lineprof.rb
relative_naming_ci_namespace.rb
relative_url.rb.sample
request_context.rb
request_profiler.rb
routing_draw.rb
rspec_profiling.rb
secret_token.rb
sentry.rb
server_uptime.rb
session_store.rb
sherlock.rb
sidekiq.rb
smtp_settings.rb.sample
static_files.rb
time_zone.rb
trusted_proxies.rb
warden.rb
workhorse_multipart.rb
wrap_parameters.rb