scout-gear 10.4.0 → 10.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/.vimproject +100 -656
  3. data/Rakefile +1 -0
  4. data/VERSION +1 -1
  5. data/bin/scout +1 -3
  6. data/lib/scout/association/fields.rb +170 -0
  7. data/lib/scout/association/index.rb +229 -0
  8. data/lib/scout/association/item.rb +227 -0
  9. data/lib/scout/association/util.rb +7 -0
  10. data/lib/scout/association.rb +100 -0
  11. data/lib/scout/entity/format.rb +62 -0
  12. data/lib/scout/entity/identifiers.rb +111 -0
  13. data/lib/scout/entity/object.rb +20 -0
  14. data/lib/scout/entity/property.rb +165 -0
  15. data/lib/scout/entity.rb +41 -0
  16. data/lib/scout/offsite/step.rb +2 -2
  17. data/lib/scout/{tsv/persist → persist/engine}/fix_width_table.rb +25 -33
  18. data/lib/scout/persist/engine/packed_index.rb +100 -0
  19. data/lib/scout/persist/engine/sharder.rb +219 -0
  20. data/lib/scout/{tsv/persist → persist/engine}/tkrzw.rb +0 -17
  21. data/lib/scout/{tsv/persist → persist/engine}/tokyocabinet.rb +55 -31
  22. data/lib/scout/persist/engine.rb +4 -0
  23. data/lib/scout/{tsv/persist/adapter.rb → persist/tsv/adapter/base.rb} +80 -51
  24. data/lib/scout/persist/tsv/adapter/fix_width_table.rb +106 -0
  25. data/lib/scout/persist/tsv/adapter/packed_index.rb +95 -0
  26. data/lib/scout/persist/tsv/adapter/sharder.rb +54 -0
  27. data/lib/scout/persist/tsv/adapter/tkrzw.rb +18 -0
  28. data/lib/scout/persist/tsv/adapter/tokyocabinet.rb +65 -0
  29. data/lib/scout/persist/tsv/adapter.rb +6 -0
  30. data/lib/scout/{tsv/persist → persist/tsv}/serialize.rb +5 -0
  31. data/lib/scout/persist/tsv.rb +107 -0
  32. data/lib/scout/tsv/annotation/repo.rb +87 -0
  33. data/lib/scout/tsv/annotation.rb +169 -0
  34. data/lib/scout/tsv/attach.rb +97 -21
  35. data/lib/scout/tsv/change_id/translate.rb +148 -0
  36. data/lib/scout/tsv/change_id.rb +3 -0
  37. data/lib/scout/tsv/csv.rb +85 -0
  38. data/lib/scout/tsv/dumper.rb +113 -25
  39. data/lib/scout/tsv/index.rb +88 -36
  40. data/lib/scout/tsv/open.rb +21 -8
  41. data/lib/scout/tsv/parser.rb +153 -90
  42. data/lib/scout/tsv/path.rb +7 -2
  43. data/lib/scout/tsv/stream.rb +48 -6
  44. data/lib/scout/tsv/transformer.rb +5 -3
  45. data/lib/scout/tsv/traverse.rb +28 -19
  46. data/lib/scout/tsv/util/process.rb +7 -0
  47. data/lib/scout/tsv/util/reorder.rb +25 -15
  48. data/lib/scout/tsv/util/select.rb +9 -1
  49. data/lib/scout/tsv/util/sort.rb +90 -2
  50. data/lib/scout/tsv/util/unzip.rb +56 -0
  51. data/lib/scout/tsv/util.rb +52 -5
  52. data/lib/scout/tsv.rb +42 -27
  53. data/lib/scout/work_queue/socket.rb +8 -0
  54. data/lib/scout/work_queue/worker.rb +22 -5
  55. data/lib/scout/work_queue.rb +41 -24
  56. data/lib/scout/workflow/definition.rb +15 -12
  57. data/lib/scout/workflow/deployment/orchestrator.rb +21 -3
  58. data/lib/scout/workflow/deployment/trace.rb +205 -0
  59. data/lib/scout/workflow/deployment.rb +1 -0
  60. data/lib/scout/workflow/documentation.rb +1 -1
  61. data/lib/scout/workflow/step/archive.rb +42 -0
  62. data/lib/scout/workflow/step/children.rb +51 -0
  63. data/lib/scout/workflow/step/config.rb +1 -1
  64. data/lib/scout/workflow/step/dependencies.rb +25 -8
  65. data/lib/scout/workflow/step/file.rb +19 -0
  66. data/lib/scout/workflow/step/info.rb +37 -9
  67. data/lib/scout/workflow/step/progress.rb +11 -2
  68. data/lib/scout/workflow/step/status.rb +9 -1
  69. data/lib/scout/workflow/step.rb +80 -25
  70. data/lib/scout/workflow/task/dependencies.rb +5 -2
  71. data/lib/scout/workflow/task/inputs.rb +91 -41
  72. data/lib/scout/workflow/task.rb +54 -57
  73. data/lib/scout/workflow/usage.rb +1 -1
  74. data/lib/scout/workflow/util.rb +4 -0
  75. data/lib/scout/workflow.rb +110 -13
  76. data/lib/scout-gear.rb +2 -0
  77. data/lib/scout.rb +0 -1
  78. data/scout-gear.gemspec +78 -23
  79. data/scout_commands/rbbt +2 -0
  80. data/test/data/person/brothers +4 -0
  81. data/test/data/person/identifiers +10 -0
  82. data/test/data/person/marriages +3 -0
  83. data/test/data/person/parents +6 -0
  84. data/test/scout/association/test_fields.rb +105 -0
  85. data/test/scout/association/test_index.rb +70 -0
  86. data/test/scout/association/test_item.rb +21 -0
  87. data/test/scout/entity/test_format.rb +19 -0
  88. data/test/scout/entity/test_identifiers.rb +58 -0
  89. data/test/scout/entity/test_object.rb +0 -0
  90. data/test/scout/entity/test_property.rb +345 -0
  91. data/test/scout/{tsv/persist → persist/engine}/test_fix_width_table.rb +0 -1
  92. data/test/scout/persist/engine/test_packed_index.rb +99 -0
  93. data/test/scout/persist/engine/test_sharder.rb +31 -0
  94. data/test/scout/persist/engine/test_tkrzw.rb +0 -0
  95. data/test/scout/persist/engine/test_tokyocabinet.rb +17 -0
  96. data/test/scout/persist/test_tsv.rb +146 -0
  97. data/test/scout/{tsv/persist/test_adapter.rb → persist/tsv/adapter/test_base.rb} +3 -4
  98. data/test/scout/persist/tsv/adapter/test_fix_width_table.rb +46 -0
  99. data/test/scout/persist/tsv/adapter/test_packed_index.rb +37 -0
  100. data/test/scout/persist/tsv/adapter/test_serialize.rb +0 -0
  101. data/test/scout/persist/tsv/adapter/test_sharder.rb +290 -0
  102. data/test/scout/{tsv/persist → persist/tsv/adapter}/test_tkrzw.rb +3 -6
  103. data/test/scout/persist/tsv/adapter/test_tokyocabinet.rb +282 -0
  104. data/test/scout/persist/tsv/test_serialize.rb +12 -0
  105. data/test/scout/test_association.rb +51 -0
  106. data/test/scout/test_entity.rb +40 -0
  107. data/test/scout/test_tsv.rb +33 -4
  108. data/test/scout/test_work_queue.rb +5 -2
  109. data/test/scout/test_workflow.rb +31 -14
  110. data/test/scout/tsv/annotation/test_repo.rb +150 -0
  111. data/test/scout/tsv/change_id/test_translate.rb +178 -0
  112. data/test/scout/tsv/test_annotation.rb +52 -0
  113. data/test/scout/tsv/test_attach.rb +255 -1
  114. data/test/scout/tsv/test_change_id.rb +25 -0
  115. data/test/scout/tsv/test_csv.rb +50 -0
  116. data/test/scout/tsv/test_dumper.rb +38 -0
  117. data/test/scout/tsv/test_index.rb +82 -0
  118. data/test/scout/tsv/test_open.rb +44 -0
  119. data/test/scout/tsv/test_parser.rb +70 -0
  120. data/test/scout/tsv/test_stream.rb +22 -0
  121. data/test/scout/tsv/test_transformer.rb +27 -3
  122. data/test/scout/tsv/test_traverse.rb +78 -0
  123. data/test/scout/tsv/util/test_process.rb +16 -0
  124. data/test/scout/tsv/util/test_reorder.rb +67 -0
  125. data/test/scout/tsv/util/test_sort.rb +28 -1
  126. data/test/scout/tsv/util/test_unzip.rb +32 -0
  127. data/test/scout/work_queue/test_socket.rb +4 -1
  128. data/test/scout/workflow/deployment/test_orchestrator.rb +17 -26
  129. data/test/scout/workflow/deployment/test_trace.rb +25 -0
  130. data/test/scout/workflow/step/test_archive.rb +28 -0
  131. data/test/scout/workflow/step/test_children.rb +25 -0
  132. data/test/scout/workflow/step/test_info.rb +16 -0
  133. data/test/scout/workflow/task/test_dependencies.rb +16 -16
  134. data/test/scout/workflow/task/test_inputs.rb +45 -1
  135. data/test/scout/workflow/test_definition.rb +52 -0
  136. data/test/scout/workflow/test_step.rb +57 -0
  137. data/test/scout/workflow/test_task.rb +26 -1
  138. data/test/scout/workflow/test_usage.rb +4 -4
  139. data/test/test_helper.rb +23 -1
  140. metadata +69 -14
  141. data/lib/scout/tsv/persist.rb +0 -27
  142. data/test/scout/tsv/persist/test_tokyocabinet.rb +0 -120
  143. data/test/scout/tsv/test_persist.rb +0 -45
@@ -1,12 +1,12 @@
1
- require 'scout/meta_extension'
1
+ require 'scout/annotation'
2
2
  require 'scout/named_array'
3
3
  require_relative 'step'
4
4
  require_relative 'task/inputs'
5
5
  require_relative 'task/dependencies'
6
6
 
7
7
  module Task
8
- extend MetaExtension
9
- extension_attr :name, :type, :inputs, :deps, :directory, :description, :returns, :extension, :workflow
8
+ extend Annotation
9
+ annotation :name, :type, :inputs, :deps, :directory, :description, :returns, :extension, :workflow
10
10
 
11
11
  DEFAULT_NAME = "Default"
12
12
 
@@ -22,15 +22,6 @@ module Task
22
22
  @inputs ||= []
23
23
  end
24
24
 
25
- def recursive_inputs
26
- return inputs if deps.nil?
27
- deps.inject(inputs) do |acc,dep|
28
- workflow, task = dep
29
- next acc if workflow.nil? || task.nil?
30
- acc += workflow.tasks[task].recursive_inputs
31
- end
32
- end
33
-
34
25
  def directory
35
26
  @directory ||= Task.default_directory
36
27
  end
@@ -39,75 +30,81 @@ module Task
39
30
  binding.instance_exec(*inputs, &self)
40
31
  end
41
32
 
42
- def job(id = DEFAULT_NAME, provided_inputs = nil )
43
- provided_inputs, id = id, DEFAULT_NAME if (provided_inputs.nil? || provided_inputs.empty?) && (Hash === id || Array === id)
44
- provided_inputs = {} if provided_inputs.nil?
45
- IndiferentHash.setup(provided_inputs)
46
- id = DEFAULT_NAME if id.nil?
33
+ def job(id = nil, provided_inputs = nil)
34
+ Persist.memory("Task job", other_options: {task: self, id: id, provided_inputs: provided_inputs}) do
35
+ provided_inputs, id = id, nil if (provided_inputs.nil? || provided_inputs.empty?) && (Hash === id || Array === id)
36
+ provided_inputs = {} if provided_inputs.nil?
37
+ IndiferentHash.setup(provided_inputs)
47
38
 
39
+ if id.nil?
40
+ inputs.each do |name,type,desc,default,input_options|
41
+ next unless input_options && input_options[:jobname]
42
+ id = provided_inputs[name] || default
43
+ end
44
+ id = DEFAULT_NAME if id.nil?
45
+ end
48
46
 
49
- missing_inputs = []
50
- self.inputs.each do |input,type,desc,val,options|
51
- next unless options && options[:required]
52
- missing_inputs << input unless provided_inputs.include?(input)
53
- end if self.inputs
47
+ missing_inputs = []
48
+ self.inputs.each do |input,type,desc,val,options|
49
+ next unless options && options[:required]
50
+ missing_inputs << input unless provided_inputs.include?(input)
51
+ end if self.inputs
54
52
 
55
- if missing_inputs.length == 1
56
- raise ParameterException, "Input '#{missing_inputs.first}' is required but was not provided or is nil"
57
- end
53
+ if missing_inputs.length == 1
54
+ raise ParameterException, "Input '#{missing_inputs.first}' is required but was not provided or is nil"
55
+ end
58
56
 
59
- if missing_inputs.length > 1
60
- raise ParameterException, "Inputs #{Misc.humanize_list(missing_inputs)} are required but were not provided or are nil"
61
- end
57
+ if missing_inputs.length > 1
58
+ raise ParameterException, "Inputs #{Misc.humanize_list(missing_inputs)} are required but were not provided or are nil"
59
+ end
62
60
 
63
- provided_inputs = load_inputs(provided_inputs[:load_inputs]) if Hash === provided_inputs && provided_inputs[:load_inputs]
61
+ provided_inputs = load_inputs(provided_inputs.delete(:load_inputs)).merge(provided_inputs) if Hash === provided_inputs && provided_inputs[:load_inputs]
64
62
 
65
- inputs, non_default_inputs, input_digest_str = process_inputs provided_inputs, id
63
+ job_inputs, non_default_inputs, input_digest_str = process_inputs provided_inputs, id
66
64
 
