diff -Nru ruby-active-model-serializers-0.10.10/active_model_serializers.gemspec ruby-active-model-serializers-0.10.12/active_model_serializers.gemspec --- ruby-active-model-serializers-0.10.10/active_model_serializers.gemspec 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/active_model_serializers.gemspec 2020-12-10 17:42:12.000000000 +0000 @@ -15,13 +15,13 @@ spec.homepage = 'https://github.com/rails-api/active_model_serializers' spec.license = 'MIT' - spec.files = Dir["CHANGELOG.md", "MIT-LICENSE", "README.md", "lib/**/*"] + spec.files = Dir['CHANGELOG.md', 'MIT-LICENSE', 'README.md', 'lib/**/*'] spec.require_paths = ['lib'] spec.executables = [] spec.required_ruby_version = '>= 2.1' - rails_versions = ['>= 4.1', '< 6.1'] + rails_versions = ['>= 4.1', '< 6.2'] spec.add_runtime_dependency 'activemodel', rails_versions # 'activesupport', rails_versions # 'builder' @@ -54,10 +54,10 @@ spec.add_development_dependency 'kaminari', ' ~> 0.16.3' spec.add_development_dependency 'will_paginate', '~> 3.0', '>= 3.0.7' - spec.add_development_dependency 'bundler', '~> 1.6' - spec.add_development_dependency 'simplecov', '~> 0.11' + spec.add_development_dependency 'bundler' + spec.add_development_dependency 'simplecov', '>= 0.11' spec.add_development_dependency 'timecop', '~> 0.7' spec.add_development_dependency 'grape', ['>= 0.13', '< 0.19.1'] spec.add_development_dependency 'json_schema' - spec.add_development_dependency 'rake', ['>= 10.0', '< 12.0'] + spec.add_development_dependency 'rake', ['>= 10.0', '< 13.0'] end diff -Nru ruby-active-model-serializers-0.10.10/appveyor.yml ruby-active-model-serializers-0.10.12/appveyor.yml --- ruby-active-model-serializers-0.10.10/appveyor.yml 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/appveyor.yml 2020-12-10 17:42:12.000000000 +0000 @@ -14,9 +14,9 @@ install: - SET PATH=C:\%ruby_version%\bin;%PATH% - - gem uninstall bundler -a -x -I - - gem update --system 2.7.9 - - # gem install bundler -v '1.17.3' + - gem uninstall bundler -x + - # gem update --system 2.7.9 + - gem install bundler -v '1.17.3' - bundle env - bundle check || bundle install --path=vendor/bundle --retry=3 --jobs=3 - bundle clean --force diff -Nru ruby-active-model-serializers-0.10.10/CHANGELOG.md ruby-active-model-serializers-0.10.12/CHANGELOG.md --- ruby-active-model-serializers-0.10.10/CHANGELOG.md 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/CHANGELOG.md 2020-12-10 17:42:12.000000000 +0000 @@ -1,6 +1,6 @@ ## 0.10.x -### [master (unreleased)](https://github.com/rails-api/active_model_serializers/compare/v0.10.10...0-10-stable) +### [master (unreleased)](https://github.com/rails-api/active_model_serializers/compare/v0.10.12...0-10-stable) Breaking changes: @@ -10,6 +10,23 @@ Misc: +### [v0.10.12 (2020-12-10)](https://github.com/rails-api/active_model_serializers/compare/v0.10.11...v0.10.12) + +Fixes: + +- [#2398](https://github.com/rails-api/active_model_serializers/pull/2398) Update rails dependency to < 6.2 (@ritikesh) + +### [v0.10.11 (2020-12-04)](https://github.com/rails-api/active_model_serializers/compare/v0.10.10...v0.10.11) + +Features: + +- [#2361](https://github.com/rails-api/active_model_serializers/pull/2361) Add `ActiveModelSerializers.config.use_sha1_digests` to allow customization of the hashing algorithm used for serializer caching (@alexzherdev) + +Fixes: + +- [#2344](https://github.com/rails-api/active_model_serializers/pull/2344) Fixes #2341 introduced since #2223 (@wasifhossain) +- [#2395](https://github.com/rails-api/active_model_serializers/pull/2395) remove explicit require for thread_safe (@ritikesh) + ### [v0.10.10 (2019-07-13)](https://github.com/rails-api/active_model_serializers/compare/v0.10.9...v0.10.10) Fixes: diff -Nru ruby-active-model-serializers-0.10.10/debian/changelog ruby-active-model-serializers-0.10.12/debian/changelog --- ruby-active-model-serializers-0.10.10/debian/changelog 2020-02-28 21:50:06.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/debian/changelog 2021-12-01 02:09:24.000000000 +0000 @@ -1,3 +1,33 @@ +ruby-active-model-serializers (0.10.12-1) unstable; urgency=medium + + * New upstream release. + + [ Balasankar C ] + * Remove Balu as an uploader. + + [ Daniel Leidert ] + * d/clean: Remove test/tmp/. + * d/control (Uploaders): Add myself. + (Standards-Version): Bump to 4.6.0. + (Depends): Use ${ruby:Depends}. + * d/copyright (Copyright): Add team. + * d/rules: Use gem installation layout. Drop obsolete targets. + * d/watch: Minor update to version 4. + * d/patches/relax-rails-61-tests.patch: Add patch applied upstream. + - Fix tests with Rails 6.1 (closes: #996117). + * d/patches/series: Enable new patch. + * d/upstream/metadata: Update URLs. + + -- Daniel Leidert Wed, 01 Dec 2021 03:09:24 +0100 + +ruby-active-model-serializers (0.10.10-2) UNRELEASED; urgency=medium + + * Set field Upstream-Contact in debian/copyright. + * Remove obsolete fields Contact, Name from debian/upstream/metadata + (already present in machine-readable debian/copyright). + + -- Debian Janitor Fri, 24 Apr 2020 00:56:35 +0000 + ruby-active-model-serializers (0.10.10-1) unstable; urgency=medium * Team upload diff -Nru ruby-active-model-serializers-0.10.10/debian/clean ruby-active-model-serializers-0.10.12/debian/clean --- ruby-active-model-serializers-0.10.10/debian/clean 1970-01-01 00:00:00.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/debian/clean 2021-12-01 02:09:24.000000000 +0000 @@ -0,0 +1 @@ +test/tmp/ diff -Nru ruby-active-model-serializers-0.10.10/debian/control ruby-active-model-serializers-0.10.12/debian/control --- ruby-active-model-serializers-0.10.10/debian/control 2020-02-28 21:50:06.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/debian/control 2021-12-01 02:09:24.000000000 +0000 @@ -1,9 +1,9 @@ Source: ruby-active-model-serializers Section: ruby Priority: optional -Maintainer: Debian Ruby Extras Maintainers -Uploaders: Balasankar C -Build-Depends: debhelper-compat (= 12), +Maintainer: Debian Ruby Team +Uploaders: Daniel Leidert +Build-Depends: debhelper-compat (= 13), gem2deb, pry, rake, @@ -20,23 +20,19 @@ ruby-sqlite3, ruby-timecop, ruby-will-paginate -Standards-Version: 4.5.0 +Standards-Version: 4.6.0 Vcs-Git: https://salsa.debian.org/ruby-team/ruby-active-model-serializers.git Vcs-Browser: https://salsa.debian.org/ruby-team/ruby-active-model-serializers Homepage: https://github.com/rails-api/active_model_serializers Testsuite: autopkgtest-pkg-ruby XS-Ruby-Versions: all -Rules-requires-root: no +Rules-Requires-Root: no Package: ruby-active-model-serializers Architecture: all XB-Ruby-Versions: ${ruby:Versions} -Depends: ruby-actionpack (>= 2:4.1), - ruby-activemodel (>= 2:4.1), - ruby-case-transform (>= 0.2), - ruby-jsonapi-renderer (<< 0.3), - ruby-jsonapi-renderer (>= 0.1.1.beta1), - ${misc:Depends}, +Depends: ${misc:Depends}, + ${ruby:Depends}, ${shlibs:Depends} Description: Making it easy to serialize models for client-side use Bringing consistency and object orientation to model serialization. Works diff -Nru ruby-active-model-serializers-0.10.10/debian/copyright ruby-active-model-serializers-0.10.12/debian/copyright --- ruby-active-model-serializers-0.10.10/debian/copyright 2020-02-28 21:50:06.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/debian/copyright 2021-12-01 02:09:24.000000000 +0000 @@ -1,5 +1,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: active_model_serializers +Upstream-Contact: https://github.com/rails-api/active_model_serializers/issues Source: https://github.com/rails-api/active_model_serializers Files: * @@ -8,6 +9,7 @@ Files: debian/* Copyright: 2015 Balasankar C + 2021 Debian Ruby Extras Maintainers License: Expat Comment: The Debian packaging is licensed under the same terms as the source. diff -Nru ruby-active-model-serializers-0.10.10/debian/patches/relax-rails-61-tests.patch ruby-active-model-serializers-0.10.12/debian/patches/relax-rails-61-tests.patch --- ruby-active-model-serializers-0.10.10/debian/patches/relax-rails-61-tests.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/debian/patches/relax-rails-61-tests.patch 2021-12-01 02:09:24.000000000 +0000 @@ -0,0 +1,188 @@ +From: Benjamin Fleischer +Date: Fri, 11 Dec 2020 00:19:18 -0500 +Subject: Rails 6.1 content type changed to application/json; charset=utf-8 + +Relax tests to deal with that situation. + +Origin: https://github.com/rails-api/active_model_serializers/commit/fc71a327145065146f593f06bbf3e5b4aa086fc1.patch +Forwarded: https://github.com/rails-api/active_model_serializers/pull/2403 +--- + test/action_controller/explicit_serializer_test.rb | 6 ++-- + test/action_controller/serialization_test.rb | 32 +++++++++++----------- + 2 files changed, 19 insertions(+), 19 deletions(-) + +diff --git a/test/action_controller/explicit_serializer_test.rb b/test/action_controller/explicit_serializer_test.rb +index 71df54b..2d39e7b 100644 +--- a/test/action_controller/explicit_serializer_test.rb ++++ b/test/action_controller/explicit_serializer_test.rb +@@ -71,13 +71,13 @@ module ActionController + def test_render_using_explicit_serializer + get :render_using_explicit_serializer + +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + assert_equal '{"name":"Name 1"}', @response.body + end + + def test_render_array_using_explicit_serializer + get :render_array_using_explicit_serializer +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + + expected = [ + { 'name' => 'Name 1' }, +@@ -89,7 +89,7 @@ module ActionController + + def test_render_array_using_implicit_serializer + get :render_array_using_implicit_serializer +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + + expected = [ + { 'name' => 'Name 1' }, +diff --git a/test/action_controller/serialization_test.rb b/test/action_controller/serialization_test.rb +index 6e9bb45..8d360b6 100644 +--- a/test/action_controller/serialization_test.rb ++++ b/test/action_controller/serialization_test.rb +@@ -155,7 +155,7 @@ module ActionController + description: 'Description 1' + } + +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + assert_equal expected.to_json, @response.body + end + +@@ -174,7 +174,7 @@ module ActionController + } + } + +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + assert_equal expected.to_json, @response.body + end + +@@ -183,7 +183,7 @@ module ActionController + get :render_array_using_custom_root + end + expected = { custom_root: [{ name: 'Name 1', description: 'Description 1' }] } +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + assert_equal expected.to_json, @response.body + end + +@@ -193,7 +193,7 @@ module ActionController + end + + expected = { custom_root: [] } +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + assert_equal expected.to_json, @response.body + end + +@@ -203,14 +203,14 @@ module ActionController + end + + expected = { custom_root: { name: 'Name 1', description: 'Description 1' } } +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + assert_equal expected.to_json, @response.body + end + + def test_render_json_object_without_serializer + get :render_json_object_without_serializer + +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + expected_body = { error: 'Result is Invalid' } + assert_equal expected_body.to_json, @response.body + end +@@ -218,14 +218,14 @@ module ActionController + def test_render_json_array_object_without_serializer + get :render_json_array_object_without_serializer + +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + expected_body = [{ error: 'Result is Invalid' }] + assert_equal expected_body.to_json, @response.body + end + + def test_render_array_using_implicit_serializer + get :render_array_using_implicit_serializer +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + + expected = [ + { +@@ -261,7 +261,7 @@ module ActionController + } + } + +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + assert_equal expected.to_json, @response.body + end + +@@ -284,7 +284,7 @@ module ActionController + } + } + +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + assert_equal expected.to_json, @response.body + end + +@@ -313,7 +313,7 @@ module ActionController + Timecop.freeze(Time.zone.now) do + get :render_object_with_cache_enabled + +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + assert_equal expected.to_json, @response.body + + get :render_changed_object_with_cache_enabled +@@ -349,7 +349,7 @@ module ActionController + } + } + +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + actual = @response.body + expected = expected.to_json + if ENV['APPVEYOR'] && actual != expected +@@ -364,7 +364,7 @@ module ActionController + get :render_fragment_changed_object_with_only_cache_enabled + response = JSON.parse(@response.body) + +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + assert_equal 'ZOMG A ROLE', response['name'] + assert_equal 'HUEHUEBRBR', response['description'] + end +@@ -374,7 +374,7 @@ module ActionController + get :render_fragment_changed_object_with_except_cache_enabled + response = JSON.parse(@response.body) + +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + assert_equal 5, response['rating'] + assert_equal 'lol', response['content'] + end +@@ -395,7 +395,7 @@ module ActionController + } + } + +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + assert_equal expected_return, response + end + end +@@ -426,7 +426,7 @@ module ActionController + + get :update_and_render_object_with_cache_enabled + +- assert_equal 'application/json', @response.content_type ++ assert_match(%r{\Aapplication/json}, @response.content_type) + actual = @response.body + expected = expected.to_json + if ENV['APPVEYOR'] && actual != expected diff -Nru ruby-active-model-serializers-0.10.10/debian/patches/series ruby-active-model-serializers-0.10.12/debian/patches/series --- ruby-active-model-serializers-0.10.10/debian/patches/series 2020-02-28 21:50:06.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/debian/patches/series 2021-12-01 02:09:24.000000000 +0000 @@ -1,2 +1,3 @@ bundler fix-tests +relax-rails-61-tests.patch diff -Nru ruby-active-model-serializers-0.10.10/debian/rules ruby-active-model-serializers-0.10.12/debian/rules --- ruby-active-model-serializers-0.10.10/debian/rules 2020-02-28 21:50:06.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/debian/rules 2021-12-01 02:09:24.000000000 +0000 @@ -1,26 +1,11 @@ #!/usr/bin/make -f #export DH_VERBOSE=1 -# -# Uncomment to ignore all test failures (but the tests will run anyway) -#export DH_RUBY_IGNORE_TESTS=all -# -# Uncomment to ignore some test failures (but the tests will run anyway). -# Valid values: -#export DH_RUBY_IGNORE_TESTS=ruby2.1 require-rubygems -# -# If you need to specify the .gemspec (eg there is more than one) -#export DH_RUBY_GEMSPEC=gem.gemspec + +export GEM2DEB_TEST_RUNNER = --check-dependencies +export DH_RUBY = --gem-install %: dh $@ --buildsystem=ruby --with ruby -override_dh_auto_install: - dh_auto_install - rm -rf debian/ruby-active-model-serializers/usr/bin - override_dh_installchangelogs: dh_installchangelogs CHANGELOG.md - -override_dh_auto_clean: - rm -rf test/tmp - dh_auto_clean diff -Nru ruby-active-model-serializers-0.10.10/debian/upstream/metadata ruby-active-model-serializers-0.10.12/debian/upstream/metadata --- ruby-active-model-serializers-0.10.10/debian/upstream/metadata 2020-02-28 21:50:06.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/debian/upstream/metadata 2021-12-01 02:09:24.000000000 +0000 @@ -1,9 +1,7 @@ --- Archive: GitHub Bug-Database: https://github.com/rails-api/active_model_serializers/issues -Bug-Submit: https://github.com/rails-api/active_model_serializers/issues -Changelog: https://github.com/rails-api/active_model_serializers/tags -Contact: https://github.com/rails-api/active_model_serializers/issues -Name: active_model_serializers +Bug-Submit: https://github.com/rails-api/active_model_serializers/issues/new +Changelog: https://github.com/rails-api/active_model_serializers/blob/0-10-stable/CHANGELOG.md Repository: https://github.com/rails-api/active_model_serializers.git Repository-Browse: https://github.com/rails-api/active_model_serializers diff -Nru ruby-active-model-serializers-0.10.10/debian/watch ruby-active-model-serializers-0.10.12/debian/watch --- ruby-active-model-serializers-0.10.10/debian/watch 2020-02-28 21:50:06.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/debian/watch 2021-12-01 02:09:24.000000000 +0000 @@ -1,3 +1,4 @@ -version=3 -opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|b|a)\d*)$/$1~$2/,dversionmangle=s/\+(debian|dfsg|ds|deb|gh)\d*$// \ -https://github.com/rails-api/active_model_serializers/tags .*/v?(\d[\d\.]+)\.tar\.gz +version=4 +opts=uversionmangle=s/[_.+-]?(rc|pre|dev|beta|alpha|b|a)/~$1/i,\ +filenamemangle=s%v?@ANY_VERSION@(@ARCHIVE_EXT@)%@PACKAGE@-$1$2% \ + https://github.com/rails-api/active_model_serializers/tags .*/v?@ANY_VERSION@@ARCHIVE_EXT@ diff -Nru ruby-active-model-serializers-0.10.10/docs/general/configuration_options.md ruby-active-model-serializers-0.10.12/docs/general/configuration_options.md --- ruby-active-model-serializers-0.10.10/docs/general/configuration_options.md 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/docs/general/configuration_options.md 2020-12-10 17:42:12.000000000 +0000 @@ -111,6 +111,18 @@ See [lookup_chain.rb](https://github.com/rails-api/active_model_serializers/blob/master/lib/active_model_serializers/lookup_chain.rb) for further explanations and examples. +#### use_sha1_digests + +Determines which hashing algorithm to use internally when caching serializers. + +Possible values: + +- `true` +- `false` (default) + +When `true`, ActiveModelSerializers will use SHA1. Otherwise, it will default to using MD5. +Be warned that changing this value may result in serializer caches being invalidated. + ## JSON API ##### jsonapi_resource_type diff -Nru ruby-active-model-serializers-0.10.10/Gemfile ruby-active-model-serializers-0.10.12/Gemfile --- ruby-active-model-serializers-0.10.10/Gemfile 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/Gemfile 2020-12-10 17:42:12.000000000 +0000 @@ -1,6 +1,12 @@ # frozen_string_literal: true source 'https://rubygems.org' + +git_source(:github) do |repo_name| + repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/') + "https://github.com/#{repo_name}.git" +end + # # Add a Gemfile.local to locally bundle gems outside of version control local_gemfile = File.join(File.expand_path('..', __FILE__), 'Gemfile.local') @@ -61,8 +67,14 @@ end end platforms :jruby do - if version == 'master' || version >= '5' - gem 'activerecord-jdbcsqlite3-adapter', '~> 50' + if version == 'master' || version >= '6.0' + gem 'activerecord-jdbcsqlite3-adapter', github: 'jruby/activerecord-jdbc-adapter' + elsif version == '5.2' + gem 'activerecord-jdbcsqlite3-adapter', '~> 52.0' + elsif version == '5.1' + gem 'activerecord-jdbcsqlite3-adapter', '~> 51.0' + elsif version == '5.0' + gem 'activerecord-jdbcsqlite3-adapter', '~> 50.0' else gem 'activerecord-jdbcsqlite3-adapter', '~> 1.3.0' end @@ -71,7 +83,6 @@ gem 'm', '~> 1.5' gem 'pry', '>= 0.10' gem 'byebug', '~> 8.2' if RUBY_VERSION < '2.2' - gem 'pry-byebug', platforms: :ruby end group :development, :test do diff -Nru ruby-active-model-serializers-0.10.10/lib/active_model/serializer/concerns/caching.rb ruby-active-model-serializers-0.10.12/lib/active_model/serializer/concerns/caching.rb --- ruby-active-model-serializers-0.10.10/lib/active_model/serializer/concerns/caching.rb 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/lib/active_model/serializer/concerns/caching.rb 2020-12-10 17:42:12.000000000 +0000 @@ -56,7 +56,8 @@ def digest_caller_file(caller_line) serializer_file_path = caller_line[CALLER_FILE] serializer_file_contents = IO.read(serializer_file_path) - Digest::MD5.hexdigest(serializer_file_contents) + algorithm = ActiveModelSerializers.config.use_sha1_digests ? Digest::SHA1 : Digest::MD5 + algorithm.hexdigest(serializer_file_contents) rescue TypeError, Errno::ENOENT warn <<-EOF.strip_heredoc Cannot digest non-existent file: '#{caller_line}'. diff -Nru ruby-active-model-serializers-0.10.10/lib/active_model/serializer/fieldset.rb ruby-active-model-serializers-0.10.12/lib/active_model/serializer/fieldset.rb --- ruby-active-model-serializers-0.10.10/lib/active_model/serializer/fieldset.rb 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/lib/active_model/serializer/fieldset.rb 2020-12-10 17:42:12.000000000 +0000 @@ -12,7 +12,7 @@ end def fields_for(type) - fields[type.singularize.to_sym] || fields[type.pluralize.to_sym] + fields[type.to_s.singularize.to_sym] || fields[type.to_s.pluralize.to_sym] end protected diff -Nru ruby-active-model-serializers-0.10.10/lib/active_model/serializer/reflection.rb ruby-active-model-serializers-0.10.12/lib/active_model/serializer/reflection.rb --- ruby-active-model-serializers-0.10.10/lib/active_model/serializer/reflection.rb 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/lib/active_model/serializer/reflection.rb 2020-12-10 17:42:12.000000000 +0000 @@ -87,8 +87,8 @@ # meta ids: ids # end # end - def link(name, value = nil) - options[:links][name] = block_given? ? Proc.new : value + def link(name, value = nil, &block) + options[:links][name] = block_given? ? block : value :nil end @@ -102,8 +102,8 @@ # href object.blog.id.to_s # meta(id: object.blog.id) # end - def meta(value = nil) - options[:meta] = block_given? ? Proc.new : value + def meta(value = nil, &block) + options[:meta] = block_given? ? block : value :nil end diff -Nru ruby-active-model-serializers-0.10.10/lib/active_model/serializer/version.rb ruby-active-model-serializers-0.10.12/lib/active_model/serializer/version.rb --- ruby-active-model-serializers-0.10.10/lib/active_model/serializer/version.rb 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/lib/active_model/serializer/version.rb 2020-12-10 17:42:12.000000000 +0000 @@ -2,6 +2,6 @@ module ActiveModel class Serializer - VERSION = '0.10.10'.freeze + VERSION = '0.10.12'.freeze end end diff -Nru ruby-active-model-serializers-0.10.10/lib/active_model/serializer.rb ruby-active-model-serializers-0.10.12/lib/active_model/serializer.rb --- ruby-active-model-serializers-0.10.10/lib/active_model/serializer.rb 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/lib/active_model/serializer.rb 2020-12-10 17:42:12.000000000 +0000 @@ -1,6 +1,5 @@ # frozen_string_literal: true -require 'thread_safe' require 'jsonapi/include_directive' require 'active_model/serializer/collection_serializer' require 'active_model/serializer/array_serializer' @@ -73,7 +72,7 @@ # Used to cache serializer name => serializer class # when looked up by Serializer.get_serializer_for. def self.serializers_cache - @serializers_cache ||= ThreadSafe::Cache.new + @serializers_cache ||= Concurrent::Map.new end # @api private diff -Nru ruby-active-model-serializers-0.10.10/README.md ruby-active-model-serializers-0.10.12/README.md --- ruby-active-model-serializers-0.10.10/README.md 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/README.md 2020-12-10 17:42:12.000000000 +0000 @@ -4,8 +4,8 @@ Build Status - Build Status - Build status + Build Status + Build status @@ -41,7 +41,7 @@ By default ActiveModelSerializers will use the **Attributes Adapter** (no JSON root). But we strongly advise you to use **JsonApi Adapter**, which -follows 1.0 of the format specified in [jsonapi.org/format](http://jsonapi.org/format). +follows 1.0 of the format specified in [jsonapi.org/format](https://jsonapi.org/format). Check how to change the adapter in the sections below. `0.10.x` is **not** backward compatible with `0.9.x` nor `0.8.x`. @@ -75,9 +75,9 @@ If you find a bug, please report an [Issue](https://github.com/rails-api/active_model_serializers/issues/new) and see our [contributing guide](CONTRIBUTING.md). -If you have a question, please [post to Stack Overflow](http://stackoverflow.com/questions/tagged/active-model-serializers). +If you have a question, please [post to Stack Overflow](https://stackoverflow.com/questions/tagged/active-model-serializers). -If you'd like to chat, we have a [community slack](http://amserializers.herokuapp.com). +If you'd like to chat, we have a [community slack](https://amserializers.herokuapp.com). Thanks! @@ -87,14 +87,14 @@ reading documentation for our `master`, which may include features that have not been released yet. Please see below for the documentation relevant to you. -- [0.10 (master) Documentation](https://github.com/rails-api/active_model_serializers/tree/master) -- [0.10.6 (latest release) Documentation](https://github.com/rails-api/active_model_serializers/tree/v0.10.6) - - [![API Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/gems/active_model_serializers/0.10.6) - - [Guides](docs) +- [0.10 (0-10-stable) Documentation](https://github.com/rails-api/active_model_serializers/tree/0-10-stable) +- [0.10.10 (latest release) Documentation](https://github.com/rails-api/active_model_serializers/tree/v0.10.10) + - [![API Docs](https://img.shields.io/badge/yard-docs-blue.svg)](https://www.rubydoc.info/gems/active_model_serializers/0.10.10) + - [Guides](docs) - [0.9 (0-9-stable) Documentation](https://github.com/rails-api/active_model_serializers/tree/0-9-stable) - - [![API Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/github/rails-api/active_model_serializers/0-9-stable) + - [![API Docs](https://img.shields.io/badge/yard-docs-blue.svg)](https://www.rubydoc.info/gems/active_model_serializers/0.9.7) - [0.8 (0-8-stable) Documentation](https://github.com/rails-api/active_model_serializers/tree/0-8-stable) - - [![API Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/github/rails-api/active_model_serializers/0-8-stable) + - [![API Docs](https://img.shields.io/badge/yard-docs-blue.svg)](https://www.rubydoc.info/gems/active_model_serializers/0.8.4) ## High-level behavior @@ -171,12 +171,12 @@ ### ActiveModel::Serializer -An **`ActiveModel::Serializer`** wraps a [serializable resource](https://github.com/rails/rails/blob/4-2-stable/activemodel/lib/active_model/serialization.rb) +An **`ActiveModel::Serializer`** wraps a [serializable resource](https://github.com/rails/rails/blob/master/activemodel/lib/active_model/serialization.rb) and exposes an `attributes` method, among a few others. It allows you to specify which attributes and associations should be represented in the serializatation of the resource. It requires an adapter to transform its attributes into a JSON document; it cannot be serialized itself. It may be useful to think of it as a -[presenter](http://blog.steveklabnik.com/posts/2011-09-09-better-ruby-presenters). +[presenter](https://blog.steveklabnik.com/posts/2011-09-09-better-ruby-presenters). #### ActiveModel::CollectionSerializer @@ -188,7 +188,7 @@ The **`ActiveModelSerializers::Adapter::Base`** describes the structure of the JSON document generated from a serializer. For example, the `Attributes` example represents each serializer as its unmodified attributes. The `JsonApi` adapter represents the serializer as a [JSON -API](http://jsonapi.org/) document. +API](https://jsonapi.org/) document. ### ActiveModelSerializers::SerializableResource @@ -229,7 +229,7 @@ - `:each_serializer` specifies the serializer for each resource in the collection. - For a **single resource**, the `:serializer` option is the resource serializer. - Options are partitioned in serializer options and adapter options. Keys for adapter options are specified by - [`ADAPTER_OPTION_KEYS`](https://github.com/rails-api/active_model_serializers/blob/master/lib/active_model_serializers/serializable_resource.rb#L5). + [`ADAPTER_OPTION_KEYS`](lib/active_model_serializers/serializable_resource.rb#L5). The remaining options are serializer options. Details: @@ -254,7 +254,7 @@ 2. `adapter_instance = ActiveModel::Serializer::Adapter.create(serializer_instance, adapter_opts)` 1. **ActiveModel::Serializer::CollectionSerializer#new** 1. If the `serializer_instance` was a `CollectionSerializer` and the `:serializer` serializer_opts - is present, then [that serializer is passed into each resource](https://github.com/rails-api/active_model_serializers/blob/a54d237e2828fe6bab1ea5dfe6360d4ecc8214cd/lib/active_model/serializer/array_serializer.rb#L14-L16). + is present, then [that serializer is passed into each resource](https://github.com/rails-api/active_model_serializers/blob/0-10-stable/lib/active_model/serializer/collection_serializer.rb#L77-L79). 1. **ActiveModel::Serializer#attributes** is used by the adapter to get the attributes for resource as defined by the serializer. @@ -270,7 +270,7 @@ [(code)](lib/active_model/serializer/lint.rb). ActiveModelSerializers provides a -[`ActiveModelSerializers::Model`](https://github.com/rails-api/active_model_serializers/blob/master/lib/active_model_serializers/model.rb), +[`ActiveModelSerializers::Model`](lib/active_model_serializers/model.rb), which is a simple serializable PORO (Plain-Old Ruby Object). `ActiveModelSerializers::Model` may be used either as a reference implementation, or in production code. @@ -298,7 +298,7 @@ ## Semantic Versioning -This project adheres to [semver](http://semver.org/) +This project adheres to [semver](https://semver.org/) ## Contributing diff -Nru ruby-active-model-serializers-0.10.10/test/adapter/json/transform_test.rb ruby-active-model-serializers-0.10.12/test/adapter/json/transform_test.rb --- ruby-active-model-serializers-0.10.10/test/adapter/json/transform_test.rb 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/test/adapter/json/transform_test.rb 2020-12-10 17:42:12.000000000 +0000 @@ -56,9 +56,8 @@ def test_transform_undefined mock_request(:blam) - result = nil assert_raises NoMethodError do - result = @adapter.serializable_hash + @adapter.serializable_hash end end diff -Nru ruby-active-model-serializers-0.10.10/test/cache_test.rb ruby-active-model-serializers-0.10.12/test/cache_test.rb --- ruby-active-model-serializers-0.10.10/test/cache_test.rb 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/test/cache_test.rb 2020-12-10 17:42:12.000000000 +0000 @@ -446,17 +446,41 @@ # rubocop:enable Metrics/AbcSize def test_uses_file_digest_in_cache_key + reset_cache_digest(@blog_serializer) render_object_with_cache(@blog) file_digest = Digest::MD5.hexdigest(File.open(__FILE__).read) key = "#{@blog.cache_key}/#{adapter.cache_key}/#{file_digest}" assert_equal(@blog_serializer.attributes, cache_store.fetch(key)) end + def test_uses_sha1_digest_in_cache_key_when_configured + reset_cache_digest(@blog_serializer) + previous_use_sha1_digests = ActiveModelSerializers.config.use_sha1_digests + ActiveModelSerializers.config.use_sha1_digests = true + render_object_with_cache(@blog) + file_digest = Digest::SHA1.hexdigest(File.open(__FILE__).read) + key = "#{@blog.cache_key}/#{adapter.cache_key}/#{file_digest}" + assert_equal(@blog_serializer.attributes, cache_store.fetch(key)) + ensure + ActiveModelSerializers.config.use_sha1_digests = previous_use_sha1_digests + end + def test_cache_digest_definition + reset_cache_digest(@post_serializer) file_digest = Digest::MD5.hexdigest(File.open(__FILE__).read) assert_equal(file_digest, @post_serializer.class._cache_digest) end + def test_cache_sha1_digest_definition + reset_cache_digest(@post_serializer) + previous_use_sha1_digests = ActiveModelSerializers.config.use_sha1_digests + ActiveModelSerializers.config.use_sha1_digests = true + file_digest = Digest::SHA1.hexdigest(File.open(__FILE__).read) + assert_equal(file_digest, @post_serializer.class._cache_digest) + ensure + ActiveModelSerializers.config.use_sha1_digests = previous_use_sha1_digests + end + def test_object_cache_keys serializable = ActiveModelSerializers::SerializableResource.new([@comment, @comment]) include_directive = JSONAPI::IncludeDirective.new('*', allow_wildcard: true) @@ -715,5 +739,10 @@ def adapter @serializable_resource.adapter end + + def reset_cache_digest(serializer) + return unless serializer.class.instance_variable_defined?(:@_cache_digest) + serializer.class.remove_instance_variable(:@_cache_digest) + end end end diff -Nru ruby-active-model-serializers-0.10.10/test/serializers/fieldset_test.rb ruby-active-model-serializers-0.10.12/test/serializers/fieldset_test.rb --- ruby-active-model-serializers-0.10.10/test/serializers/fieldset_test.rb 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/test/serializers/fieldset_test.rb 2020-12-10 17:42:12.000000000 +0000 @@ -5,11 +5,21 @@ module ActiveModel class Serializer class FieldsetTest < ActiveSupport::TestCase + def setup + @fieldset = ActiveModel::Serializer::Fieldset.new('post' => %w(id title), 'comment' => ['body']) + end + def test_fieldset_with_hash - fieldset = ActiveModel::Serializer::Fieldset.new('post' => %w(id title), 'comment' => ['body']) expected = { post: [:id, :title], comment: [:body] } - assert_equal(expected, fieldset.fields) + assert_equal(expected, @fieldset.fields) + end + + def test_fields_for_accepts_string_or_symbol + expected = [:id, :title] + + assert_equal(expected, @fieldset.fields_for(:post)) + assert_equal(expected, @fieldset.fields_for('post')) end end end diff -Nru ruby-active-model-serializers-0.10.10/test/serializers/serializer_for_with_namespace_test.rb ruby-active-model-serializers-0.10.12/test/serializers/serializer_for_with_namespace_test.rb --- ruby-active-model-serializers-0.10.10/test/serializers/serializer_for_with_namespace_test.rb 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/test/serializers/serializer_for_with_namespace_test.rb 2020-12-10 17:42:12.000000000 +0000 @@ -35,12 +35,11 @@ class BookSerializer < ActiveModel::Serializer attributes :title, :author_name end + test 'resource without a namespace' do book = Book.new(title: 'A Post', author_name: 'hello') - # TODO: this should be able to pull up this serializer without explicitly specifying the serializer - # currently, with no options, it still uses the Api::V3 serializer - result = ActiveModelSerializers::SerializableResource.new(book, serializer: BookSerializer).serializable_hash + result = ActiveModelSerializers::SerializableResource.new(book).serializable_hash expected = { title: 'A Post', author_name: 'hello' } assert_equal expected, result diff -Nru ruby-active-model-serializers-0.10.10/test/support/rails_app.rb ruby-active-model-serializers-0.10.12/test/support/rails_app.rb --- ruby-active-model-serializers-0.10.10/test/support/rails_app.rb 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/test/support/rails_app.rb 2020-12-10 17:42:12.000000000 +0000 @@ -9,6 +9,10 @@ config.action_controller.perform_caching = true config.action_controller.cache_store = :memory_store + if Rails::VERSION::MAJOR >= 6 + config.action_dispatch.return_only_media_type_on_content_type = true + end + config.filter_parameters += [:password] end diff -Nru ruby-active-model-serializers-0.10.10/test/support/serialization_testing.rb ruby-active-model-serializers-0.10.12/test/support/serialization_testing.rb --- ruby-active-model-serializers-0.10.10/test/support/serialization_testing.rb 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/test/support/serialization_testing.rb 2020-12-10 17:42:12.000000000 +0000 @@ -20,11 +20,11 @@ end def with_prepended_lookup(lookup_proc) - original_lookup = ActiveModelSerializers.config.serializer_lookup_cahin + original_lookup = ActiveModelSerializers.config.serializer_lookup_chain ActiveModelSerializers.config.serializer_lookup_chain.unshift lookup_proc yield ensure - ActiveModelSerializers.config.serializer_lookup_cahin = original_lookup + ActiveModelSerializers.config.serializer_lookup_chain = original_lookup end # Aliased as :with_configured_adapter to clarify that diff -Nru ruby-active-model-serializers-0.10.10/.travis.yml ruby-active-model-serializers-0.10.12/.travis.yml --- ruby-active-model-serializers-0.10.10/.travis.yml 2019-07-13 09:30:49.000000000 +0000 +++ ruby-active-model-serializers-0.10.12/.travis.yml 2020-12-10 17:42:12.000000000 +0000 @@ -1,23 +1,39 @@ language: ruby -sudo: false +os: linux -ruby_supported_versions: +_ruby_supported_versions: - &ruby_2_1 2.1.10 - &ruby_2_2 2.2.10 - &ruby_2_3 2.3.8 - - &ruby_2_4 2.4.6 - - &ruby_2_5 2.5.5 - - &ruby_2_6 2.6.3 + - &ruby_2_4 2.4.9 + - &ruby_2_5 2.5.7 + - &ruby_2_6 2.6.5 + - &ruby_2_7 2.7.0 - &ruby_head ruby-head -rails_supported_versions: +_jruby_supported_versions: + - &jruby_9_1 jruby-9.1.17.0 + - &jruby_9_2 jruby-9.2.8.0 + - &jruby_head jruby-head + +_jdk_supported_versions: + - &jdk_8 openjdk8 + +_rails_supported_versions: - &rails_4_1 RAILS_VERSION=4.1 + - &rails_4_1_jruby RAILS_VERSION=4.1 JRUBY_OPTS='--dev -J-Xmx1024M --debug' - &rails_4_2 RAILS_VERSION=4.2 + - &rails_4_2_jruby RAILS_VERSION=4.2 JRUBY_OPTS='--dev -J-Xmx1024M --debug' - &rails_5_0 RAILS_VERSION=5.0 + - &rails_5_0_jruby RAILS_VERSION=5.0 JRUBY_OPTS='--dev -J-Xmx1024M --debug' - &rails_5_1 RAILS_VERSION=5.1 + - &rails_5_1_jruby RAILS_VERSION=5.1 JRUBY_OPTS='--dev -J-Xmx1024M --debug' - &rails_5_2 RAILS_VERSION=5.2 - - &rails_6_0_0_rc1 RAILS_VERSION=6.0.0.rc1 + - &rails_5_2_jruby RAILS_VERSION=5.2 JRUBY_OPTS='--dev -J-Xmx1024M --debug' + - &rails_6_0 RAILS_VERSION=6.0 + - &rails_6_0_jruby RAILS_VERSION=6.0 JRUBY_OPTS='--dev -J-Xmx1024M --debug' - &rails_master RAILS_VERSION=master + - &rails_master_jruby RAILS_VERSION=master JRUBY_OPTS='--dev -J-Xmx1024M --debug' cache: directories: @@ -26,7 +42,7 @@ before_install: - "travis_retry gem update --system 2.7.9" - "travis_retry gem install bundler -v '1.17.3'" -install: BUNDLER_VERSION=1.17.3 bundle install --path=vendor/bundle --retry=3 --jobs=3 +install: bundle install --path=vendor/bundle --retry=3 --jobs=3 script: - bundle exec rake ci @@ -34,71 +50,73 @@ - codeclimate-test-reporter env: - matrix: + global: + - BUNDLER_VERSION=1.17.3 + jobs: - *rails_4_1 - *rails_4_2 - *rails_5_0 - *rails_5_1 - *rails_5_2 - - *rails_6_0_0_rc1 + - *rails_6_0 - *rails_master rvm: - *ruby_2_1 - *ruby_2_2 - *ruby_2_3 - - *ruby_2_4 - - *ruby_2_5 - - *ruby_2_6 + - *ruby_2_7 - *ruby_head branches: only: 0-10-stable -matrix: +jobs: include: - - { rvm: jruby-9.1.13.0, jdk: oraclejdk8, env: "RAILS_VERSION=4.1 JRUBY_OPTS='--dev -J-Xmx1024M --debug'" } - - { rvm: jruby-9.1.13.0, jdk: oraclejdk8, env: "RAILS_VERSION=4.2 JRUBY_OPTS='--dev -J-Xmx1024M --debug'" } - - { rvm: jruby-9.1.13.0, jdk: oraclejdk8, env: "RAILS_VERSION=5.1 JRUBY_OPTS='--dev -J-Xmx1024M --debug'" } - # See JRuby currently failing on Rails 5+ https://github.com/jruby/activerecord-jdbc-adapter/issues/708 - # - { rvm: jruby-9.1.13.0, jdk: oraclejdk8, env: "RAILS_VERSION=5.0 JRUBY_OPTS='--dev -J-Xmx1024M --debug'" } - # - { rvm: jruby-head, jdk: oraclejdk8, env: "RAILS_VERSION=5.1 JRUBY_OPTS='--dev -J-Xmx1024M --debug'" } + - { rvm: *ruby_2_4, env: *rails_4_2 } + - { rvm: *ruby_2_5, env: *rails_4_2 } + - { rvm: *ruby_2_6, env: *rails_4_2 } + - { rvm: *jruby_9_1, jdk: *jdk_8, env: *rails_4_1_jruby } + - { rvm: *jruby_9_1, jdk: *jdk_8, env: *rails_4_2_jruby } + - { rvm: *jruby_9_1, jdk: *jdk_8, env: *rails_5_0_jruby } + - { rvm: *jruby_9_1, jdk: *jdk_8, env: *rails_5_1_jruby } + - { rvm: *jruby_9_1, jdk: *jdk_8, env: *rails_5_2_jruby } + + - { rvm: *jruby_9_2, jdk: *jdk_8, env: *rails_4_2_jruby } + - { rvm: *jruby_9_2, jdk: *jdk_8, env: *rails_5_0_jruby } + - { rvm: *jruby_9_2, jdk: *jdk_8, env: *rails_5_1_jruby } + - { rvm: *jruby_9_2, jdk: *jdk_8, env: *rails_5_2_jruby } + - { rvm: *jruby_9_2, jdk: *jdk_8, env: *rails_6_0_jruby } + - { rvm: *jruby_9_2, jdk: *jdk_8, env: *rails_master_jruby } + + - { rvm: *jruby_head, jdk: *jdk_8, env: *rails_4_2_jruby } + - { rvm: *jruby_head, jdk: *jdk_8, env: *rails_5_0_jruby } + - { rvm: *jruby_head, jdk: *jdk_8, env: *rails_5_1_jruby } + - { rvm: *jruby_head, jdk: *jdk_8, env: *rails_5_2_jruby } + - { rvm: *jruby_head, jdk: *jdk_8, env: *rails_6_0_jruby } + - { rvm: *jruby_head, jdk: *jdk_8, env: *rails_master_jruby } + exclude: + - { rvm: *ruby_head, env: *rails_4_1 } + - { rvm: *ruby_2_1, env: *rails_5_0 } - { rvm: *ruby_2_1, env: *rails_5_1 } - { rvm: *ruby_2_1, env: *rails_5_2 } - - { rvm: *ruby_2_1, env: *rails_6_0_0_rc1 } - - { rvm: *ruby_2_2, env: *rails_6_0_0_rc1 } - - { rvm: *ruby_2_3, env: *rails_6_0_0_rc1 } - - { rvm: *ruby_2_4, env: *rails_6_0_0_rc1 } + - { rvm: *ruby_2_1, env: *rails_6_0 } + - { rvm: *ruby_2_2, env: *rails_6_0 } + - { rvm: *ruby_2_3, env: *rails_6_0 } - { rvm: *ruby_2_1, env: *rails_master } - { rvm: *ruby_2_2, env: *rails_master } - { rvm: *ruby_2_3, env: *rails_master } - - { rvm: *ruby_2_4, env: *rails_master } allow_failures: - - { rvm: *ruby_2_4, env: *rails_4_1 } - - { rvm: *ruby_2_5, env: *rails_4_1 } - - { rvm: *ruby_2_6, env: *rails_4_1 } - - # allow RAILS_VERSION=master to fail against ruby 2.5+ until this gem supports RAILS_VERSION - # https://github.com/rails/rails/blob/master/RAILS_VERSION - # https://github.com/rails-api/active_model_serializers/blob/0-10-stable/active_model_serializers.gemspec#L24 - - { rvm: *ruby_2_5, env: *rails_master } - - { rvm: *ruby_2_6, env: *rails_master } - rvm: *ruby_head - # - { rvm: *ruby_head, env: *rails_4_1 } - # - { rvm: *ruby_head, env: *rails_4_2 } - # - { rvm: *ruby_head, env: *rails_5_0 } - # - { rvm: *ruby_head, env: *rails_5_1 } - # - { rvm: *ruby_head, env: *rails_5_2 } - # - { rvm: *ruby_head, env: *rails_6_0_0_rc1 } - # - { rvm: *ruby_head, env: *rails_master } - - - rvm: jruby-head - # See JRuby currently failing on Rails 5+ https://github.com/jruby/activerecord-jdbc-adapter/issues/708 - - { rvm: jruby-9.1.13.0, jdk: oraclejdk8, env: "RAILS_VERSION=5.1 JRUBY_OPTS='--dev -J-Xmx1024M --debug'" } + + - { rvm: *jruby_9_2, jdk: *jdk_8, env: *rails_master_jruby } + + - rvm: *jruby_head + fast_finish: true