From a6ff9f5d16f34e8c5e1340a512cbd88e502f9f5e Mon Sep 17 00:00:00 2001 From: dblock Date: Wed, 4 Jan 2017 12:59:38 -0500 Subject: [PATCH] Mongoid 6 support. --- .travis.yml | 1 + CHANGELOG.md | 1 + Gemfile | 9 ++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 59600e6c..73bba4b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ env: - MONGOID_VERSION=3 - MONGOID_VERSION=4 - MONGOID_VERSION=5 + - MONGOID_VERSION=6 - MONGOID_VERSION=HEAD rvm: diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d062017..c4a38269 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## 5.3.1 (Next) +* [#234](https://github.com/mongoid/mongoid-slug/pull/234): Compatibility with Mongoid 6 - [@moodlemags](https://github.com/moodlemags), [@dblock](https://github.com/dblock). * Your contribution here. ## 5.3.0 (2016/09/11) diff --git a/Gemfile b/Gemfile index a3e37a90..c3b8119c 100644 --- a/Gemfile +++ b/Gemfile @@ -2,20 +2,27 @@ source 'https://rubygems.org' gemspec name: 'mongoid-slug' -case version = ENV['MONGOID_VERSION'] || '5' +case version = ENV['MONGOID_VERSION'] || '6' when 'HEAD' gem 'mongoid', github: 'mongodb/mongoid' gem 'mongoid_paranoia', github: 'simi/mongoid_paranoia' gem 'mongoid-observers' gem 'rails-observers', github: 'rails/rails-observers' +when /^6/ + gem 'mongoid', '~> 6.0.0' + gem 'mongoid_paranoia', github: 'simi/mongoid_paranoia' + gem 'mongoid-observers' + gem 'rails-observers', github: 'rails/rails-observers' when /^5/ gem 'mongoid', '~> 5.0' gem 'mongoid_paranoia' gem 'mongoid-observers' + gem 'rails-observers', github: 'rails/rails-observers' when /^4/ gem 'mongoid', '~> 4.0' gem 'mongoid_paranoia' gem 'mongoid-observers' + gem 'rails-observers', github: 'rails/rails-observers' when /^3/ gem 'mongoid', '~> 3.1' else