67
- compute = {}
68
- dependencies = dependencies(id, provided_inputs, non_default_inputs, compute)
65
+ compute = {}
66
+ dependencies = dependencies(id, provided_inputs, non_default_inputs, compute)
69
67
 
70
- #non_default_inputs.concat provided_inputs.keys.select{|k| String === k && k.include?("#") } if Hash === provided_inputs
68
+ #non_default_inputs.concat provided_inputs.keys.select{|k| String === k && k.include?("#") } if Hash === provided_inputs
71
69
 
72
- non_default_inputs.uniq!
70
+ non_default_inputs.uniq!
73
71
 
74
- if non_default_inputs.any?
75
- hash = Misc.digest(:inputs => input_digest_str, :dependencies => dependencies)
76
- name = [id, hash] * "_"
77
- else
78
- name = id
79
- end
72
+ if non_default_inputs.any?
73
+ hash = Misc.digest(:inputs => input_digest_str, :dependencies => dependencies)
74
+ name = [id, hash] * "_"
75
+ else
76
+ name = id
77
+ end
80
78
 
81
- extension = self.extension
82
- if extension == :dep_task
83
- extension = nil
84
- if dependencies.any?
85
- dep_basename = File.basename(dependencies.last.path)
86
- if dep_basename.include? "."
87
- parts = dep_basename.split(".")
88
- extension = [parts.pop]
89
- while parts.last.length <= 4
90
- extension << parts.pop
79
+ extension = self.extension
80
+ if extension == :dep_task
81
+ extension = nil
82
+ if dependencies.any?
83
+ dep_basename = File.basename(dependencies.last.path)
84
+ if dep_basename.include? "."
85
+ parts = dep_basename.split(".")
86
+ extension = [parts.pop]
87
+ while parts.last.length <= 4
88
+ extension << parts.pop
89
+ end
90
+ extension = extension.reverse * "."
91
91
  end
92
- extension = extension.reverse * "."
93
92
  end
94
93
  end
95
- end
96
94
 
97
95
 
98
- path = directory[name]
96
+ path = directory[name]
99
97
 
100
- path = path.set_extension(extension) if extension
98
+ path = path.set_extension(extension) if extension
101
99
 
102
- Persist.memory(path) do
103
100
  if hash
104
101
  Log.debug "ID #{self.name} #{id} - #{hash}: #{Log.fingerprint(:input_digest => input_digest_str, :non_default_inputs => non_default_inputs, :dependencies => dependencies)}"
105
102
  else
106
103
  Log.debug "ID #{self.name} #{id} - Clean"
107
104
  end
108
- NamedArray.setup(inputs, @inputs.collect{|i| i[0] }) if @inputs
105
+ NamedArray.setup(job_inputs, @inputs.collect{|i| i[0] }) if @inputs
109
106
  step_provided_inputs = Hash === provided_inputs ? provided_inputs.slice(*non_default_inputs) : provided_inputs
110
- Step.new path.find, inputs, dependencies, id, non_default_inputs, step_provided_inputs, compute, &self
107
+ Step.new path.find, job_inputs, dependencies, id, non_default_inputs, step_provided_inputs, compute, &self
111
108
  end
112
109
  end
113
110
 
@@ -114,6 +114,7 @@ module Task
114
114
  def get_SOPT
115
115
  sopt_option_string = self.SOPT_str
116
116
  job_options = SOPT.get sopt_option_string
117
+
117
118
  recursive_inputs.uniq.each do |name,type|
118
119
  next unless type.to_s.include?('array')
119
120
  if job_options.include?(name) && (! Open.exist?(job_options[name]) || type.to_s.include?('file') || type.to_s.include?('path'))
@@ -285,7 +286,6 @@ module Workflow
285
286
  task = self.tasks[task_name]
286
287
  end
287
288
 
288
- #dependencies = self.rec_dependencies(task_name).collect{|dep_name| Array === dep_name ? dep_name.first.tasks[dep_name[1].to_sym] : self.tasks[dep_name.to_sym]}
289
289
  str.puts task.usage(self, self.recursive_deps(task_name))
290
290
 
291
291
  dep_tree = {[self, task_name] => dep_tree(task_name)}
@@ -8,6 +8,10 @@ module Workflow
8
8
  mod
9
9
  end
10
10
 
11
+ def self.installed_workflows
12
+ Path.setup("workflows").glob_all("*").collect{|f| File.basename(f) }.uniq
13
+ end
14
+
11
15
  def find_in_dependencies(name, dependencies)
12
16
  name = name.to_sym
13
17
  dependencies.select{|dep| dep.task_name.to_sym == name }
@@ -11,13 +11,45 @@ require 'scout/resource/scout'
11
11
 
