diff --git a/.travis.yml b/.travis.yml index 8828fbfa..117ce30b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ sudo: false language: ruby -before_install: gem update --system +before_install: + - gem update --system + - gem install bundler -v '< 2' cache: bundler rvm: - 2.2 diff --git a/lib/paranoia.rb b/lib/paranoia.rb index 4ba4c389..ac8b6f0f 100644 --- a/lib/paranoia.rb +++ b/lib/paranoia.rb @@ -1,8 +1,6 @@ require 'active_record' unless defined? ActiveRecord -if [ActiveRecord::VERSION::MAJOR, ActiveRecord::VERSION::MINOR] == [5, 2] - require 'paranoia/active_record_5_2' -end +require 'paranoia/active_record_5_2' module Paranoia @@default_sentinel_value = nil @@ -305,7 +303,7 @@ def build_relation(klass, *args) class UniquenessValidator < ActiveModel::EachValidator prepend UniquenessParanoiaValidator end - + class AssociationNotSoftDestroyedValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) # if association is soft destroyed, add an error diff --git a/paranoia.gemspec b/paranoia.gemspec index 18a9768f..e57d3f53 100644 --- a/paranoia.gemspec +++ b/paranoia.gemspec @@ -26,7 +26,7 @@ Gem::Specification.new do |s| s.add_dependency 'activerecord', '>= 4.0', '< 5.3' - s.add_development_dependency "bundler", ">= 1.0.0" + s.add_development_dependency "bundler", ">= 1.3.0" s.add_development_dependency "rake" s.files = `git ls-files`.split("\n")