diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index c192e970..ca6f1a6a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2019-03-13 09:02:40 -0400 using RuboCop version 0.65.0. +# on 2019-03-13 11:39:01 -0500 using RuboCop version 0.65.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -90,7 +90,7 @@ Metrics/MethodLength: # Offense count: 3 # Configuration parameters: CountComments. Metrics/ModuleLength: - Max: 147 + Max: 148 # Offense count: 2 # Configuration parameters: CountKeywordArgs. @@ -243,7 +243,7 @@ RSpec/DescribeClass: RSpec/ExampleLength: Enabled: false -# Offense count: 44 +# Offense count: 45 RSpec/ExpectInHook: Exclude: - 'spec/datastreams/content_metadata_ds_spec.rb' @@ -277,7 +277,7 @@ RSpec/MessageChain: Exclude: - 'spec/services/suri_service_spec.rb' -# Offense count: 275 +# Offense count: 276 # Configuration parameters: EnforcedStyle. # SupportedStyles: have_received, receive RSpec/MessageSpies: diff --git a/lib/dor/models/concerns/contentable.rb b/lib/dor/models/concerns/contentable.rb index fa97b8ea..f3a30936 100644 --- a/lib/dor/models/concerns/contentable.rb +++ b/lib/dor/models/concerns/contentable.rb @@ -185,12 +185,12 @@ def decommission(tag) TagService.add self, "Decommissioned : #{tag}" end - # TODO: Move to Dor-Utils. # Adds a RELS-EXT constituent relationship to the given druid # @param [String] druid the parent druid of the constituent relationship # e.g.: def add_constituent(druid) add_relationship :is_constituent_of, ActiveFedora::Base.find(druid) end + deprecation_deprecate add_constituent: 'Use add_relationship :is_constituent_of instead' end end diff --git a/spec/models/concerns/contentable_spec.rb b/spec/models/concerns/contentable_spec.rb index d064d6ee..a68a0b76 100644 --- a/spec/models/concerns/contentable_spec.rb +++ b/spec/models/concerns/contentable_spec.rb @@ -262,6 +262,7 @@ def internal_uri end before do + expect(Deprecation).to receive(:warn) allow(ActiveFedora::Base).to receive(:find) { child_obj } end