eco-helpers 3.0.4 → 3.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -0
  3. data/CHANGELOG.md +44 -4
  4. data/eco-helpers.gemspec +1 -1
  5. data/lib/eco/api/common/class_helpers.rb +24 -23
  6. data/lib/eco/api/common/class_meta_basics.rb +0 -2
  7. data/lib/eco/api/common/loaders/use_case.rb +1 -0
  8. data/lib/eco/api/common/people/entry_factory.rb +6 -4
  9. data/lib/eco/api/common/people/person_entry.rb +4 -6
  10. data/lib/eco/api/common/people/person_entry_attribute_mapper.rb +25 -12
  11. data/lib/eco/api/common/people/person_parser.rb +8 -0
  12. data/lib/eco/api/common/session/base_session.rb +1 -1
  13. data/lib/eco/api/common/session/environment.rb +7 -0
  14. data/lib/eco/api/common/session/file_manager.rb +15 -8
  15. data/lib/eco/api/common/session/logger/cache.rb +14 -10
  16. data/lib/eco/api/common/session/logger/log.rb +8 -7
  17. data/lib/eco/api/common/session/mailer.rb +22 -13
  18. data/lib/eco/api/common/session/s3_uploader.rb +29 -20
  19. data/lib/eco/api/microcases/people_search.rb +1 -1
  20. data/lib/eco/api/organization/login_providers.rb +11 -4
  21. data/lib/eco/api/organization/node_classifications.rb +3 -0
  22. data/lib/eco/api/organization/presets_factory.rb +37 -31
  23. data/lib/eco/api/organization/tag_tree.rb +14 -5
  24. data/lib/eco/api/policies/default_policies/99_user_access_policy.rb +28 -18
  25. data/lib/eco/api/session/batch/errors.rb +38 -20
  26. data/lib/eco/api/session/batch/job.rb +252 -135
  27. data/lib/eco/api/session/batch/status.rb +55 -36
  28. data/lib/eco/api/session/batch.rb +2 -2
  29. data/lib/eco/api/session/config/base_config.rb +12 -11
  30. data/lib/eco/api/session/config/tagtree.rb +10 -14
  31. data/lib/eco/api/session/config/workflow.rb +15 -3
  32. data/lib/eco/api/session/config.rb +19 -26
  33. data/lib/eco/api/session.rb +13 -4
  34. data/lib/eco/api/usecases/cli.rb +4 -0
  35. data/lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb +18 -0
  36. data/lib/eco/api/usecases/default/locations/cli/csv_to_tree_cli.rb +12 -0
  37. data/lib/eco/api/usecases/default/locations/cli/tagtree_paths_cli.rb +12 -0
  38. data/lib/eco/api/usecases/default/locations/codes_to_tags_case.rb +32 -13
  39. data/lib/eco/api/usecases/default/locations/csv_to_tree_case.rb +15 -5
  40. data/lib/eco/api/usecases/default/locations/tagtree_extract_case.rb +6 -0
  41. data/lib/eco/api/usecases/default/locations/tagtree_paths_case.rb +51 -0
  42. data/lib/eco/api/usecases/default/locations.rb +1 -1
  43. data/lib/eco/api/usecases/default/people/amend/cli/reinvite_sync_cli.rb +8 -0
  44. data/lib/eco/api/usecases/default/people/amend/cli/reinvite_trans_cli.rb +11 -0
  45. data/lib/eco/api/usecases/default/people/amend/cli/restore_db_cli.rb +26 -0
  46. data/lib/eco/api/usecases/default/people/amend/reinvite_sync_case.rb +2 -0
  47. data/lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb +2 -0
  48. data/lib/eco/api/usecases/default/people/amend/restore_db_case.rb +3 -0
  49. data/lib/eco/api/usecases/default/people/treat/analyse_people_case.rb +15 -5
  50. data/lib/eco/api/usecases/default/people/treat/cli/analyse_people_cli.rb +66 -0
  51. data/lib/eco/api/usecases/default/people/treat/cli/org_data_convert_cli.rb +35 -0
  52. data/lib/eco/api/usecases/default/people/treat/cli/supers_cyclic_identify_cli.rb +15 -0
  53. data/lib/eco/api/usecases/default/people/treat/cli/supers_hierachy_cli.rb +15 -0
  54. data/lib/eco/api/usecases/default/people/treat/org_data_convert_case.rb +11 -5
  55. data/lib/eco/api/usecases/default/people/treat/supers_cyclic_identify_case.rb +28 -7
  56. data/lib/eco/api/usecases/default/people/treat/supers_hierarchy_case.rb +32 -9
  57. data/lib/eco/api/usecases/default/people/utils/set_default_tag_case.rb +2 -1
  58. data/lib/eco/api/usecases/default_cases/to_csv_case.rb +2 -2
  59. data/lib/eco/api/usecases/graphql/helpers/location/base/classifications_parser.rb +5 -0
  60. data/lib/eco/api/usecases/graphql/helpers/location/command/diffs/stages/commandable.rb +2 -0
  61. data/lib/eco/api/usecases/graphql/helpers/location/command/diffs/stages/diff_sortable.rb +2 -0
  62. data/lib/eco/api/usecases/graphql/helpers/location/command/result.rb +2 -1
  63. data/lib/eco/api/usecases/graphql/helpers/location/command/results.rb +3 -0
  64. data/lib/eco/api/usecases/graphql/helpers/location/command.rb +1 -0
  65. data/lib/eco/api/usecases/graphql/helpers/location/tags_remap.rb +3 -0
  66. data/lib/eco/api/usecases/graphql/samples/location/command/service/tree_update.rb +2 -0
  67. data/lib/eco/api/usecases/graphql/samples/location/command/track_changed_ids.rb +1 -0
  68. data/lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/classifications.rb +2 -0
  69. data/lib/eco/api/usecases/graphql/samples/location/service/tree_diff.rb +6 -2
  70. data/lib/eco/api/usecases/graphql/samples/location/service/tree_to_list/converter/parser.rb +6 -2
  71. data/lib/eco/api/usecases/graphql/samples/location/service/tree_to_list/converter.rb +2 -0
  72. data/lib/eco/api/usecases/ooze_cases/export_register_case.rb +1 -0
  73. data/lib/eco/api/usecases/ooze_samples/helpers_migration/copying.rb +66 -29
  74. data/lib/eco/api/usecases/ooze_samples/ooze_base_case.rb +25 -3
  75. data/lib/eco/api/usecases/ooze_samples/register_update_case.rb +10 -0
  76. data/lib/eco/api/usecases/use_case.rb +3 -1
  77. data/lib/eco/cli/config/use_cases.rb +4 -0
  78. data/lib/eco/cli/scripting/args_helpers.rb +3 -2
  79. data/lib/eco/cli/scripting/argument.rb +2 -2
  80. data/lib/eco/cli_default/input.rb +49 -45
  81. data/lib/eco/cli_default/input_filters.rb +32 -17
  82. data/lib/eco/cli_default/options.rb +8 -4
  83. data/lib/eco/cli_default/people.rb +1 -1
  84. data/lib/eco/cli_default/people_filters.rb +32 -24
  85. data/lib/eco/cli_default/usecases.rb +8 -121
  86. data/lib/eco/cli_default/workflow.rb +6 -4
  87. data/lib/eco/csv/split.rb +2 -0
  88. data/lib/eco/csv/table.rb +13 -0
  89. data/lib/eco/data/files/encoding.rb +15 -8
  90. data/lib/eco/data/files/helpers.rb +6 -2
  91. data/lib/eco/data/hashes/diff_result.rb +5 -0
  92. data/lib/eco/data/locations/node_diff/nodes_diff.rb +13 -0
  93. data/lib/eco/data/locations/node_diff.rb +4 -0
  94. data/lib/eco/data/locations/node_level.rb +6 -0
  95. data/lib/eco/language/auxiliar_logger.rb +2 -0
  96. data/lib/eco/version.rb +1 -1
  97. data/lib/eco-helpers.rb +1 -1
  98. metadata +15 -6
  99. data/lib/eco/api/usecases/default/locations/create_tag_paths_case.rb +0 -25
  100. data/lib/eco/api/usecases/default/people/amend/reinvite_trans_cli.rb +0 -4
data/lib/eco/csv/table.rb CHANGED
@@ -5,6 +5,7 @@ module Eco
5
5
  # - when `Array<Array>` => all `rows` as arrays where first array is the **header**
6
6
  def initialize(input)
7
7
  super(to_rows_array(input))
8
+
8
9
  delete_if do |row|
9
10
  values = row.fields
10
11
  values.all?(&:nil?) || values.map(&:to_s).all?(&:empty?)
@@ -21,6 +22,7 @@ module Eco
21
22
  row[header] = value.empty?? nil : value
22
23
  end
23
24
  end
25
+
24
26
  self
25
27
  end
26
28
 
@@ -41,9 +43,11 @@ module Eco
41
43
  # @return [Eco::CSV::Table]
42
44
  def transform_headers
43
45
  cols = columns
46
+
44
47
  cols.each do |col|
45
48
  col[0] = yield(col.first)
46
49
  end
50
+
47
51
  columns_to_table(cols)
48
52
  end
49
53
 
@@ -70,6 +74,7 @@ module Eco
70
74
  end
71
75
  end
72
76
  end
77
+
73
78
  self.class.new(out_rows)
74
79
  end
75
80
 
@@ -83,6 +88,7 @@ module Eco
83
88
  def transform_values
84
89
  transformed_rows = rows.map do |row|
