chaotic_job 0.7.0 → 0.8.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94de9ce766a9042a925882e70f29a8022fbd3b22fbd175ed3254260e04962cba
4
- data.tar.gz: e05d2546038d72cd9181fef3eff223d7adec84225b0fa1267d89d0b3880351ef
3
+ metadata.gz: eb8c72d5ca7192303c7c337d472c3eb6b02d3fc42eca6261dde846246b6526c6
4
+ data.tar.gz: 34726750b6c695d27f7d9b9260ad45a31710f7f870444d4ce5b2ca2f167cdd97
5
5
  SHA512:
6
- metadata.gz: 29fedcda5ca8ec4c98fa68d4f1e0661194c558a72a7a70b6b19a445de0e4bb0741e873c1365911315a8be73461248ccbca3005dd604e0a1f8229cf75aa4f7f69
7
- data.tar.gz: 93423ffd252f3faf4b3c0e0c0e7097fc9e14468d884935fed12421ca653cc99a47819ab80833d4068e0c8ebf23752e45385923384c56e4072e08554d7fe872f2
6
+ metadata.gz: 92a1d4958ab971e5850b0f60770fbf09c0c2556cdf25eb9cf23d494f8dabdce660ebd47718bb590b65d124c096d2bca391b4198bcbef6b241fe4b11c26468239
7
+ data.tar.gz: 319f7d9d1fa9f78c5490a5e48a58e464907432cdb018a298d365d84a8e514ac7791ea92f8fcc54e275da36da85b4ad411e21406ac46a8ad19c03d1054d478bbd
data/.standard.yml CHANGED
@@ -5,3 +5,5 @@ ruby_version: 3.0
5
5
  ignore:
6
6
  - 'test/**/*':
7
7
  - Lint/ConstantDefinitionInBlock
8
+ - 'lib/**/*':
9
+ - Style/YodaCondition
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.8.0] - 2025-06-11
4
+
5
+ - Add methods to allow checking if a Scenario matches a particular Glitch key + event pair [#10](https://github.com/fractaledmind/chaotic_job/pull/10)
6
+
3
7
  ## [0.7.0] - 2025-06-09
4
8
 
5
9
  - Glitch only works with singular event + key definition [#6](https://github.com/fractaledmind/chaotic_job/pull/6)
@@ -19,6 +19,8 @@ module ChaoticJob
19
19
  new(key, :return, retval: return_type, &block)
20
20
  end
21
21
 
22
+ attr_reader :key, :event
23
+
22
24
  def initialize(key, event, *args, retval: nil, **kwargs, &block)
23
25
  @event = event
24
26
  @key = key
@@ -36,5 +36,23 @@ module ChaoticJob
36
36
  def glitched?
37
37
  @glitch.executed?
38
38
  end
39
+
40
+ def before_line?(key)
41
+ return false unless :line == @glitch.event
42
+
43
+ key == @glitch.key
44
+ end
45
+
46
+ def before_call?(key)
47
+ return false unless :call == @glitch.event
48
+
49
+ key == @glitch.key
50
+ end
51
+
52
+ def before_return?(key)
53
+ return false unless :return == @glitch.event
54
+
55
+ key == @glitch.key
56
+ end
39
57
  end
40
58
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ChaoticJob
4
- VERSION = "0.7.0"
4
+ VERSION = "0.8.0"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chaotic_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Margheim
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-06-09 00:00:00.000000000 Z
10
+ date: 2025-06-11 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activejob