vert-core 1.0.6 → 1.0.8

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: 8fd6c84ffbe83567582921e953352c1c1270e04488256342792e986c9d3426d5
4
- data.tar.gz: 91d78b78aaea21ab75266bcc15776d48c804e69b60d0833c0202095af35c4d48
3
+ metadata.gz: 6511e0828487854e75a90388687b0432d9e2c2f3c7f480a9c94546866910c045
4
+ data.tar.gz: d56de4d337f77160a65e4b3993a36203656952a0db5a26eae380e804cddf22bd
5
5
  SHA512:
6
- metadata.gz: d6a08734ea5cc099c36d64c4ae9b35433f21daee126588fe4e0777724896c76f765ee43f1ff755c519976f20ecd6283f831403d1796574808153f7fe34f73ccc
7
- data.tar.gz: 2025a587b3bb4da7ec26f7afc27c47d9becd869d2138b1687ea5cb3943d0abc9697984b7944170f4d912af699facf5ed1f37b39e67ac3a8a5a5c8ce55a2522e5
6
+ metadata.gz: 6ca56ea97dbd0f81e207f71e80496c6a99da19093c7f2073f19576ee751cdf5d76f17429bba7b534bc7b0aa1a8c68872194080fef2fbeed8bd505af9b97eb12e
7
+ data.tar.gz: 177b6ce59ce094c8927c7cfa0a2aed060f82b6f14f61c066e7eb072f919634e63d704bbd6e2a7700ee371202cb29396fd55faf8cca21e820bd6f7b9cd43e032a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.7] - 2026-03-21
4
+
5
+ ### Added
6
+
7
+ - `Railtie`: initializer `vert.consumer_paths` que adiciona automaticamente `app/consumers` ao `autoload_paths` e `eager_load_paths` quando o diretório existe. Elimina a necessidade de configuração manual em cada serviço e garante que `rake sneakers:run` descubra todos os workers via `Rails.application.eager_load!`.
8
+
3
9
  ## [1.0.6] - 2026-03-21
4
10
 
5
11
  ### Fixed
@@ -11,7 +11,7 @@ module Vert
11
11
  validates :aggregate_id, presence: true
12
12
  validates :payload, presence: true
13
13
  validates :status, presence: true
14
- enum :status, { pending: 0, published: 1, failed: 2 }, prefix: true
14
+ enum :status, { pending: "pending", published: "published", failed: "failed" }, prefix: true
15
15
  scope :pending_events, -> { status_pending.order(:created_at) }
16
16
  scope :failed_events, -> { status_failed.where("retry_count < ?", max_retry_count).order(:created_at) }
17
17
  scope :by_aggregate, ->(type, id) { where(aggregate_type: type, aggregate_id: id) }
data/lib/vert/railtie.rb CHANGED
@@ -4,6 +4,14 @@ module Vert
4
4
  class Railtie < Rails::Railtie
5
5
  config.vert = ActiveSupport::OrderedOptions.new
6
6
 
7
+ initializer "vert.consumer_paths", before: :set_autoload_paths do |app|
8
+ consumers_path = app.root.join("app", "consumers")
9
+ if consumers_path.directory?
10
+ app.config.autoload_paths << consumers_path
11
+ app.config.eager_load_paths << consumers_path
12
+ end
13
+ end
14
+
7
15
  initializer "vert.middleware" do |app|
8
16
  if Vert.config.enable_rls
9
17
  app.middleware.use Vert::Rls::ContextMiddleware
data/lib/vert/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vert
4
- VERSION = "1.0.6"
4
+ VERSION = "1.0.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vert-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vert Team