nats_wave 1.1.16 → 1.1.17

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: 70b9abe2ec70949d2ffd0b97d0d2e33688590d8d4bc5c01baa2a555cb0b355e4
4
- data.tar.gz: cbef4f7b640670744b71626606a0ad62de313012bfb524e7e406594ff0b31e9c
3
+ metadata.gz: 96d6d8104b53ea2928cb582117540bee7ea2e6b7f53cd59d6fe45e4b425951dc
4
+ data.tar.gz: 54f25e266faeef7de1f7596582d16d755aa37a50969fc07e1249f9cef48311ae
5
5
  SHA512:
6
- metadata.gz: 552e1c4272994c73ab29ed2c714aa7d9e776ef6cd81431a97da99af9609669815ad8af64651a12278154609033f1a1e82c37a9fa921ce400770a2228f56078bb
7
- data.tar.gz: 6c2f1a722122a2de176186b58835158764ff0ba4a5913c7d15e0b15b8b15feaba6b053fd12a97acc8d0699b3b2db7f701797679efe5322574e43c1b86b4cd6fd
6
+ metadata.gz: 9c891b5df233ab589e4481fe88b6c37900c1577fcac0f84babef441c31a4966c8cc1725419cbd12ac69eb07e196cdc0446212ea0fb230a99a018a6bbfcefc07d
7
+ data.tar.gz: 76e24d165d453ca8f51450e1eaa44a2823778928855ba1182d000aa22f6bf42c73a64d8e1174bb85fafd7430755e73a0b31ba0bdece98d3babf657fd321c0282
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nats_wave (1.1.16)
4
+ nats_wave (1.1.17)
5
5
  activerecord (>= 6.1, < 8.0)
6
6
  activesupport (>= 6.1, < 8.0)
7
7
  concurrent-ruby (~> 1.1)
data/README.md CHANGED
@@ -174,7 +174,7 @@ rails console
174
174
  # This automatically publishes via nats_wave_publishes_to
