jetstream_bridge 4.1.0 → 4.3.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 +4 -4
- data/CHANGELOG.md +86 -0
- data/README.md +25 -1426
- data/docs/GETTING_STARTED.md +97 -0
- data/docs/PRODUCTION.md +503 -0
- data/docs/TESTING.md +414 -0
- data/lib/jetstream_bridge/consumer/consumer.rb +16 -4
- data/lib/jetstream_bridge/consumer/inbox/inbox_processor.rb +17 -3
- data/lib/jetstream_bridge/consumer/inbox/inbox_repository.rb +19 -7
- data/lib/jetstream_bridge/consumer/message_processor.rb +88 -52
- data/lib/jetstream_bridge/consumer/subscription_manager.rb +24 -15
- data/lib/jetstream_bridge/core/bridge_helpers.rb +90 -0
- data/lib/jetstream_bridge/core/connection.rb +21 -5
- data/lib/jetstream_bridge/core.rb +8 -0
- data/lib/jetstream_bridge/models/inbox_event.rb +2 -2
- data/lib/jetstream_bridge/models/outbox_event.rb +2 -2
- data/lib/jetstream_bridge/publisher/publisher.rb +8 -6
- data/lib/jetstream_bridge/rails/integration.rb +148 -0
- data/lib/jetstream_bridge/rails/railtie.rb +53 -0
- data/lib/jetstream_bridge/rails.rb +5 -0
- data/lib/jetstream_bridge/tasks/install.rake +1 -1
- data/lib/jetstream_bridge/test_helpers/fixtures.rb +41 -0
- data/lib/jetstream_bridge/test_helpers/integration_helpers.rb +77 -0
- data/lib/jetstream_bridge/test_helpers/matchers.rb +98 -0
- data/lib/jetstream_bridge/test_helpers.rb +4 -259
- data/lib/jetstream_bridge/topology/stream.rb +1 -1
- data/lib/jetstream_bridge/version.rb +1 -1
- data/lib/jetstream_bridge.rb +56 -97
- metadata +21 -8
- data/lib/jetstream_bridge/railtie.rb +0 -91
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe94130ab86adb28c2623f20b6ad744cb51550fa2130750cbdcb30a0949e002e
|
|
4
|
+
data.tar.gz: 97e0957974e440f4ecb5ae7b129920da0e60bc727a07c03764b67035ebcdacd6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: be18e0b5fff0b38a5605d86ac870a73e1e471be0d8aae4eb122dd4f4a7084399156fc4a5a2249344d46eea01b385cdf51476c42ed2e782b8b75997ef200eb2c6
|
|
7
|
+
data.tar.gz: 5063a30a0146f6dc6acafded1a86ef12e7aab41edb13f99c5c3366c507a4a277f0c92ef957d2ce73178ae8ef48aae5320190f748890f0cff160220196c1ddb8f
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,92 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [4.3.0] - 2025-11-24
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Connection Diagnostics** - Exposed reconnection error tracking for health checks
|
|
13
|
+
- `last_reconnect_error` and `last_reconnect_error_at` now publicly accessible
|
|
14
|
+
- Enables better monitoring and diagnostics of connection issues
|
|
15
|
+
- Added test coverage for diagnostic accessor visibility
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **Connection Lifecycle** - Improved topology management during startup
|
|
20
|
+
- `startup!` now explicitly ensures topology is created during initialization
|
|
21
|
+
- `connect_and_ensure_stream!` properly ensures topology after connecting
|
|
22
|
+
- `fetch_stream_info` now ensures connection is established before querying
|
|
23
|
+
- More reliable initialization sequence for non-Rails applications
|
|
24
|
+
|
|
25
|
+
- **Rails Integration** - Changed console autostart behavior
|
|
26
|
+
- Rails console now autostarts JetStream Bridge by default (previously skipped)
|
|
27
|
+
- Simplified autostart logic by removing console detection as skip condition
|
|
28
|
+
- Autostart remains disabled only for rake tasks (unless forced with `JETSTREAM_BRIDGE_FORCE_AUTOSTART`)
|
|
29
|
+
- Better developer experience in Rails console for immediate testing
|
|
30
|
+
|
|
31
|
+
- **Documentation** - Clarified connection initialization behavior
|
|
32
|
+
- Added notes explaining that `configure` only sets options and does not connect
|
|
33
|
+
- Documented when connection actually occurs (Rails: after initialization; non-Rails: call `startup!`)
|
|
34
|
+
- Improved explanation of `lazy_connect` behavior in Rails environments
|
|
35
|
+
- Added guidance for non-Rails applications to call `startup!` explicitly
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- **Test Coverage** - Added missing test scenarios
|
|
40
|
+
- Added tests for topology ensuring in `startup!` and `connect_and_ensure_stream!`
|
|
41
|
+
- Added tests for connection initialization in `stream_info`
|
|
42
|
+
- Updated Rails integration specs to reflect new console behavior
|
|
43
|
+
|
|
44
|
+
## [4.2.0] - 2025-11-24
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
|
|
48
|
+
- **Modular Code Organization** - Restructured codebase with dedicated modules
|
|
49
|
+
- New `JetstreamBridge::Core` module for core utilities (connection, logging, model utils, helpers)
|
|
50
|
+
- New `JetstreamBridge::Rails` module for Rails-specific integration
|
|
51
|
+
- Improved separation of concerns and code discoverability
|
|
52
|
+
- Better namespace organization for future extensibility
|
|
53
|
+
|
|
54
|
+
- **Enhanced Test Helpers** - Comprehensive testing utilities split into focused modules
|
|
55
|
+
- `JetstreamBridge::TestHelpers::Fixtures` - Convenient fixture generation for events and messages
|
|
56
|
+
- `JetstreamBridge::TestHelpers::IntegrationHelpers` - Full NATS message simulation for integration tests
|
|
57
|
+
- `JetstreamBridge::TestHelpers::Matchers` - RSpec matchers for event publishing assertions
|
|
58
|
+
- Improved test doubles with realistic NATS message structure
|
|
59
|
+
- Better support for testing event-driven Rails applications
|
|
60
|
+
|
|
61
|
+
- **Getting Started Guide** - New comprehensive guide in `docs/GETTING_STARTED.md`
|
|
62
|
+
- Quick installation and setup instructions
|
|
63
|
+
- Publishing and consuming examples
|
|
64
|
+
- Rails integration patterns
|
|
65
|
+
- Links to advanced documentation
|
|
66
|
+
|
|
67
|
+
### Changed
|
|
68
|
+
|
|
69
|
+
- **Rails Integration** - Reorganized Rails-specific code
|
|
70
|
+
- Moved from single `lib/jetstream_bridge/railtie.rb` to dedicated `lib/jetstream_bridge/rails/` directory
|
|
71
|
+
- `JetstreamBridge::Rails::Railtie` - Rails lifecycle integration
|
|
72
|
+
- `JetstreamBridge::Rails::Integration` - Autostart logic and Rails environment detection
|
|
73
|
+
- Cleaner separation between gem core and Rails integration
|
|
74
|
+
|
|
75
|
+
- **Documentation** - Restructured README for clarity
|
|
76
|
+
- Condensed README focusing on quick start and highlights
|
|
77
|
+
- Moved detailed guides to dedicated docs directory
|
|
78
|
+
- Improved navigation with links to specialized documentation
|
|
79
|
+
- More concise examples and clearer feature descriptions
|
|
80
|
+
|
|
81
|
+
- **Gemspec** - Enhanced package configuration
|
|
82
|
+
- Added `docs/**/*.md` to distributed files
|
|
83
|
+
- Added `extra_rdoc_files` for better documentation
|
|
84
|
+
- Updated description to emphasize production-readiness
|
|
85
|
+
|
|
86
|
+
### Fixed
|
|
87
|
+
|
|
88
|
+
- **Code Quality** - Resolved all RuboCop style violations
|
|
89
|
+
- Fixed string literal consistency issues
|
|
90
|
+
- Improved code formatting and indentation
|
|
91
|
+
- Reduced complexity in conditional assignments
|
|
92
|
+
- Updated RuboCop configuration for new file structure
|
|
93
|
+
|
|
8
94
|
## [4.1.0] - 2025-11-23
|
|
9
95
|
|
|
10
96
|
### Added
|