ddr-models 2.5.3 → 2.6.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/users/sessions_controller.rb +0 -5
  3. data/config/initializers/devise.rb +3 -2
  4. data/config/initializers/rsolr_monkey_patches.rb +7 -0
  5. data/config/initializers/subscriptions.rb +0 -2
  6. data/ddr-models.gemspec +2 -1
  7. data/lib/ddr/actions/virus_check.rb +0 -1
  8. data/lib/ddr/auth.rb +0 -4
  9. data/lib/ddr/auth/ability_definitions/role_based_ability_definitions.rb +9 -16
  10. data/lib/ddr/derivatives/generator.rb +0 -2
  11. data/lib/ddr/derivatives/png_generator.rb +2 -4
  12. data/lib/ddr/derivatives/ptif_generator.rb +6 -7
  13. data/lib/ddr/index/fields.rb +18 -2
  14. data/lib/ddr/jobs.rb +0 -4
  15. data/lib/ddr/managers.rb +0 -1
  16. data/lib/ddr/managers/derivatives_manager.rb +3 -4
  17. data/lib/ddr/managers/workflow_manager.rb +3 -0
  18. data/lib/ddr/models.rb +6 -3
  19. data/lib/ddr/models/base.rb +13 -0
  20. data/lib/ddr/models/has_admin_metadata.rb +4 -20
  21. data/lib/ddr/models/indexing.rb +16 -0
  22. data/lib/ddr/models/solr_document.rb +8 -0
  23. data/lib/ddr/models/version.rb +1 -1
  24. data/lib/ddr/models/year_facet.rb +60 -118
  25. data/spec/auth/ability_spec.rb +1 -1
  26. data/spec/auth/roles/role_spec.rb +9 -9
  27. data/spec/index/fields_spec.rb +96 -0
  28. data/spec/models/active_fedora_datastream_spec.rb +6 -5
  29. data/spec/models/has_admin_metadata_spec.rb +49 -125
  30. data/spec/models/indexing_spec.rb +50 -18
  31. data/spec/models/solr_document_spec.rb +28 -0
  32. data/spec/models/year_facet_spec.rb +49 -22
  33. data/spec/support/shared_examples_for_ddr_models.rb +54 -2
  34. metadata +21 -8
  35. data/lib/ddr/jobs/permanent_id.rb +0 -35
  36. data/lib/ddr/managers/permanent_id_manager.rb +0 -93
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b22fafd7e310b7f3d54f41a40c50cf219bdb1d8e
4
- data.tar.gz: 90f815713bb8ae78c4b265192e729b13f758e103
3
+ metadata.gz: edadac3d26e329ebd8cd6ce67e3d92c10e2233da
4
+ data.tar.gz: 70aefbe23b138eedb961dd6cc24886a3ad4691ed
5
5
  SHA512:
6
- metadata.gz: 38f710413a57cbae1f797ac9741c221e5ec364c254ac59fcff2c20da39bea086541599cfad173bac2b6fb52b20b68db5f6baf9aa52bdb5f6e7a27bb5c65ffc34
7
- data.tar.gz: c7f14d40ffdd5992f39f4e8141aa7635213f612acc9602bd67677e2318f1b38a2e9103aca39f1fe8f0ac6a053505b5706fcbf4feb8b078894833d5b3648ced0c
6
+ metadata.gz: 73f1a830f3a2763d9a867505260286d5c50836d530551d758b92351339af451c67eb4572f5924501017d271bedbef692a1ff9981469f589c4fe796e187e05bbe
7
+ data.tar.gz: 1a2541c01cdf459f64ec0b9ee291479f77446b845da398c13038d721c48c69d9a3641a25f83a56ea7f673d555e096f99ff2c1a670705d298dc773b444389c51e
@@ -10,9 +10,4 @@ class Users::SessionsController < Devise::SessionsController
10
10
  end
11
11
  end
12
12
 
13
- def after_sign_out_path_for(scope)
14
- return Ddr::Auth.sso_logout_url if Ddr::Auth.require_shib_user_authn
15
- super
16
- end
17
-
18
13
  end
@@ -218,14 +218,15 @@ Devise.setup do |config|
218
218
  # Explicit require is needed here for devise to find strategy
219
219
  require "omniauth-shibboleth"
