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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1e3846531cd8f6b4965289ffdffc9a60004be21
4
- data.tar.gz: 52a91fc4e6bd9e282c32c4be332b9c414ce9b602
3
+ metadata.gz: 0c82dac72c127c0156b94b1201238bccb31a4732
4
+ data.tar.gz: fffbc7000e7142315c9aae2b68173937877b60ec
5
5
  SHA512:
6
- metadata.gz: 12908b93e8e15cbf9c6fa8e6319020a6a649333fa467d67619c98783b8aad34a8598751575eb219f01fbb3af6d9f708b986804d64ccbf24a7e499ef75b5af846
7
- data.tar.gz: 2a4fb223c9754181cb56598a4bb5455b2fb97e5e15d250782b3af799b2c582df923a46690e590863aa00890149f970c0abe62734d09f9a311c4bd902594a63b6
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[:size]
216
+ properties['size']
217
217
  end
218
218
 
219
219
  def fixity_check(checksum)
220
- properties[:checksum] == checksum
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[:size]
241
+ properties['size']
242
242
  end
243
243
 
244
244
  def fixity_check(checksum)
245
- properties[:checksum] == checksum
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[:filename]) || self.properties[:link]
16
+ File.basename(self.properties['filename']) || self.properties['link']
17
17
  end
18
18
 
19
19
  def name
20
- self.properties[:name] || self.filename
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[:filename]
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[: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
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[:filename] = name
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[:link]
61
+ self.properties['link']
62
62
  end
63
63
 
64
64
  def link=(name)
65
- self.properties[:link] = name
65
+ self.properties['link'] = name
66
66
  end
67
67
 
68
68
  def set_info(info)
@@ -83,7 +83,7 @@ module Libis
83
83
  # @return [String] string identification for this work item.
84
84
  def name
85
85
  # noinspection RubyResolve
86
- self.properties[:name] || self.inspect
86
+ self.properties['name'] || self.inspect
87
87
  end
88
88
 
89
89
  def to_s;
@@ -14,13 +14,13 @@ module Libis
14
14
  # @param [Libis::Workflow::Base::WorkItem] item
15
15
  def run(item)
16
16
 
17
- item.properties[:ingest_failed] = item.check_status(:FAILED)
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.23' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
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
@@ -9,7 +9,7 @@ class TestDirItem < ::Libis::Workflow::DirItem
9
9
  end
10
10
 
11
11
  def name
12
- self.properties[:name] || super
12
+ self.properties['name'] || super
13
13
  end
14
14
 
15
15
  end
@@ -12,7 +12,7 @@ class TestFileItem < ::Libis::Workflow::FileItem
12
12
  end
13
13
 
14
14
  def name
15
- self.properties[:name] || super
15
+ self.properties['name'] || super
16
16
  end
17
17
 
18
18
  end
@@ -7,7 +7,7 @@ class CamelizeName < ::Libis::Workflow::Task
7
7
 
8
8
  def process(item)
9
9
  return unless (item.is_a?(TestFileItem) || item.is_a?(TestDirItem))
10
- item.properties[:name] = item.name.camelize
10
+ item.properties['name'] = item.name.camelize
11
11
  end
12
12
 
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libis-workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.beta.23
4
+ version: 2.0.beta.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kris Dekeyser