12
12
  module Workflow
13
13
  class << self
14
- attr_accessor :workflows, :main
14
+ attr_accessor :workflows, :main, :workflow_dir, :autoinstall, :workflow_repo
15
15
  def workflows
16
16
  @workflows ||= []
17
17
  end
18
+
19
+ def workflow_dir
20
+ @workflow_dir ||
21
+ ENV["SCOUT_WORKFLOW_DIR"] ||
22
+ begin
23
+ workflow_dir_config = Path.setup("etc/workflow_dir")
24
+ if workflow_dir_config.exists?
25
+ Path.setup(workflow_dir_config.read.strip)
26
+ else
27
+ Path.setup('workflows').find(:user)
28
+ end
29
+ end
30
+ end
31
+
32
+ def workflow_repo
33
+ @workflow_repo ||
34
+ ENV["SCOUT_WORKFLOW_REPO"] ||
35
+ begin
36
+ workflow_repo_config = Path.setup("etc/workflow_repo")
37
+ if workflow_repo_config.exists?
38
+ workflow_repo_config.read.strip
39
+ else
40
+ 'https://github.com/Scout-Workflows/'
41
+ end
42
+ end
43
+ end
44
+
45
+ def autoinstall
46
+ @autoinstall || ENV["SCOUT_WORKFLOW_AUTOINSTALL"] = "true"
47
+ end
48
+
18
49
  end
19
50
 
20
51
  attr_accessor :libdir
52
+
21
53
  def self.extended(base)
22
54
  self.workflows << base
23
55
  libdir = Path.caller_lib_dir
@@ -25,22 +57,87 @@ module Workflow
25
57
  base.libdir = Path.setup(libdir).tap{|p| p.resource = base}
26
58
  end
27
59
 
60
+ def self.update_workflow_dir(workflow_dir)
61
+ Misc.in_dir(workflow_dir) do
62
+ Log.info "Updating: " + workflow_dir
63
+ `git pull`
64
+ `git submodule init`
65
+ `git submodule update`
66
+ end
67
+ end
68
+
69
+ def self.install_workflow(workflow, base_repo_url = nil)
70
+ case
71
+ when File.exist?(workflow)
72
+ update_workflow_dir(workflow)
73
+ else
74
+ Misc.in_dir(self.workflow_dir) do
75
+ Log.info "Installing: " + workflow
76
+
77
+ repo_base_url ||= self.workflow_repo
78
+
79
+
80
+ if repo_base_url.include?(workflow) or repo_base_url.include?(Misc.snake_case(workflow))
81
+ repo = repo_base_url
82
+ else
83
+ begin
84
+ repo = File.join(repo_base_url, workflow + '.git')
85
+ CMD.cmd("wget '#{repo}' -O /dev/null").read
86
+ rescue
87
+ Log.debug "Workflow repo does not exist, trying snake_case: #{ repo }"
88
+ begin
89
+ repo = File.join(repo_base_url, Misc.snake_case(workflow) + '.git')
90
+ CMD.cmd("wget '#{repo}' -O /dev/null").read
91
+ rescue
92
+ raise "Workflow repo does not exist: #{ repo }"
93
+ end
94
+ end
95
+ end
96
+
97
+ Log.warn "Cloning #{ repo }"
98
+ Misc.insist do
99
+ `git clone "#{repo}" #{ Misc.snake_case(workflow) }`
100
+ raise unless $?.success?
101
+ end
102
+ Log.warn "Initializing and updating submodules for #{repo}. You might be prompted for passwords."
103
+ Misc.in_dir(Misc.snake_case(workflow)) do
104
+ `git submodule init`
105
+ `git submodule update`
106
+ end
107
+ end
108
+ end
109
+ end
110
+
111
+ def self.require_workflow_file(file)
112
+ file = file.find if Path === file
113
+ $LOAD_PATH.unshift(File.join(File.dirname(file), 'lib'))
114
+ load file
115
+ end
116
+
28
117
  def self.require_workflow(workflow_name_orig)
29
118
  first = nil
30
119
  workflow_name_orig.split("+").each do |complete_workflow_name|
31
120
  self.main = nil
