diff options
-rw-r--r-- | .gitlab-ci.yml | 6 | ||||
-rw-r--r-- | .ruby-version | 2 | ||||
-rw-r--r-- | app/workers/authorized_projects_worker.rb | 8 | ||||
-rw-r--r-- | doc/install/installation.md | 7 | ||||
-rw-r--r-- | spec/workers/concerns/waitable_worker_spec.rb | 6 |
5 files changed, 22 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e0719221221..4659722854e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -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/ @@ -571,7 +571,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/ diff --git a/.ruby-version b/.ruby-version index e75da3e63d6..00355e29d11 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.3.6 +2.3.7 diff --git a/app/workers/authorized_projects_worker.rb b/app/workers/authorized_projects_worker.rb index d7e24491516..8fe3619f6ee 100644 --- a/app/workers/authorized_projects_worker.rb +++ b/app/workers/authorized_projects_worker.rb @@ -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) diff --git a/doc/install/installation.md b/doc/install/installation.md index 1abbfd78738..3cf6f7b7ddf 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -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 diff --git a/spec/workers/concerns/waitable_worker_spec.rb b/spec/workers/concerns/waitable_worker_spec.rb index 4af0de86ac9..54ab07981a4 100644 --- a/spec/workers/concerns/waitable_worker_spec.rb +++ b/spec/workers/concerns/waitable_worker_spec.rb @@ -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 |