lex-react 0.1.2 → 0.1.3

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: 7b6e8c6fc804c004a10065afcadedd161352c1f5c47d02facd4a38ae04b6c47d
4
- data.tar.gz: 883cd1e4c4feecbc520b3f2aac45b06d9bd8fbf90ea0535cf9eee550d7f227a4
3
+ metadata.gz: f71f99eeab9038e0ad04b2447e615c01c936a642af8226c8f0187d0994ecd917
4
+ data.tar.gz: 12e0401f2ac44a9f4306a2161cf7a34dff2d68a8c9712637b6aa2838e4e47eda
5
5
  SHA512:
6
- metadata.gz: 2b2b308b970e94d06c2268fa73b4f76818f49ed717da6c88a21c7c86bbbb887d06a5663373ef01fc41e0cf6deaea5ec108107fe84385226c72de19cf3df01347
7
- data.tar.gz: b9ff9ac28badf04feb8199649bcabc2f8adef8511f93ad0da27802b19bb997c8573d6369bbac25916561f665ec697f2aadc6541be3be0fc2779a880eecb35cbd
6
+ metadata.gz: 426ffc5b872bb31bd9a9bf984e3b347c9ba9ee6445a446facc66b2f0d3c4945c6b16047b164476699d91f4fcb26977bbff6ee726d40659cbf7f020ac8a210c75
7
+ data.tar.gz: f2a3688c37f3d17d9ac51c4ec02dbf3858b75c8f58b243b8d80cddcda39e87e7a48b03d40f2563d2c8f62c3acd480595c1a4c0b081c9453bbeb6864b18a20b31
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.3] - 2026-03-30
4
+
5
+ ### Changed
6
+ - update to rubocop-legion 0.1.7, resolve all offenses
7
+
3
8
  ## [0.1.2] - 2026-03-29
4
9
 
5
10
  ### Changed
@@ -14,7 +14,7 @@ module Legion
14
14
  .gsub('__DS__', '\..*')
15
15
  regex_str = "\\A#{regex_str}\\z"
16
16
  Regexp.new(regex_str).match?(event_name)
17
- rescue RegexpError
17
+ rescue RegexpError => _e
18
18
  false
19
19
  end
20
20
 
@@ -36,7 +36,7 @@ module Legion
36
36
  else
37
37
  false
38
38
  end
39
- rescue StandardError
39
+ rescue StandardError => _e
40
40
  false
41
41
  end
42
42
  end
@@ -17,7 +17,7 @@ module Legion
17
17
  {}
18
18
  end
19
19
  new(rules_hash)
20
- rescue StandardError
20
+ rescue StandardError => _e
21
21
  new({})
22
22
  end
23
23
 
@@ -5,7 +5,7 @@ module Legion
5
5
  module React
6
6
  module Runners
7
7
  module React
8
- module_function
8
+ extend self
9
9
 
10
10
  def handle_event(event:)
11
11
  engine = rule_engine
@@ -45,6 +45,8 @@ module Legion
45
45
  @reaction_dispatcher = nil
46
46
  end
47
47
 
48
+ private
49
+
48
50
  def rule_engine
49
51
  @rule_engine ||= RuleEngine.from_settings
50
52
  end
@@ -68,11 +70,9 @@ module Legion
68
70
  return {} unless defined?(Legion::Settings) && !Legion::Settings[:react].nil?
69
71
 
70
72
  Legion::Settings[:react] || {}
71
- rescue StandardError
73
+ rescue StandardError => _e
72
74
  {}
73
75
  end
74
-
75
- private_class_method :rule_engine, :loop_breaker, :reaction_dispatcher, :react_settings
76
76
  end
77
77
  end
78
78
  end
@@ -3,7 +3,7 @@
3
3
  module Legion
4
4
  module Extensions
5
5
  module React
6
- VERSION = '0.1.2'
6
+ VERSION = '0.1.3'
7
7
  end
8
8
  end
9
9
  end
@@ -11,7 +11,7 @@ require_relative 'react/runners/react'
11
11
  module Legion
12
12
  module Extensions
13
13
  module React
14
- extend Legion::Extensions::Core if Legion::Extensions.const_defined?(:Core)
14
+ extend Legion::Extensions::Core if Legion::Extensions.const_defined?(:Core, false)
15
15
 
16
16
  class << self
17
17
  include Legion::Extensions::Helpers::Lex if defined?(Legion::Extensions::Helpers::Lex)
@@ -27,7 +27,7 @@ module Legion
27
27
  def subscribe!
28
28
  return unless defined?(Legion::Events)
29
29
 
30
- @subscription ||= Legion::Events.on('*') do |event|
30
+ @subscribe ||= Legion::Events.on('*') do |event| # rubocop:disable ThreadSafety/ClassInstanceVariable
31
31
  next if event[:event].to_s.start_with?('react.')
32
32
 
33
33
  Runners::React.handle_event(event: event)
@@ -37,10 +37,10 @@ module Legion
37
37
  end
38
38
 
39
39
  def unsubscribe!
40
- return unless @subscription && defined?(Legion::Events)
40
+ return unless @subscribe && defined?(Legion::Events) # rubocop:disable ThreadSafety/ClassInstanceVariable
41
41
 
42
- Legion::Events.off('*', @subscription)
43
- @subscription = nil
42
+ Legion::Events.off('*', @subscribe) # rubocop:disable ThreadSafety/ClassInstanceVariable
43
+ @subscribe = nil # rubocop:disable ThreadSafety/ClassInstanceVariable
44
44
  end
45
45
 
46
46
  unless method_defined?(:log)
@@ -50,7 +50,7 @@ module Legion
50
50
  end
51
51
  end
52
52
 
53
- require_relative 'react/actors/event_subscriber' if defined?(Legion::Extensions::Actors::Once)
53
+ require_relative 'react/actors/event_subscriber'
54
54
  end
55
55
  end
56
56
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lex-react
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity