shard-radix/CHANGELOG.md

50 lines
1.6 KiB
Markdown
Raw Normal View History

# Change Log
All notable changes to Radix project will be documented in this file.
This project aims to comply with [Semantic Versioning](http://semver.org/),
so please check *Changed* and *Removed* notes before upgrading.
## [Unreleased]
### Fixed
- Improve forward compatibility with newer versions of the compiler by adding
missing types to solve type inference errors.
### Changed
- `Radix::Tree` now requires the usage of a type which will be used as node's
payload. See [README](README.md) for details.
2016-03-15 23:52:58 +00:00
## [0.2.1] - 2016-03-15
### Fixed
- Correct `Result#key` incorrect inferred type.
### Removed
- Attempt to use two named parameters at the same level will raise
`Radix::Tree::SharedKeyError`
## [0.2.0] - 2016-03-15 [YANKED]
### Removed
- Attempt to use two named parameters at the same level will raise
`Radix::Tree::SharedKeyError`
2016-03-10 23:18:59 +00:00
## [0.1.2] - 2016-03-10
Correctly split named parameters on tree insert Our Radix implementation was literally considering every single character as candidate for splitting, which caused keys that contained named parameters markers (`:foo`) to be broken across nodes: tree = Radix::Tree.new tree.add "/", :root tree.add "/:post", :post tree.add "/:category/:post", :category_post # / # : # post # category/:post This caused incorrect behavior when performing lookup (`Tree#find`) and failing to detect and map the key name, even when the value was properly captured: result = tree.find "/example" pp result.found? # => false This change corrects the issue by identifying named parameter marker and once detected, consider everything until a separator or the end of the supplied string is reached to be a unique key: tree = Radix::Tree.new tree.add "/", :root tree.add "/:post", :post tree.add "/:category/:post", :category_post # / # :category/:post # :post However, due how Radix tree is structured, two named parameters at the same level might result in problems during lookup phase: tree = Radix::Tree.new tree.add "/", :root tree.add "/:post", :post tree.add "/:category/:post", :category_post # / # :category/:post # :post tree.root.sort! # / # :post # :category/:post result = tree.find "/example" pp result.found? # => false pp result.params # => {"post" => "example"} result = tree.find "/news/first-post" pp result.found? # => false pp result.params # => {"post" => "news"} Causing lookup to fail and values be stored under incorrect keys for the parameters. Because of this, a deprecation warning will be shown to allow users adjust and correct their code prior fully removing it and raise error (you know, semantic versioning and all that jazz). This fixes #5 and closes #4
2016-03-10 12:55:10 +00:00
### Fixed
- No longer split named parameters that share same level (@alsm)
### Changed
- Attempt to use two named parameters at same level will display a
deprecation warning. Future versions will raise `Radix::Tree::SharedKeyError`
2016-02-29 15:11:12 +00:00
## [0.1.1] - 2016-02-29
### Fixed
- Fix named parameter key names extraction.
## [0.1.0] - 2016-01-24
### Added
- Initial release based on code extracted from Beryl.
2016-03-15 23:52:58 +00:00
[Unreleased]: https://github.com/luislavena/radix/compare/v0.2.1...HEAD
[0.2.1]: https://github.com/luislavena/radix/compare/v0.2.0...v0.2.1
2016-03-15 23:39:35 +00:00
[0.2.0]: https://github.com/luislavena/radix/compare/v0.1.2...v0.2.0
2016-03-10 23:18:59 +00:00
[0.1.2]: https://github.com/luislavena/radix/compare/v0.1.1...v0.1.2
2016-02-29 15:11:12 +00:00
[0.1.1]: https://github.com/luislavena/radix/compare/v0.1.0...v0.1.1