scout-gear 10.7.4 → 10.7.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92262edf62404f5935bf749d3ab71d2ce39ffc7292a1b3d860fd5dc712501fcb
4
- data.tar.gz: 47f69a80c0a135d3a9b3b42558e7b91e766b7781ff2360cd8344ef9c0f7ac8b9
3
+ metadata.gz: 60a8c5a91d83e96aaa721154fa4f7fdd63d2699c691b8c99962c6ba5561365eb
4
+ data.tar.gz: 4b2303f3db25c1316286e8c6edbd8d76be66ba8b851626393f0c0b5ea34aac1d
5
5
  SHA512:
6
- metadata.gz: 3d532c6a4ac2bd3d0b5584761531b0364f381c317a9864b85b22c7a23bd61dbf2b31d1655f5fc7085c893c843f1b3f36a1b23fffae4c4b9dc2253352f3f5febf
7
- data.tar.gz: 50e36c694239f0d74528b9156435b8769d16ae172dd87029ee741c0002b8ef3606f5088fc2c8f881d413b78f1f00f66134f06fc14129da3015648546130809c6
6
+ metadata.gz: 0eb9761f9cc9acab8842372de6bbe9f69413bc9d6b2c1b05ebae6c51e40ca292fbce9edce27d1c5d26a7e298273e700881bdd39f8bac3441b1e9af604c443eb0
7
+ data.tar.gz: cb46e73a548bca55f41e088167eff7494691a6fdd61ed17f7a06f6a1a0257679441b7d62a56e67a376943e4e0a96acd39d3a4ee5888550c1721c5d79e4f7e6a4
data/.gitmodules CHANGED
@@ -1,4 +0,0 @@
1
- [submodule "modules/rbbt-util"]
2
- path = modules/rbbt-util
3
- url = https://github.com/mikisvaz/rbbt-util.git
4
- branch = scout
data/.vimproject CHANGED
@@ -8,6 +8,7 @@ scout-gear=/$PWD filter="*.rb *.yaml" {
8
8
  workflow.rb
9
9
  workflow=workflow{
10
10
  exceptions.rb
11
+ export.rb
11
12
  definition.rb
12
13
  documentation.rb
13
14
  usage.rb
@@ -38,6 +39,7 @@ scout-gear=/$PWD filter="*.rb *.yaml" {
38
39
  trace.rb
39
40
  orchestrator.rb
40
41
  }
42
+ entity.rb
41
43
  }
42
44
  work_queue.rb
43
45
  work_queue=work_queue{
@@ -122,12 +124,6 @@ scout-gear=/$PWD filter="*.rb *.yaml" {
122
124
  enrichment.rb
123
125
  list.rb
124
126
  }
125
- offsite.rb
126
- offsite=offsite{
127
- ssh.rb
128
- sync.rb
129
- step.rb
130
- }
131
127
  semaphore.rb
132
128
  }
133
129
  scout-gear.rb
@@ -144,7 +140,6 @@ scout-gear=/$PWD filter="*.rb *.yaml" {
144
140
  doc
145
141
  update
146
142
  template
147
- offsite
148
143
  kb=kb{
149
144
  config
150
145
  entities
@@ -186,7 +181,6 @@ scout-gear=/$PWD filter="*.rb *.yaml" {
186
181
  scout=scout{
187
182
  test_association.rb
188
183
  test_entity.rb
189
- test_offsite.rb
190
184
  test_semaphore.rb
191
185
  test_tsv.rb
192
186
  test_workflow.rb
@@ -248,12 +242,6 @@ scout-gear=/$PWD filter="*.rb *.yaml" {
248
242
  test_tokyocabinet.rb
249
243
  }
250
244
  }
251
- offsite=offsite{
252
- test_ssh.rb
253
- test_step.rb
254
- test_sync.rb
255
- test_task.rb
256
- }
257
245
  }
258
246
  }
259
247
  share=share{
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ Juwelier::Tasks.new do |gem|
12
12
  gem.homepage = "http://github.com/mikisvaz/scout-gear"
13
13
  gem.license = "MIT"
14
14
  gem.summary = %Q{basic gear for scouts}
15
- gem.description = %Q{Temporary files, logs, path, resources, persistence, workflows, TSV, etc.}
15
+ gem.description = %Q{Scout gear: workflow, TSVs, persistence, entities, associations, and knowledge_bases.}
16
16
  gem.email = "mikisvaz@gmail.com"
17
17
  gem.authors = ["Miguel Vazquez"]
18
18
 
@@ -26,10 +26,7 @@ Juwelier::Tasks.new do |gem|
26
26
  gem.add_runtime_dependency 'RubyInline'
27
27
  #gem.add_runtime_dependency 'tokyocabinet'
28
28
 
29
- gem.add_development_dependency "rdoc", "~> 3.12"
30
- gem.add_development_dependency "bundler", "~> 1.0"
31
29
  gem.add_development_dependency "juwelier", "~> 2.1.0"
32
- gem.add_development_dependency "simplecov", ">= 0"
33
30
  end
34
31
  Juwelier::RubygemsDotOrgTasks.new
35
32
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 10.7.4
1
+ 10.7.5
@@ -141,7 +141,7 @@ module Association
141
141
  new.extend Index
142
142
  new
143
143
  else
144
- FileUtils.mkdir_p File.dirname(reverse_filename) unless File.exist?(File.dirname(reverse_filename))
144
+ Open.mkdir File.dirname(reverse_filename) unless Open.exist?(File.dirname(reverse_filename))
145
145
 
146
146
  new = Persist.open_tokyocabinet(reverse_filename, true, serializer, TokyoCabinet::BDB)
147
147
 
@@ -64,13 +64,16 @@ module Entity
64
64
  Persist.memory("Entity index #{identity_type}: #{format} (from #{source || "All"})", :persist => true, :format => format, :source => source) do
65
65
  source ||= self.respond_to?(:format)? self.format : nil
66
66
 
67
+ saved_exception = nil
67
68
  begin
68
69
  index = TSV.translation_index(identifier_files, source, format, :persist => true)
69
70
  raise "No index from #{ Misc.fingerprint source } to #{ Misc.fingerprint format }: #{Misc.fingerprint identifier_files}" if index.nil?
70
71
  index.unnamed = true
71
72
  index
72
73
  rescue
73
- raise $! if source.nil?
74
+ raise saved_exception || $! if source.nil?
75
+ Log.debug "Retrying identifier index without specifying source"
76
+ saved_exception = $!
74
77
  source = nil
75
78
  retry
76
79
  end
@@ -93,7 +96,7 @@ module Entity
93
96
 
94
97
  name = default if name.nil?
95
98
 
96
- self.send(:include, Entity::Identified) unless Entity::Identified === self
99
+ self.send(:include, Entity::Identified) unless self.include?(Entity::Identified)
97
100
 
98
101
  self.format = all_fields
99
102
  @formats ||= []
@@ -148,7 +148,7 @@ module Entity
148
148
 
149
149
  def persist(name, type = :marshal, options = {})
150
150
  options = IndiferentHash.add_defaults options, persist: true,
151
- dir: File.join(Entity.entity_property_cache, self.to_s, name.to_s)
151
+ dir: Entity.entity_property_cache[self.to_s][name.to_s]
152
152
  @persisted_methods ||= {}
153
153
  @persisted_methods[name] = [type, options]
154
154
  end
@@ -40,7 +40,7 @@ module TSV
40
40
  target_file = target_files.select{|file| fields = file_fields[file]; (fields & middle_fields).any? }.collect{|file,f| file }.first
41
41
  [source_file, middle_file, target_file]
42
42
  else
43
- raise "Could not traverse identifier path from #{Log.fingerprint source} to #{Log.fingerprint target} in #{Log.fingerprint file_fields}"
43
+ raise "Could not traverse identifier path from #{Log.fingerprint source} to #{Log.fingerprint target}. #{file_fields.empty? ? "No identifier files" : Log.fingerprint(file_fields)}"
44
44
  end
45
45
  end
46
46
  end
@@ -55,7 +55,13 @@ module TSV
55
55
  files = [files] unless Array === files
56
56
 
57
57
  files.each do |file|
58
- next if Path === file && ! Open.exist?(file)
58
+ #next if Path === file && ! Open.exist?(file)
59
+ begin
60
+ file = file.produce if Path === file
61
+ rescue
62
+ Log.warn $!.message
63
+ next
64
+ end
59
65
  file = file.find if Path === file
60
66
  file_fields[file] = all_fields(file)
61
67
  end
@@ -151,6 +151,8 @@ module Open
151
151
  res = block.call(line)
152
152
  callback.call res if callback
153
153
  end
154
+ obj.close
155
+ obj.join if obj.respond_to? :join
154
156
  else
155
157
  Log.low "Traverse stream with parser #{Log.fingerprint obj}"
156
158
  parser = options[:sep].nil? ? TSV::Parser.new(obj) : TSV::Parser.new(obj, sep: options[:sep])
@@ -0,0 +1,99 @@
1
+ require 'scout/entity'
2
+ require 'scout/workflow'
3
+
4
+ module EntityWorkflow
5
+
6
+ def self.extended(base)
7
+ base.extend Workflow
8
+ base.extend Entity
9
+
10
+ base.instance_variable_set(:@annotation_inputs, IndiferentHash.setup({})) unless base.instance_variables.include?(:@annotation_inputs)
11
+ class << base
12
+ def annotation_input(name, type=nil, desc=nil, default=nil, options = {})
13
+ annotation name
14
+ annotation_inputs = self.instance_variable_get("@annotation_inputs")
15
+ annotation_inputs[name] = [type, desc, default, options]
16
+ end
17
+ end
18
+
19
+ base.helper :entity do
20
+ base.setup(clean_name.dup, inputs.to_hash)
21
+ end
22
+
23
+ base.helper :entity_list do
24
+ list = inputs.last
25
+ list = list.load if Step === list
26
+ base.setup(list, inputs.to_hash)
27
+ end
28
+
29
+ base.property job: :both do |task_name,options={}|
30
+ if Array === self && AnnotatedArray === self
31
+ base.job(task_name, "Default", options.merge(list: self))
32
+ else
33
+ base.job(task_name, self, options)
34
+ end
35
+ end
36
+ end
37
+
38
+ def property_task(task_name, property_type=:single, *args, &block)
39
+ task_name, result_type = task_name.keys.first, task_name.values.first if Hash === task_name
40
+
41
+ annotation_inputs = self.instance_variable_get("@annotation_inputs")
42
+ self.annotations.each do |annotation|
43
+ if annotation_inputs[annotation]
44
+ input annotation, *annotation_inputs[annotation]
45
+ else
46
+ input annotation
47
+ end
48
+ end
49
+ case property_type
50
+ when :single, :single2array
51
+ input :entity, :string, "#{self.to_s} identifier", nil, jobname: true
52
+ task(task_name => result_type, &block)
53
+ when :both
54
+ input :entity, :string, "#{self.to_s} identifier", nil, jobname: true
55
+ input :list, :array, "#{self.to_s} identifier list"
56
+ task(task_name => result_type, &block)
57
+ else
58
+ input :list, :array, "#{self.to_s} identifier list"
59
+ task(task_name => result_type, &block)
60
+ end
61
+
62
+ property task_name => property_type do |*args|
63
+ job = job(task_name, *args)
64
+ Array === job ? job.collect(&:run) : job.run
65
+ end
66
+ end
67
+
68
+ def entity_task(task_name, *args, &block)
69
+ property_task(task_name, :single, *args, &block)
70
+ end
71
+
72
+ def list_task(task_name, *args, &block)
73
+ property_task(task_name, :array, *args, &block)
74
+ end
75
+
76
+ def multiple_task(task_name, *args, &block)
77
+ property_task(task_name, :multiple, *args, &block)
78
+ end
79
+
80
+ def property_task_alias(task_name, property_type=:single, *args)
81
+ task_alias task_name, *args
82
+ property task_name => property_type do |*args|
83
+ job = job(task_name, *args)
84
+ Array === job ? job.collect(&:run) : job.run
85
+ end
86
+ end
87
+
88
+ def entity_task_alias(task_name, *args)
89
+ property_task_alias(task_name, :single, *args)
90
+ end
91
+
92
+ def list_task_alias(task_name, *args)
93
+ property_task_alias(task_name, :array, *args)
94
+ end
95
+
96
+ def multiple_task_alias(task_name, *args)
97
+ property_task_alias(task_name, :multiple, *args)
98
+ end
99
+ end
@@ -0,0 +1,66 @@
1
+ module Workflow
2
+
3
+ annotation :asynchronous_exports, :synchronous_exports, :exec_exports, :stream_exports
4
+
5
+ def asynchronous_exports
6
+ @asynchronous_exports ||= []
7
+ end
8
+
9
+ def synchronous_exports
10
+ @synchronous_exports ||= []
11
+ end
12
+
13
+ def exec_exports
14
+ @exec_exports ||= []
15
+ end
16
+
17
+ def stream_exports
18
+ @exec_exports ||= []
19
+ end
20
+
21
+
22
+ def all_exports
23
+ asynchronous_exports + synchronous_exports + exec_exports + stream_exports
24
+ end
25
+
26
+ alias task_exports all_exports
27
+
28
+ def unexport(*names)
29
+ names = names.collect{|n| n.to_s} + names.collect{|n| n.to_sym}
30
+ names.uniq!
31
+ exec_exports.replace exec_exports - names if exec_exports
32
+ synchronous_exports.replace synchronous_exports - names if synchronous_exports
33
+ asynchronous_exports.replace asynchronous_exports - names if asynchronous_exports
34
+ stream_exports.replace stream_exports - names if stream_exports
35
+ end
36
+
37
+ def export_exec(*names)
38
+ unexport *names
39
+ exec_exports.concat names
40
+ exec_exports.uniq!
41
+ exec_exports
42
+ end
43
+
44
+ def export_synchronous(*names)
45
+ unexport *names
46
+ synchronous_exports.concat names
47
+ synchronous_exports.uniq!
48
+ synchronous_exports
49
+ end
50
+
51
+ def export_asynchronous(*names)
52
+ unexport *names
53
+ asynchronous_exports.concat names
54
+ asynchronous_exports.uniq!
55
+ asynchronous_exports
56
+ end
57
+
58
+ def export_stream(*names)
59
+ unexport *names
60
+ stream_exports.concat names
61
+ stream_exports.uniq!
62
+ stream_exports
63
+ end
64
+
65
+ alias export export_asynchronous
66
+ end
@@ -21,13 +21,13 @@ class Step
21
21
  end
22
22
 
23
23
  def files
24
- Dir.glob(File.join(files_dir, '**', '*')).reject{|path| File.directory? path }.collect do |path|
25
- Misc.path_relative_to(files_dir, path)
24
+ files_dir.glob("**/*").reject{|path| File.directory? path }.collect do |path|
25
+ Misc.path_relative_to(files_dir, path)
26
26
  end
27
27
  end
28
28
 
29
29
  def bundle_files
30
- [path, info_file, Dir.glob(File.join(files_dir,"**/*"))].flatten.select{|f| Open.exist?(f) }
30
+ [path, info_file, files_dir.glob("**/*")].flatten.select{|f| Open.exist?(f) }
31
31
  end
32
32
 
33
33
  def copy_linked_files_dir
@@ -74,6 +74,11 @@ class Step
74
74
  issued = info[:issued]
75
75
  start = info[:start]
76
76
  eend = new_info[:end]
77
+
78
+ start = Time.parse start if String === start
79
+ eend = Time.parse eend if String === eend
80
+ issued = Time.parse issued if String === issued
81
+
77
82
  if start && eend
78
83
  time = eend - start
79
84
  total_time = eend - issued
@@ -108,12 +108,11 @@ class Step
108
108
  status = info[:status] || :missing
109
109
  status = status.to_sym if String === status
110
110
  status = :noinfo if status == :missing && Open.exist?(path)
111
- status = "remote" if Open.remote?(path) || Open.ssh?(path)
111
+ status = :remote if Open.remote?(path) || Open.ssh?(path)
112
112
  name = info[:name] || File.basename(path)
113
113
  status = :unsync if status == :done and not Open.exist?(path)
114
114
  status = :notfound if status == :noinfo and not Open.exist?(path)
115
115
 
116
-
117
116
  this_step_msg = prov_report_msg(status, name, path, info, input)
118
117
 
119
118
  input_dependencies ||= {}
@@ -42,6 +42,7 @@ class Step
42
42
  @result = nil
43
43
  @info = nil
44
44
  @info_load_time = nil
45
+ @done = nil
45
46
  Open.rm path if Open.exist_or_link?(path)
46
47
  Open.rm tmp_path if Open.exist_or_link?(tmp_path)
47
48
  Open.rm info_file if Open.exist_or_link?(info_file)
@@ -75,19 +75,21 @@ class Step
75
75
  def clean_name
76
76
  return @id if @id
77
77
  return info[:clean_name] if info.include? :clean_name
78
- if m = name.match(/(.*?)(?:_[a-z0-9]{32})?(?:\..*)?/)
78
+ if m = name.match(/(.+?)(?:_[a-z0-9]{32})?(?:\..*)?$/)
79
79
  return m[1]
80
80
  end
81
81
  return name.split(".").first
82
82
  end
83
83
 
84
84
  def task_name
85
+ return @task_name if @task_name
85
86
  @task_name ||= @task.name if @task.respond_to?(:name)
86
87
  @task_name ||= info[:task_name] if Open.exist?(info_file)
87
88
  @task_name ||= path.split("/")[-2]
88
89
  end
89
90
 
90
91
  def workflow
92
+ return @workflow if @workflow
91
93
  @workflow ||= @task.workflow if Task === @task
92
94
  @workflow ||= info[:workflow] if info_file && Open.exist?(info_file)
93
95
  @workflow ||= path.split("/")[-3]
@@ -181,7 +183,7 @@ class Step
181
183
  log :start
182
184
  @exec_result = exec
183
185
 
184
- if @exec_result.nil? && File.exist?(self.tmp_path) && ! File.exist?(self.path)
186
+ if @exec_result.nil? && Open.exist?(self.tmp_path) && ! Open.exist?(self.path)
185
187
  Open.mv self.tmp_path, self.path
186
188
  else
187
189
  @exec_result = @exec_result.stream if @exec_result.respond_to?(:stream) && ! (TSV === @exec_result)
@@ -263,7 +265,7 @@ class Step
263
265
  end
264
266
 
265
267
  def done?
266
- Open.exist?(path)
268
+ @done ||= Open.exist?(path)
267
269
  end
268
270
 
269
271
  def streaming?
@@ -186,7 +186,8 @@ module Task
186
186
  seen << name
187
187
  end
188
188
 
189
- Dir.glob(File.join(directory, "*#*")).each do |file|
189
+ directory = Path.setup(directory.dup) unless Path === directory
190
+ directory.glob("*#*").each do |file|
190
191
  override_dep, _, extension = File.basename(file).partition(".")
191
192
 
192
193
  inputs[override_dep] = Task.load_input_from_file(file, :file)
@@ -7,6 +7,8 @@ require_relative 'workflow/usage'
7
7
  require_relative 'workflow/deployment'
8
8
  require_relative 'workflow/exceptions'
9
9
  require_relative 'workflow/path'
10
+ require_relative 'workflow/entity'
11
+ require_relative 'workflow/export'
10
12
 
11
13
  require 'scout/resource'
12
14
  require 'scout/resource/scout'
@@ -50,7 +52,7 @@ module Workflow
50
52
 
51
53
  end
52
54
 
53
- attr_accessor :libdir
55
+ attr_accessor :libdir, :knowledge_base
54
56
 
55
57
  def self.extended(base)
56
58
  self.workflows << base
@@ -70,7 +72,7 @@ module Workflow
70
72
 
71
73
  def self.install_workflow(workflow, base_repo_url = nil)
72
74
  case
73
- when File.exist?(workflow)
75
+ when Open.exist?(workflow)
74
76
  update_workflow_dir(workflow)
75
77
  else
76
78
  Misc.in_dir(self.workflow_dir) do
data/lib/scout-gear.rb CHANGED
@@ -1,5 +1,9 @@
1
1
  require 'scout-essentials'
2
2
  require_relative 'scout/tsv'
3
- require_relative 'scout/offsite'
4
3
 
5
4
  Path.path_maps[:scout_gear] = File.join(Path.caller_lib_dir(__FILE__), "{TOPLEVEL}/{SUBPATH}")
5
+
6
+ Persist.cache_dir = Scout.var.cache.persistence
7
+ TmpFile.tmpdir = Scout.tmp.find :user
8
+ Resource.default_resource = Scout
9
+
data/scout-gear.gemspec CHANGED
@@ -2,17 +2,17 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: scout-gear 10.7.4 ruby lib
5
+ # stub: scout-gear 10.7.5 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "scout-gear".freeze
9
- s.version = "10.7.4".freeze
9
+ s.version = "10.7.5".freeze
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Miguel Vazquez".freeze]
14
- s.date = "2025-03-10"
15
- s.description = "Temporary files, logs, path, resources, persistence, workflows, TSV, etc.".freeze
14
+ s.date = "2025-03-19"
15
+ s.description = "Scout gear: workflow, TSVs, persistence, entities, associations, and knowledge_bases.".freeze
16
16
  s.email = "mikisvaz@gmail.com".freeze
17
17
  s.executables = ["scout".freeze]
18
18
  s.extra_rdoc_files = [
@@ -51,11 +51,6 @@ Gem::Specification.new do |s|
51
51
  "lib/scout/knowledge_base/query.rb",
52
52
  "lib/scout/knowledge_base/registry.rb",
53
53
  "lib/scout/knowledge_base/traverse.rb",
54
- "lib/scout/offsite.rb",
55
- "lib/scout/offsite/exceptions.rb",
56
- "lib/scout/offsite/ssh.rb",
57
- "lib/scout/offsite/step.rb",
58
- "lib/scout/offsite/sync.rb",
59
54
  "lib/scout/persist/engine.rb",
60
55
  "lib/scout/persist/engine/fix_width_table.rb",
61
56
  "lib/scout/persist/engine/packed_index.rb",
@@ -105,7 +100,9 @@ Gem::Specification.new do |s|
105
100
  "lib/scout/workflow/deployment/orchestrator.rb",
106
101
  "lib/scout/workflow/deployment/trace.rb",
107
102
  "lib/scout/workflow/documentation.rb",
103
+ "lib/scout/workflow/entity.rb",
108
104
  "lib/scout/workflow/exceptions.rb",
105
+ "lib/scout/workflow/export.rb",
109
106
  "lib/scout/workflow/path.rb",
110
107
  "lib/scout/workflow/step.rb",
111
108
  "lib/scout/workflow/step/archive.rb",
@@ -141,7 +138,6 @@ Gem::Specification.new do |s|
141
138
  "scout_commands/kb/show",
142
139
  "scout_commands/kb/traverse",
143
140
  "scout_commands/log",
144
- "scout_commands/offsite",
145
141
  "scout_commands/rbbt",
146
142
  "scout_commands/resource/produce",
147
143
  "scout_commands/template",
@@ -176,10 +172,6 @@ Gem::Specification.new do |s|
176
172
  "test/scout/knowledge_base/test_query.rb",
177
173
  "test/scout/knowledge_base/test_registry.rb",
178
174
  "test/scout/knowledge_base/test_traverse.rb",
179
- "test/scout/offsite/test_ssh.rb",
180
- "test/scout/offsite/test_step.rb",
181
- "test/scout/offsite/test_sync.rb",
182
- "test/scout/offsite/test_task.rb",
183
175
  "test/scout/persist/engine/test_fix_width_table.rb",
184
176
  "test/scout/persist/engine/test_packed_index.rb",
185
177
  "test/scout/persist/engine/test_sharder.rb",
@@ -197,7 +189,6 @@ Gem::Specification.new do |s|
197
189
  "test/scout/test_association.rb",
198
190
  "test/scout/test_entity.rb",
199
191
  "test/scout/test_knowledge_base.rb",
200
- "test/scout/test_offsite.rb",
201
192
  "test/scout/test_semaphore.rb",
202
193
  "test/scout/test_tsv.rb",
203
194
  "test/scout/test_work_queue.rb",
@@ -240,6 +231,7 @@ Gem::Specification.new do |s|
240
231
  "test/scout/workflow/task/test_inputs.rb",
241
232
  "test/scout/workflow/test_definition.rb",
242
233
  "test/scout/workflow/test_documentation.rb",
234
+ "test/scout/workflow/test_entity.rb",
243
235
  "test/scout/workflow/test_path.rb",
244
236
  "test/scout/workflow/test_step.rb",
245
237
  "test/scout/workflow/test_task.rb",
@@ -260,9 +252,6 @@ Gem::Specification.new do |s|
260
252
  s.add_runtime_dependency(%q<net-ssh>.freeze, [">= 0".freeze])
261
253
  s.add_runtime_dependency(%q<matrix>.freeze, [">= 0".freeze])
262
254
  s.add_runtime_dependency(%q<RubyInline>.freeze, [">= 0".freeze])
263
- s.add_development_dependency(%q<rdoc>.freeze, ["~> 3.12".freeze])
264
- s.add_development_dependency(%q<bundler>.freeze, ["~> 1.0".freeze])
265
255
  s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.1.0".freeze])
266
- s.add_development_dependency(%q<simplecov>.freeze, [">= 0".freeze])
267
256
  end
268
257
 
@@ -120,7 +120,7 @@ class TestTaskDependencies < Test::Unit::TestCase
120
120
  job = wf.job(:my_sum, :input1 => 2, :input2 => 3)
121
121
  assert_equal 5, job.run
122
122
 
123
- TmpFile.with_file(4) do |file|
123
+ TmpFile.with_file("4") do |file|
124
124
  job = wf.job(:my_sum, :input1 => 2, :input2 => 3, "TaskInputs#step2"=> file)
125
125
  assert_equal 6, job.run
126
126
  assert_not_equal Task::DEFAULT_NAME, job.name
@@ -238,7 +238,7 @@ class TestTaskDependencies < Test::Unit::TestCase
238
238
  input :input1, :string
239
239
  task :step1 => :string do |i| i end
240
240
 
241
- dep :step1, :input1 => 1 do |id,options|
241
+ dep :step1, :input1 => "1" do |id,options|
242
242
  {:inputs => options}
243
243
  end
244
244
  task :step2 => :string do |i| step(:step1).load end
@@ -271,7 +271,7 @@ class TestTaskDependencies < Test::Unit::TestCase
271
271
  input :input1, :string
272
272
  task :step1 => :string do |i| i end
273
273
 
274
- dep :step1, :input1 => 1 do |id,options|
274
+ dep :step1, :input1 => "1" do |id,options|
275
275
  [{:inputs => options}]
276
276
  end
277
277
  input :input2, :string
@@ -289,7 +289,7 @@ class TestTaskDependencies < Test::Unit::TestCase
289
289
  input :input1, :string
290
290
  task :step1 => :string do |i| i end
291
291
 
292
- dep :step1, :input1 => 1
292
+ dep :step1, :input1 => "1"
293
293
  input :input2, :string
294
294
  task :step2 => :string do |i| step(:step1).load end
295
295
  end
@@ -304,9 +304,9 @@ class TestTaskDependencies < Test::Unit::TestCase
304
304
  wf = Workflow.annonymous_workflow "TaskInputs" do
305
305
  input :input1, :integer, "", 1
306
306
  input :input2, :integer, "", 0
307
- task :step1 => :string do |i1,i2| i1 + i2 end
307
+ task :step1 => :string do |i1,i2| (i1 + i2).to_s end
308
308
 
309
- dep :step1, :input2 => 1
309
+ dep :step1, :input2 => "1"
310
310
  task :step2 => :string do |i| step(:step1).load end
311
311
 
312
312
  dep :step2
@@ -334,7 +334,7 @@ class TestTaskDependencies < Test::Unit::TestCase
334
334
  if i1 < 0
335
335
  raise ScoutException
336
336
  else
337
- i1
337
+ i1.to_s
338
338
  end
339
339
  end
340
340
 
@@ -64,7 +64,7 @@ class TestWorkflowDefinition < Test::Unit::TestCase
64
64
  refute Open.exist?(dep_path)
65
65
  Scout::Config::CACHE.replace old_cache
66
66
  assert_include job.archived_info, dep_path
67
- assert_equal :done, job.archived_info[dep_path][:status]
67
+ assert_equal :done, job.archived_info[dep_path][:status].to_sym
68
68
  end
69
69
 
70
70
  def test_task_alias_remove_dep_partial
@@ -95,7 +95,7 @@ class TestWorkflowDefinition < Test::Unit::TestCase
95
95
  assert call_name.done?
96
96
  Scout::Config::CACHE.replace old_cache
97
97
  assert_include job.archived_info, call_name.path
98
- assert_equal :done, job.archived_info[call_name.path][:status]
98
+ assert_equal :done, job.archived_info[call_name.path][:status].to_sym
99
99
  end
100
100
  end
101
101