Releases: davidesantangelo/lanet
v1.0.0
I'm excited to announce the release of Lanet v1.0.0! This major version brings significant architectural improvements, enhanced reliability, and better performance while maintaining 100% backward compatibility with existing code.
🎉 Highlights
- Enhanced Architecture - Complete refactoring with improved code organization and maintainability
- Better Resource Management - Automatic cleanup and proper socket lifecycle management
- Reduced Complexity - 75% reduction in cyclomatic complexity across core components
- Improved Performance - Optimized network operations and state management
- Enhanced Reliability - Comprehensive error handling with custom exception classes
- Zero Breaking Changes - Full backward compatibility with v0.x releases
✨ What's New
Core Infrastructure Improvements
Centralized Configuration Management
- New
Configclass provides centralized management of all configuration constants - Eliminates scattered magic numbers across the codebase
- Makes the library easier to configure and maintain
- Consistent defaults across all components
Enhanced Sender Class
- Custom exceptions for better error handling (
SendError,InvalidPortError) - Input validation for all parameters
- Proper socket lifecycle management with automatic cleanup
- Improved error messages with detailed context
- Resource leak prevention with ensure blocks
Improved Receiver Class
- Graceful shutdown with proper signal handling
- Automatic resource cleanup preventing memory leaks
- Port conflict detection with clear error messages
- Configurable buffer sizes for optimal performance
- Enhanced error handling throughout the receive cycle
Refactored Encryptor Class
- Reduced method complexity from 50+ lines to focused 5-10 line methods
- 75% reduction in cyclomatic complexity (from 12+ to 2-3)
- MessageType enumeration for type-safe message handling
- Extracted encryption/decryption into dedicated methods
- Better separation of concerns with clear, single-purpose methods
File Transfer Enhancements
New TransferState Class
- Dedicated state management for file transfers
- Automatic progress tracking with real-time updates
- Improved checksum verification for data integrity
- Better error recovery mechanisms
- Resource cleanup after transfer completion
FileTransfer Improvements
- Reduced complexity by extracting state management
- Enhanced progress reporting with detailed metrics
- Better error messages for troubleshooting
- Improved reliability in interrupted transfers
📊 Metrics & Performance
Code Quality Improvements
- Average method length: Reduced by 60%
- Cyclomatic complexity: Reduced by 75% (Encryptor class)
- Test coverage: 96 passing tests with comprehensive scenarios
- Code maintainability: Significantly improved with clear separation of concerns
Performance
- Optimized network operations for faster message delivery
- Efficient state management reducing memory overhead
- Better resource utilization with automatic cleanup
🔧 Technical Details
New Classes
Lanet::Config- Centralized configuration managementLanet::TransferState- File transfer state management
Enhanced Classes
Lanet::Sender- Improved validation and error handlingLanet::Receiver- Graceful shutdown and resource managementLanet::Encryptor- Reduced complexity with better structureLanet::FileTransfer- Uses TransferState for better state management
Custom Exceptions
Lanet::Sender::SendError
Lanet::Sender::InvalidPortError
Lanet::Receiver::ReceiveError
Lanet::Receiver::PortInUseError
Lanet::FileTransfer::TransferError🔄 Migration Guide
No migration required! This release maintains 100% backward compatibility. All existing code will continue to work without any changes.
Optional: Using New Configuration
If you want to customize configuration values:
# Access configuration constants
Lanet::Config::DEFAULT_PORT # 5000
Lanet::Config::BROADCAST_ADDRESS # "255.255.255.255"
Lanet::Config::BUFFER_SIZE # 4096
Lanet::Config::MAX_CHUNK_SIZE # 60000Example: Before and After
Before (still works):
sender = Lanet::Sender.new(5000)
sender.send_to('192.168.1.5', 'Hello!')After (enhanced with better error handling):
begin
sender = Lanet::Sender.new(5000)
sender.send_to('192.168.1.5', 'Hello!')
rescue Lanet::Sender::SendError => e
puts "Failed to send: #{e.message}"
end🐛 Bug Fixes
- Fixed potential resource leaks in socket management
- Improved error handling in interrupted file transfers
- Better handling of network timeout scenarios
- Fixed race conditions in concurrent operations
📚 Documentation
- Updated README with v1.0.0 features and examples
- Added comprehensive CHANGELOG documenting all changes
- Created detailed REFACTORING_REPORT with metrics and analysis
- Enhanced inline documentation for better IDE support
🎯 Testing
All 96 tests pass successfully:
- ✅ Unit tests for all core components
- ✅ Integration tests for message flow and file transfers
- ✅ Edge case coverage for error scenarios
- ✅ Performance tests for network operations
🙏 Acknowledgments
Thank you to all contributors and users who have provided feedback and helped shape this release.
📦 Installation
gem install lanetOr in your Gemfile:
gem 'lanet', '~> 1.0.0'🔮 What's Next
We're committed to continuous improvement. Future releases will focus on:
- Additional protocol support
- Enhanced mesh networking capabilities
- Performance optimizations
- Extended monitoring and debugging tools
📞 Support
- Documentation: https://github.com/davidesantangelo/lanet
- Issues: https://github.com/davidesantangelo/lanet/issues
- Discussions: https://github.com/davidesantangelo/lanet/discussions
Full Changelog: https://github.com/davidesantangelo/lanet/blob/master/CHANGELOG.md
v0.5.0: feat: Added Advanced Traceroute Functionality
[0.5.0] - 2025-03-12
Added
- Advanced Traceroute Functionality:
- Support for ICMP, UDP, and TCP protocols.
- Load balancing detection to identify multiple IPs at the same hop.
- Detailed hop-by-hop analysis including IP address, hostname, average response time, and timeouts.
- Integration into both the CLI and the Ruby API.
- Comprehensive documentation and examples for ease of use.
Updated
- Documentation:
- Updated README.md with new traceroute features and examples.
- Updated CHANGELOG.md to reflect the new version and features.
- Updated index.html with new traceroute section and examples.
Fixed
- Bug Fixes:
- Resolved issues with hostname resolution in traceroute results.
- Improved error handling for unresolvable hostnames and timeout scenarios.
Changed
- Dependencies:
- Updated Gemfile.lock to reflect the new version.
Removed
- Deprecated Features:
- Removed outdated examples and references from the documentation.
v0.4.0
Full Changelog: v0.2.1...v0.4.0
0.2.1
Full Changelog: https://github.com/davidesantangelo/lanet/commits/v0.2.1