Skip to content

Commit

Permalink
Merge pull request #515 from samvera/deps_reconciliation
Browse files Browse the repository at this point in the history
Make child gems match parent hydra-head rails version dependencies
  • Loading branch information
jeremyf authored Nov 18, 2020
2 parents 9693041 + 9c9fdb9 commit 0e7d086
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion hydra-access-controls/hydra-access-controls.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |gem|

gem.required_ruby_version = '>= 2.4'

gem.add_dependency 'activesupport', '>= 4', '< 7'
gem.add_dependency 'activesupport', '>= 5.2', '< 7'
gem.add_dependency 'active-fedora', '>= 10.0.0'
gem.add_dependency 'blacklight-access_controls', '~> 6.0'
gem.add_dependency 'cancancan', '>= 1.8', '< 4'
Expand Down
18 changes: 3 additions & 15 deletions hydra-access-controls/spec/unit/embargoable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,7 @@ class ModelWithPersistence < ActiveFedora::Base
context "when the same embargo is applied" do
before do
subject.apply_embargo(future_date.to_s)
if ActiveModel.version < Gem::Version.new('4.2.0')
subject.embargo.send(:reset_changes)
else
subject.embargo.send(:clear_changes_information)
end
subject.embargo.send(:clear_changes_information)
end

it "doesn't call visibility_will_change!" do
Expand Down Expand Up @@ -248,11 +244,7 @@ class ModelWithPersistence < ActiveFedora::Base
context "when the same lease is applied" do
before do
subject.apply_lease(future_date.to_s)
if ActiveModel.version < Gem::Version.new('4.2.0')
subject.lease.send(:reset_changes)
else
subject.lease.send(:clear_changes_information)
end
subject.lease.send(:clear_changes_information)
end

it "doesn't call visibility_will_change!" do
Expand All @@ -266,11 +258,7 @@ class ModelWithPersistence < ActiveFedora::Base
before do
subject.visibility = Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC
# reset the changed log
if ActiveModel.version < Gem::Version.new('4.2.0')
subject.send(:reset_changes)
else
subject.send(:clear_changes_information)
end
subject.send(:clear_changes_information)
end

it "applies appropriate embargo_visibility settings" do
Expand Down
2 changes: 1 addition & 1 deletion hydra-core/hydra-core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
gem.required_ruby_version = '>= 2.4'

gem.add_dependency 'hydra-access-controls', version
gem.add_dependency "railties", '>= 4.0.0', '< 7'
gem.add_dependency "railties", '>= 5.2', '< 7'

gem.add_development_dependency 'rails-controller-testing', '~> 1'
gem.add_development_dependency 'rspec-rails', '~> 4.0'
Expand Down

0 comments on commit 0e7d086

Please sign in to comment.