0.8.0 - February 14, 2017
This update focuses on new features and huge code refactoring / reorganization.
The rivescript-java implementations has been aligned with the rivescript-go
implementation.
- API Breaking Changes:
- Removed
RiveScript(boolean debug)constructor in favour of
RiveScript(Config config)constructor . - The
RiveScriptinstance has no notion ofdebugmode anymore.
Debug logging is now based on the SLF4J configuration. - Refactored
com.rivescript.ObjectMacrotocom.rivescript.macro.Subroutine. - Renamed
ObjectHandlermethods fromonLoad,onCallto respectively
loadandcall. Also thesetClassmethod has been removed. - The
org.jsondependency is now a optional dependency.
Developers using Perl object macros must include thisorg.jsondependency
manually to their projects.
- Removed
- Changes:
- Replace
System.outlogging by using the SLF4J API. - Add Unicode support (#30, #31).
- Add new forceCase config option, which will force-lowercase your triggers
during parse time, enabling authors to use uppercase letters in triggers
without it being a syntax error. Do note however that Unicode case folding
can become an issue with certain symbols. - Add customizable error messages config option.
- Add throw exceptions config option, which will make the bot throw (runtime)
exceptions (e.g.DeepRecursionException,ReplyNotFoundException)
in case of an error instead of just replying with an error message.
When enabled, developers should catch these exceptions and take the
appropriate actions. - The
RiveScriptconstructor now accepts aConfigobject to configure
the RiveScript instance. Also a developerConfig.Builderis available. - Add support for pluggable session stores for user variables. The default
one still keeps user variables in memory, but you can specify your own
implementation instead (#33). - Add RiveScript shell to quickly demo and test a RiveScript bot.
Seecom.rivescript.cmd.Shell. - Separated the
Parserwhich can now be used independently.
The parser returns a Abstract Syntax Tree (AST) identical to the
rivescript-goparser. It enables third party developers to write
applications that simply parse RiveScript code and getting an AST from it. - Add option to load RiveScript source code from a
java.io.Fileor
java.nio.file.Path. - Fix for sorting %Previous triggers (#9).
- Replace