diff --git a/.travis.yml b/.travis.yml index 869fa95..5db5b63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ rvm: - 2.2.9 gemfile: + - gemfiles/activerecord_6.0.gemfile - gemfiles/activerecord_5.2.gemfile - gemfiles/activerecord_5.1.gemfile - gemfiles/activerecord_5.0.gemfile diff --git a/Appraisals b/Appraisals index 268aac2..534d38a 100644 --- a/Appraisals +++ b/Appraisals @@ -1,3 +1,8 @@ +appraise "activerecord-6.0" do + gem 'activerecord', '~> 6.0.0' + gem 'railties', '~> 6.0.0' +end + appraise "activerecord-5.2" do gem 'activerecord', '~> 5.2.0' gem 'railties', '~> 5.2.0' diff --git a/README.md b/README.md index e68dd30..1945ad2 100644 --- a/README.md +++ b/README.md @@ -56,14 +56,14 @@ Sinatra. ## Compatibility -Compatible with ActiveRecord 4 and 5. +Compatible with ActiveRecord 4, 5 and 6. Works well with Rails, Sinatra, or any other application that depends on ActiveRecord. ## Installation -### Rails 4 and 5 +### Rails 4, 5 and 6 Add Draftsman to your `Gemfile`. diff --git a/draftsman.gemspec b/draftsman.gemspec index 902d29f..0a592cb 100644 --- a/draftsman.gemspec +++ b/draftsman.gemspec @@ -16,11 +16,11 @@ Gem::Specification.new do |s| s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ['lib'] - s.add_dependency 'activerecord', ['>= 4.2', '< 5.3'] + s.add_dependency 'activerecord', ['>= 4.2', '<= 6.0'] s.add_development_dependency 'appraisal' s.add_development_dependency 'rake' - s.add_development_dependency 'railties', ['>= 4.2', '< 5.3'] + s.add_development_dependency 'railties', ['>= 4.2', '<= 6.0'] s.add_development_dependency 'sinatra', ['>= 1.0', '<3'] s.add_development_dependency 'rspec-rails', '~> 3.5' diff --git a/gemfiles/activerecord_6.0.gemfile b/gemfiles/activerecord_6.0.gemfile new file mode 100644 index 0000000..aa7c934 --- /dev/null +++ b/gemfiles/activerecord_6.0.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activerecord", "~> 6.0.0" +gem "railties", "~> 6.0.0" + +gemspec path: "../" diff --git a/spec/models/trashable_spec.rb b/spec/models/trashable_spec.rb index b2c7eaa..0b05ab5 100644 --- a/spec/models/trashable_spec.rb +++ b/spec/models/trashable_spec.rb @@ -140,7 +140,7 @@ context 'without draft' do before do trashable.save! - trashable.update_attributes! :published_at => Time.now + trashable.update! :published_at => Time.now end subject { trashable.draft_destruction; return trashable.reload }