dev_suite 0.2.7 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +1 -1
  3. data/Gemfile.lock +9 -11
  4. data/README.md +142 -0
  5. data/dev_suite.gemspec +1 -0
  6. data/examples/workflow/basic_workflow.rb +15 -0
  7. data/examples/workflow/composite_workflow.rb +21 -0
  8. data/examples/workflow/conditional_workflow.rb +17 -0
  9. data/examples/workflow/full_workflow.rb +79 -0
  10. data/examples/workflow/loop_workflow.rb +17 -0
  11. data/examples/workflow/parallel_workflow.rb +17 -0
  12. data/lib/dev_suite/dev_suite.rb +2 -0
  13. data/lib/dev_suite/request_builder/builder/base.rb +27 -0
  14. data/lib/dev_suite/request_builder/builder/builder.rb +10 -0
  15. data/lib/dev_suite/request_builder/builder/http.rb +32 -0
  16. data/lib/dev_suite/request_builder/builder.rb +9 -0
  17. data/lib/dev_suite/request_builder/config/config.rb +11 -0
  18. data/lib/dev_suite/request_builder/config/configuration.rb +24 -0
  19. data/lib/dev_suite/request_builder/config.rb +9 -0
  20. data/lib/dev_suite/request_builder/formatter/base.rb +13 -0
  21. data/lib/dev_suite/request_builder/formatter/formatter.rb +10 -0
  22. data/lib/dev_suite/request_builder/formatter/graphql.rb +19 -0
  23. data/lib/dev_suite/request_builder/formatter.rb +9 -0
  24. data/lib/dev_suite/request_builder/request_builder.rb +21 -0
  25. data/lib/dev_suite/request_builder/tool/base.rb +19 -0
  26. data/lib/dev_suite/request_builder/tool/curl.rb +91 -0
  27. data/lib/dev_suite/request_builder/tool/tool.rb +11 -0
  28. data/lib/dev_suite/request_builder/tool/validator/curl.rb +38 -0
  29. data/lib/dev_suite/request_builder/tool/validator/validator.rb +11 -0
  30. data/lib/dev_suite/request_builder/tool/validator.rb +11 -0
  31. data/lib/dev_suite/request_builder/tool.rb +9 -0
  32. data/lib/dev_suite/request_builder.rb +7 -0
  33. data/lib/dev_suite/request_logger/adapter/adapter.rb +11 -9
  34. data/lib/dev_suite/request_logger/adapter/faraday.rb +12 -1
  35. data/lib/dev_suite/request_logger/adapter/middleware/faraday.rb +3 -3
  36. data/lib/dev_suite/request_logger/adapter/net_http.rb +15 -6
  37. data/lib/dev_suite/request_logger/config/configuration.rb +1 -0
  38. data/lib/dev_suite/request_logger/extractor/base.rb +8 -2
  39. data/lib/dev_suite/request_logger/extractor/extractor.rb +5 -6
  40. data/lib/dev_suite/request_logger/extractor/faraday.rb +32 -14
  41. data/lib/dev_suite/request_logger/extractor/net_http.rb +53 -12
  42. data/lib/dev_suite/request_logger/logger.rb +9 -3
  43. data/lib/dev_suite/request_logger/request.rb +12 -0
  44. data/lib/dev_suite/request_logger/response.rb +34 -9
  45. data/lib/dev_suite/utils/construct/component/base.rb +13 -0
  46. data/lib/dev_suite/utils/construct/component/component.rb +1 -0
  47. data/lib/dev_suite/utils/construct/component/manager.rb +27 -10
  48. data/lib/dev_suite/utils/construct/component/validator/base.rb +25 -0
  49. data/lib/dev_suite/utils/construct/component/validator/validation_error.rb +21 -0
  50. data/lib/dev_suite/utils/construct/component/validator/validation_rule.rb +68 -0
  51. data/lib/dev_suite/utils/construct/component/validator/validator.rb +15 -0
  52. data/lib/dev_suite/utils/construct/component/validator.rb +13 -0
  53. data/lib/dev_suite/utils/construct/config/dependency_handler.rb +25 -34
  54. data/lib/dev_suite/utils/construct/config/settings/base.rb +35 -26
  55. data/lib/dev_suite/utils/data/base_operations.rb +61 -0
  56. data/lib/dev_suite/utils/data/data.rb +19 -0
  57. data/lib/dev_suite/utils/data/path_access.rb +172 -0
  58. data/lib/dev_suite/utils/data/search_filter.rb +60 -0
  59. data/lib/dev_suite/utils/data/serialization.rb +29 -0
  60. data/lib/dev_suite/utils/data/transformations.rb +45 -0
  61. data/lib/dev_suite/utils/data.rb +9 -0
  62. data/lib/dev_suite/utils/dependency_loader.rb +2 -2
  63. data/lib/dev_suite/utils/emoji.rb +1 -0
  64. data/lib/dev_suite/utils/file_loader/file_loader.rb +1 -5
  65. data/lib/dev_suite/utils/file_loader/loader/json.rb +4 -1
  66. data/lib/dev_suite/utils/file_loader/loader/loader.rb +23 -19
  67. data/lib/dev_suite/utils/file_loader/loader.rb +0 -2
  68. data/lib/dev_suite/utils/file_writer/atomic_writer.rb +53 -0
  69. data/lib/dev_suite/utils/file_writer/backup_manager.rb +21 -0
  70. data/lib/dev_suite/utils/file_writer/file_writer.rb +24 -0
  71. data/lib/dev_suite/utils/file_writer/writer/base.rb +43 -0
  72. data/lib/dev_suite/utils/file_writer/writer/json.rb +24 -0
  73. data/lib/dev_suite/utils/file_writer/writer/text.rb +27 -0
  74. data/lib/dev_suite/utils/file_writer/writer/writer.rb +14 -0
  75. data/lib/dev_suite/utils/file_writer/writer/yaml.rb +44 -0
  76. data/lib/dev_suite/utils/file_writer/writer.rb +11 -0
  77. data/lib/dev_suite/utils/file_writer/writer_manager.rb +32 -0
  78. data/lib/dev_suite/utils/file_writer.rb +9 -0
  79. data/lib/dev_suite/utils/store/config/config.rb +13 -0
  80. data/lib/dev_suite/utils/store/config/configuration.rb +30 -0
  81. data/lib/dev_suite/utils/store/config.rb +11 -0
  82. data/lib/dev_suite/utils/store/driver/base.rb +35 -0
  83. data/lib/dev_suite/utils/store/driver/driver.rb +18 -0
  84. data/lib/dev_suite/utils/store/driver/file.rb +61 -0
  85. data/lib/dev_suite/utils/store/driver/memory.rb +42 -0
  86. data/lib/dev_suite/utils/store/driver.rb +11 -0
  87. data/lib/dev_suite/utils/store/store.rb +69 -0
  88. data/lib/dev_suite/utils/store.rb +9 -0
  89. data/lib/dev_suite/utils/utils.rb +17 -5
  90. data/lib/dev_suite/utils/warning_handler.rb +25 -0
  91. data/lib/dev_suite/version.rb +1 -1
  92. data/lib/dev_suite/workflow/engine.rb +27 -0
  93. data/lib/dev_suite/workflow/step/base.rb +48 -0
  94. data/lib/dev_suite/workflow/step/composite.rb +27 -0
  95. data/lib/dev_suite/workflow/step/conditional.rb +23 -0
  96. data/lib/dev_suite/workflow/step/loop.rb +21 -0
  97. data/lib/dev_suite/workflow/step/parallel.rb +18 -0
  98. data/lib/dev_suite/workflow/step/step.rb +13 -0
  99. data/lib/dev_suite/workflow/step.rb +9 -0
  100. data/lib/dev_suite/workflow/step_context.rb +32 -0
  101. data/lib/dev_suite/workflow/workflow.rb +35 -0
  102. data/lib/dev_suite/workflow.rb +7 -0
  103. metadata +87 -3
  104. data/lib/dev_suite/utils/construct/component/initializer.rb +0 -28
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev_suite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Huy Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-26 00:00:00.000000000 Z
11
+ date: 2024-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: benchmark
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: csv
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: get_process_mem
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +94,12 @@ files:
80
94
  - bin/rspec
81
95
  - bin/setup
82
96
  - dev_suite.gemspec
97
+ - examples/workflow/basic_workflow.rb
98
+ - examples/workflow/composite_workflow.rb
99
+ - examples/workflow/conditional_workflow.rb
100
+ - examples/workflow/full_workflow.rb
101
+ - examples/workflow/loop_workflow.rb
102
+ - examples/workflow/parallel_workflow.rb
83
103
  - exe/devsuite
84
104
  - lib/dev_suite.rb
85
105
  - lib/dev_suite/cli.rb
@@ -132,6 +152,26 @@ files:
132
152
  - lib/dev_suite/performance/reporter/helpers/table_builder.rb
133
153
  - lib/dev_suite/performance/reporter/reporter.rb
134
154
  - lib/dev_suite/performance/reporter/simple.rb
155
+ - lib/dev_suite/request_builder.rb
156
+ - lib/dev_suite/request_builder/builder.rb
157
+ - lib/dev_suite/request_builder/builder/base.rb
158
+ - lib/dev_suite/request_builder/builder/builder.rb
159
+ - lib/dev_suite/request_builder/builder/http.rb
160
+ - lib/dev_suite/request_builder/config.rb
161
+ - lib/dev_suite/request_builder/config/config.rb
162
+ - lib/dev_suite/request_builder/config/configuration.rb
163
+ - lib/dev_suite/request_builder/formatter.rb
164
+ - lib/dev_suite/request_builder/formatter/base.rb
165
+ - lib/dev_suite/request_builder/formatter/formatter.rb
166
+ - lib/dev_suite/request_builder/formatter/graphql.rb
167
+ - lib/dev_suite/request_builder/request_builder.rb
168
+ - lib/dev_suite/request_builder/tool.rb
169
+ - lib/dev_suite/request_builder/tool/base.rb
170
+ - lib/dev_suite/request_builder/tool/curl.rb
171
+ - lib/dev_suite/request_builder/tool/tool.rb
172
+ - lib/dev_suite/request_builder/tool/validator.rb
173
+ - lib/dev_suite/request_builder/tool/validator/curl.rb
174
+ - lib/dev_suite/request_builder/tool/validator/validator.rb
135
175
  - lib/dev_suite/request_logger.rb
136
176
  - lib/dev_suite/request_logger/adapter.rb
137
177
  - lib/dev_suite/request_logger/adapter/adapter.rb
@@ -172,8 +212,12 @@ files:
172
212
  - lib/dev_suite/utils/construct/component.rb
173
213
  - lib/dev_suite/utils/construct/component/base.rb
174
214
  - lib/dev_suite/utils/construct/component/component.rb
175
- - lib/dev_suite/utils/construct/component/initializer.rb
176
215
  - lib/dev_suite/utils/construct/component/manager.rb
216
+ - lib/dev_suite/utils/construct/component/validator.rb
217
+ - lib/dev_suite/utils/construct/component/validator/base.rb
218
+ - lib/dev_suite/utils/construct/component/validator/validation_error.rb
219
+ - lib/dev_suite/utils/construct/component/validator/validation_rule.rb
220
+ - lib/dev_suite/utils/construct/component/validator/validator.rb
177
221
  - lib/dev_suite/utils/construct/config.rb
178
222
  - lib/dev_suite/utils/construct/config/attribute.rb
179
223
  - lib/dev_suite/utils/construct/config/attribute/attr_definition.rb
@@ -195,6 +239,13 @@ files:
195
239
  - lib/dev_suite/utils/construct/config/settings/manager.rb
196
240
  - lib/dev_suite/utils/construct/config/settings/settings.rb
197
241
  - lib/dev_suite/utils/construct/construct.rb
242
+ - lib/dev_suite/utils/data.rb
243
+ - lib/dev_suite/utils/data/base_operations.rb
244
+ - lib/dev_suite/utils/data/data.rb
245
+ - lib/dev_suite/utils/data/path_access.rb
246
+ - lib/dev_suite/utils/data/search_filter.rb
247
+ - lib/dev_suite/utils/data/serialization.rb
248
+ - lib/dev_suite/utils/data/transformations.rb
198
249
  - lib/dev_suite/utils/dependency_loader.rb
199
250
  - lib/dev_suite/utils/emoji.rb