32
- workflow_name, *subworkflows = complete_workflow_name.split("::")
33
- workflow = workflow_name
34
- workflow = Path.setup('workflows')[workflow_name]["workflow.rb"] unless Open.exists?(workflow)
35
- workflow = Path.setup('workflows')[Misc.snake_case(workflow_name)]["workflow.rb"] unless Open.exists?(workflow)
36
- workflow = Path.setup('workflows')[Misc.camel_case(workflow_name)]["workflow.rb"] unless Open.exists?(workflow)
37
- if Open.exists?(workflow)
38
- self.main = nil
39
- workflow = workflow.find if Path === workflow
40
- $LOAD_PATH.unshift(File.join(File.dirname(workflow), 'lib'))
41
- load workflow
42
- else
43
- raise "Workflow #{workflow_name} not found"
121
+
122
+ Persist.memory(complete_workflow_name, prefix: "Workflow") do
123
+ begin
124
+ workflow_name, *subworkflows = complete_workflow_name.split("::")
125
+ workflow_file = workflow_name
126
+ workflow_file = Path.setup('workflows')[workflow_name]["workflow.rb"] unless Open.exists?(workflow_file)
127
+ workflow_file = Path.setup('workflows')[Misc.snake_case(workflow_name)]["workflow.rb"] unless Open.exists?(workflow_file)
128
+ workflow_file = Path.setup('workflows')[Misc.camel_case(workflow_name)]["workflow.rb"] unless Open.exists?(workflow_file)
129
+ if Open.exists?(workflow_file)
130
+ self.main = nil
131
+ require_workflow_file(workflow_file)
132
+ elsif autoinstall
133
+ install_workflow(workflow_name)
134
+ raise TryAgain
135
+ else
136
+ raise "Workflow #{workflow_name} not found"
137
+ end
138
+ rescue TryAgain
139
+ retry
140
+ end
44
141
  end
45
142
 
46
143
  current = begin
data/lib/scout-gear.rb CHANGED
@@ -1,3 +1,5 @@
1
1
  require 'scout-essentials'
2
2
  require_relative 'scout/tsv'
3
3
  require_relative 'scout/offsite'
4
+
5
+ Path.path_maps[:scout_gear] = File.join(Path.caller_lib_dir(__FILE__), "{TOPLEVEL}/{SUBPATH}")
data/lib/scout.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'workflow-scout'
2
- require 'rbbt-scout'
3
2
 
4
3
  module Scout
5
4
  def self.version
data/scout-gear.gemspec CHANGED
@@ -2,16 +2,16 @@
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.4.0 ruby lib
5
+ # stub: scout-gear 10.7.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "scout-gear".freeze
9
- s.version = "10.4.0"
9
+ s.version = "10.7.0".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 = "2023-08-09"
14
+ s.date = "2024-06-05"
15
15
  s.description = "Temporary files, logs, path, resources, persistence, workflows, TSV, etc.".freeze
16
16
  s.email = "mikisvaz@gmail.com".freeze
17
17
  s.executables = ["scout".freeze]
@@ -33,26 +33,49 @@ Gem::Specification.new do |s|
33
33
  "lib/rbbt-scout.rb",
34
34
  "lib/scout-gear.rb",
35
35
  "lib/scout.rb",
36
+ "lib/scout/association.rb",
37
+ "lib/scout/association/fields.rb",
38
+ "lib/scout/association/index.rb",
39
+ "lib/scout/association/item.rb",
40
+ "lib/scout/association/util.rb",
41
+ "lib/scout/entity.rb",
42
+ "lib/scout/entity/format.rb",
43
+ "lib/scout/entity/identifiers.rb",
44
+ "lib/scout/entity/object.rb",
45
+ "lib/scout/entity/property.rb",
36
46
  "lib/scout/offsite.rb",
37
47
  "lib/scout/offsite/exceptions.rb",
38
48
  "lib/scout/offsite/ssh.rb",
39
49
  "lib/scout/offsite/step.rb",
40
50
  "lib/scout/offsite/sync.rb",
51
+ "lib/scout/persist/engine.rb",
52
+ "lib/scout/persist/engine/fix_width_table.rb",
53
+ "lib/scout/persist/engine/packed_index.rb",
54
+ "lib/scout/persist/engine/sharder.rb",
55
+ "lib/scout/persist/engine/tkrzw.rb",
56
+ "lib/scout/persist/engine/tokyocabinet.rb",
57
+ "lib/scout/persist/tsv.rb",
58
+ "lib/scout/persist/tsv/adapter.rb",
59
+ "lib/scout/persist/tsv/adapter/base.rb",
60
+ "lib/scout/persist/tsv/adapter/fix_width_table.rb",
61
+ "lib/scout/persist/tsv/adapter/packed_index.rb",
62
+ "lib/scout/persist/tsv/adapter/sharder.rb",
63
+ "lib/scout/persist/tsv/adapter/tkrzw.rb",
64
+ "lib/scout/persist/tsv/adapter/tokyocabinet.rb",
65
+ "lib/scout/persist/tsv/serialize.rb",
41
66
  "lib/scout/semaphore.rb",
42
67
  "lib/scout/tsv.rb",
68
+ "lib/scout/tsv/annotation.rb",
69
+ "lib/scout/tsv/annotation/repo.rb",
43
70
  "lib/scout/tsv/attach.rb",
44
71
  "lib/scout/tsv/change_id.rb",
72
+ "lib/scout/tsv/change_id/translate.rb",
73
+ "lib/scout/tsv/csv.rb",
45
74
  "lib/scout/tsv/dumper.rb",
46
75
  "lib/scout/tsv/index.rb",
47
76
  "lib/scout/tsv/open.rb",
48
77
  "lib/scout/tsv/parser.rb",
49
78
  "lib/scout/tsv/path.rb",
50
- "lib/scout/tsv/persist.rb",
51
- "lib/scout/tsv/persist/adapter.rb",
52
- "lib/scout/tsv/persist/fix_width_table.rb",
53
- "lib/scout/tsv/persist/serialize.rb",
54
- "lib/scout/tsv/persist/tkrzw.rb",
55
- "lib/scout/tsv/persist/tokyocabinet.rb",
56
79
  "lib/scout/tsv/stream.rb",
57
80
  "lib/scout/tsv/transformer.rb",
58
81
  "lib/scout/tsv/traverse.rb",
@@ -72,8 +95,11 @@ Gem::Specification.new do |s|
72
95
  "lib/scout/workflow/definition.rb",
73
96
  "lib/scout/workflow/deployment.rb",
74
97
  "lib/scout/workflow/deployment/orchestrator.rb",
98
+ "lib/scout/workflow/deployment/trace.rb",
75
99
  "lib/scout/workflow/documentation.rb",
76
100
  "lib/scout/workflow/step.rb",
101
+ "lib/scout/workflow/step/archive.rb",
102
+ "lib/scout/workflow/step/children.rb",
77
103
  "lib/scout/workflow/step/config.rb",
78
104
  "lib/scout/workflow/step/dependencies.rb",
79
105
  "lib/scout/workflow/step/file.rb",
@@ -114,26 +140,52 @@ Gem::Specification.new do |s|
114
140
  "share/software/install_helpers",
115
141
  "share/templates/command",
116
142
  "share/templates/workflow.rb",
143
+ "test/data/person/brothers",
144
+ "test/data/person/identifiers",
145
+ "test/data/person/marriages",
146
+ "test/data/person/parents",
147
+ "test/scout/association/test_fields.rb",
148
+ "test/scout/association/test_index.rb",
149
+ "test/scout/association/test_item.rb",
150
+ "test/scout/entity/test_format.rb",
151
+ "test/scout/entity/test_identifiers.rb",
152
+ "test/scout/entity/test_object.rb",
153
+ "test/scout/entity/test_property.rb",
117
154
  "test/scout/offsite/test_ssh.rb",
118
155
  "test/scout/offsite/test_step.rb",
119
156
  "test/scout/offsite/test_sync.rb",
120
157
  "test/scout/offsite/test_task.rb",
158
+ "test/scout/persist/engine/test_fix_width_table.rb",
159
+ "test/scout/persist/engine/test_packed_index.rb",
160
+ "test/scout/persist/engine/test_sharder.rb",
161
+ "test/scout/persist/engine/test_tkrzw.rb",
162
+ "test/scout/persist/engine/test_tokyocabinet.rb",
163
+ "test/scout/persist/test_tsv.rb",
164
+ "test/scout/persist/tsv/adapter/test_base.rb",
165
+ "test/scout/persist/tsv/adapter/test_fix_width_table.rb",
166
+ "test/scout/persist/tsv/adapter/test_packed_index.rb",
167
+ "test/scout/persist/tsv/adapter/test_serialize.rb",
168
+ "test/scout/persist/tsv/adapter/test_sharder.rb",
169
+ "test/scout/persist/tsv/adapter/test_tkrzw.rb",
170
+ "test/scout/persist/tsv/adapter/test_tokyocabinet.rb",
171
+ "test/scout/persist/tsv/test_serialize.rb",
172
+ "test/scout/test_association.rb",
173
+ "test/scout/test_entity.rb",
121
174
  "test/scout/test_offsite.rb",
122
175
  "test/scout/test_semaphore.rb",
123
176
  "test/scout/test_tsv.rb",
124
177
  "test/scout/test_work_queue.rb",
125
178
  "test/scout/test_workflow.rb",
126
- "test/scout/tsv/persist/test_adapter.rb",
127
- "test/scout/tsv/persist/test_fix_width_table.rb",
128
- "test/scout/tsv/persist/test_tkrzw.rb",
129
- "test/scout/tsv/persist/test_tokyocabinet.rb",
179
+ "test/scout/tsv/annotation/test_repo.rb",
180
+ "test/scout/tsv/change_id/test_translate.rb",
181
+ "test/scout/tsv/test_annotation.rb",
130
182
  "test/scout/tsv/test_attach.rb",