220
220
  config.omniauth :shibboleth, {
221
- uid_field: "eppn",
221
+ uid_field: lambda { |rpm| rpm.call("eppn") || rpm.call("duDukeID") },
222
222
  name_field: "displayName",
223
223
  info_fields: {
224
224
  email: "mail",
225
225
  first_name: "givenName",
226
226
  last_name: "sn",
227
227
  nickname: "eduPersonNickname"
228
- }
228
+ },
229
+ extra_fields: ["duDukeID"],
229
230
  }
230
231
 
231
232
  # ==> Warden configuration
@@ -0,0 +1,7 @@
1
+ require 'rsolr'
2
+
3
+ module RSolr
4
+ class << self
5
+ alias_method :escape, :solr_escape
6
+ end
7
+ end
@@ -17,8 +17,6 @@ ActiveSupport::Notifications.subscribe(Ddr::Notifications::UPDATE, Ddr::Events::
17
17
  # Deletion
18
18
  ActiveSupport::Notifications.subscribe(Ddr::Notifications::DELETION, Ddr::Events::DeletionEvent)
19
19
  ActiveSupport::Notifications.subscribe(/destroy\.\w+/, Ddr::Events::DeletionEvent)
20
- ActiveSupport::Notifications.subscribe(/destroy\.\w+/, Ddr::Jobs::PermanentId::MakeUnavailable)
21
20
 
22
21
  # Deaccession
23
22
  ActiveSupport::Notifications.subscribe(/deaccession\.\w+/, Ddr::Events::DeaccessionEvent)
24
- ActiveSupport::Notifications.subscribe(/deaccession\.\w+/, Ddr::Jobs::PermanentId::MakeUnavailable)
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
 
19
19
  s.require_paths = ["lib", "app/models"]
20
20
 
21
- s.add_dependency "rails", "~> 4.1.6"
21
+ s.add_dependency "rails", "~> 4.1"
22
22
  s.add_dependency "activeresource"
23
23
  s.add_dependency "active-fedora", "~> 7.0"
24
24
  s.add_dependency "hydra-core", "~> 7.2"
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
34
34
  s.add_dependency "ddr-antivirus", "~> 2.1.1"
35
35
  s.add_dependency "virtus", "~> 1.0.5"
36
36
  s.add_dependency "hashie", "~> 3.4", "< 3.4.4"
37
+ s.add_dependency "edtf", "~> 3.0"
37
38
 
38
39
  s.add_development_dependency "bundler", "~> 1.11"
39
40
  s.add_development_dependency "rake"
@@ -1,4 +1,3 @@
1
- require "open3"
2
1
  require "ostruct"
3
2
  require "shellwords"
4
3
 
@@ -91,10 +91,6 @@ module Ddr
91
91
  false
92
92
  end
93
93
 
94
- mattr_accessor :sso_logout_url do
95
- "/Shibboleth.sso/Logout?return=https://shib.oit.duke.edu/cgi-bin/logout.pl"
96
- end
97
-
98
94
  # Grouper gateway implementation
99
95
  mattr_accessor :grouper_gateway do
100
96
  GrouperGateway
@@ -12,19 +12,20 @@ module Ddr
12
12
 
13
13
  private
14
14
 
15
- def has_permission?(permission, obj)
16
- permissions(obj).include? permission
15
+ def has_permission?(permission, object_or_id)
16
+ permissions(object_or_id).include? permission
17
17
  end
18
18
 
19
- def permissions(obj)
20
- case obj
19
+ def permissions(object_or_id)
20
+ case object_or_id
21
21
  when Ddr::Models::Base, SolrDocument
22
- cached_permissions obj.pid do
23
- obj.effective_permissions(agents)
22
+ cached_permissions(object_or_id.id) do
23
+ object_or_id.effective_permissions(agents)
24
24
  end
25
25
  when String
26
- cached_permissions obj do
27
- permissions_doc(obj).effective_permissions(agents)
26
+ cached_permissions(object_or_id) do
27
+ doc = SolrDocument.find(object_or_id) # raises SolrDocument::NotFound
28
+ doc.effective_permissions(agents)
28
29
  end
29
30
  end
30
31
  end
@@ -33,14 +34,6 @@ module Ddr
33
34
  cache[pid] ||= block.call
34
35
  end
35
36
 
36
- def permissions_doc(pid)
37
- roles_query_result = ActiveFedora::SolrService.query("id:\"#{pid}\"", rows: 1).first
38
- if roles_query_result.nil?
39
- raise "Solr document not found for PID \"#{pid}\"."
40
- end
41
- SolrDocument.new roles_query_result
42
- end
43
-
44
37
  end
45
38
  end
46
39
  end
@@ -5,8 +5,6 @@ module Ddr
5
5
 
6
6
  attr_reader :source, :output, :options
7
7
 
8
- GeneratorResult = Struct.new(:stdout, :stderr, :status)
9
-
10
8
  def initialize source, output, options=nil
11
9
  raise ArgumentError, "Source must be a File or path to a file" unless Ddr::Utils.file_or_path?(source)
12
10
  raise ArgumentError, "Output must be a File or path to a file" unless Ddr::Utils.file_or_path?(output)
@@ -1,5 +1,3 @@
1
- require 'open3'
2
-
3
1
  module Ddr
4
2
  module Derivatives
5
3
  class PngGenerator < Generator
@@ -10,8 +8,8 @@ module Ddr
10
8
 
11
9
  def generate
12
10
  command = "convert #{Ddr::Utils.file_path(source)}[0] #{options} png:#{Ddr::Utils.file_path(output)}"
13
- out, err, s = Open3.capture3(command)
14
- GeneratorResult.new(out, err, s)
11
+ `#{command}`
12
+ $?.exitstatus
15
13
  end
16
14
 
17
15
  end
@@ -1,5 +1,3 @@
1
- require 'open3'
2
-
3
1
  module Ddr
4
2
  module Derivatives
5
3
  class PtifGenerator < Generator
@@ -27,19 +25,20 @@ module Ddr
27
25
 
28
26
  def run_generator(source_to_use)
29
27
  command = "vips im_vips2tiff #{Ddr::Utils.file_path(source_to_use)} #{Ddr::Utils.file_path(output)}:#{options}"
30
- out, err, s = Open3.capture3(command)
31
- GeneratorResult.new(out, err, s)
28
+ `#{command}`
29
+ $?.exitstatus
32
30
  end
33
31
 
34
32
  def make_8_bit(tempdir)
35
33
  temp_8_bit = File.new(File.join(tempdir, "temp_8_bit.v"), 'wb')
36
34
  command = "vips im_msb #{Ddr::Utils.file_path(source)} #{Ddr::Utils::file_path(temp_8_bit)}"
37
- out, err, s = Open3.capture3(command)
38
- if s.success?
35
+ `#{command}`
36
+ exitstatus = $?.exitstatus
37
+ if exitstatus == 0
39
38
  return temp_8_bit
40
39
  else
41
40
  raise Ddr::Models::DerivativeGenerationFailure,
42
- "Error converting #{Ddr::Utils.file_path(source)} to 8-bit: #{err}"
41
+ "Error converting #{Ddr::Utils.file_path(source)} to 8-bit"
43
42
  end
44
43
  end
45
44
 
@@ -10,6 +10,7 @@ module Ddr::Index
10
10
  ADMIN_SET_FACET = Field.new :admin_set_facet, :facetable
11
11
  ADMIN_SET_TITLE = Field.new :admin_set_title, :stored_sortable
12
12
  ALL_TEXT = Field.new :all_text, solr_name: "all_text_timv"
13
+ ARRANGER_FACET = Field.new :arranger_facet, :facetable
13
14
  ASPACE_ID = Field.new :aspace_id, :stored_sortable
14
15
  ATTACHED_FILES_HAVING_CONTENT =
15
16
  Field.new :attached_files_having_content, :symbol
@@ -19,6 +20,7 @@ module Ddr::Index
19
20
  COLLECTION_TITLE = Field.new :collection_title, :stored_sortable
20
21
  COLLECTION_URI = Field.new :collection_uri, :symbol
21
22
  COMPANY_FACET = Field.new :company_facet, :facetable
23
+ COMPOSER_FACET = Field.new :composer_facet, :facetable
22
24
  CONTENT_CONTROL_GROUP = Field.new :content_control_group, :searchable, type: :string
23
25
  CONTENT_CREATE_DATE = Field.new :content_create_date, :stored_sortable, type: :date
24
26
  CONTENT_SIZE = Field.new :content_size, solr_name: "content_size_lsi"
@@ -31,12 +33,18 @@ module Ddr::Index
31
33
  DISPLAY_FORMAT = Field.new :display_format, :stored_sortable
32
34
  DOI = Field.new :doi, :symbol
33
35
  EAD_ID = Field.new :ead_id, :stored_sortable
36
+ ENGRAVER_FACET = Field.new :engraver_facet, :facetable
34
37
  EXTRACTED_TEXT = Field.new :extracted_text, solr_name: "extracted_text_tsm"
35
38
  FOLDER_FACET = Field.new :folder_facet, :facetable
36
39
  FORMAT_FACET = Field.new :format_facet, :facetable
40
+ GENRE_FACET = Field.new :genre_facet, :facetable
37
41
  HAS_MODEL = Field.new :has_model, :symbol
38
42
  IDENTIFIER_ALL = Field.new :identifier_all, :symbol
43
+ ILLUSTRATED_FACET = Field.new :illustrated_facet, :facetable
44
+ ILLUSTRATOR_FACET = Field.new :illustrator_facet, :facetable
45
+ INSTRUMENTATION_FACET = Field.new :instrumentation_facet, :facetable
39
46
  INTERNAL_URI = Field.new :internal_uri, :stored_sortable
47
+ INTERVIEWER_NAME_FACET = Field.new :interviewer_name_facet, :facetable
40
48
  IS_ATTACHED_TO = Field.new :is_attached_to, :symbol
41
49
  IS_EXTERNAL_TARGET_FOR = Field.new :is_external_target_for, :symbol
42
50
  IS_GOVERNED_BY = Field.new :is_governed_by, :symbol
@@ -49,7 +57,9 @@ module Ddr::Index
49
57
  LAST_VIRUS_CHECK_ON = Field.new :last_virus_check_on, :stored_sortable, type: :date
50
58
  LAST_VIRUS_CHECK_OUTCOME = Field.new :last_virus_check_outcome, :symbol
51
59
  LICENSE = Field.new :license, :stored_sortable
60
+ LITHOGRAPHER_FACET = Field.new :lithographer_facet, :facetable
52
61
  LOCAL_ID = Field.new :local_id, :stored_sortable
62
+ LYRICIST_FACET = Field.new :lyricist_facet, :facetable
53
63
  MEDIA_SUB_TYPE = Field.new :content_media_sub_type, :facetable
54
64
  MEDIA_MAJOR_TYPE = Field.new :content_media_major_type, :facetable
55
65
  MEDIA_TYPE = Field.new :content_media_type, :symbol
@@ -59,20 +69,24 @@ module Ddr::Index
59
69
  OBJECT_STATE = Field.new :object_state, :stored_sortable
60
70
  OBJECT_CREATE_DATE = Field.new :system_create, :stored_sortable, type: :date
61
71
  OBJECT_MODIFIED_DATE = Field.new :system_modified, :stored_sortable, type: :date
72
+ PERFORMER_FACET = Field.new :performer_facet, :facetable
62
73
  PERMANENT_ID = Field.new :permanent_id, :stored_sortable, type: :string
63
74
  PERMANENT_URL = Field.new :permanent_url, :stored_sortable, type: :string
64
75
  PLACEMENT_COMPANY_FACET = Field.new :placement_company_facet, :facetable
65
76
  POLICY_ROLE = Field.new :policy_role, :symbol
77
+ PRODUCER_FACET = Field.new :producer_facet, :facetable
66
78
  PRODUCT_FACET = Field.new :product_facet, :facetable
67
79
  PUBLICATION_FACET = Field.new :publication_facet, :facetable
68
80
  PUBLISHER_FACET = Field.new :publisher_facet, :facetable
69
81
  RESEARCH_HELP_CONTACT = Field.new :research_help_contact, :stored_sortable
70
82
  RESOURCE_ROLE = Field.new :resource_role, :symbol
83
+ ROLL_NUMBER_FACET = Field.new :roll_number_facet, :facetable
71
84
  SERIES_FACET = Field.new :series_facet, :facetable
72
85
  SETTING_FACET = Field.new :setting_facet, :facetable
73
86
  SPATIAL_FACET = Field.new :spatial_facet, :facetable
74
87
  STRUCT_MAPS = Field.new :struct_maps, :stored_sortable
75
88
  SUBJECT_FACET = Field.new :subject_facet, :facetable
89
+ SUBSERIES_FACET = Field.new :subseries_facet, :facetable
76
90
  TECHMD_COLOR_SPACE = Field.new :techmd_color_space, :symbol
77
91
  TECHMD_CREATING_APPLICATION = Field.new :techmd_creating_application, :symbol
78
92
  TECHMD_CREATION_TIME = Field.new :techmd_creation_time, :stored_searchable, type: :date
@@ -90,9 +104,11 @@ module Ddr::Index
90
104
  TECHMD_PRONOM_IDENTIFIER = Field.new :techmd_pronom_identifier, :symbol
91
105
  TECHMD_VALID = Field.new :techmd_valid, :symbol
92
106
  TECHMD_WELL_FORMED = Field.new :techmd_well_formed, :symbol
107
+ TEMPORAL_FACET = Field.new :temporal_facet, :facetable
93
108
  TITLE = Field.new :title, :stored_sortable
94
109
  TONE_FACET = Field.new :tone_facet, :facetable
95
110
  TYPE_FACET = Field.new :type_facet, :facetable
111
+ VOLUME_FACET = Field.new :volume_facet, :facetable
96
112
  WORKFLOW_STATE = Field.new :workflow_state, :stored_sortable
97
113
  YEAR_FACET = Field.new :year_facet, solr_name: "year_facet_iim"
98
114
 
@@ -101,13 +117,13 @@ module Ddr::Index
101
117
  end
102
118
 
103
119
  def self.techmd
104
- @techmd ||= constants(false).select { |c| c =~ /\ATECHMD_/ }.map { |c| const_get(c) }
120
+ @techmd ||= constants(false).select { |c| c =~ /\ATECHMD_/ }.map { |c| const_get(c) }.freeze
105
121
  end
106
122
 
107
123
  def self.descmd
108
124
  @descmd ||= Ddr::Datastreams::DescriptiveMetadataDatastream.properties.map do |base, config|
109
125
  Field.new base, *(config.behaviors)
110
- end
126
+ end.freeze
111
127
  end
112
128
 
113
129
  def self.const_missing(name)
@@ -5,12 +5,8 @@ module Ddr
5
5
  autoload :FitsFileCharacterization
6
6
  autoload :FixityCheck
7
7
  autoload :Job
8
- autoload :PermanentId
9
8
  autoload :Queue
10
9
  autoload :UpdateIndex
11
10
 
12
- autoload_at 'ddr/jobs/permanent_id' do
13
- autoload :MakeUnavailable
14
- end
15
11
  end
16
12
  end
@@ -4,7 +4,6 @@ module Ddr
4
4
 
5
5
  autoload :Manager
6
6
  autoload :DerivativesManager
7
- autoload :PermanentIdManager
8
7
  autoload :TechnicalMetadataManager
9
8
  autoload :WorkflowManager
10
9
 
@@ -56,17 +56,16 @@ module Ddr
56
56
  tempdir = FileUtils.mkdir(tempdir_path).first
57
57
  generator_source = create_source_file(tempdir)
58
58
  generator_output = File.new(File.join(tempdir, "output.out"), 'wb')
59
- results = derivative.generator.new(generator_source.path, generator_output.path, derivative.options).generate
59
+ exitstatus = derivative.generator.new(generator_source.path, generator_output.path, derivative.options).generate
60
60
  generator_source.close unless generator_source.closed?
61
- if results.status.success?
61
+ if exitstatus == 0
62
62
  generator_output = File.open(generator_output, 'rb')
63
63
  object.reload if object.persisted?
64
64
  object.add_file generator_output, derivative.datastream, mime_type: derivative.generator.output_mime_type
65
65
  object.save!
66
66
  else
67
- Rails.logger.error results.stderr
68
67
  raise Ddr::Models::DerivativeGenerationFailure,
69
- "Failure generating #{derivative.name} for #{object.pid}: #{results.stderr}"
68
+ "Failure generating #{derivative.name} for #{object.pid}"
70
69
  end
71
70
  generator_output.close unless generator_output.closed?
72
71
  ensure
@@ -9,6 +9,9 @@ module Ddr
9
9
  object.workflow_state == PUBLISHED
10
10
  end
11
11
 
12
+ def unpublished?
13
+ object.workflow_state == UNPUBLISHED
14
+ end
12
15
 
13
16
  def publish!(include_descendants: true)
14
17
  unless published?
@@ -89,9 +89,6 @@ module Ddr
89
89
  # Image server URL
90
90
  mattr_accessor :image_server_url
91
91
 
92
- # Whether permanent IDs should be automatically assigned on create
93
- mattr_accessor :auto_assign_permanent_ids
94
-
95
92
  mattr_accessor :permanent_id_target_url_base do
96
93
  "https://repository.duke.edu/id/"
97
94
  end
@@ -116,6 +113,12 @@ module Ddr
116
113
  Dir.tmpdir
117
114
  end
118
115
 
116
+ # Is repository locked? Default is false.
117
+ # A locked repository behaves as though each object in the repository is locked.
118
+ mattr_accessor :repository_locked do
119
+ false
120
+ end
121
+
119
122
  # Yields an object with module configuration accessors
120
123
  def self.configure
121
124
  yield self
@@ -23,6 +23,8 @@ module Ddr
23
23
  deprecation_deprecate *(Hydra::AccessControls::Permissions.public_instance_methods)
24
24
 
25
25
  around_save :notify_save
26
+ around_save :notify_workflow_change, if: [:workflow_state_changed?, :persisted?]
27
+ after_create :notify_create
26
28
  around_deaccession :notify_deaccession
27
29
  around_destroy :notify_destroy
28
30
 
@@ -128,6 +130,17 @@ module Ddr
128
130
  end
129
131
  end
130
132
 
133
+ def notify_workflow_change
134
+ ActiveSupport::Notifications.instrument("#{workflow_state}.workflow.#{self.class.to_s.underscore}", pid: pid) do |payload|
135
+ yield
136
+ end
137
+ end
138
+
139
+ def notify_create
140
+ ActiveSupport::Notifications.instrument("create.#{self.class.to_s.underscore}",
141
+ pid: pid)
142
+ end
143
+
131
144
  def notify_deaccession
132
145
  ActiveSupport::Notifications.instrument("deaccession.#{self.class.to_s.underscore}",
133
146
  pid: pid,
@@ -22,16 +22,12 @@ module Ddr::Models
22
22
  :ead_id,
23
23
  :aspace_id,
24
24
  :is_locked,
25
+ :doi,
25
26
  datastream: "adminMetadata",
26
27
  multiple: false
27
28
 
28
- delegate :publish!, :unpublish!, :published?, to: :workflow
29
-
30
- after_create :assign_permanent_id!, if: "Ddr::Models.auto_assign_permanent_ids"
31
- end
32
-
33
- def permanent_id_manager
34
- @permanent_id_manager ||= Ddr::Managers::PermanentIdManager.new(self)
29
+ delegate :publish!, :unpublish!, :published?, :unpublished?,
30
+ to: :workflow
35
31
  end
36
32
 
37
33
  def roles
@@ -46,10 +42,6 @@ module Ddr::Models
46
42
  @workflow ||= Ddr::Managers::WorkflowManager.new(self)
47
43
  end
48
44
 
49
- def assign_permanent_id!
50
- permanent_id_manager.assign_later
51
- end
52
-
53
45
  def grant_roles_to_creator(creator)
54
46
  roles.grant type: Ddr::Auth::Roles::EDITOR,
55
47
  agent: creator,
@@ -83,7 +75,7 @@ module Ddr::Models
83
75
  end
84
76
 
85
77
  def locked?
86
- !!is_locked
78
+ !!is_locked || Ddr::Models.repository_locked
87
79
  end
88
80
 
89
81
  def lock
@@ -104,13 +96,5 @@ module Ddr::Models
104
96
  save
105
97
  end
106
98
 
107
- private
108
-
109
- def update_permanent_id_on_destroy
110
- @permanent_id = permanent_id
111
- yield
112
- Resque.enqueue(Ddr::Jobs::PermanentId::MakeUnavailable, @permanent_id, "deleted")
113
- end
114
-
115
99
  end
116
100
  end