200
251
  - lib/dev_suite/utils/error_handler.rb
@@ -211,11 +262,32 @@ files:
211
262
  - lib/dev_suite/utils/file_loader/loader/yaml.rb
212
263
  - lib/dev_suite/utils/file_loader/loader_manager.rb
213
264
  - lib/dev_suite/utils/file_loader/loader_registry.rb
265
+ - lib/dev_suite/utils/file_writer.rb
266
+ - lib/dev_suite/utils/file_writer/atomic_writer.rb
267
+ - lib/dev_suite/utils/file_writer/backup_manager.rb
268
+ - lib/dev_suite/utils/file_writer/file_writer.rb
269
+ - lib/dev_suite/utils/file_writer/writer.rb
270
+ - lib/dev_suite/utils/file_writer/writer/base.rb
271
+ - lib/dev_suite/utils/file_writer/writer/json.rb
272
+ - lib/dev_suite/utils/file_writer/writer/text.rb
273
+ - lib/dev_suite/utils/file_writer/writer/writer.rb
274
+ - lib/dev_suite/utils/file_writer/writer/yaml.rb
275
+ - lib/dev_suite/utils/file_writer/writer_manager.rb
214
276
  - lib/dev_suite/utils/logger.rb
215
277
  - lib/dev_suite/utils/path_matcher.rb
216
278
  - lib/dev_suite/utils/path_matcher/matcher.rb
217
279
  - lib/dev_suite/utils/path_matcher/path_matcher.rb
218
280
  - lib/dev_suite/utils/path_matcher/pattern.rb
281
+ - lib/dev_suite/utils/store.rb
282
+ - lib/dev_suite/utils/store/config.rb
283
+ - lib/dev_suite/utils/store/config/config.rb
284
+ - lib/dev_suite/utils/store/config/configuration.rb
285
+ - lib/dev_suite/utils/store/driver.rb
286
+ - lib/dev_suite/utils/store/driver/base.rb
287
+ - lib/dev_suite/utils/store/driver/driver.rb
288
+ - lib/dev_suite/utils/store/driver/file.rb
289
+ - lib/dev_suite/utils/store/driver/memory.rb
290
+ - lib/dev_suite/utils/store/store.rb
219
291
  - lib/dev_suite/utils/table.rb
220
292
  - lib/dev_suite/utils/table/column.rb
221
293
  - lib/dev_suite/utils/table/config.rb
@@ -232,7 +304,19 @@ files:
232
304
  - lib/dev_suite/utils/table/row.rb
233
305
  - lib/dev_suite/utils/table/table.rb
234
306
  - lib/dev_suite/utils/utils.rb
307
+ - lib/dev_suite/utils/warning_handler.rb
235
308
  - lib/dev_suite/version.rb
309
+ - lib/dev_suite/workflow.rb
310
+ - lib/dev_suite/workflow/engine.rb
311
+ - lib/dev_suite/workflow/step.rb
312
+ - lib/dev_suite/workflow/step/base.rb
313
+ - lib/dev_suite/workflow/step/composite.rb
314
+ - lib/dev_suite/workflow/step/conditional.rb
315
+ - lib/dev_suite/workflow/step/loop.rb
316
+ - lib/dev_suite/workflow/step/parallel.rb
317
+ - lib/dev_suite/workflow/step/step.rb
318
+ - lib/dev_suite/workflow/step_context.rb
319
+ - lib/dev_suite/workflow/workflow.rb
236
320
  homepage: https://patrick204nqh.github.io
237
321
  licenses:
238
322
  - MIT
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module DevSuite
4
- module Utils
5
- module Construct
6
- module Component
7
- module Initializer
8
- extend self
9
-
10
- def define_constants(base)
11
- structure_module = ensure_structure_module(base)
12
- define_structure_component(structure_module)
13
- end
14
-
15
- private
16
-
17
- def ensure_structure_module(base)
18
- base.const_defined?(:Structure) ? base.const_get(:Structure) : base.const_set(:Structure, Module.new)
19
- end
20
-
21
- def define_structure_component(structure_module)
22
- structure_module.const_set(:Component, Base) unless structure_module.const_defined?(:Component)
23
- end
24
- end
25
- end
26
- end
27
- end
28
- end