131
183
  "test/scout/tsv/test_change_id.rb",
184
+ "test/scout/tsv/test_csv.rb",
132
185
  "test/scout/tsv/test_dumper.rb",
133
186
  "test/scout/tsv/test_index.rb",
134
187
  "test/scout/tsv/test_open.rb",
135
188
  "test/scout/tsv/test_parser.rb",
136
- "test/scout/tsv/test_persist.rb",
137
189
  "test/scout/tsv/test_stream.rb",
138
190
  "test/scout/tsv/test_transformer.rb",
139
191
  "test/scout/tsv/test_traverse.rb",
@@ -148,6 +200,9 @@ Gem::Specification.new do |s|
148
200
  "test/scout/work_queue/test_socket.rb",
149
201
  "test/scout/work_queue/test_worker.rb",
150
202
  "test/scout/workflow/deployment/test_orchestrator.rb",
203
+ "test/scout/workflow/deployment/test_trace.rb",
204
+ "test/scout/workflow/step/test_archive.rb",
205
+ "test/scout/workflow/step/test_children.rb",
151
206
  "test/scout/workflow/step/test_dependencies.rb",
152
207
  "test/scout/workflow/step/test_info.rb",
153
208
  "test/scout/workflow/step/test_load.rb",
@@ -167,18 +222,18 @@ Gem::Specification.new do |s|
167
222
  ]
168
223
  s.homepage = "http://github.com/mikisvaz/scout-gear".freeze
169
224
  s.licenses = ["MIT".freeze]
170
- s.rubygems_version = "3.5.0.dev".freeze
225
+ s.rubygems_version = "3.5.10".freeze
171
226
  s.summary = "basic gear for scouts".freeze
172
227
 
173
228
  s.specification_version = 4
174
229
 
175
- s.add_runtime_dependency(%q<scout-essentials>.freeze, [">= 0"])
176
- s.add_runtime_dependency(%q<net-ssh>.freeze, [">= 0"])
177
- s.add_runtime_dependency(%q<matrix>.freeze, [">= 0"])
178
- s.add_runtime_dependency(%q<RubyInline>.freeze, [">= 0"])
179
- s.add_development_dependency(%q<rdoc>.freeze, ["~> 3.12"])
180
- s.add_development_dependency(%q<bundler>.freeze, ["~> 1.0"])
181
- s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
182
- s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
230
+ s.add_runtime_dependency(%q<scout-essentials>.freeze, [">= 0".freeze])
231
+ s.add_runtime_dependency(%q<net-ssh>.freeze, [">= 0".freeze])
232
+ s.add_runtime_dependency(%q<matrix>.freeze, [">= 0".freeze])
233
+ s.add_runtime_dependency(%q<RubyInline>.freeze, [">= 0".freeze])
234
+ s.add_development_dependency(%q<rdoc>.freeze, ["~> 3.12".freeze])
235
+ s.add_development_dependency(%q<bundler>.freeze, ["~> 1.0".freeze])
236
+ s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.1.0".freeze])
237
+ s.add_development_dependency(%q<simplecov>.freeze, [">= 0".freeze])
183
238
  end
184
239
 
data/scout_commands/rbbt CHANGED
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require 'rbbt-scout'
4
+
3
5
  case
4
6
  when File.exist?(file = File.join(__dir__, '../modules/rbbt-util/bin/rbbt'))
5
7
  $LOAD_PATH.unshift(lib_dir = File.join(file, '../..', 'lib'))
@@ -0,0 +1,4 @@
1
+ #: :sep=,#:type=:list
2
+ #Older,Younger
3
+ Clei,Guille
4
+ Isa,Miki
@@ -0,0 +1,10 @@
1
+ #: :sep=,#:type=:list
2
+ #Name,Alias,ID
3
+ Miguel,Miki,001
4
+ Cleia,Clei,002
5
+ Isabel,Isa,003
6
+ Guillermo,Guille,004
7
+ Juan Luis,Juan,005
8
+ Maria Luz,Mariluz,006
9
+ Domingo,Domingo,007
10
+ Gloria,Gloria,008
@@ -0,0 +1,3 @@
1
+ #: :type=:list
2
+ #Husband (ID) Wife (ID) Date
3
+ 001 002 2021
@@ -0,0 +1,6 @@
1
+ #: :sep=,#:type=:double
2
+ #Child (Alias),Parent (Alias),Type of parent
3
+ Miki,Juan|Mariluz,father|mother
4
+ Isa,Juan|Mariluz,father|mother
5
+ Guille,Domingo|Gloria,father|mother
6
+ Clei,Domingo|Gloria,father|mother