FEATURE: add Rails 6 support

FEATURE: add Rails 6 support

No actual code changes are required but we needed to amend some internals to keep testing Rails 6.

diff --git a/.travis.yml b/.travis.yml
index 46ed7b7..d695033 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,10 +4,12 @@ rvm:
   - 2.3
   - 2.4
   - 2.5
+  - 2.6
 
 gemfile:
   - gemfiles/rails_4.gemfile
   - gemfiles/rails_5.gemfile
+  - gemfiles/rails_master.gemfile
 
 matrix:
   fast_finish: true
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 076bcbe..2f4a61e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 2.0.7 - 04-02-2019
+
+ * Add support for Rails 6
+
 ## 2.0.6 - 23-01-2019
 
   * Fixed a bug where calling `RailsMultisite::ConnectionManagement#establish_connection`
diff --git a/Gemfile b/Gemfile
index 49b73f3..4148820 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,5 +1,14 @@
 source 'https://rubygems.org'
 
+def rails_master?
+  ENV["RAILS_MASTER"] == '1'
+end
+
+if rails_master?
+  gem 'arel', git: 'https://github.com/rails/arel.git'
+  gem 'rails', git: 'https://github.com/rails/rails.git'
+end
+
 group :development, :test do
   gem 'byebug'
   gem 'rubocop'
diff --git a/gemfiles/rails_master.gemfile b/gemfiles/rails_master.gemfile
new file mode 100644
index 0000000..6c1154c
--- /dev/null
+++ b/gemfiles/rails_master.gemfile
@@ -0,0 +1,10 @@
+source 'https://rubygems.org'
+
+group :test do
+  gem 'arel', git: 'https://github.com/rails/arel.git'
+  gem 'rails', git: 'https://github.com/rails/rails.git'
+  gem 'rspec'
+  gem 'sqlite3'
+  gem 'byebug'
+  gem 'rubocop'
+end
diff --git a/lib/rails_multisite/version.rb b/lib/rails_multisite/version.rb
index 7c03601..ea12cb9 100644
--- a/lib/rails_multisite/version.rb
+++ b/lib/rails_multisite/version.rb
@@ -1,5 +1,5 @@
 # frozen_string_literal: true
 #
 module RailsMultisite
-  VERSION = "2.0.6"
+  VERSION = "2.0.7"
 end
diff --git a/rails_multisite.gemspec b/rails_multisite.gemspec
index 9e89db9..ad05fcd 100644
--- a/rails_multisite.gemspec
+++ b/rails_multisite.gemspec
@@ -22,6 +22,6 @@ Gem::Specification.new do |gem|
   gem.required_ruby_version = ">=2.2.0"
 
   %w{activerecord railties}.each do |gem_name|
-    gem.add_dependency gem_name, "> 4.2", "< 6"
+    gem.add_dependency gem_name, "> 4.2", "< 7"
   end
 end

GitHub sha: 3f3b0a00

1 Like