175
175
  ```
176
176
 
177
- ## ⚙️ Configuration
177
+ ## ⚙️ Configuration
178
178
 
179
179
  ### Environment Variables
180
180
 
@@ -77,7 +77,7 @@ module NatsWave
77
77
  {
78
78
  service: @service_name,
79
79
  environment: ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'unknown',
80
- version: ENV['APP_VERSION'] || '1.1.16'
80
+ version: ENV['APP_VERSION'] || '1.1.17'
81
81
  }
82
82
  end
83
83
 
@@ -1037,7 +1037,7 @@ module NatsWave
1037
1037
 
1038
1038
  # Configure publishing with optional custom handler AND auto-publishing callbacks
1039
1039
  def nats_wave_publishes_to(*subjects, **options, &block)
1040
- NatsWave.logger.debug "⚙️#{self.name}: Setting up publishing to subjects: #{subjects.inspect}"
1040
+ NatsWave.logger.debug "⚙️ #{self.name}: Setting up publishing to subjects: #{subjects.inspect}"
1041
1041
 
1042
1042
  # Custom handler is now optional and runs AFTER default behavior
1043
1043
  custom_handler = options[:handler] || block
@@ -1062,7 +1062,7 @@ module NatsWave
1062
1062
  # Add ActiveRecord callbacks for auto-publishing (only once per model)
1063
1063
  setup_publishing_callbacks_once
1064
1064
 
1065
- NatsWave.logger.debug "⚙️#{self.name}: Registered publishing config for subjects: #{subjects}"
1065
+ NatsWave.logger.debug "⚙️ #{self.name}: Registered publishing config for subjects: #{subjects}"
1066
1066
  end
1067
1067
 
1068
1068
  # Get all subscription configurations
@@ -1222,7 +1222,7 @@ module NatsWave
1222
1222
  after_commit :trigger_nats_wave_auto_publish_on_destroy, on: :destroy
1223
1223
 
1224
1224
  @nats_wave_callbacks_added = true
1225
- NatsWave.logger.debug "⚙️#{self.name}: Added publishing callbacks"
1225
+ NatsWave.logger.debug "⚙️ #{self.name}: Added publishing callbacks"
1226
1226
  end
1227
1227
 
1228
1228
  # Create a subscription handler that processes data and calls custom handler AFTER auto-sync
@@ -1231,7 +1231,7 @@ module NatsWave
1231
1231
 
1232
1232
  lambda do |message|
1233
1233
  begin
1234
- NatsWave.logger.debug "⚙️Processing subscription message for #{model_class.name}"
1234
+ NatsWave.logger.debug "⚙️ Processing subscription message for #{model_class.name}"
1235
1235
 
1236
1236
  # Extract the raw data
1237
1237
  raw_data = message['data'] || {}
@@ -1250,7 +1250,7 @@ module NatsWave
1250
1250
  # Handle nested data structure
1251
1251
  if raw_data['data'].is_a?(Hash)
1252
1252
  raw_data = raw_data['data']
1253
- NatsWave.logger.debug "⚙️Using nested data structure"
1253
+ NatsWave.logger.debug "⚙️ Using nested data structure"
1254
1254
  end
1255
1255
 
1256
1256
  # Process the data through mappings and transformations
@@ -1258,13 +1258,13 @@ module NatsWave
1258
1258
 
1259
1259
  # Always perform auto-sync first (if enabled)
1260
1260
  if config[:auto_sync]
1261
- NatsWave.logger.debug "⚙️Performing auto-sync first"
1261
+ NatsWave.logger.debug "⚙️ Performing auto-sync first"
1262
1262
  model_class.perform_auto_sync(model_name, action, processed_data, config)
1263
1263
  end
1264
1264
 
1265
1265
  # Then call custom handler if provided (optional)
1266
1266
  if config[:custom_handler]
1267
- NatsWave.logger.debug "⚙️Calling custom subscription handler after auto-sync"
1267
+ NatsWave.logger.debug "⚙️ Calling custom subscription handler after auto-sync"
1268
1268
  config[:custom_handler].call(model_name, action, processed_data, message)
1269
1269
  end
1270
1270
 
@@ -1287,7 +1287,7 @@ module NatsWave
1287
1287
 
1288
1288
  # Check conditions (only for publishing)
1289
1289
  if config[:conditions].any? && !evaluate_conditions(config[:conditions])
1290
- NatsWave.logger.debug "⚙️Skipping publish - conditions not met"
1290
+ NatsWave.logger.debug "⚙️ Skipping publish - conditions not met"
1291
1291
  next
1292
1292
  end
1293
1293
 
@@ -1315,7 +1315,7 @@ module NatsWave
1315
1315
 
1316
1316
  # Then call custom handler if provided (optional)
1317
1317
  if config[:custom_handler]
1318
- NatsWave.logger.debug "⚙️Calling custom publishing handler after publishing"
1318
+ NatsWave.logger.debug "⚙️ Calling custom publishing handler after publishing"
1319
1319
  config[:custom_handler].call(self.class.name, action, processed_data, self)
1320
1320
  end
1321
1321
  end
@@ -18,7 +18,7 @@ module NatsWave
18
18
  def initialize(options = {})
19
19
  @nats_url = ENV['NATS_URL'] || "nats://localhost:4222"
20
20
  @service_name = ENV['NATS_SERVICE_NAME'] || "purplewave"
21
- @version = ENV['NATS_SERVICE_VERSION'] || "1.1.16"
21
+ @version = ENV['NATS_SERVICE_VERSION'] || "1.1.17"
22
22
  @instance_id = ENV['NATS_INSTANCE_ID'] || Socket.gethostname
23
23
  @database_url = ENV['NATS_DATABASE_URL'] || nil
24
24
  @connection_pool_size = (ENV['NATS_CONNECTION_POOL_SIZE'] || 10).to_i
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NatsWave
4
- VERSION = '1.1.16'
4
+ VERSION = '1.1.17'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nats_wave
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.16
4
+ version: 1.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey Dabo