From ddcce35c28042745d14f81b1275eabdc589a71a5 Mon Sep 17 00:00:00 2001 From: blackst0ne Date: Thu, 19 Apr 2018 13:31:11 +1100 Subject: [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]: https://github.com/rails/rails/pull/23523/commits/811a4fa8eb6ceea841e61e8ac05747ffb69595ae [2]: https://github.com/rails/rails/pull/24745/commits/aa062318c451512035c10898a1af95943b1a3803 --- Gemfile.rails5.lock | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) (limited to 'Gemfile.rails5.lock') diff --git a/Gemfile.rails5.lock b/Gemfile.rails5.lock index c953b9708a0..a0330cbdd02 100644 --- a/Gemfile.rails5.lock +++ b/Gemfile.rails5.lock @@ -69,7 +69,7 @@ GEM unf ast (2.4.0) atomic (1.1.100) - attr_encrypted (3.0.3) + attr_encrypted (3.1.0) encryptor (~> 3.0.0) attr_required (1.0.1) autoprefixer-rails (8.1.0.1) @@ -291,9 +291,9 @@ GEM po_to_json (>= 1.0.0) rails (>= 3.2.0) gherkin-ruby (0.3.2) - gitaly-proto (0.94.0) + gitaly-proto (0.97.0) google-protobuf (~> 3.1) - grpc (~> 1.0) + grpc (~> 1.10) github-linguist (5.3.3) charlock_holmes (~> 0.7.5) escape_utils (~> 1.1.0) @@ -304,6 +304,17 @@ GEM flowdock (~> 0.7) gitlab-grit (>= 2.4.1) multi_json + gitlab-gollum-lib (4.2.7.1) + gemojione (~> 3.2) + github-markup (~> 1.6) + gollum-grit_adapter (~> 1.0) + nokogiri (>= 1.6.1, < 2.0) + rouge (~> 2.1) + sanitize (~> 2.1) + stringex (~> 2.6) + gitlab-gollum-rugged_adapter (0.4.4) + mime-types (>= 1.15) + rugged (~> 0.25) gitlab-grit (2.8.2) charlock_holmes (~> 0.6) diff-lcs (~> 1.1) @@ -321,22 +332,8 @@ GEM rubyntlm (~> 0.5) globalid (0.4.1) activesupport (>= 4.2.0) - goldiloader (2.0.1) - activerecord (>= 4.2, < 5.2) - activesupport (>= 4.2, < 5.2) gollum-grit_adapter (1.0.1) gitlab-grit (~> 2.7, >= 2.7.1) - gollum-lib (4.2.7) - gemojione (~> 3.2) - github-markup (~> 1.6) - gollum-grit_adapter (~> 1.0) - nokogiri (>= 1.6.1, < 2.0) - rouge (~> 2.1) - sanitize (~> 2.1) - stringex (~> 2.6) - gollum-rugged_adapter (0.4.4) - mime-types (>= 1.15) - rugged (~> 0.25) gon (6.1.0) actionpack (>= 3.0) json @@ -1009,7 +1006,7 @@ DEPENDENCIES asciidoctor (~> 1.5.6) asciidoctor-plantuml (= 0.0.8) asset_sync (~> 2.2.0) - attr_encrypted (~> 3.0.0) + attr_encrypted (~> 3.1.0) awesome_print (~> 1.2.0) babosa (~> 1.0.2) base32 (~> 0.3.0) @@ -1069,15 +1066,14 @@ DEPENDENCIES gettext (~> 3.2.2) gettext_i18n_rails (~> 1.8.0) gettext_i18n_rails_js (~> 1.3) - gitaly-proto (~> 0.94.0) + gitaly-proto (~> 0.97.0) github-linguist (~> 5.3.3) gitlab-flowdock-git-hook (~> 1.0.1) + gitlab-gollum-lib (~> 4.2) + gitlab-gollum-rugged_adapter (~> 0.4.4) gitlab-markup (~> 1.6.2) gitlab-styles (~> 2.3) gitlab_omniauth-ldap (~> 2.0.4) - goldiloader (~> 2.0) - gollum-lib (~> 4.2) - gollum-rugged_adapter (~> 0.4.4) gon (~> 6.1.0) google-api-client (~> 0.19.8) google-protobuf (= 3.5.1) -- cgit v1.2.1