diff --git a/.ruby-version b/.ruby-version index 276cbf9e2..ec1cf33c3 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.3.0 +2.6.3 diff --git a/.travis.yml b/.travis.yml index 0b4232a41..082cb72fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,23 @@ language: ruby -dist: trusty +dist: bionic cache: bundler +services: + - postgresql + - elasticsearch +addons: + postgresql: "9.4" + apt: + packages: + - postgresql-9.4 + - postgresql-client-9.4 + chrome: stable bundler_args: '--without development' env: global: - DATABASE_URL=postgres://postgres@localhost/timeoverflow_test - CC_TEST_REPORTER_ID=025bc15a0fa9afa52d86ee24fea845cf1d363f48a466bcf2cef8ab80c29acb28 before_install: - - gem install bundler:1.17.0 + - gem install bundler:1.17.3 before_script: - bundle exec rake db:setup - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter @@ -17,7 +27,3 @@ before_script: - sleep 10 after_script: - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT -services: - - elasticsearch -addons: - chrome: stable diff --git a/Gemfile b/Gemfile index 811334e20..f8b962925 100644 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,7 @@ gem "rdiscount" gem 'activeadmin', '~> 1.2.1' gem 'has_scope' gem 'pundit', '~> 2.0.0' -gem 'pg', '0.17.1' +gem 'pg', '0.21.0' gem 'hstore_translate' gem 'dalli' gem 'devise', '~> 4.5.0' diff --git a/Gemfile.lock b/Gemfile.lock index 36da5a6ed..ef6705fb3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,21 +1,21 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.11) - actionpack (= 4.2.11) - actionview (= 4.2.11) - activejob (= 4.2.11) + actionmailer (4.2.11.1) + actionpack (= 4.2.11.1) + actionview (= 4.2.11.1) + activejob (= 4.2.11.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.11) - actionview (= 4.2.11) - activesupport (= 4.2.11) + actionpack (4.2.11.1) + actionview (= 4.2.11.1) + activesupport (= 4.2.11.1) rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.11) - activesupport (= 4.2.11) + actionview (4.2.11.1) + activesupport (= 4.2.11.1) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) @@ -32,17 +32,17 @@ GEM ransack (~> 1.3) sass (~> 3.1) sprockets (< 4.1) - activejob (4.2.11) - activesupport (= 4.2.11) + activejob (4.2.11.1) + activesupport (= 4.2.11.1) globalid (>= 0.3.0) - activemodel (4.2.11) - activesupport (= 4.2.11) + activemodel (4.2.11.1) + activesupport (= 4.2.11.1) builder (~> 3.1) - activerecord (4.2.11) - activemodel (= 4.2.11) - activesupport (= 4.2.11) + activerecord (4.2.11.1) + activemodel (= 4.2.11.1) + activesupport (= 4.2.11.1) arel (~> 6.0) - activesupport (4.2.11) + activesupport (4.2.11.1) i18n (~> 0.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) @@ -104,7 +104,7 @@ GEM execjs coffee-script-source (1.8.0) columnize (0.9.0) - concurrent-ruby (1.1.3) + concurrent-ruby (1.1.5) connection_pool (2.2.1) crass (1.0.4) dalli (2.7.2) @@ -151,7 +151,7 @@ GEM actionpack (>= 3.2.13) formtastic_i18n (0.6.0) gli (2.16.0) - globalid (0.4.1) + globalid (0.4.2) activesupport (>= 4.2.0) has_scope (0.6.0) actionpack (>= 3.2, < 5) @@ -205,7 +205,7 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mini_mime (1.0.1) - mini_portile2 (2.3.0) + mini_portile2 (2.4.0) minitest (5.11.3) multi_json (1.11.2) multipart-post (2.0.0) @@ -213,14 +213,14 @@ GEM net-ssh (>= 2.6.5) net-ssh (2.9.2) netrc (0.11.0) - nokogiri (1.8.5) - mini_portile2 (~> 2.3.0) + nokogiri (1.10.3) + mini_portile2 (~> 2.4.0) orm_adapter (0.5.0) parallel (1.12.1) parser (2.5.0.0) ast (~> 2.4.0) pdf-core (0.7.0) - pg (0.17.1) + pg (0.21.0) polyamorous (1.3.3) activerecord (>= 3.0) powerpack (0.1.1) @@ -237,16 +237,16 @@ GEM rack rack-test (0.6.3) rack (>= 1.0) - rails (4.2.11) - actionmailer (= 4.2.11) - actionpack (= 4.2.11) - actionview (= 4.2.11) - activejob (= 4.2.11) - activemodel (= 4.2.11) - activerecord (= 4.2.11) - activesupport (= 4.2.11) + rails (4.2.11.1) + actionmailer (= 4.2.11.1) + actionpack (= 4.2.11.1) + actionview (= 4.2.11.1) + activejob (= 4.2.11.1) + activemodel (= 4.2.11.1) + activerecord (= 4.2.11.1) + activesupport (= 4.2.11.1) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.11) + railties (= 4.2.11.1) sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) @@ -259,14 +259,14 @@ GEM rails-i18n (4.0.3) i18n (~> 0.6) railties (~> 4.0) - railties (4.2.11) - actionpack (= 4.2.11) - activesupport (= 4.2.11) + railties (4.2.11.1) + actionpack (= 4.2.11.1) + activesupport (= 4.2.11.1) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (3.0.0) raindrops (0.16.0) - rake (12.3.1) + rake (12.3.2) ransack (1.8.6) actionpack (>= 3.0) activerecord (>= 3.0) @@ -420,7 +420,7 @@ DEPENDENCIES kaminari (~> 1.1.1) letter_opener (= 1.4.1) localeapp (= 2.1.1) - pg (= 0.17.1) + pg (= 0.21.0) prawn (~> 2.2.0) prawn-table (~> 0.2.2) pundit (~> 2.0.0) @@ -447,7 +447,7 @@ DEPENDENCIES whenever RUBY VERSION - ruby 2.3.0p0 + ruby 2.6.3p62 BUNDLED WITH - 1.16.2 + 1.17.3 diff --git a/config/database.yml b/config/database.yml index 61b9c86f2..590d9d50e 100644 --- a/config/database.yml +++ b/config/database.yml @@ -16,7 +16,7 @@ defaults: &defaults collation: 'es_ES.UTF-8' ctype: 'es_ES.UTF-8' template: 'template0' - encoding: utf8 + encoding: 'UTF8' development: <<: *defaults diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 44cd48558..daa6c289b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -157,3 +157,20 @@ def set_browser_locale(locale) with.library :rails end end + +# Rails 4.2 call `initialize` inside `recycle!`. However Ruby 2.6 doesn't allow calling `initialize` twice. +# More info: https://github.com/rails/rails/issues/34790 +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! Remove me please!" +end