85
90
  res = yield(row)
91
+
86
92
  case res
87
93
  when Array
88
94
  ::CSV::Row.new(row.headers, res)
@@ -90,6 +96,7 @@ module Eco
90
96
  res
91
97
  end
92
98
  end
99
+
93
100
  self.class.new(transformed_rows)
94
101
  end
95
102
 
@@ -136,6 +143,7 @@ module Eco
136
143
  def add_column(header_name, pos: -1)
137
144
  header_name = header_name.to_s.strip
138
145
  raise ArgumentError, "header_name can't be blank" if header_name.empty?
146
+
139
147
  new_col = Array.new(length).unshift(header_name)
140
148
  columns_to_table(columns.insert(pos, new_col))
141
149
  end
@@ -146,6 +154,7 @@ module Eco
146
154
  # @return [Eco::CSV::Table] with a new column named `name` with the row number
147
155
  def add_index_column(header_name = 'idx', pos: 0)
148
156
  header_name = header_name.to_s.strip
157
+
149
158
  add_column(header_name, pos: pos).tap do |table|
150
159
  table.each.with_index do |row, idx|
151
160
  row[header_name] = idx + 2
@@ -163,6 +172,7 @@ module Eco
163
172
  # It removes all rows where all columns' values are the same
164
173
  def delete_duplicates!
165
174
  unique_rows = []
175
+
166
176
  by_row!.delete_if do |row|
167
177
  unique_rows.any? {|done| equal_rows?(row, done)}.tap do |found|
168
178
  unique_rows << row unless found
@@ -218,6 +228,7 @@ module Eco
218
228
  def columns_to_table(columns_array)
219
229
  rows_data = columns_array.transpose
220
230
  return self.class.new(rows_data) if rows_data.length.positive?
231
+
221
232
  raise ArgumentError, "Expecting 'columns_array' to at least have header. Given: #{columns_array}"
222
233
  end
223
234
 
@@ -232,6 +243,7 @@ module Eco
232
243
  when Enumerable
233
244
  data = data.dup.compact
234
245
  return data unless data.count.positive?
246
+
235
247
  sample = data.first
236
248
 
237
249
  case sample
