Commit cf031738 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'sh-test-ruby-2.3.7' into 'master'

Port Ruby 2.3.7 changes to EE

See merge request gitlab-org/gitlab-ee!5304
parents 56a0e409 f629b8ef
image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.3.6-golang-1.9-git-2.16-chrome-63.0-node-8.x-yarn-1.2-postgresql-9.6"
image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.3.7-golang-1.9-git-2.17-chrome-63.0-node-8.x-yarn-1.2-postgresql-9.6"
.dedicated-runner: &dedicated-runner
retry: 1
......@@ -6,7 +6,7 @@ image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.3.6-golang-1.9-git
- gitlab-org
.default-cache: &default-cache
key: "ruby-2.3.6-with-yarn"
key: "ruby-2.3.7-with-yarn"
paths:
- vendor/ruby
- .yarn-cache/
......@@ -692,7 +692,7 @@ static-analysis:
script:
- scripts/static-analysis
cache:
key: "ruby-2.3.6-with-yarn-and-rubocop"
key: "ruby-2.3.7-with-yarn-and-rubocop"
paths:
- vendor/ruby
- .yarn-cache/
......
......@@ -2,6 +2,14 @@ class AuthorizedProjectsWorker
include ApplicationWorker
prepend WaitableWorker
# This is a workaround for a Ruby 2.3.7 bug. rspec-mocks cannot restore the
# visibility of prepended modules. See https://github.com/rspec/rspec-mocks/issues/1231
# for more details.
if Rails.env.test?
def self.bulk_perform_and_wait(args_list, timeout: 10)
end
end
def perform(user_id)
user = User.find_by(id: user_id)
......
......@@ -133,9 +133,10 @@ Remove the old Ruby 1.8 if present:
Download Ruby and compile it:
mkdir /tmp/ruby && cd /tmp/ruby
curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.6.tar.gz
echo '4e6a0f828819e15d274ae58485585fc8b7caace0 ruby-2.3.6.tar.gz' | shasum -c - && tar xzf ruby-2.3.6.tar.gz
cd ruby-2.3.6
curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.7.tar.gz
echo '540996fec64984ab6099e34d2f5820b14904f15a ruby-2.3.7.tar.gz' | shasum -c - && tar xzf ruby-2.3.7.tar.gz
cd ruby-2.3.7
./configure --disable-install-rdoc
make
sudo make install
......
......@@ -78,7 +78,6 @@ module Gitlab
cipher.__send__(operation) # rubocop:disable GitlabSecurity/PublicSend
cipher.iv = salt
cipher.key = Gitlab::Application.secrets.db_key_base
cipher.auth_data = ''
cipher
end
......
......@@ -17,6 +17,15 @@ module Gitlab
true
end
# This is a workaround for a Ruby 2.3.7 bug. rspec-mocks cannot restore
# the visibility of prepended modules. See
# https://github.com/rspec/rspec-mocks/issues/1231 for more details.
if Rails.env.test?
def self.requires_ci_cd_setup?
raise NotImplementedError
end
end
def initialize(project)
@project = project
end
......
......@@ -14,6 +14,12 @@ describe WaitableWorker do
include ApplicationWorker
prepend WaitableWorker
# This is a workaround for a Ruby 2.3.7 bug. rspec-mocks cannot restore
# the visibility of prepended modules. See
# https://github.com/rspec/rspec-mocks/issues/1231 for more details.
def self.bulk_perform_inline(args_list)
end
def perform(i = 0)
self.class.counter += i
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment