From 82ad288fc77724be77799aee73eb61e94c8fd3a2 Mon Sep 17 00:00:00 2001 From: Wasif Hossain Date: Wed, 21 Aug 2019 22:21:31 +0600 Subject: [PATCH] Add support for Rails 6.0.0 on Travis --- .travis.yml | 4 ++-- Gemfile | 6 ++++++ test/adapter/json/transform_test.rb | 3 +-- test/support/serialization_testing.rb | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index aa057dc8..074ea456 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,8 +29,8 @@ rails_supported_versions: - &rails_5_1_jruby RAILS_VERSION=5.1 JRUBY_OPTS='--dev -J-Xmx1024M --debug' - &rails_5_2 RAILS_VERSION=5.2 - &rails_5_2_jruby RAILS_VERSION=5.2 JRUBY_OPTS='--dev -J-Xmx1024M --debug' - - &rails_6_0 RAILS_VERSION=6.0.0.rc2 - - &rails_6_0_jruby RAILS_VERSION=6.0.0.rc2 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' diff --git a/Gemfile b/Gemfile index d3ced1c6..eece3227 100644 --- a/Gemfile +++ b/Gemfile @@ -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') diff --git a/test/adapter/json/transform_test.rb b/test/adapter/json/transform_test.rb index 66b225d9..5035c2d7 100644 --- a/test/adapter/json/transform_test.rb +++ b/test/adapter/json/transform_test.rb @@ -56,9 +56,8 @@ module ActiveModelSerializers def test_transform_undefined mock_request(:blam) - result = nil assert_raises NoMethodError do - result = @adapter.serializable_hash + @adapter.serializable_hash end end diff --git a/test/support/serialization_testing.rb b/test/support/serialization_testing.rb index 65730ffc..ada7fa3b 100644 --- a/test/support/serialization_testing.rb +++ b/test/support/serialization_testing.rb @@ -20,11 +20,11 @@ module SerializationTesting 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