@@ -264,6 +276,7 @@ module Eco
264
276
 
265
277
  def if_array_to_pipe_string(value)
266
278
  return value unless value.is_a?(Array)
279
+
267
280
  value.join('|')
268
281
  end
269
282
  end
@@ -4,7 +4,7 @@ module Eco
4
4
  module Encoding
5
5
  include Eco::Language::AuxiliarLogger
6
6
 
7
- BOM_BYTES = [239, 187, 191]
7
+ BOM_BYTES = [239, 187, 191].freeze
8
8
 
9
9
  def has_bom?(path)
10
10
  return false if !path || file_empty?(path)
@@ -16,9 +16,10 @@ module Eco
16
16
 
17
17
  def get_file_content_with_encoding(file, encoding: nil)
18
18
  encoding ||= scoped_encoding(file)
19
+
19
20
  unless !encoding || encoding == 'utf-8'
20
21
  msg = "File encoding: '#{encoding}'"
21
- logger.debug(msg)
22
+ log(:debug) { msg }
22
23
  puts msg
23
24
  end
24
25
 
@@ -29,7 +30,9 @@ module Eco
29
30
  else
30
31
  content = File.read(file, encoding: encoding)
31
32
  end
32
- return nil unless content
33
+
34
+ return unless content
35
+
33
36
  content = content.encode("utf-8") unless encoding.include?('utf-8')
34
37
  content
35
38
  end
@@ -42,6 +45,7 @@ module Eco
42
45
  content = content.sub(bom, '')
43
46
  content.force_encoding('utf-8')
44
47
  end
48
+
45
49
  content
46
50
  end
47
51
 
@@ -52,21 +56,24 @@ module Eco
52
56
  # Gives the parameter as it should
53
57
  def scoped_encoding(path)
54
58
  unless file_exists?(path)
55
- logger.error("File does not exist: #{path}")
59
+ log(:error) { "File does not exist: #{path}" }
56
60
  return nil
57
61
  end
62
+
58
63
  encoding ||= encoding(path)
59
- encoding = (encoding == "bom") ? "#{encoding}|utf-8": encoding
64
+ encoding = "#{encoding}|utf-8" if encoding == "bom"
60
65
  encoding
61
66
  end
62
67
 
63
68
  def file_exists?(file)
64
- return false if !file
65
- return File.exist?(file) || File.exist?(File.expand_path(file))
69
+ return false unless file
70
+
71
+ File.exist?(file) || File.exist?(File.expand_path(file))
66
72
  end
67
73
 
68
74
  def file_empty?(path)
69
- return true if !File.file?(path)
75
+ return true unless File.file?(path)
76
+
70
77
  File.zero?(path)
71
78
  end
72
79
  end
@@ -30,11 +30,15 @@ module Eco
30
30
  replacement = "<#{bytes.unpack1('H*')}>"
31
31
 
32
32
  if tolerance <= 0
33
- logger.error("There were more than 5 encoding errors in the file '#{file}'.")
33
+ log(:error) {
34
+ "There were more than 5 encoding errors in the file '#{file}'."
35
+ }
34
36
  return content
35
37
  else
36
38
  tolerance -= 1
37
- logger.error("Encoding problem in file '#{file}': '#{replacement}'.")
39
+ log(:error) {
40
+ "Encoding problem in file '#{file}': '#{replacement}'."
41
+ }
38
42
  replacement
39
43
  end
40
44
  end
@@ -48,8 +48,10 @@ module Eco
48
48
  # between `src_1` and `src_2`.
49
49
  def diff_attrs
50
50
  return (@diff_attrs = []) if new? || del?
51
+
51
52
  @diff_attrs ||= all_compared_attrs.each_with_object([]) do |kattr, out|
52
53
  next unless comparable_attr?(kattr)
54
+
53
55
  out << kattr unless eq?(attr_prev(kattr), attr(kattr))
54
56
  end
55
57
  end
@@ -71,6 +73,7 @@ module Eco
71
73
  def diff_attr?(attr)
72
74
  return true if new?
73
75
  return true if del?
76
+
74
77
  diff_attrs.include?(attr.to_s)
75
78
  end
76
79
 
@@ -80,6 +83,7 @@ module Eco
80
83
  target_attrs = [key] | all_compared_attrs
81
84
  return slice_attrs(src_2, *target_attrs) if new?
82
85
  return slice_attrs(src_1, key) if del?
86
+
83
87
  slice_attrs(src_2, key, *diff_attrs)
84
88
  end
85
89
 
@@ -109,6 +113,7 @@ module Eco
109
113
  attr = attr.to_s
110
114
  return false unless all_compared_attrs.include?(attr)
111
115
  return true unless self.class.compared_attr_when_present?(attr)
116
+
112
117
  key_present_in_both?(attr)
113
118
  end
114
119
 
@@ -28,6 +28,7 @@ class Eco::Data::Locations::NodeDiff
28
28
  @diffs ||= super.select do |dff|
29
29
  # discard entries that are to be inserted and archived at the same time
30
30
  next false if dff.insert? && dff.archive?(validate: false)
31
+
31
32
  dff.unarchive? || dff.id_name? || dff.insert? ||
32
33
  dff.move? || dff.archive?
33
34
  end
@@ -67,32 +68,42 @@ class Eco::Data::Locations::NodeDiff
67
68
  def diffs_summary # rubocop:disable Metrics/AbcSize
68
69
  comp = "(#{source_2.count} input nodes VS #{source_1.count} live nodes)"
69
70
  return "There were no differences identified #{comp}" if diffs.empty?
71
+
70
72
  msg = []
73
+
71
74
  msg << "Identified #{diffs.count} differences #{comp}:"
72
75
  msg << when_present(insert) do |count|
73
76
  " • #{count} nodes to insert"
74
77
  end
78
+
75
79
  msg << when_present(update) do |count|
76
80
  " • #{count} nodes to update"
77
81
  end
82
+
78
83
  msg << when_present(unarchive) do |count|
79
84
  " • #{count} nodes to unarchive (includes ancestors of target nodes)"
80
85
  end
86
+
81
87
  msg << when_present(id) do |count|
82
88
  " • #{count} nodes to change id\n"
83
89
  end
90
+
84
91
  msg << when_present(name) do |count|
85
92
  " • #{count} nodes to change name"
86
93
  end
94
+
87
95
  msg << when_present(classifications) do |count|
88
96
  " • #{count} nodes to change classifications"
89
97
  end
98
+
90
99
  msg << when_present(move) do |count|
91
100
  " • #{count} nodes to move"
92
101
  end
102
+
93
103
  msg << when_present(archive) do |count|
94
104
  " • #{count} nodes to archive"
95
105
  end
106
+
96
107
  msg.compact.join("\n")
97
108
  end
98
109
 
@@ -108,8 +119,10 @@ class Eco::Data::Locations::NodeDiff
108
119
 
109
120
  def when_present(list, default = nil)
110
121
  raise ArgumentError, "Expecting block but not given" unless block_given?
122
+
111
123
  count = list.count
112
124
  return yield(count) if count&.positive?
125
+
113
126
  default
114
127
  end
115
128
 
@@ -50,12 +50,14 @@ module Eco::Data::Locations
50
50
  def id_name?
51
51
  return true if id?
52
52
  return true if name?
53
+
53
54
  classifications?
54
55
  end
55
56
 
56
57
  # Has the parent id changed?
57
58
  def move?
58
59
  return false unless update?
60
+
59
61
  parent_id?
60
62
  end
61
63
 
@@ -72,6 +74,7 @@ module Eco::Data::Locations
72
74
  return true if marked_for_unarchive?
73
75
  return false if archived
74
76
  return false unless update?
77
+
75
78
  archived?
76
79
  end
77
80
 
