eventsimple 2.0.1 → 2.0.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 +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/app/controllers/eventsimple/entities_controller.rb +1 -1
- data/app/controllers/eventsimple/models_controller.rb +1 -1
- data/app/views/eventsimple/entities/show.html.erb +2 -2
- data/lib/eventsimple/configuration.rb +8 -2
- data/lib/eventsimple/entity.rb +1 -1
- data/lib/eventsimple/message.rb +4 -0
- data/lib/eventsimple/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d72072b70e9962eb4e340513ea94a5f68bc0e9c3e80555a0ddf7ed188d990888
|
|
4
|
+
data.tar.gz: d42eb9077fda2bd8cd450a1198314dfe6e06ea7aa450af2b2d2c21f9349ccbda
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 043c3b0f6383c2b25729a721986454398d6fabd0a51444b4e0f5f3a9664bdd562730942fd5549e09c00ca8cb2c051813657e667ce9be68fe93c90cc8a512768a
|
|
7
|
+
data.tar.gz: dfefe25f7cd94473700ac4802e93234cef7d0b2d69621163b2f91de3380982bbe23df95735fa5ea4123e5b775db3fbd17ed24e91a58df73f9c3d371dea0c887e
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## 2.0.3 - 2025-12-12
|
|
10
|
+
### Changed
|
|
11
|
+
- Fix false positive deprecation warnings when using Message as an optional attribute type.
|
|
12
|
+
|
|
13
|
+
## 2.0.2 - 2025-12-12
|
|
14
|
+
### Changed
|
|
15
|
+
- Fix UI event loading issue.
|
|
16
|
+
|
|
9
17
|
## 2.0.1 - 2025-12-11
|
|
10
18
|
### Changed
|
|
11
19
|
- Switch back to using dry-struct for Message class, for better compatibility with existing code.
|
data/Gemfile.lock
CHANGED
|
@@ -10,7 +10,7 @@ module Eventsimple
|
|
|
10
10
|
@tab_id = params[:t] == 'event' ? 'event' : 'entity'
|
|
11
11
|
|
|
12
12
|
filter_columns = @model_class._filter_attributes
|
|
13
|
-
params_filters = params.permit(filters:
|
|
13
|
+
params_filters = params.permit(filters: filter_columns).fetch(:filters, {})
|
|
14
14
|
@filters = filter_columns.index_with { |column| params_filters[column] }
|
|
15
15
|
|
|
16
16
|
primary_key = @model_class.event_class._aggregate_id
|
|
@@ -19,7 +19,7 @@ module Eventsimple
|
|
|
19
19
|
def apply_filter(model_class, model_event_class)
|
|
20
20
|
filter_columns = model_class._filter_attributes
|
|
21
21
|
|
|
22
|
-
params_filters = params.permit(filters:
|
|
22
|
+
params_filters = params.permit(filters: filter_columns).fetch(:filters, {})
|
|
23
23
|
@filters = filter_columns.index_with { |column| params_filters[column] }
|
|
24
24
|
|
|
25
25
|
return model_event_class unless @filters.values.any?(&:present?)
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
<th scope="row" colspan="2">Data</th>
|
|
62
62
|
</tr>
|
|
63
63
|
<% if @selected_event.data.present? %>
|
|
64
|
-
<% @selected_event.data.
|
|
64
|
+
<% @selected_event.data.to_h.each do |attr_name, attr_value| %>
|
|
65
65
|
<tr>
|
|
66
66
|
<td> <%= attr_name %></td>
|
|
67
67
|
<td><code class="entity-property"><%= attr_value %></code></td>
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
<tr>
|
|
73
73
|
<th scope="row" colspan="2">Metadata</th>
|
|
74
74
|
</tr>
|
|
75
|
-
<% @selected_event.metadata.
|
|
75
|
+
<% @selected_event.metadata.to_h.each do |attr_name, attr_value| %>
|
|
76
76
|
<tr>
|
|
77
77
|
<td> <%= attr_name %></td>
|
|
78
78
|
<td><code class="entity-property">: <%= attr_value %></code></td>
|
|
@@ -4,7 +4,7 @@ module Eventsimple
|
|
|
4
4
|
class Configuration
|
|
5
5
|
attr_reader :max_concurrency_retries
|
|
6
6
|
attr_writer :metadata_klass, :parent_record_klass
|
|
7
|
-
attr_accessor :retry_reactor_on_record_not_found, :
|
|
7
|
+
attr_accessor :retry_reactor_on_record_not_found, :ui_visible_model_names
|
|
8
8
|
|
|
9
9
|
def initialize
|
|
10
10
|
@dispatchers = []
|
|
@@ -13,7 +13,13 @@ module Eventsimple
|
|
|
13
13
|
@parent_record_klass = 'ApplicationRecord'
|
|
14
14
|
@retry_reactor_on_record_not_found = false
|
|
15
15
|
|
|
16
|
-
@
|
|
16
|
+
@ui_visible_model_names = [] # internal use only - stores class names as strings
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Returns fresh class objects by constantizing stored names
|
|
20
|
+
# This avoids stale class references after code reload in development
|
|
21
|
+
def ui_visible_models
|
|
22
|
+
@ui_visible_model_names.map(&:constantize)
|
|
17
23
|
end
|
|
18
24
|
|
|
19
25
|
def max_concurrency_retries=(value)
|
data/lib/eventsimple/entity.rb
CHANGED
|
@@ -43,7 +43,7 @@ module Eventsimple
|
|
|
43
43
|
# disable automatic timestamp updates
|
|
44
44
|
self.record_timestamps = false
|
|
45
45
|
|
|
46
|
-
Eventsimple.configuration.
|
|
46
|
+
Eventsimple.configuration.ui_visible_model_names |= [name]
|
|
47
47
|
|
|
48
48
|
include InstanceMethods
|
|
49
49
|
extend ClassMethods
|
data/lib/eventsimple/message.rb
CHANGED
data/lib/eventsimple/version.rb
CHANGED