dor-services 5.9.1 → 5.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dor/models/publishable.rb +12 -0
- data/lib/dor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e12615e3d7ad817a848742dddf48a7a288787cce
|
4
|
+
data.tar.gz: a5098bb9427445ecdf14ce8111ec830c725b1755
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d521a3d3fb59b32e90f6c5dec682c78d8a2d9ec327f36ac7b6072b30074a75b1f143a0af1d994753b840266f0bd5260007929cde04befd046066ffb5468da08f
|
7
|
+
data.tar.gz: 64cc4d1e9869fb93d48e08058aa0943c00ffab9bb0fae90503b8b04dbbaf5ef96c2f12a320078ac61149e446ce4a9e1bb615bcfe5be2cad8dab6a2f687c0feb3
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'dor/datastreams/content_metadata_ds'
|
2
|
+
require 'fileutils'
|
2
3
|
|
3
4
|
module Dor
|
4
5
|
module Publishable
|
@@ -61,6 +62,7 @@ module Dor
|
|
61
62
|
end
|
62
63
|
DigitalStacksService.transfer_to_document_store(pid, public_xml, 'public')
|
63
64
|
DigitalStacksService.transfer_to_document_store(pid, generate_public_desc_md, 'mods') if metadata_format == 'mods'
|
65
|
+
publish_notify_on_success
|
64
66
|
else
|
65
67
|
# Clear out the document cache for this item
|
66
68
|
DigitalStacksService.prune_purl_dir pid
|
@@ -74,5 +76,15 @@ module Dor
|
|
74
76
|
endpoint.post ''
|
75
77
|
endpoint.url
|
76
78
|
end
|
79
|
+
|
80
|
+
##
|
81
|
+
# When publishing a PURL, we drop a `aa11bb2222` file into the `local_recent_changes` folder
|
82
|
+
# to notify other applications watching the filesystem (i.e., purl-fetcher).
|
83
|
+
# @param [String] `local_recent_changes` usually `/purl/recent_changes`
|
84
|
+
def publish_notify_on_success(local_recent_changes = Config.stacks.local_recent_changes)
|
85
|
+
raise ArgumentError, "Missing local_recent_changes directory: #{local_recent_changes}" unless File.directory?(local_recent_changes)
|
86
|
+
id = pid.gsub(/^druid:/, '')
|
87
|
+
FileUtils.touch(File.join(local_recent_changes, id))
|
88
|
+
end
|
77
89
|
end
|
78
90
|
end
|
data/lib/dor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Klein
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2016-
|
17
|
+
date: 2016-08-16 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: active-fedora
|