@@ -86,6 +89,7 @@ module Eco::Data::Locations
86
89
  raise msg if validate && archived && insert?
87
90
 
88
91
  return true if del?
92
+
89
93
  archived
90
94
  end
91
95
  end
@@ -70,6 +70,7 @@ module Eco::Data::Locations
70
70
 
71
71
  def classifications
72
72
  return [] unless (al = actual_level).positive?
73
+
73
74
  original_headers[al - 1]
74
75
  end
75
76
 
@@ -111,8 +112,10 @@ module Eco::Data::Locations
111
112
  # Requires that all upper levels (lower positions) are filled-in
112
113
  def common_level_with(other)
113
114
  return nil unless other
115
+
114
116
  otags_array = other.tags_array.compact
115
117
  stags_array = tags_array.compact
118
+
116
119
  raise "Missing lower levels for #{other.id}: #{other.tags_array.pretty_inspect}" unless other.highest_levels_set?
117
120
  raise "Missing lower levels for #{id}: #{tags_array.pretty_inspect}" unless highest_levels_set?
118
121
 
@@ -174,6 +177,7 @@ module Eco::Data::Locations
174
177
  def highest_levels_set?
175
178
  return true if raw_level == 1
176
179
  return true unless raw_prev_empty_level?
180
+
177
181
  !!@highest_levels_set
178
182
  end
179
183
 
@@ -194,10 +198,12 @@ module Eco::Data::Locations
194
198
  target = i.to_a
195
199
  when Integer
196
200
  return false unless i >= 1 && i <= tag_attrs_count
201
+
197
202
  target = Array(i..tag_attrs_count)
198
203
  else
199
204
  return false
200
205
  end
206
+
201
207
  return false if target.empty?
202
208
 
203
209
  target.each do |n|
@@ -22,6 +22,8 @@ module Eco
22
22
 
23
23
  # Shortcut to logger.
24
24
  def log(level, &block)
25
+ return unless logger.respond_to?(:level)
26
+
25
27
  logger&.send(level, &block)
26
28
  end
27
29
  end
data/lib/eco/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eco
2
- VERSION = '3.0.4'.freeze
2
+ VERSION = '3.0.6'.freeze
3
3
  end
data/lib/eco-helpers.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # rubocop:disable Naming/FileName
2
2
  require 'csv'
3
3
  require 'json'
4
- require 'pp'
4
+ require 'pp' # rubocop:disable Lint/RedundantRequireStatement
5
5
  require 'dotenv'
6
6
  require 'dotenv/load'
7
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eco-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 3.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Segura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-14 00:00:00.000000000 Z
11
+ date: 2024-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -269,7 +269,7 @@ dependencies:
269
269
  version: '2.0'
270
270
  - - ">="
271
271
  - !ruby/object:Gem::Version
272
- version: 2.0.8
272
+ version: 2.0.9
273
273
  type: :runtime
274
274
  prerelease: false
275
275
  version_requirements: !ruby/object:Gem::Requirement
@@ -279,7 +279,7 @@ dependencies:
279
279
  version: '2.0'
280
280
  - - ">="
281
281
  - !ruby/object:Gem::Version
282
- version: 2.0.8
282
+ version: 2.0.9
283
283
  - !ruby/object:Gem::Dependency
284
284
  name: ed25519
285
285
  requirement: !ruby/object:Gem::Requirement
@@ -663,12 +663,15 @@ files:
663
663
  - lib/eco/api/usecases/cli/option.rb
664
664
  - lib/eco/api/usecases/default.rb
665
665
  - lib/eco/api/usecases/default/locations.rb
666
+ - lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
667
+ - lib/eco/api/usecases/default/locations/cli/csv_to_tree_cli.rb
666
668
  - lib/eco/api/usecases/default/locations/cli/tagtree_extract_cli.rb
669
+ - lib/eco/api/usecases/default/locations/cli/tagtree_paths_cli.rb
667
670
  - lib/eco/api/usecases/default/locations/cli/tagtree_upload_cli.rb
