libis-workflow 2.0.beta.23 → 2.0.beta.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/libis/workflow/base/file_item.rb +13 -13
- data/lib/libis/workflow/base/work_item.rb +1 -1
- data/lib/libis/workflow/tasks/analyzer.rb +3 -3
- data/lib/libis/workflow/version.rb +1 -1
- data/spec/items/test_dir_item.rb +1 -1
- data/spec/items/test_file_item.rb +1 -1
- data/spec/tasks/camelize_name.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c82dac72c127c0156b94b1201238bccb31a4732
|
4
|
+
data.tar.gz: fffbc7000e7142315c9aae2b68173937877b60ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7c0890903d1b836b9f60ed94c1bf6d23cf9d769be5a7af10b3a43b36e064a3b39a6b19b28c6d2a6d53d0a9f86679048334fd51d322325dea1a60963cb3be7da
|
7
|
+
data.tar.gz: c8ec666d8bec3d1c7ce5396edf2736d16ded25997768d46c9a7b7def27d089372c911abec4f18398fae5841d0b4a4b722c81c6bbf0f3de1ca07b792af4b38626
|
data/README.md
CHANGED
@@ -213,11 +213,11 @@ Work items that are file-based can derive from the ::Libis::Workflow::FileItem c
|
|
213
213
|
end
|
214
214
|
|
215
215
|
def filesize
|
216
|
-
properties[
|
216
|
+
properties['size']
|
217
217
|
end
|
218
218
|
|
219
219
|
def fixity_check(checksum)
|
220
|
-
properties[
|
220
|
+
properties['checksum'] == checksum
|
221
221
|
end
|
222
222
|
|
223
223
|
end
|
@@ -238,11 +238,11 @@ or include the ::Libis::Workflow::Base::FileItem module:
|
|
238
238
|
end
|
239
239
|
|
240
240
|
def filesize
|
241
|
-
properties[
|
241
|
+
properties['size']
|
242
242
|
end
|
243
243
|
|
244
244
|
def fixity_check(checksum)
|
245
|
-
properties[
|
245
|
+
properties['checksum'] == checksum
|
246
246
|
end
|
247
247
|
|
248
248
|
end
|
@@ -13,11 +13,11 @@ module Libis
|
|
13
13
|
include Libis::Workflow::Base::WorkItem
|
14
14
|
|
15
15
|
def filename
|
16
|
-
File.basename(self.properties[
|
16
|
+
File.basename(self.properties['filename']) || self.properties['link']
|
17
17
|
end
|
18
18
|
|
19
19
|
def name
|
20
|
-
self.properties[
|
20
|
+
self.properties['name'] || self.filename
|
21
21
|
end
|
22
22
|
|
23
23
|
def filelist
|
@@ -29,24 +29,24 @@ module Libis
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def fullpath
|
32
|
-
self.properties[
|
32
|
+
self.properties['filename']
|
33
33
|
end
|
34
34
|
|
35
35
|
def filename=(name)
|
36
36
|
begin
|
37
37
|
stats = ::File.stat name
|
38
|
-
self.properties[
|
39
|
-
self.properties[
|
40
|
-
self.properties[
|
41
|
-
self.properties[
|
42
|
-
self.properties[
|
43
|
-
self.properties[
|
44
|
-
self.properties[
|
38
|
+
self.properties['size'] = stats.size
|
39
|
+
self.properties['access_time'] = stats.atime
|
40
|
+
self.properties['modification_time'] = stats.mtime
|
41
|
+
self.properties['creation_time'] = stats.ctime
|
42
|
+
self.properties['mode'] = stats.mode
|
43
|
+
self.properties['uid'] = stats.uid
|
44
|
+
self.properties['gid'] = stats.gid
|
45
45
|
set_checksum(:MD5, ::Digest::MD5.hexdigest(File.read(name))) if File.file?(name)
|
46
46
|
rescue
|
47
47
|
# ignored
|
48
48
|
end
|
49
|
-
self.properties[
|
49
|
+
self.properties['filename'] = name
|
50
50
|
end
|
51
51
|
|
52
52
|
def checksum(checksum_type)
|
@@ -58,11 +58,11 @@ module Libis
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def link
|
61
|
-
self.properties[
|
61
|
+
self.properties['link']
|
62
62
|
end
|
63
63
|
|
64
64
|
def link=(name)
|
65
|
-
self.properties[
|
65
|
+
self.properties['link'] = name
|
66
66
|
end
|
67
67
|
|
68
68
|
def set_info(info)
|
@@ -14,13 +14,13 @@ module Libis
|
|
14
14
|
# @param [Libis::Workflow::Base::WorkItem] item
|
15
15
|
def run(item)
|
16
16
|
|
17
|
-
item.properties[
|
17
|
+
item.properties['ingest_failed'] = item.check_status(:FAILED)
|
18
18
|
|
19
19
|
item.summary = {}
|
20
20
|
item.log_history.each do |log|
|
21
21
|
level = log[:severity]
|
22
|
-
item.summary[level] ||= 0
|
23
|
-
item.summary[level] += 1
|
22
|
+
item.summary[level.to_s] ||= 0
|
23
|
+
item.summary[level.to_s] += 1
|
24
24
|
end
|
25
25
|
|
26
26
|
item.each do |i|
|
@@ -2,6 +2,6 @@
|
|
2
2
|
|
3
3
|
module Libis
|
4
4
|
module Workflow
|
5
|
-
VERSION = '2.0.beta.
|
5
|
+
VERSION = '2.0.beta.24' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
|
6
6
|
end
|
7
7
|
end
|
data/spec/items/test_dir_item.rb
CHANGED
data/spec/tasks/camelize_name.rb
CHANGED