cmdx 1.20.0 → 1.21.0

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 (101) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/lib/cmdx/chain.rb +1 -1
  4. data/lib/cmdx/configuration.rb +12 -0
  5. data/lib/cmdx/context.rb +2 -2
  6. data/lib/cmdx/executor.rb +5 -1
  7. data/lib/cmdx/middlewares/runtime.rb +18 -3
  8. data/lib/cmdx/pipeline.rb +1 -1
  9. data/lib/cmdx/result.rb +64 -8
  10. data/lib/cmdx/settings.rb +4 -0
  11. data/lib/cmdx/task.rb +9 -2
  12. data/lib/cmdx/version.rb +1 -1
  13. data/lib/cmdx/workflow.rb +17 -0
  14. data/lib/generators/cmdx/templates/install.rb +9 -5
  15. data/lib/locales/af.yml +2 -0
  16. data/lib/locales/ar.yml +2 -0
  17. data/lib/locales/az.yml +2 -0
  18. data/lib/locales/be.yml +2 -0
  19. data/lib/locales/bg.yml +2 -0
  20. data/lib/locales/bn.yml +2 -0
  21. data/lib/locales/bs.yml +2 -0
  22. data/lib/locales/ca.yml +2 -0
  23. data/lib/locales/cnr.yml +2 -0
  24. data/lib/locales/cs.yml +2 -0
  25. data/lib/locales/cy.yml +2 -0
  26. data/lib/locales/da.yml +2 -0
  27. data/lib/locales/de.yml +2 -0
  28. data/lib/locales/dz.yml +2 -0
  29. data/lib/locales/el.yml +2 -0
  30. data/lib/locales/en.yml +2 -0
  31. data/lib/locales/eo.yml +2 -0
  32. data/lib/locales/es.yml +2 -0
  33. data/lib/locales/et.yml +2 -0
  34. data/lib/locales/eu.yml +2 -0
  35. data/lib/locales/fa.yml +2 -0
  36. data/lib/locales/fi.yml +2 -0
  37. data/lib/locales/fr.yml +2 -0
  38. data/lib/locales/fy.yml +2 -0
  39. data/lib/locales/gd.yml +2 -0
  40. data/lib/locales/gl.yml +2 -0
  41. data/lib/locales/he.yml +2 -0
  42. data/lib/locales/hi.yml +2 -0
  43. data/lib/locales/hr.yml +2 -0
  44. data/lib/locales/hu.yml +2 -0
  45. data/lib/locales/hy.yml +2 -0
  46. data/lib/locales/id.yml +2 -0
  47. data/lib/locales/is.yml +2 -0
  48. data/lib/locales/it.yml +2 -0
  49. data/lib/locales/ja.yml +2 -0
  50. data/lib/locales/ka.yml +2 -0
  51. data/lib/locales/kk.yml +2 -0
  52. data/lib/locales/km.yml +2 -0
  53. data/lib/locales/kn.yml +2 -0
  54. data/lib/locales/ko.yml +2 -0
  55. data/lib/locales/lb.yml +2 -0
  56. data/lib/locales/lo.yml +2 -0
  57. data/lib/locales/lt.yml +2 -0
  58. data/lib/locales/lv.yml +2 -0
  59. data/lib/locales/mg.yml +2 -0
  60. data/lib/locales/mk.yml +2 -0
  61. data/lib/locales/ml.yml +2 -0
  62. data/lib/locales/mn.yml +2 -0
  63. data/lib/locales/mr-IN.yml +2 -0
  64. data/lib/locales/ms.yml +2 -0
  65. data/lib/locales/nb.yml +2 -0
  66. data/lib/locales/ne.yml +2 -0
  67. data/lib/locales/nl.yml +2 -0
  68. data/lib/locales/nn.yml +2 -0
  69. data/lib/locales/oc.yml +2 -0
  70. data/lib/locales/or.yml +2 -0
  71. data/lib/locales/pa.yml +2 -0
  72. data/lib/locales/pl.yml +2 -0
  73. data/lib/locales/pt.yml +2 -0
  74. data/lib/locales/rm.yml +2 -0
  75. data/lib/locales/ro.yml +2 -0
  76. data/lib/locales/ru.yml +2 -0
  77. data/lib/locales/sc.yml +2 -0
  78. data/lib/locales/sk.yml +2 -0
  79. data/lib/locales/sl.yml +2 -0
  80. data/lib/locales/sq.yml +2 -0
  81. data/lib/locales/sr.yml +2 -0
  82. data/lib/locales/st.yml +2 -0
  83. data/lib/locales/sv.yml +2 -0
  84. data/lib/locales/sw.yml +2 -0
  85. data/lib/locales/ta.yml +2 -0
  86. data/lib/locales/te.yml +2 -0
  87. data/lib/locales/th.yml +2 -0
  88. data/lib/locales/tl.yml +2 -0
  89. data/lib/locales/tr.yml +2 -0
  90. data/lib/locales/tt.yml +2 -0
  91. data/lib/locales/ug.yml +2 -0
  92. data/lib/locales/uk.yml +2 -0
  93. data/lib/locales/ur.yml +2 -0
  94. data/lib/locales/uz.yml +2 -0
  95. data/lib/locales/vi.yml +2 -0
  96. data/lib/locales/wo.yml +2 -0
  97. data/lib/locales/zh-CN.yml +2 -0
  98. data/lib/locales/zh-HK.yml +2 -0
  99. data/lib/locales/zh-TW.yml +2 -0
  100. data/lib/locales/zh-YUE.yml +2 -0
  101. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34ebd45d6a27296d5960995fc1b313b808f1d3835df82ce688ae1a6dc4faa313
4
- data.tar.gz: 01ccc099ffd40950e4085c850ba3959db59bddbb5df39e8b540a6310607f7a59
3
+ metadata.gz: 1acff12a85519d3546d8c2c6b8d9a8fc6330e731826a9a4a359907631e7afa82
4
+ data.tar.gz: 69c814dc115c70dc36ab02e7462d00a5b802490d39b7f4bc1fb2c9e5c666c55e
5
5
  SHA512:
6
- metadata.gz: 9cadc2e6c98e819512a62eb484c7ffb5ed2ea29bf135851441cb78fa4bb64421b844337d489976c4148c0e471144159640257dc20d574a802e90619d833c2316
7
- data.tar.gz: 3edd420426ccc2ed48b1bc3f972984111eb10ec1f41bd835de478318cb5dba169cb440c5ff24b202533a942040a62aaf9897d88f03229cc97285ea69af11a377
6
+ metadata.gz: f2bc1eb34789f888bffc84b9ebb65252fc23ea8d598465c9ff853670ab44c9e640988b2a528ed97ff53cc1774a26e35a87706a9056aa7fc55f6604e73540cb29
7
+ data.tar.gz: 5c7af44bda7a2d7371c8f62183dde2195bf9b27382c65c379bc8bfd94321d7b3ab61ad41888a9a1dad57c4e606de843f4d479581cc2cea20aeb3fb8996afcd52
data/CHANGELOG.md CHANGED
@@ -6,6 +6,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [UNRELEASED]
8
8
 
9
+ ## [1.21.0] - 2026-04-09
10
+
11
+ ### Added
12
+ - Add `strict` option to `Result#skip!` and `Result#fail!` to bypass breakpoint halting in `execute!`
13
+ - Add `dump_context` global/local setting to include `context` in `Task#to_h`
14
+ - Add `Result#success!` for annotating successful results
15
+ - Add `started_at` and `ended_at` to runtime middleware payload
16
+ - Add `keys`, `values`, `each`, `each_key`, `each_value` methods to context
17
+ - Add `subtasks` to returns tasks defined in a workflow
18
+
19
+ ### Changed
20
+ - Move `faults.unspecified` locale key to `reasons.unspecified`
21
+
9
22
  ## [1.20.0] - 2026-03-12
10
23
 
11
24
  ### Added
data/lib/cmdx/chain.rb CHANGED
@@ -32,7 +32,7 @@ module CMDx
32
32
  attr_reader :results
33
33
 
34
34
  def_delegators :results, :first, :last, :size
35
- def_delegators :first, :state, :status, :outcome, :runtime
35
+ def_delegators :first, :state, :status, :outcome
36
36
 
37
37
  # Creates a new chain with a unique identifier and empty results collection.
38
38
  #
@@ -123,6 +123,16 @@ module CMDx
123
123
  # @rbs @rollback_on: Array[String]
124
124
  attr_accessor :rollback_on
125
125
 
126
+ # Returns whether to include context data in hash representation output.
127
+ #
128
+ # @return [Boolean] true if context should be included (default: false)
129
+ #
130
+ # @example
131
+ # config.dump_context = true
132
+ #
133
+ # @rbs @dump_context: bool
134
+ attr_accessor :dump_context
135
+
126
136
  # Returns whether to freeze task results after execution.
127
137
  # Set to false in test environments to allow stubbing on result objects.
128
138
  #
@@ -167,6 +177,7 @@ module CMDx
167
177
  @task_breakpoints = DEFAULT_BREAKPOINTS
168
178
  @workflow_breakpoints = DEFAULT_BREAKPOINTS
169
179
  @rollback_on = DEFAULT_ROLLPOINTS
180
+ @dump_context = false
170
181
  @freeze_results = true
171
182
  @default_locale = "en"
172
183
 
@@ -206,6 +217,7 @@ module CMDx
206
217
  backtrace: @backtrace,
207
218
  backtrace_cleaner: @backtrace_cleaner,
208
219
  exception_handler: @exception_handler,
220
+ dump_context: @dump_context,
209
221
  logger: @logger
210
222
  }
211
223
  end
data/lib/cmdx/context.rb CHANGED
@@ -22,7 +22,7 @@ module CMDx
22
22
  attr_reader :table
23
23
  alias to_h table
24
24
 
25
- def_delegators :table, :each, :map
25
+ def_delegators :table, :keys, :values, :each, :each_key, :each_value, :map
26
26
 
27
27
  # Creates a new Context instance from the given arguments.
28
28
  #
@@ -214,7 +214,7 @@ module CMDx
214
214
  #
215
215
  # @rbs (untyped other) -> bool
216
216
  def eql?(other)
217
- other.is_a?(self.class) && (to_h == other.to_h)
217
+ other.is_a?(self.class) && (table == other.to_h)
218
218
  end
219
219
  alias == eql?
220
220
 
data/lib/cmdx/executor.rb CHANGED
@@ -135,6 +135,7 @@ module CMDx
135
135
  protected
136
136
 
137
137
  # Determines if execution should halt based on breakpoint configuration.
138
+ # Returns false when the result was created with +strict: false+.
138
139
  #
139
140
  # @param exception [Exception] The exception that occurred
140
141
  #
@@ -142,6 +143,8 @@ module CMDx
142
143
  #
143
144
  # @rbs (Exception exception) -> bool
144
145
  def halt_execution?(exception)
146
+ return false unless exception.result.strict?
147
+
145
148
  @halt_statuses ||= Utils::Normalize.statuses(
146
149
  task.class.settings.breakpoints ||
147
150
  task.class.settings.task_breakpoints
@@ -229,13 +232,14 @@ module CMDx
229
232
  end
230
233
 
231
234
  # Executes the main task logic.
235
+ # Wraps task.work in catch(:cmdx_halt) so that success! can halt early.
232
236
  #
233
237
  # @rbs () -> void
234
238
  def execution!
235
239
  invoke_callbacks(:before_execution)
236
240
 
237
241
  result.executing!
238
- task.work
242
+ catch(:cmdx_halt) { task.work }
239
243
  end
240
244
 
241
245
  # Verifies that all declared returns are present in the context after execution.
@@ -11,7 +11,8 @@ module CMDx
11
11
 
12
12
  extend self
13
13
 
14
- # Middleware entry point that measures task execution runtime.
14
+ # Middleware entry point that measures task execution runtime and
15
+ # task execution start and end times.
15
16
  #
16
17
  # Evaluates the condition from options and measures execution time
17
18
  # if enabled. Uses monotonic clock for precise timing measurements
@@ -35,11 +36,16 @@ module CMDx
35
36
  #
36
37
  # @rbs (Task task, **untyped options) { () -> untyped } -> untyped
37
38
  def call(task, **options)
39
+ unow = utc_time
40
+ mnow = monotonic_time
38
41
  return yield unless Utils::Condition.evaluate(task, options)
39
42
 
40
- now = monotonic_time
41
43
  result = yield
42
- task.result.metadata[:runtime] = monotonic_time - now
44
+ task.result.metadata.merge!(
45
+ runtime: monotonic_time - mnow,
46
+ ended_at: utc_time,
47
+ started_at: unow
48
+ )
43
49
  result
44
50
  end
45
51
 
@@ -57,6 +63,15 @@ module CMDx
57
63
  Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond)
58
64
  end
59
65
 
66
+ # Gets the current UTC time in ISO 8601 format.
67
+ #
68
+ # @return [String] Current UTC time in ISO 8601 format
69
+ #
70
+ # @rbs () -> String
71
+ def utc_time
72
+ Time.now.utc.iso8601
73
+ end
74
+
60
75
  end
61
76
  end
62
77
  end
data/lib/cmdx/pipeline.rb CHANGED
@@ -159,7 +159,7 @@ module CMDx
159
159
 
160
160
  workflow.public_send(
161
161
  :"#{faulted.last.status}!",
162
- Locale.t("cmdx.faults.unspecified"),
162
+ Locale.t("cmdx.reasons.unspecified"),
163
163
  source: :parallel,
164
164
  faults: faulted.map(&:to_h)
165
165
  )
data/lib/cmdx/result.rb CHANGED
@@ -109,6 +109,18 @@ module CMDx
109
109
  # @rbs @retries: Integer
110
110
  attr_accessor :retries
111
111
 
112
+ # Returns whether this result is strict.
113
+ # When false, {CMDx::Executor#halt_execution?} returns false
114
+ # regardless of the task's breakpoint settings.
115
+ #
116
+ # @return [Boolean] Whether the result is strict
117
+ #
118
+ # @example
119
+ # result.strict? # => true
120
+ #
121
+ # @rbs @strict: bool
122
+ attr_reader :strict
123
+
112
124
  # Returns whether the result has been rolled back.
113
125
  #
114
126
  # @return [Boolean] Whether the result has been rolled back
@@ -143,6 +155,7 @@ module CMDx
143
155
  @reason = nil
144
156
  @cause = nil
145
157
  @retries = 0
158
+ @strict = true
146
159
  @rolled_back = false
147
160
  end
148
161
 
@@ -269,9 +282,36 @@ module CMDx
269
282
  self
270
283
  end
271
284
 
285
+ # Sets a reason and optional metadata on a successful result without
286
+ # changing its state or status. Useful for annotating why a task succeeded.
287
+ # When halt is true, uses throw/catch to exit the work method early.
288
+ #
289
+ # @param reason [String, nil] Reason or note for the success
290
+ # @param halt [Boolean] Whether to halt execution after success
291
+ # @param metadata [Hash] Additional metadata about the success
292
+ # @option metadata [Object] :* Any key-value pairs for additional metadata
293
+ #
294
+ # @raise [RuntimeError] When status is not success
295
+ #
296
+ # @example
297
+ # result.success!("Created 42 records")
298
+ # result.success!("Imported", halt: false, rows: 100)
299
+ #
300
+ # @rbs (?String? reason, halt: bool, **untyped metadata) -> void
301
+ def success!(reason = nil, halt: true, **metadata)
302
+ raise "can only be used while #{SUCCESS}" unless success?
303
+
304
+ @reason = reason
305
+ @metadata = metadata
306
+
307
+ throw(:cmdx_halt) if halt
308
+ end
309
+
272
310
  # @param reason [String, nil] Reason for skipping the task
273
311
  # @param halt [Boolean] Whether to halt execution after skipping
274
312
  # @param cause [Exception, nil] Exception that caused the skip
313
+ # @param strict [Boolean] Whether this skip is strict (default: true).
314
+ # When false, {CMDx::Executor#halt_execution?} returns false regardless of task settings.
275
315
  # @param metadata [Hash] Additional metadata about the skip
276
316
  # @option metadata [Object] :* Any key-value pairs for additional metadata
277
317
  #
@@ -280,17 +320,19 @@ module CMDx
280
320
  # @example
281
321
  # result.skip!("Dependencies not met", cause: dependency_error)
282
322
  # result.skip!("Already processed", halt: false)
323
+ # result.skip!("Optional step", strict: false)
283
324
  #
284
- # @rbs (?String? reason, halt: bool, cause: Exception?, **untyped metadata) -> void
285
- def skip!(reason = nil, halt: true, cause: nil, **metadata)
325
+ # @rbs (?String? reason, halt: bool, cause: Exception?, strict: bool, **untyped metadata) -> void
326
+ def skip!(reason = nil, halt: true, cause: nil, strict: true, **metadata)
286
327
  return if skipped?
287
328
 
288
329
  raise "can only transition to #{SKIPPED} from #{SUCCESS}" unless success?
289
330
 
290
331
  @state = INTERRUPTED
291
332
  @status = SKIPPED
292
- @reason = reason || Locale.t("cmdx.faults.unspecified")
333
+ @reason = reason || Locale.t("cmdx.reasons.unspecified")
293
334
  @cause = cause
335
+ @strict = strict
294
336
  @metadata = metadata
295
337
 
296
338
  halt! if halt
@@ -299,6 +341,8 @@ module CMDx
299
341
  # @param reason [String, nil] Reason for task failure
300
342
  # @param halt [Boolean] Whether to halt execution after failure
301
343
  # @param cause [Exception, nil] Exception that caused the failure
344
+ # @param strict [Boolean] Whether this failure is strict (default: true).
345
+ # When false, {CMDx::Executor#halt_execution?} returns false regardless of task settings.
302
346
  # @param metadata [Hash] Additional metadata about the failure
303
347
  # @option metadata [Object] :* Any key-value pairs for additional metadata
304
348
  #
@@ -307,17 +351,19 @@ module CMDx
307
351
  # @example
308
352
  # result.fail!("Validation failed", cause: validation_error)
309
353
  # result.fail!("Network timeout", halt: false, timeout: 30)
354
+ # result.fail!("Soft failure", strict: false)
310
355
  #
311
- # @rbs (?String? reason, halt: bool, cause: Exception?, **untyped metadata) -> void
312
- def fail!(reason = nil, halt: true, cause: nil, **metadata)
356
+ # @rbs (?String? reason, halt: bool, cause: Exception?, strict: bool, **untyped metadata) -> void
357
+ def fail!(reason = nil, halt: true, cause: nil, strict: true, **metadata)
313
358
  return if failed?
314
359
 
315
360
  raise "can only transition to #{FAILED} from #{SUCCESS}" unless success?
316
361
 
317
362
  @state = INTERRUPTED
318
363
  @status = FAILED
319
- @reason = reason || Locale.t("cmdx.faults.unspecified")
364
+ @reason = reason || Locale.t("cmdx.reasons.unspecified")
320
365
  @cause = cause
366
+ @strict = strict
321
367
  @metadata = metadata
322
368
 
323
369
  halt! if halt
@@ -464,6 +510,16 @@ module CMDx
464
510
  retries.positive?
465
511
  end
466
512
 
513
+ # @return [Boolean] Whether the result is strict
514
+ #
515
+ # @example
516
+ # result.strict? # => true
517
+ #
518
+ # @rbs () -> bool
519
+ def strict?
520
+ !!@strict
521
+ end
522
+
467
523
  # @return [Boolean] Whether the result has been rolled back
468
524
  #
469
525
  # @example
@@ -499,7 +555,7 @@ module CMDx
499
555
  #
500
556
  # @example
501
557
  # result.to_h
502
- # # => {state: "complete", status: "success", outcome: "success", metadata: {}}
558
+ # # => {state: "complete", status: "success", outcome: "success", reason: "Unspecified", metadata: {}}
503
559
  #
504
560
  # @rbs () -> Hash[Symbol, untyped]
505
561
  def to_h
@@ -507,10 +563,10 @@ module CMDx
507
563
  state:,
508
564
  status:,
509
565
  outcome:,
566
+ reason:,
510
567
  metadata:
511
568
  ).tap do |hash|
512
569
  if interrupted?
513
- hash[:reason] = reason
514
570
  hash[:cause] = cause
515
571
  hash[:rolled_back] = rolled_back?
516
572
  end
data/lib/cmdx/settings.rb CHANGED
@@ -113,6 +113,10 @@ module CMDx
113
113
  # @return [Boolean] true if backtraces should be logged
114
114
  delegate_to_configuration :backtrace
115
115
 
116
+ # @!attribute [rw] dump_context
117
+ # @return [Boolean] true if context should be included in Task#to_h
118
+ delegate_to_configuration :dump_context
119
+
116
120
  # @!attribute [rw] rollback_on
117
121
  # @return [Array<String>] Statuses that trigger rollback
118
122
  delegate_to_configuration :rollback_on
data/lib/cmdx/task.rb CHANGED
@@ -70,7 +70,7 @@ module CMDx
70
70
  # @rbs @chain: Chain
71
71
  attr_reader :chain
72
72
 
73
- def_delegators :result, :skip!, :fail!, :throw!
73
+ def_delegators :result, :success!, :skip!, :fail!, :throw!
74
74
  def_delegators :chain, :dry_run?
75
75
 
76
76
  # @param context [Hash, Context, nil] The initial context for the task
@@ -376,6 +376,7 @@ module CMDx
376
376
  # @option return [Array<Symbol>] :tags The task tags
377
377
  # @option return [String] :class The task class name
378
378
  # @option return [String] :id The task identifier
379
+ # @option return [Hash] :context The task context (when dump_context is true)
379
380
  #
380
381
  # @return [Hash] A hash representation of the task
381
382
  #
@@ -394,7 +395,13 @@ module CMDx
394
395
  id:,
395
396
  dry_run: dry_run?,
396
397
  tags: self.class.settings.tags
397
- }
398
+ }.tap do |hash|
399
+ if self.class.settings.dump_context
400
+ # Large context can make dumps and logs very noisy,
401
+ # so only include it if explicitly enabled
402
+ hash[:context] = context.to_h
403
+ end
404
+ end
398
405
  end
399
406
 
400
407
  # @return [String] A string representation of the task
data/lib/cmdx/version.rb CHANGED
@@ -5,6 +5,6 @@ module CMDx
5
5
  # @return [String] the version of the CMDx gem
6
6
  #
7
7
  # @rbs return: String
8
- VERSION = "1.20.0"
8
+ VERSION = "1.21.0"
9
9
 
10
10
  end
data/lib/cmdx/workflow.rb CHANGED
@@ -73,6 +73,23 @@ module CMDx
73
73
  end
74
74
  alias task tasks
75
75
 
76
+ # Returns all tasks in the pipeline.
77
+ #
78
+ # @return [Array<Class>] Array of task classes
79
+ #
80
+ # @example
81
+ # class MyWorkflow
82
+ # include CMDx::Workflow
83
+ # task Task1
84
+ # task Task2
85
+ # puts subtasks.size # => 2
86
+ # end
87
+ #
88
+ # @rbs () -> Array[Class]
89
+ def subtasks
90
+ pipeline.flat_map(&:tasks)
91
+ end
92
+
76
93
  end
77
94
 
78
95
  # Represents a group of tasks with shared execution options.
@@ -10,7 +10,7 @@ CMDx.configure do |config|
10
10
 
11
11
  # Workflow breakpoint configuration - controls when workflows stop execution
12
12
  # When a task returns these statuses, subsequent workflow tasks won't execute
13
- # See https://github.com/drexed/cmdx/blob/main/docs/workflow.md for more details
13
+ # See https://github.com/drexed/cmdx/blob/main/docs/workflows.md for more details
14
14
  #
15
15
  # Available statuses: "success", "skipped", "failed"
16
16
  # If set to an empty array, workflow will never halt
@@ -44,18 +44,22 @@ CMDx.configure do |config|
44
44
  # config.default_locale = "en"
45
45
 
46
46
  # Backtrace configuration - controls whether to log backtraces on faults and exceptions
47
- # https://github.com/drexed/cmdx/blob/main/docs/getting_started.md#backtraces
47
+ # https://github.com/drexed/cmdx/blob/main/docs/configuration.md#backtraces
48
48
  # config.backtrace = false
49
49
  # config.backtrace_cleaner = nil
50
50
 
51
51
  # Exception handler configuration - called when non-fault exceptions are raised
52
- # https://github.com/drexed/cmdx/blob/main/docs/getting_started.md#exception-handler
52
+ # https://github.com/drexed/cmdx/blob/main/docs/configuration.md#exception-handlers
53
53
  # config.exception_handler = nil
54
54
 
55
+ # Dump context configuration - include context data in hash representation output
56
+ # https://github.com/drexed/cmdx/blob/main/docs/configuration.md#dump-context
57
+ # config.dump_context = false
58
+
55
59
  # Additional global configurations - automatically applied to all tasks
56
60
  #
57
61
  # Middlewares - https://github.com/drexed/cmdx/blob/main/docs/middlewares.md
58
62
  # Callbacks - https://github.com/drexed/cmdx/blob/main/docs/callbacks.md
59
- # Coercions - https://github.com/drexed/cmdx/blob/main/docs/coercions.md
60
- # Validations - https://github.com/drexed/cmdx/blob/main/docs/validations.md
63
+ # Coercions - https://github.com/drexed/cmdx/blob/main/docs/attributes/coercions.md
64
+ # Validations - https://github.com/drexed/cmdx/blob/main/docs/attributes/validations.md
61
65
  end
data/lib/locales/af.yml CHANGED
@@ -13,6 +13,8 @@ af:
13
13
  faults:
14
14
  invalid: "Ongeldig"
15
15
  unspecified: "Ongespesifiseer"
16
+ reasons:
17
+ unspecified: "Ongespesifiseer"
16
18
  types:
17
19
  array: "skikking"
18
20
  big_decimal: "groot desimale"
data/lib/locales/ar.yml CHANGED
@@ -13,6 +13,8 @@ ar:
13
13
  faults:
14
14
  invalid: "غير صالح"
15
15
  unspecified: "غير محدد"
16
+ reasons:
17
+ unspecified: "غير محدد"
16
18
  types:
17
19
  array: "مصفوفة"
18
20
  big_decimal: "عدد عشري كبير"
data/lib/locales/az.yml CHANGED
@@ -13,6 +13,8 @@ az:
13
13
  faults:
14
14
  invalid: "Etibarsız"
15
15
  unspecified: "Göstərilməyib"
16
+ reasons:
17
+ unspecified: "Göstərilməyib"
16
18
  types:
17
19
  array: "massiv"
18
20
  big_decimal: "böyük onluq"
data/lib/locales/be.yml CHANGED
@@ -13,6 +13,8 @@ be:
13
13
  faults:
14
14
  invalid: "Няправільныя"
15
15
  unspecified: "Не паказана"
16
+ reasons:
17
+ unspecified: "Не паказана"
16
18
  types:
17
19
  array: "масіў"
18
20
  big_decimal: "вялікае дзесятковае лік"
data/lib/locales/bg.yml CHANGED
@@ -13,6 +13,8 @@ bg:
13
13
  faults:
14
14
  invalid: "Невалидни"
15
15
  unspecified: "Не е посочена"
16
+ reasons:
17
+ unspecified: "Не е посочена"
16
18
  types:
17
19
  array: "масив"
18
20
  big_decimal: "голямо десетично число"
data/lib/locales/bn.yml CHANGED
@@ -13,6 +13,8 @@ bn:
13
13
  faults:
14
14
  invalid: "অবৈধ"
15
15
  unspecified: "অনির্দিষ্ট"
16
+ reasons:
17
+ unspecified: "অনির্দিষ্ট"
16
18
  types:
17
19
  array: "অ্যারে"
18
20
  big_decimal: "বড় দশমিক"
data/lib/locales/bs.yml CHANGED
@@ -13,6 +13,8 @@ bs:
13
13
  faults:
14
14
  invalid: "Neispravni"
15
15
  unspecified: "Nije naveden"
16
+ reasons:
17
+ unspecified: "Nije naveden"
16
18
  types:
17
19
  array: "niz"
18
20
  big_decimal: "veliki decimalni broj"
data/lib/locales/ca.yml CHANGED
@@ -13,6 +13,8 @@ ca:
13
13
  faults:
14
14
  invalid: "No vàlides"
15
15
  unspecified: "No especificat"
16
+ reasons:
17
+ unspecified: "No especificat"
16
18
  types:
17
19
  array: "array"
18
20
  big_decimal: "decimal gran"
data/lib/locales/cnr.yml CHANGED
@@ -13,6 +13,8 @@ cnr:
13
13
  faults:
14
14
  invalid: "Neispravni"
15
15
  unspecified: "Nije dat"
16
+ reasons:
17
+ unspecified: "Nije dat"
16
18
  types:
17
19
  array: "niz"
18
20
  big_decimal: "veliki decimalni"
data/lib/locales/cs.yml CHANGED
@@ -13,6 +13,8 @@ cs:
13
13
  faults:
14
14
  invalid: "Neplatné"
15
15
  unspecified: "Neurčeno"
16
+ reasons:
17
+ unspecified: "Neurčeno"
16
18
  types:
17
19
  array: "pole"
18
20
  big_decimal: "velké desetinné číslo"
data/lib/locales/cy.yml CHANGED
@@ -13,6 +13,8 @@ cy:
13
13
  faults:
14
14
  invalid: "Annilys"
15
15
  unspecified: "Anhebgor"
16
+ reasons:
17
+ unspecified: "Anhebgor"
16
18
  types:
17
19
  array: "arae"
18
20
  big_decimal: "degol mawr"
data/lib/locales/da.yml CHANGED
@@ -13,6 +13,8 @@ da:
13
13
  faults:
14
14
  invalid: "Ugyldige"
15
15
  unspecified: "Uspecificeret"
16
+ reasons:
17
+ unspecified: "Uspecificeret"
16
18
  types:
17
19
  array: "array"
18
20
  big_decimal: "stort decimaltal"
data/lib/locales/de.yml CHANGED
@@ -13,6 +13,8 @@ de:
13
13
  faults:
14
14
  invalid: "Ungültig"
15
15
  unspecified: "Nicht angegeben"
16
+ reasons:
17
+ unspecified: "Nicht angegeben"
16
18
  types:
17
19
  array: "Array"
18
20
  big_decimal: "große Dezimalzahl"
data/lib/locales/dz.yml CHANGED
@@ -13,6 +13,8 @@ dz:
13
13
  faults:
14
14
  invalid: "ཆ་རྐྱེན་མི་ཆོག"
15
15
  unspecified: "མ་བཟུང་།"
16
+ reasons:
17
+ unspecified: "མ་བཟུང་།"
16
18
  types:
17
19
  array: "ཐིག་ཕྲེང་།"
18
20
  big_decimal: "ཆེ་བའི་བཅུ་ཆ།"
data/lib/locales/el.yml CHANGED
@@ -13,6 +13,8 @@ el:
13
13
  faults:
14
14
  invalid: "Μη έγκυρες"
15
15
  unspecified: "Απροσδιόριστο"
16
+ reasons:
17
+ unspecified: "Απροσδιόριστο"
16
18
  types:
17
19
  array: "πίνακας"
18
20
  big_decimal: "μεγάλος δεκαδικός"
data/lib/locales/en.yml CHANGED
@@ -11,6 +11,8 @@ en:
11
11
  faults:
12
12
  invalid: "Invalid"
13
13
  unspecified: "Unspecified"
14
+ reasons:
15
+ unspecified: "Unspecified"
14
16
  returns:
15
17
  missing: "must be set in the context"
16
18
  types:
data/lib/locales/eo.yml CHANGED
@@ -13,6 +13,8 @@ eo:
13
13
  faults:
14
14
  invalid: "Nevalidaj"
15
15
  unspecified: "Nespecifita"
16
+ reasons:
17
+ unspecified: "Nespecifita"
16
18
  types:
17
19
  array: "tabelo"
18
20
  big_decimal: "granda dekuma"
data/lib/locales/es.yml CHANGED
@@ -13,6 +13,8 @@ es:
13
13
  faults:
14
14
  invalid: "Inválidas"
15
15
  unspecified: "No especificada"
16
+ reasons:
17
+ unspecified: "No especificada"
16
18
  types:
17
19
  array: "array"
18
20
  big_decimal: "decimal grande"
data/lib/locales/et.yml CHANGED
@@ -13,6 +13,8 @@ et:
13
13
  faults:
14
14
  invalid: "Kehtetud"
15
15
  unspecified: "Määramata"
16
+ reasons:
17
+ unspecified: "Määramata"
16
18
  types:
17
19
  array: "massiiv"
18
20
  big_decimal: "suur kümnendmurd"
data/lib/locales/eu.yml CHANGED
@@ -13,6 +13,8 @@ eu:
13
13
  faults:
14
14
  invalid: "Baliogabeak"
15
15
  unspecified: "Zehaztu gabe"
16
+ reasons:
17
+ unspecified: "Zehaztu gabe"
16
18
  types:
17
19
  array: "array"
18
20
  big_decimal: "hamartar handia"
data/lib/locales/fa.yml CHANGED
@@ -13,6 +13,8 @@ fa:
13
13
  faults:
14
14
  invalid: "نامعتبر"
15
15
  unspecified: "نامشخص"
16
+ reasons:
17
+ unspecified: "نامشخص"
16
18
  types:
17
19
  array: "آرایه"
18
20
  big_decimal: "اعشاری بزرگ"