668
671
  - lib/eco/api/usecases/default/locations/codes_to_tags_case.rb
669
- - lib/eco/api/usecases/default/locations/create_tag_paths_case.rb
670
672
  - lib/eco/api/usecases/default/locations/csv_to_tree_case.rb
671
673
  - lib/eco/api/usecases/default/locations/tagtree_extract_case.rb
674
+ - lib/eco/api/usecases/default/locations/tagtree_paths_case.rb
672
675
  - lib/eco/api/usecases/default/locations/tagtree_upload_case.rb
673
676
  - lib/eco/api/usecases/default/meta.rb
674
677
  - lib/eco/api/usecases/default/meta/cli/graphql_schema_cli.rb
@@ -678,16 +681,22 @@ files:
678
681
  - lib/eco/api/usecases/default/people/amend/clean_unknown_tags_case.rb
679
682
  - lib/eco/api/usecases/default/people/amend/clear_abilities_case.rb
680
683
  - lib/eco/api/usecases/default/people/amend/cli/clean_unknown_tags_cli.rb
684
+ - lib/eco/api/usecases/default/people/amend/cli/reinvite_sync_cli.rb
685
+ - lib/eco/api/usecases/default/people/amend/cli/reinvite_trans_cli.rb
686
+ - lib/eco/api/usecases/default/people/amend/cli/restore_db_cli.rb
681
687
  - lib/eco/api/usecases/default/people/amend/refresh_case.rb
682
688
  - lib/eco/api/usecases/default/people/amend/reinvite_sync_case.rb
683
689
  - lib/eco/api/usecases/default/people/amend/reinvite_trans_case.rb
684
- - lib/eco/api/usecases/default/people/amend/reinvite_trans_cli.rb
685
690
  - lib/eco/api/usecases/default/people/amend/restore_db_case.rb
686
691
  - lib/eco/api/usecases/default/people/migrate.rb
687
692
  - lib/eco/api/usecases/default/people/migrate/cli/remap_tags_cli.rb
688
693
  - lib/eco/api/usecases/default/people/migrate/remap_tags_case.rb
689
694
  - lib/eco/api/usecases/default/people/treat.rb
690
695
  - lib/eco/api/usecases/default/people/treat/analyse_people_case.rb
696
+ - lib/eco/api/usecases/default/people/treat/cli/analyse_people_cli.rb
697
+ - lib/eco/api/usecases/default/people/treat/cli/org_data_convert_cli.rb
698
+ - lib/eco/api/usecases/default/people/treat/cli/supers_cyclic_identify_cli.rb
699
+ - lib/eco/api/usecases/default/people/treat/cli/supers_hierachy_cli.rb
691
700
  - lib/eco/api/usecases/default/people/treat/org_data_convert_case.rb
692
701
  - lib/eco/api/usecases/default/people/treat/supers_cyclic_identify_case.rb
693
702
  - lib/eco/api/usecases/default/people/treat/supers_hierarchy_case.rb
@@ -1,25 +0,0 @@
1
- class Eco::API::UseCases::Default::Locations::TagPaths < Eco::API::Common::Loaders::UseCase
2
- name "create-tag-paths"
3
- type :other
4
-
5
- def main(session, options, usecase)
6
- CSV.open("tag_paths.csv", "w") do |csv|
7
- csv << ["Tag", "Path"]
8
- tag_paths.each do |values|
9
- csv << values
10
- end
11
- end
12
- end
13
-
14
- private
15
-
16
- def tag_paths
17
- @tag_paths ||= tagtree.tags.reverse.map do |tag|
18
- [tag, tagtree.path(tag).join("|")]
19
- end
20
- end
21
-
22
- def tagtree
23
- session.tagtree
24
- end
25
- end
@@ -1,4 +0,0 @@
1
- class Eco::API::UseCases::Default::People::Amend::ReinviteTransCase
2
- class Cli < Eco::API::UseCases::Cli
3
- end
4
- end