Skip to content

ActionDB 0.2.0

Compare
Choose a tag to compare
@ihrwein ihrwein released this 23 Jul 14:21
· 303 commits to master since this release

User visible changes:

  • support JSON pattern files
  • nicer and more precise error messages

Internal changes:

  • Matcher becomes a trait and ParserTrie implements it
  • the pattern reading and trie building code is extracted into a Builder struct
  • Builder is able to populate any Matcher instance from any type which implements the PatternSource trait
    • BuildResult = Result<Pattern, BuildError>
    • BuildError contains all possible Error types (IO, pattern parse errors, etc.)
    • PatternSource is automatically implemented for every type which implements Iterator<Item=BuildResult>
    • this makes possible to generalize the Matcher building logic:
    • BuildResults are being read from a PatternSource and if they are Ok() then they are added to the Matcher
    • in case of an Err() value the building process stops and the error is returned
  • Factory is introduced to create Matcher instances from files (JSON and plain pattern files)
    • Factory::form_file() is file extension agnostic and creates a Matcher instance from the given file
  • the big modules are split into smaller submodules
  • allow . character in Parser names
  • the JSON files can contain test messages. They are tested when their pattern is added to the Matcher.
  • Coveralls.io checks every modifications
  • new unit tests are added