diff --git a/.circleci/config.yml b/.circleci/config.yml index 2c6609b6f..1cc182eee 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ version: 2 defaults: &defaults docker: - - image: circleci/ruby:2.5.1-node + - image: circleci/ruby:2.6.0-node working_directory: ~/api.goodcity jobs: @@ -47,7 +47,7 @@ jobs: test: <<: *defaults docker: - - image: circleci/ruby:2.5.1-node + - image: circleci/ruby:2.6.0-node - image: circleci/postgres:9.6.9-alpine-ram - image: circleci/redis:4.0.9-alpine parallelism: 4 diff --git a/Gemfile b/Gemfile index 2c67c6b3d..0ff9c43d1 100755 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -ruby "2.5.1" +ruby "2.6.0" gem 'rails', '~> 4.2.11.1' gem 'rails-api' diff --git a/Gemfile.lock b/Gemfile.lock index a374db053..cc2cbee52 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -545,7 +545,7 @@ DEPENDENCIES with_advisory_lock RUBY VERSION - ruby 2.5.1p57 + ruby 2.6.0p0 BUNDLED WITH 1.17.3 diff --git a/spec/support/controller_helpers.rb b/spec/support/controller_helpers.rb index aac2d6216..f224032b2 100644 --- a/spec/support/controller_helpers.rb +++ b/spec/support/controller_helpers.rb @@ -1,6 +1,23 @@ # test/test_helpers/warden.rb -# Based on http://stackoverflow.com/questions/13420923/configuring-warden-for-use-in-rspec-controller-specs +if RUBY_VERSION >= '2.6.0' + if Rails.version < '5' + module ActionController + class TestResponse < ActionDispatch::TestResponse + def recycle! + # HACK: to avoid MonitorMixin double-initialize error: + @mon_mutex_owner_object_id = nil + @mon_mutex = nil + initialize + end + end + end + else + puts 'Monkeypatch for ActionController::TestResponse no longer needed' + end +end + +# Based on http://stackoverflow.com/questions/13420923/configuring-warden-for-use-in-rspec-controller-specs module Warden # Warden::Test::ControllerHelpers provides a facility to test controllers in isolation # Most of the code was extracted from Devise's Devise::TestHelpers.