eco-helpers 2.6.4 → 2.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +95 -0
  4. data/CHANGELOG.md +139 -2
  5. data/Rakefile +13 -7
  6. data/eco-helpers.gemspec +2 -2
  7. data/lib/eco/api/common/loaders/base.rb +2 -2
  8. data/lib/eco/api/common/loaders/case_base.rb +1 -1
  9. data/lib/eco/api/common/loaders/config/workflow/mailer.rb +5 -5
  10. data/lib/eco/api/common/loaders/error_handler.rb +8 -5
  11. data/lib/eco/api/common/loaders/parser.rb +44 -22
  12. data/lib/eco/api/common/loaders/policy.rb +6 -4
  13. data/lib/eco/api/common/loaders/use_case.rb +13 -7
  14. data/lib/eco/api/common/people/base_parser.rb +0 -2
  15. data/lib/eco/api/common/people/default_parsers/boolean_parser.rb +0 -1
  16. data/lib/eco/api/common/people/default_parsers/csv_parser.rb +1 -1
  17. data/lib/eco/api/common/people/default_parsers/date_parser.rb +64 -12
  18. data/lib/eco/api/common/people/default_parsers/freemium_parser.rb +0 -1
  19. data/lib/eco/api/common/people/default_parsers/login_providers_parser.rb +13 -5
  20. data/lib/eco/api/common/people/default_parsers/multi_parser.rb +0 -1
  21. data/lib/eco/api/common/people/default_parsers/numeric_parser.rb +18 -5
  22. data/lib/eco/api/common/people/default_parsers/policy_groups_parser.rb +8 -8
  23. data/lib/eco/api/common/people/default_parsers/select_parser.rb +50 -26
  24. data/lib/eco/api/common/people/default_parsers/send_invites_parser.rb +6 -6
  25. data/lib/eco/api/common/people/default_parsers/xls_parser.rb +9 -12
  26. data/lib/eco/api/common/people/default_parsers.rb +1 -12
  27. data/lib/eco/api/common/people/entries.rb +13 -13
  28. data/lib/eco/api/common/people/entry_factory.rb +76 -45
  29. data/lib/eco/api/common/people/person_attribute_parser.rb +8 -12
  30. data/lib/eco/api/common/people/person_entry.rb +86 -75
  31. data/lib/eco/api/common/people/person_entry_attribute_mapper.rb +60 -44
  32. data/lib/eco/api/common/people/person_factory.rb +30 -22
  33. data/lib/eco/api/common/people/person_modifier.rb +11 -13
  34. data/lib/eco/api/common/people/person_parser.rb +101 -39
  35. data/lib/eco/api/common/people/supervisor_helpers.rb +25 -26
  36. data/lib/eco/api/common/session/base_session.rb +9 -9
  37. data/lib/eco/api/common/session/environment.rb +7 -5
  38. data/lib/eco/api/common/session/sftp.rb +59 -32
  39. data/lib/eco/api/common/version_patches/exception.rb +11 -13
  40. data/lib/eco/api/error.rb +32 -20
  41. data/lib/eco/api/organization/node_classifications.rb +82 -0
  42. data/lib/eco/api/organization/policy_groups.rb +4 -6
  43. data/lib/eco/api/organization/tag_tree.rb +169 -93
  44. data/lib/eco/api/organization.rb +1 -0
  45. data/lib/eco/api/session/batch/job.rb +1 -1
  46. data/lib/eco/api/session/config/tagtree.rb +41 -23
  47. data/lib/eco/api/session/config/workflow.rb +113 -88
  48. data/lib/eco/api/session/config.rb +6 -0
  49. data/lib/eco/api/session.rb +51 -29
  50. data/lib/eco/api/usecases/base_io.rb +28 -25
  51. data/lib/eco/api/usecases/default/locations/cli/tagtree_extract_cli.rb +7 -2
  52. data/lib/eco/api/usecases/default/locations/cli/tagtree_upload_cli.rb +21 -0
  53. data/lib/eco/api/usecases/default/locations/csv_to_tree_case.rb +3 -3
  54. data/lib/eco/api/usecases/default/locations/tagtree_extract_case.rb +54 -23
  55. data/lib/eco/api/usecases/default/locations/tagtree_upload_case.rb +87 -0
  56. data/lib/eco/api/usecases/default/locations.rb +1 -0
  57. data/lib/eco/api/usecases/default/people/analyse_people_case.rb +60 -56
  58. data/lib/eco/api/usecases/default/people/change_email_case.rb +8 -9
  59. data/lib/eco/api/usecases/default/people/clean_unknown_tags_case.rb +13 -11
  60. data/lib/eco/api/usecases/default/people/clear_abilities_case.rb +2 -2
  61. data/lib/eco/api/usecases/default/people/org_data_convert_case.rb +25 -27
  62. data/lib/eco/api/usecases/default/people/refresh_case.rb +2 -2
  63. data/lib/eco/api/usecases/default/people/reinvite_trans_case.rb +1 -1
  64. data/lib/eco/api/usecases/default/people/reinvite_trans_cli.rb +0 -1
  65. data/lib/eco/api/usecases/default/people/restore_db_case.rb +39 -34
  66. data/lib/eco/api/usecases/default/people/set_default_tag_case.rb +19 -15
  67. data/lib/eco/api/usecases/default/people/supers_cyclic_identify_case.rb +16 -12
  68. data/lib/eco/api/usecases/default_cases/hris_case.rb +17 -15
  69. data/lib/eco/api/usecases/default_cases/samples/sftp_case.rb +30 -16
  70. data/lib/eco/api/usecases/graphql/base.rb +5 -3
  71. data/lib/eco/api/usecases/graphql/helpers/base/case_env.rb +4 -1
  72. data/lib/eco/api/usecases/graphql/helpers/base/graphql_env.rb +14 -0
  73. data/lib/eco/api/usecases/graphql/helpers/base.rb +5 -4
  74. data/lib/eco/api/usecases/graphql/helpers/location/base/classifications_parser.rb +60 -0
  75. data/lib/eco/api/usecases/graphql/helpers/location/base/tree_tracking.rb +72 -0
  76. data/lib/eco/api/usecases/graphql/helpers/location/base.rb +25 -59
  77. data/lib/eco/api/usecases/graphql/helpers/location/command/diff/as_update.rb +59 -0
  78. data/lib/eco/api/usecases/graphql/helpers/location/command/diff/compare.rb +49 -0
  79. data/lib/eco/api/usecases/graphql/helpers/location/command/diff.rb +11 -0
  80. data/lib/eco/api/usecases/graphql/helpers/location/command/diffs/stages/commandable.rb +46 -0
  81. data/lib/eco/api/usecases/graphql/helpers/location/command/diffs/stages/diff_sortable/for_archive.rb +23 -0
  82. data/lib/eco/api/usecases/graphql/helpers/location/command/diffs/stages/diff_sortable/for_unarchive.rb +65 -0
  83. data/lib/eco/api/usecases/graphql/helpers/location/command/diffs/stages/diff_sortable.rb +49 -0
  84. data/lib/eco/api/usecases/graphql/helpers/location/command/diffs/stages/sortable/relation_safe_sort.rb +119 -0
  85. data/lib/eco/api/usecases/graphql/helpers/location/command/diffs/stages/sortable.rb +59 -0
  86. data/lib/eco/api/usecases/graphql/helpers/location/command/diffs/stages.rb +82 -0
  87. data/lib/eco/api/usecases/graphql/helpers/location/command/diffs.rb +20 -0
  88. data/lib/eco/api/usecases/graphql/helpers/location/command/optimizations.rb +84 -0
  89. data/lib/eco/api/usecases/graphql/helpers/location/command/result.rb +4 -4
  90. data/lib/eco/api/usecases/graphql/helpers/location/command/results.rb +24 -12
  91. data/lib/eco/api/usecases/graphql/helpers/location/command.rb +21 -24
  92. data/lib/eco/api/usecases/graphql/helpers/location/tags_remap/tags_map.rb +1 -1
  93. data/lib/eco/api/usecases/graphql/helpers/location/tags_remap/tags_set.rb +10 -11
  94. data/lib/eco/api/usecases/graphql/helpers/location/tags_remap.rb +8 -9
  95. data/lib/eco/api/usecases/graphql/samples/location/command/dsl.rb +41 -12
  96. data/lib/eco/api/usecases/graphql/samples/location/command/results.rb +11 -80
  97. data/lib/eco/api/usecases/graphql/samples/location/command/service/tree_update.rb +89 -0
  98. data/lib/eco/api/usecases/graphql/samples/location/command/service.rb +6 -0
  99. data/lib/eco/api/usecases/graphql/samples/location/command/track_changed_ids.rb +89 -0
  100. data/lib/eco/api/usecases/graphql/samples/location/command.rb +3 -0
  101. data/lib/eco/api/usecases/graphql/samples/location/service/base.rb +9 -0
  102. data/lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/heading.rb +18 -0
  103. data/lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/inputable.rb +53 -0
  104. data/lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/classifications.rb +34 -0
  105. data/lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb +28 -0
  106. data/lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing.rb +46 -0
  107. data/lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible.rb +38 -0
  108. data/lib/eco/api/usecases/graphql/samples/location/service/tree_diff.rb +105 -0
  109. data/lib/eco/api/usecases/graphql/samples/location/service/tree_to_list/converter/discarded.rb +16 -0
  110. data/lib/eco/api/usecases/graphql/samples/location/service/tree_to_list/converter/input.rb +15 -0
  111. data/lib/eco/api/usecases/graphql/samples/location/service/tree_to_list/converter/node_attr_maps.rb +22 -0
  112. data/lib/eco/api/usecases/graphql/samples/location/service/tree_to_list/converter/parser.rb +45 -0
  113. data/lib/eco/api/usecases/graphql/samples/location/service/tree_to_list/converter.rb +36 -0
  114. data/lib/eco/api/usecases/graphql/samples/location/service/tree_to_list/output.rb +56 -0
  115. data/lib/eco/api/usecases/graphql/samples/location/service/tree_to_list.rb +41 -0
  116. data/lib/eco/api/usecases/graphql/samples/location/service.rb +8 -0
  117. data/lib/eco/api/usecases/graphql/samples/location.rb +1 -0
  118. data/lib/eco/api/usecases/graphql/utils/sftp.rb +96 -36
  119. data/lib/eco/api/usecases/ooze_cases/export_register_case.rb +8 -6
  120. data/lib/eco/api/usecases/ooze_samples/helpers/creatable.rb +4 -3
  121. data/lib/eco/api/usecases/ooze_samples/helpers/exportable_ooze.rb +39 -25
  122. data/lib/eco/api/usecases/ooze_samples/helpers/exportable_register.rb +13 -15
  123. data/lib/eco/api/usecases/ooze_samples/helpers/filters.rb +50 -21
  124. data/lib/eco/api/usecases/ooze_samples/helpers/ooze_handlers.rb +21 -11
  125. data/lib/eco/api/usecases/ooze_samples/helpers/rescuable.rb +2 -0
  126. data/lib/eco/api/usecases/ooze_samples/helpers/shortcuts.rb +49 -43
  127. data/lib/eco/api/usecases/ooze_samples/ooze_base_case.rb +17 -19
  128. data/lib/eco/api/usecases/ooze_samples/register_export_case.rb +48 -43
  129. data/lib/eco/api/usecases/ooze_samples/register_update_case.rb +33 -34
  130. data/lib/eco/api/usecases/ooze_samples/target_oozes_update_case.rb +8 -10
  131. data/lib/eco/api/usecases.rb +0 -1
  132. data/lib/eco/cli/config/use_cases.rb +31 -29
  133. data/lib/eco/cli_default/workflow.rb +13 -14
  134. data/lib/eco/csv/table.rb +34 -25
  135. data/lib/eco/data/hashes/array_diff.rb +24 -35
  136. data/lib/eco/data/hashes/diff_result/meta.rb +131 -0
  137. data/lib/eco/data/hashes/diff_result.rb +65 -57
  138. data/lib/eco/data/hashes/sanke_camel_indifferent_access.rb +278 -0
  139. data/lib/eco/data/hashes.rb +1 -1
  140. data/lib/eco/data/locations/convert.rb +1 -1
  141. data/lib/eco/data/locations/node_base/csv_convert.rb +19 -9
  142. data/lib/eco/data/locations/node_base/parsing.rb +4 -2
  143. data/lib/eco/data/locations/node_base/treeify.rb +149 -132
  144. data/lib/eco/data/locations/node_base.rb +15 -4
  145. data/lib/eco/data/locations/node_diff/accessors.rb +13 -5
  146. data/lib/eco/data/locations/node_diff/nodes_diff/clustered_treeify.rb +101 -0
  147. data/lib/eco/data/locations/node_diff/nodes_diff/diffs_tree.rb +99 -0
  148. data/lib/eco/data/locations/node_diff/{selectors.rb → nodes_diff/selectors.rb} +1 -1
  149. data/lib/eco/data/locations/node_diff/nodes_diff.rb +50 -35
  150. data/lib/eco/data/locations/node_diff.rb +45 -17
  151. data/lib/eco/data/locations/node_level/parsing.rb +15 -21
  152. data/lib/eco/data/locations/node_level.rb +66 -22
  153. data/lib/eco/data/locations/node_plain/parsing.rb +1 -1
  154. data/lib/eco/data/locations/node_plain.rb +60 -7
  155. data/lib/eco/data/strings/camel_case.rb +35 -0
  156. data/lib/eco/data/strings/snake_case.rb +18 -0
  157. data/lib/eco/data/strings.rb +8 -0
  158. data/lib/eco/data.rb +1 -0
  159. data/lib/eco/language/auxiliar_logger.rb +7 -5
  160. data/lib/eco/language/methods/call_detector.rb +11 -0
  161. data/lib/eco/language/methods/dsl_able.rb +7 -1
  162. data/lib/eco/language/methods.rb +2 -1
  163. data/lib/eco/language/models/collection.rb +23 -25
  164. data/lib/eco/language/models/parser_serializer.rb +24 -5
  165. data/lib/eco/version.rb +1 -1
  166. data/lib/eco-helpers.rb +0 -1
  167. metadata +52 -7
  168. data/lib/eco/data/hashes/diff_meta.rb +0 -52
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ecd2c2f2849623bb76d4eb53883c5d7564cb1bf1a3c6365b4d96d3de8c9c68e
4
- data.tar.gz: 8e4ef9ddee2ca1d9750b9df3aabda5200d93e4a30216306dbe44d68b175883be
3
+ metadata.gz: 763e0c31825790c4529dca3c90c5b673fc948605f4fb0fad3c73ad5caabe1473
4
+ data.tar.gz: edabe853c610dfe4b003600e953c1a2c6e16ebf69881073d08c69af7dd08fecb
5
5
  SHA512:
6
- metadata.gz: 68001b392d5eba8ee710bc315b88adc5c0111ff9b7b6e862e1037b31c10a4269e9453c0514eabb8768c46bf9e9e0128187d072e9eec5ed017b38920cde9fc3c0
7
- data.tar.gz: 71904f2040ab00bf8cc4fd31b07fef8a80259de806ca63cff717c559c953ade2d99f76a4b336e9dbfc0c48a07ce94616fe49b9daf285cc488fcd3a8c8373281c
6
+ metadata.gz: 1e4bb559627452bddeb611a25234c02f7d9d0406af0c9c3fa585d467f4c49118d65a7462566d9e41ac737b11c52d2e344aa4242f45bc671142c3cca6e1fc8cfa
7
+ data.tar.gz: c47d33d0c37a32b3dd26a280000f91a77860cdb99ca64a15387cf5d1038de1b0fe757b4c57aef80ccd76be7576d3835408d3b58007f39a9d6cddbcbfa36996a2
data/.gitignore CHANGED
@@ -4,6 +4,7 @@ Gemfile.lock
4
4
  # build artifacts
5
5
  *.gem
6
6
  /.bundle
7
+ /.vscode
7
8
  /vendor/bundle
8
9
  /spec/reports/
9
10
  /tmp/
data/.rubocop.yml ADDED
@@ -0,0 +1,95 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.7.8
3
+ Exclude:
4
+ - 'config/routes.rb'
5
+ NewCops: enable
6
+
7
+ Metrics/ClassLength:
8
+ Max: 500
9
+ Metrics/ModuleLength:
10
+ Max: 300
11
+ Metrics/MethodLength:
12
+ Max: 50
13
+ Metrics/AbcSize:
14
+ Max: 30
15
+ Metrics/ParameterLists:
16
+ Max: 5
17
+ CountKeywordArgs: false
18
+ Metrics/BlockLength:
19
+ CountAsOne: ['array', 'heredoc', 'method_call']
20
+ Max: 50
21
+ Metrics/CyclomaticComplexity:
22
+ Max: 30
23
+ Metrics/PerceivedComplexity:
24
+ Max: 30
25
+
26
+ Style/AccessorGrouping:
27
+ Enabled: false
28
+ Style/ConditionalAssignment:
29
+ Enabled: false
30
+ Style/BlockDelimiters:
31
+ BracesRequiredMethods: ['log']
32
+ AllowedPatterns: ['proc', 'new']
33
+ Style/ClassAndModuleChildren:
34
+ Enabled: false
35
+ Style/FrozenStringLiteralComment:
36
+ Enabled: false
37
+ Style/StringLiterals:
38
+ Enabled: false
39
+ Style/StringLiteralsInInterpolation:
40
+ Enabled: false
41
+ Style/Documentation:
42
+ Enabled: false
43
+ Style/CommentedKeyword:
44
+ Enabled: false
45
+ Style/MultilineBlockChain:
46
+ Enabled: false
47
+ Style/AndOr:
48
+ Enabled: false
49
+ Style/Alias:
50
+ EnforcedStyle: prefer_alias_method
51
+ Style/FetchEnvVar:
52
+ Enabled: false
53
+ Style/RegexpLiteral:
54
+ EnforcedStyle: mixed
55
+ AllowInnerSlashes: true
56
+
57
+ Layout/HashAlignment:
58
+ EnforcedColonStyle: table
59
+ EnforcedHashRocketStyle: table
60
+ Layout/LeadingCommentSpace:
61
+ Enabled: false
62
+ AllowGemfileRubyComment: true
63
+ Layout/ParameterAlignment:
64
+ Enabled: false
65
+ Layout/MultilineMethodDefinitionBraceLayout:
66
+ EnforcedStyle: symmetrical
67
+ Layout/LineLength:
68
+ Enabled: true
69
+ Layout/SpaceInsideHashLiteralBraces:
70
+ Enabled: false
71
+ Layout/SpaceInsideBlockBraces:
72
+ Enabled: false
73
+ Layout/SpaceAroundOperators:
74
+ Enabled: false
75
+ Layout/ExtraSpacing:
76
+ AllowForAlignment: true
77
+ AllowBeforeTrailingComments: true
78
+ Layout/AccessModifierIndentation:
79
+ EnforcedStyle: indent
80
+ Layout/DotPosition:
81
+ EnforcedStyle: trailing
82
+ Layout/MultilineMethodCallIndentation:
83
+ EnforcedStyle: indented
84
+ Layout/FirstHashElementIndentation:
85
+ Enabled: false
86
+ Layout/EmptyLineAfterGuardClause:
87
+ Enabled: false
88
+
89
+ Naming/VariableNumber:
90
+ EnforcedStyle: snake_case
91
+ CheckSymbols: false
92
+ Naming/MethodParameterName:
93
+ AllowedNames: ['x', 'y', 'i', 'j', 'id', 'io', 'to']
94
+ Naming/RescuedExceptionsVariableName:
95
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,9 +1,146 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
- ## [2.6.4] - 2024-03-xx
4
+ ## [2.7.2] - 2024-04-xx
5
+
6
+ ### Added
7
+ ### Changed
8
+ ### Fixed
9
+
10
+ ## [2.7.1] - 2024-04-23
11
+
12
+ ### Fixed
13
+ - `Eco::Language::AuxiliaLogger` prioritize `session.logger` in the object scoping process.
14
+
15
+ ## [2.7.0] - 2024-04-23
16
+
17
+ ### Added
18
+ - **support** for node **classifications** on
19
+ - `Eco::Data::Locations::NodePlain`
20
+ - `Eco::API::Organization::TagTree`
21
+ - It `downcase` the classification values
22
+ - added class `Eco::API::Organization::NodeClassifications`
23
+ - `#node_classifications` method in `session`, `session.config` and in `config.tagtree`
24
+ - **validation** helpers via locations base case (`Eco::API::UseCases::GraphQL::Helpers::Location::Base::ClassificationsParser`)
25
+ - Use case (**made native**)
26
+ - `-tagtree-upload` => `Eco::API::UseCases::Default::Locations::TagtreeUpload`
27
+ - it can target specific tree via `-structure-id` cli argument
28
+ - it has some **optimizations** such as:
29
+ 1. Only backing up the tree once (before)
30
+ 2. Not graphql querying the tree as a response of each batch commands request
31
+ - Parameter `-file-as-source` for `-tagtree-extract` provided that the case can **convert** input tree csv files into a list of nodes (`Eco::API::UseCases::Default::Locations::TagtreeExtract`)
32
+ - **Tagtree UPDATE** case helpers. Added three service modules for quickly building **custom tagtree update cases**. See:
33
+ 1. `Eco::API::UseCases::GraphQL::Samples::Location::Service::TreeToList`
34
+ 2. `Eco::API::UseCases::GraphQL::Samples::Location::Service::TreeDiff`
35
+ 3. `Eco::API::UseCases::GraphQL::Samples::Location::Command::Service::TreeUpdate`
36
+ - `snake_case` helper (at `Eco::Data::Strings::SnakeCase`)
37
+ - `camel_case` helper (at `Eco::Data::Strings::CamelCase`)
38
+ - `camel_case` helper (at `Eco::Data::Strings::CamelCase`)
39
+ - snake vs camel indifferent access helper (at `Eco::Data::Hashes::SnakeCamelIndifferentAccess`)
40
+ - **Optimization** helper classes to cluster node diffs:
41
+ - `Eco::Data::Locations::NodeDiff::NodesDiff::ClusteredTreeify`: key helper
42
+ - `Eco::Data::Locations::NodeDiff::NodesDiff::DiffsTree`: supporting class.
43
+ - **consistency** (snake vs camel case) on `parentd` for `Eco::Data::Locations::NodeLevel`
44
+ - `Eco::API::UseCases::GraphQL::Utils::Sftp`
45
+ - Configurable `remote_folder`
46
+ - Made **native** location diffs staged command builders
47
+ - These helpers target ONLY location nodes where the `id` are **codes**
48
+ - Please notice that composed `id` (i.e. `name - code`) is NOT supported (as there isn't a clean way to update => no batch remap location ids operation available)
49
+ - **Added** class and namespaces under `Eco::API::UseCases::GraphQL::Helpers::Location::Command`
50
+ - `Diff`
51
+ - `Diffs`
52
+ - **SFTP Helpers** review
53
+ - `Eco::API::Common::Session::SFTP#upload` added method
54
+ - `Eco::API::UseCases::GraphQL::Utils::SFTP`
55
+ - `#sftp_download_files` added method
56
+ - `#local_folder` for downloading the files
57
+ - added parameters to the existing methods
58
+
59
+ ### Changed
60
+ - **Parsers**
61
+ - Native **date parser**, added _warning_ when date cannot be parsed
62
+ - Migrated **select parser** (`Eco::API::Common::People::DefaultParsers::SelectParser`). This change entailed to introduce several changes:
63
+ - Added _warning_ when select option is unknown.
64
+ - `Eco::API::Common::People::PersonParser`:
65
+ 1. methods `#parse` and `#serialize` call to the parser/serializer method by using a block to resolve `Proc` call dependencies.
66
+ 2. **added** method `#select_tables` (this has been moved from the _default parsers_ class to the _person parser_ itself)
67
+ - `Eco::Language::Models::ParserSerializer`
68
+ - methods `#parse` and `#serialize` can be called with a `block` to resolve dependencies.
69
+ - `Eco::CSV::Table` the internal method `to_rows_array` was not spliting `Array` values with pipe operator `|`. Made so it does so.
70
+ - **Note** that `to_array_of_hashes` (the opposite method) does NOT convert them back to `Array` (but it wasn't converting back the array string to its Array version anyway)
71
+ - **renamed** use case `-export-tree` to `-tagtree-extract`
72
+ - `Eco::API::UseCases::Default::Locations::TagtreeExtract`
73
+ - **Improved** `Eco::Data::Locations::NodeLevel` by adding support for `classifications` and `classification_names`
74
+ - It just catches the **original header** names, and uses them
75
+ - **Note** that these headers may NOT be actual classifications, but just conventional header names. For this reason, it is **required** that there is a **parse** function that **validates** that they are **actual classifications**
76
+ - `Eco::API::Organization::TagTree`
77
+ - **changed** `as_json` serialization on **classifications** (it serializes to a `dup` of the `Array` now) - ceased to ~~`join('|')`~~
78
+ - **changed** `as_json`. It now includes `level` (`depth + 1`)
79
+ - **Optimized** life cycle of applying commands to _locations structures_
80
+ - This optimization is based on **NOT retrieving** the full locations structure on each request (_apply commands payload block_ on **graphql**). This also entails that the number of **backups** per run is drastically minimized.
81
+ - `Eco::API::UseCases::GraphQL::Helpers::Location::Command::DSL`
82
+ - **Added** `#batch_tree_track_mode` to define what tracking mode would be used at each commands stage.
83
+ - The only stage that tracks/backes-up the tree on each request is now `:id` (or `:id_name`) -> remap location ids _integrity check_ purposes (which is actually somehow redundant; just an additional measure in place).
84
+ - `Eco::API::UseCases::GraphQL::Helpers::Location::Command`
85
+ - `#sliced_batches`
86
+ - **added** parameter `track_tree_mode:`
87
+ - **before** final call to `apply_commands`, it scopes the payload `block` of the request (using the new custom method `scope_commands_block`, see below)
88
+ - Decoupled re-configurable (**overridable**) methods into `Optimizations` sub-space: `Eco::API::UseCases::GraphQL::Helpers::Location::Command::Optimizations`
89
+ - `#default_tree_tracking_mode` the fallback tracking mode (besides `#batch_tree_track_mode` on `DLS`)
90
+ - `#scope_commands_block` based on the current tree tracking mode, it scopes what the block for the apply commands payload will be
91
+ - `#commands_payload_without_structure_block`: sample graphql payload block that does NOT retrieve the locations structure (**optimization lies here**)
92
+ - `Eco::API::UseCases::GraphQL::Samples::Location::Command::Results`
93
+ - **Decoupled** tracking of changed ids into `Eco::API::UseCases::GraphQL::Samples::Location::Command::TrackChangedIds`
94
+ - `#update_tags_remap_table` -> remove `:move` stage tracking
95
+ - As content only has the lowest level location node, moving does **NOT** entail remapping locations any longer (there isn't full path on content at this stage; after `RS P3` release)
96
+ - `Eco::Data::Locations::NodeDiff`
97
+ - `archived?` added parameter for **validation** (default `true`)
98
+ - `attr_expose`
99
+ - It adds `_prev` as a postfix (**removed** as a prefix ~~`prev_`~~)
100
+ - It uses the question mark `?` alone (**removed** ~~`diff_`~~ prefix)
101
+ - **added** all these methods support now `snake_case`
102
+ - **BREAKING** change to move onto **RS P3 post-release**
103
+ - A change of `name?` **WON'T** trigger a change of `id` (`nodeId`) any more
104
+ - For this reason, identification on changes on the `id` will be besides changes of the `name`
105
+ - `Eco::Data::Locations::NodeDiff::NodesDiff`- **Important change** on `#diffs` (core property)
106
+ - It now discards diffs that `insert?` and `archive?` as well, provided that they do not generate updates
107
+ - **Note** that this limiation may be a drawback when we aim to import historical location nodes that should be in the org (for import purposes) but that are not active locations. The way **around it** is to just use an input where the `archived` property is `false` (later on launch those again with `archived` true, but lets do a good input data integrity check here)
108
+ - `Eco::Data::Hashes::DiffResult`
109
+ - moved `Meta` under its namespace
110
+ - created _private_ unique points to access source hashes. This will allows to extend the behaviour from child classes
111
+ - **Moved** hash accessors (**DSL**) to `Eco::Data::Hashes::DiffResult::Meta`
112
+ - also **added** method `key_present?`
113
+ - **improved** `slice_attrs` to return `nil` if `src` isn't present.
114
+ - **added** `Array` comparizon via `eq?` method.
115
+ - (Class) **Added** named arg `when_present` to `compare` class method.
116
+ - (Instance) **Removed** unused method `compared_attrs`
117
+ - **Replaced by** `all_compared_attrs`
118
+ - (Class) **Added** `compared_attrs_when_present`
119
+ - (Instance) **Added** `comparable_attr?`, which based on `all_compared_attrs` (instance method) checks if `attr` is required for presence on both source hashes (`src_1` and `src_2`)
120
+ - This is supported by the **new** method `key_present_in_both?`
121
+ - (Instance) **Modified** behaviour on `diff_attrs` provided that takes into consideration if an `attr` is **comparable** (`comparable_attr?`)
122
+ - upgrade **gems** `ecoportal-api-v2` and `ecoportal-api-graphql`
123
+ - this brings some optimizations when treeifying locations structures
124
+ - `Eco::Data::Hashes::ArrayDiff`
125
+ - **Removed** unused method `compared_attrs`
126
+
127
+ ### Fixed
128
+ - upgrade `ecoportal-api-v2` **gem**
129
+ - A bunch of small things on the `Eco::Data::Locations` namespace
130
+ - `Eco::API::Session::Config#live_trees` to choose a tree when only one
131
+ - `Eco::API::UseCases::GraphQL::Helpers::Location::Base`
132
+ - `tagtree_id` method should `map` values rather than `select` keys on `options`
133
+ - `Eco::Data::Locations::NodeDiff::NodesDiff`
134
+ - fix `diffs_summary` lining
135
+ - `Eco::Language::Methods::DslAble`
136
+ - explicit behaviour for `respond_to_missing?` (dsl doesn't need to allow method capturing via `method` call)
137
+ - add `__FILE__` and `__LINE__` to error backtrace on `eval`
138
+ - Parsing `archived` value in
139
+ - `Eco::API::Organization::TagTree`
140
+ - `Eco::Data::Locations::NodePlain`
141
+
142
+ ## [2.6.4] - 2024-03-06
5
143
 
6
- ### Added
7
144
  ### Changed
8
145
  - updated core **gem** `ecoportal-api`
9
146
  - The `subordinates` core people property has been removed from the back-end
data/Rakefile CHANGED
@@ -1,7 +1,8 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
- require "yard"
4
- require "redcarpet"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+ require 'rubocop/rake_task'
4
+ require 'yard'
5
+ require 'redcarpet'
5
6
 
6
7
  desc "run the specs"
7
8
  RSpec::Core::RakeTask.new(:spec)
@@ -10,11 +11,13 @@ desc "run rspec showing backtrace"
10
11
  RSpec::Core::RakeTask.new(:spec_trace) do |task|
11
12
  task.rspec_opts = ['--backtrace']
12
13
  end
14
+ task(rspec_trace: :spec_trace)
13
15
 
14
16
  desc "run rspec stopping on first fail, and show backtrace"
15
17
  RSpec::Core::RakeTask.new(:spec_fast) do |task|
16
18
  task.rspec_opts = ['--fail-fast', '--backtrace']
17
19
  end
20
+ task(rspec_fast: :spec_fast)
18
21
 
19
22
  # default task name is yard
20
23
  desc "Yard: generate all the documentation"
@@ -22,6 +25,9 @@ YARD::Rake::YardocTask.new(:doc) do |t|
22
25
  #t.files = ['lib/**/*.rb']
23
26
  end
24
27
 
25
- task :default => [:spec]
26
- task :rspec_trace => :spec_trace
27
- task :rspec_fast => :spec_fast
28
+ desc "default task: runs rubocop and rspec"
29
+ task :default do
30
+ Rake::Task[:rubocop].invoke
31
+ ensure
32
+ Rake::Task[:spec].invoke
33
+ end
data/eco-helpers.gemspec CHANGED
@@ -31,8 +31,8 @@ Gem::Specification.new do |spec|
31
31
  spec.add_development_dependency "redcarpet", ">= 3.6.0", "< 4"
32
32
 
33
33
  spec.add_dependency 'ecoportal-api', '>= 0.9.7', '< 0.10'
34
- spec.add_dependency 'ecoportal-api-v2', '>= 1.1.6', '< 1.2'
35
- spec.add_dependency 'ecoportal-api-graphql', '>= 0.3.13', '< 0.4'
34
+ spec.add_dependency 'ecoportal-api-v2', '>= 1.1.8', '< 1.2'
35
+ spec.add_dependency 'ecoportal-api-graphql', '>= 0.3.15', '< 0.4'
36
36
  spec.add_dependency 'aws-sdk-s3', '>= 1.142.0', '< 2'
37
37
  spec.add_dependency 'aws-sdk-ses', '>= 1.58.0', '< 2'
38
38
  spec.add_dependency 'dotenv', '>= 2.8.1', '< 3'
@@ -14,7 +14,7 @@ module Eco
14
14
 
15
15
  # If still not set, it sets the `created_at` class timestamp.
16
16
  def set_created_at!
17
- @created_at = Time.now unless @created_at
17
+ @created_at ||= Time.now unless @created_at # rubocop:disable Naming/MemoizedInstanceVariableName
18
18
  end
19
19
 
20
20
  # Class creation timestamp, to be able to load them in the order they were declared.
@@ -33,7 +33,7 @@ module Eco
33
33
  private
34
34
 
35
35
  def simulate?
36
- options.dig(:simulate) || options.dig(:dry_run)
36
+ options[:simulate] || options[:dry_run]
37
37
  end
38
38
  alias_method :dry_run?, :simulate?
39
39
 
@@ -10,7 +10,7 @@ module Eco
10
10
  def name(value = nil)
11
11
  name_only_once! if value
12
12
  set_created_at!
13
- return @name ||= self.to_s unless value
13
+ return @name ||= to_s unless value
14
14
  @name = value
15
15
  end
16
16
 
@@ -5,7 +5,7 @@ class Eco::API::Common::Loaders::Workflow::Mailer < Eco::API::Common::Loaders::W
5
5
  inheritable_class_vars :config_block
6
6
 
7
7
  config_block do
8
- puts "running from class #{self}"
8
+ #puts "running from class #{self}"
9
9
  exception do |err, io|
10
10
  self.error = err
11
11
  log(:debug) { err.patch_full_message }
@@ -13,9 +13,9 @@ class Eco::API::Common::Loaders::Workflow::Mailer < Eco::API::Common::Loaders::W
13
13
  end
14
14
 
15
15
  after(:close) do |_wf, io|
16
- next if options.dig(:workflow, :no_email)
16
+ next if options.dig(:workflow, :no_email)
17
17
  next unless session.mailer?
18
- next if session.config.dry_run?
18
+ next if session.config.dry_run?
19
19
  next unless session.config.run_mode_remote?
20
20
  next unless some_update?(io) || error?
21
21
 
@@ -49,7 +49,7 @@ class Eco::API::Common::Loaders::Workflow::Mailer < Eco::API::Common::Loaders::W
49
49
 
50
50
  def some_update?(io)
51
51
  cli.config.usecases.active(io: io).any? do |usecase, data|
52
- [:transform, :sync].any? { |type| usecase.type == type }
52
+ %i[transform sync].any? { |type| usecase.type == type }
53
53
  end
54
54
  end
55
55
 
@@ -62,7 +62,7 @@ class Eco::API::Common::Loaders::Workflow::Mailer < Eco::API::Common::Loaders::W
62
62
  end
63
63
 
64
64
  def log_err_n_warn(io)
65
- warn_errors = io.logger.cache.logs(level: [:error, :warn])
65
+ warn_errors = io.logger.cache.logs(level: %i[error warn])
66
66
  return if warn_errors.empty?
67
67
  "WARNINGS & ERRORS:\n#{warn_errors.join('')}\n"
68
68
  end
@@ -9,7 +9,8 @@ module Eco
9
9
  # @return [Eco::API::Error] the error class, child of `Eco::API::Error`.
10
10
  def error(value = nil)
11
11
  unless value
12
- return @error || raise("You should specify an error type for #{self.class}")
12
+ msg = "You should specify an error type for #{self.class}"
13
+ return @error || (raise msg)
13
14
  end
14
15
  @error = value
15
16
  end
@@ -17,9 +18,11 @@ module Eco
17
18
 
18
19
  inheritable_class_vars :error
19
20
 
20
- def initialize(handlers)
21
- raise "Expected Eco::API::Policies. Given #{handlers.class}" unless handlers.is_a?(Eco::API::Error::Handlers)
22
- handlers.on(self.error, &self.method(:main))
21
+ def initialize(handlers) # rubocop:disable Lint/MissingSuper
22
+ msg = "Expected Eco::API::Policies. Given #{handlers.class}"
23
+ raise msg unless handlers.is_a?(Eco::API::Error::Handlers)
24
+
25
+ handlers.on(error, &method(:main))
23
26
  end
24
27
 
25
28
  # @param people [Eco::API::Organization::People] the people in the queue of the current `job`
@@ -27,7 +30,7 @@ module Eco
27
30
  # @param options [Hash] the options that modify the case behaviour or bring some dependencies.
28
31
  # @param handler [Eco::API::Error::Hanlder] the `error handler` instance object.
29
32
  # @param job [Eco::API::Session::Batch::Job] the `Batch::Job` made on purpose for this handler.
30
- def main(people, session, options, handler, job)
33
+ def main(people, session, options, handler, job) # rubocop:disable Lint/UnusedMethodArgument
31
34
  raise "You should implement this method"
32
35
  end
33
36
 
@@ -4,7 +4,7 @@ module Eco
4
4
  module Loaders
5
5
  class Parser < Eco::API::Common::Loaders::CaseBase
6
6
  # Helper class to scope what required attributes it depends on
7
- class RequiredAttrs < Struct.new(:attr, :type, :attrs)
7
+ RequiredAttrs = Struct.new(:attr, :type, :attrs) do
8
8
  def active?(*input_attrs)
9
9
  missing(*input_attrs).empty?
10
10
  end
@@ -33,7 +33,9 @@ module Eco
33
33
  # @return [String] the `type` of usecase (i.e. `:sync`, `:transform`, `:import`, `:other`)
34
34
  def attribute(value = nil)
35
35
  unless value
36
- return @attribute || raise("You should specify the 'attribute' this parser/serializer, #{self.class}, is linked to")
36
+ msg = "You should specify the 'attribute' this parser/serializer, "
37
+ msg << "#{self.class}, is linked to"
38
+ return @attribute || (raise msg)
37
39
  end
38
40
  name value
39
41
  @attribute = value
@@ -42,9 +44,13 @@ module Eco
42
44
  # Some parsers require dependencies to do their job.
43
45
  def dependencies(**value)
44
46
  @dependencies ||= {}
45
- return @dependencies.merge({
46
- required_attrs: @active_when_attrs
47
- }) unless !value.empty?
47
+
48
+ if value.empty?
49
+ return @dependencies.merge({
50
+ required_attrs: @active_when_attrs
51
+ })
52
+ end
53
+
48
54
  raise "Expected Hash. Given: '#{value.class}'" unless value.is_a?(Hash)
49
55
  @dependencies.merge!(value)
50
56
  end
@@ -70,7 +76,7 @@ module Eco
70
76
  # Helper to build the `active_when` condition.
71
77
  def active_when_any(*attrs)
72
78
  @active_when_attrs = RequiredAttrs.new(attribute, :any, attrs)
73
- @active_when = Proc.new do |source_data|
79
+ @active_when = proc do |source_data|
74
80
  keys = data_keys(source_data)
75
81
  attrs.any? {|key| keys.include?(key)}
76
82
  end
@@ -79,7 +85,7 @@ module Eco
79
85
  # Helper to build the `active_when` condition.
80
86
  def active_when_all(*attrs)
81
87
  @active_when_attrs = RequiredAttrs.new(attribute, :all, attrs)
82
- @active_when = Proc.new do |source_data|
88
+ @active_when = proc do |source_data|
83
89
  keys = data_keys(source_data)
84
90
  attrs.all? {|key| keys.include?(key)}
85
91
  end
@@ -88,40 +94,46 @@ module Eco
88
94
  private
89
95
 
90
96
  # Helper to obtain the current internal named attributes of the data
91
- # @param source_data [Array<String>, Hash] if `Array` those are already the `keys`, if `Hash` it gets the `keys`
97
+ # @param source_data [Array<String>, Hash] if `Array` those
98
+ # are already the `keys`, if `Hash` it gets the `keys`
92
99
  # @return [Array<String>] `keys` of `source_data`
93
100
  def data_keys(source_data)
94
101
  case source_data
95
102
  when Array
96
- keys = source_data
103
+ source_data
97
104
  when Hash
98
- keys = source_data.keys
105
+ source_data.keys
99
106
  else
100
- keys = []
107
+ []
101
108
  end
102
109
  end
103
110
  end
104
111
 
105
112
  inheritable_class_vars :attribute, :parsing_phase, :serializing_phase
106
113
 
107
- def initialize(person_parser)
108
- raise "Expected Eco::API::Common::People::PersonParser. Given #{policies.class}" unless person_parser.is_a?(Eco::API::Common::People::PersonParser)
109
- person_parser.define_attribute(self.attribute, dependencies: self.class.dependencies) do |attr_parser|
114
+ def initialize(person_parser) # rubocop:disable Lint/MissingSuper
115
+ msg = "Expected Eco::API::Common::People::PersonParser. Given #{person_parser.class}"
116
+ raise msg unless person_parser.is_a?(Eco::API::Common::People::PersonParser)
117
+
118
+ person_parser.define_attribute(attribute, dependencies: self.class.dependencies) do |attr_parser|
110
119
  _define_parser(attr_parser)
111
120
  _define_serializer(attr_parser)
112
121
  end
113
122
  end
114
123
 
115
124
  # @param data [Hash] all the person data at the specified `parsing_phase`:
116
- # - when `:internal`: the parser will receive external types (i.e. String with '|' delimiters instead of an Array).
117
- # - when `:final`: the parser will receive the typed values (i.e. Array instread of String with '|' delimiters).
125
+ # - when `:internal`: the parser will receive external types
126
+ # (i.e. String with '|' delimiters instead of an Array).
127
+ # - when `:final`: the parser will receive the typed values
128
+ # (i.e. Array instread of String with '|' delimiters).
118
129
  # @param deps [Hash] the merged dependencies (default to the class object and when calling the parser).
119
- def parser(data, deps)
130
+ def parser(_data, _deps)
120
131
  raise "You should implement this method"
121
132
  end
122
133
 
123
134
  # @param data [Hash, Ecoportal::API::V1::Person] all the person data at the specified `serializing_phase`:
124
- # - when `:internal`: it will receive a `Hash` with the **internal values** but the types already serialized to `String`.
135
+ # - when `:internal`: it will receive a `Hash` with the **internal values** but the types already serialized
136
+ # to `String`.
125
137
  # - when `:final`: it will receive a `Hash` with the **internal values** and **types**.
126
138
  # - when `:person`: it will receive the `person` object.
127
139
  # @param deps [Hash] the merged dependencies (default to the class object and when calling the parser).
@@ -137,16 +149,26 @@ module Eco
137
149
  private
138
150
 
139
151
  def _define_parser(attr_parser)
140
- if active_when = self.class.active_when
141
- attr_parser.def_parser(self.class.parsing_phase, active_when: active_when, &self.method(:parser))
152
+ if (active_when = self.class.active_when)
153
+ attr_parser.def_parser(
154
+ self.class.parsing_phase,
155
+ active_when: active_when,
156
+ &method(:parser)
157
+ )
142
158
  else
143
- attr_parser.def_parser(self.class.parsing_phase, &self.method(:parser))
159
+ attr_parser.def_parser(
160
+ self.class.parsing_phase,
161
+ &method(:parser)
162
+ )
144
163
  end
145
164
  end
146
165
 
147
166
  def _define_serializer(attr_parser)
148
167
  return unless respond_to?(:serializer, true)
149
- attr_parser.def_serializer(self.class.serializing_phase, &self.method(:serializer))
168
+ attr_parser.def_serializer(
169
+ self.class.serializing_phase,
170
+ &method(:serializer)
171
+ )
150
172
  end
151
173
  end
152
174
  end
@@ -3,9 +3,11 @@ module Eco
3
3
  module Common
4
4
  module Loaders
5
5
  class Policy < Eco::API::Common::Loaders::CaseBase
6
- def initialize(policies)
7
- raise "Expected Eco::API::Policies. Given #{policies.class}" unless policies.is_a?(Eco::API::Policies)
8
- policies.define(self.name, &self.method(:main))
6
+ def initialize(policies) # rubocop:disable Lint/MissingSuper
7
+ msg = "Expected Eco::API::Policies. Given #{policies.class}"
8
+ raise msg unless policies.is_a?(Eco::API::Policies)
9
+
10
+ policies.define(name, &method(:main))
9
11
  end
10
12
 
11
13
  # @param people [Eco::API::Organization::People] the people in the queue of the current `job`
@@ -13,7 +15,7 @@ module Eco
13
15
  # @param options [Hash] the options that modify the case behaviour or bring some dependencies.
14
16
  # @param policy [Eco::API::Policies::Policy] the `policy` instance object.
15
17
  # @param job [Eco::API::Session::Batch::Job] the `Batch::Job` that these `people` belong to the queue thereof.
16
- def main(people, session, options, policy, job)
18
+ def main(people, session, options, policy, job) # rubocop:disable Lint/UnusedMethodArgument
17
19
  raise "You should implement this method"
18
20
  end
19
21
  end
@@ -7,7 +7,9 @@ module Eco
7
7
  # @return [Symbol] the `type` of usecase (i.e. `:sync`, `:transform`, `:import`, `:other`)
8
8
  def type(value = nil)
9
9
  unless value
10
- return @type || raise("You should specify a type of case [:sync, :transform, :import, :other] for #{self}")
10
+ msg = "You should specify a type of case "
11
+ msg << "[:sync, :transform, :import, :other] for #{self}"
12
+ return @type || (raise msg)
11
13
  end
12
14
  @type = value
13
15
  end
@@ -18,13 +20,15 @@ module Eco
18
20
 
19
21
  def cli(cli_class = nil)
20
22
  if cli_class.is_a?(Class)
21
- raise ArgumentError, "cli_class should inherit from Eco::API::UseCases::Cli" unless cli_class < Eco::API::UseCases::Cli
23
+ msg = "cli_class should inherit from Eco::API::UseCases::Cli"
24
+ raise ArgumentError, msg unless cli_class < Eco::API::UseCases::Cli
25
+
22
26
  @cli = cli_class
23
27
  elsif cli_class.nil?
24
28
  return @cli if instance_variable_defined?(:@cli) && !@cli.nil?
25
29
  # try to see if it's namespaced after the use case it provisions cli integration
26
30
  begin
27
- try_class = [self.to_s, 'Cli'].join('::')
31
+ try_class = [to_s, 'Cli'].join('::')
28
32
  @cli = Kernel.const_get(try_class)
29
33
  rescue NameError
30
34
  nil
@@ -37,9 +41,11 @@ module Eco
37
41
 
38
42
  inheritable_class_vars :type, :cli
39
43
 
40
- def initialize(usecases)
41
- raise "Expected Eco::API::UseCases. Given #{usecases.class}" unless usecases.is_a?(Eco::API::UseCases)
42
- usecases.define(self.name, type: self.type, &self.method(:main))
44
+ def initialize(usecases) # rubocop:disable Lint/MissingSuper
45
+ msg = "Expected Eco::API::UseCases. Given #{usecases.class}"
46
+ raise msg unless usecases.is_a?(Eco::API::UseCases)
47
+
48
+ usecases.define(name, type: type, &method(:main))
43
49
  end
44
50
 
45
51
  # The parameters of this method will depend on the `type` of usecase.
@@ -48,7 +54,7 @@ module Eco
48
54
  # @param session [Eco::API::Session] the current session where the usecase kicks in.
49
55
  # @param options [Hash] the options that modify the case behaviour or bring some dependencies.
50
56
  # @param usecase [Eco::API::Policies::Policy] the `usecase` instance object.
51
- def main(entries, people, session, options, usecase)
57
+ def main(entries, people, session, options, usecase) # rubocop:disable Lint/UnusedMethodArgument
52
58
  raise "You should implement this method"
53
59
  end
54
60
 
@@ -2,7 +2,6 @@ module Eco
2
2
  module API
3
3
  module Common
4
4
  module People
5
-
6
5
  # @example Example of usage:
7
6
  # class ExampleParser < Eco::API::Common::People::BaseParser
8
7
  # def process
@@ -26,7 +25,6 @@ module Eco
26
25
  # Helper class to inherit from to ease the definition of attribute parsers in a `PersonParser` object,
27
26
  # mostly used in for configuration loading.
28
27
  class BaseParser
29
-
30
28
  # @param parsers [Eco::API::Common::People::PersonParser] set of attribute parsers/serialisers.
31
29
  # @param options [Hash] keyword arguments to be used in the `process` method of the child class.
32
30
  def initialize(parsers, **options)