Releases: Fretadao/f_service
Releases · Fretadao/f_service
0.3.1
0.3.0
0.3.0
Added
- Added Rspec Helper
#mock_service
#41; - Added Rspec Matcher
#have_succeed_with
and#have_failed_with
#41; - Added
Success()
,Failure()
,Check()
,Try()
now can be multipe types #41; - Added RSpec support for mock and match results #35
Changed
- Changed Depreacate
Result#type
method #41; - Changed Deprecate method
#then
for Success and Failure classes #40; - Deprecate method
#then
for Success and Failure classes #40; - Changed Capture just one callback per result #30.
Removed
- Removed deprecated method
#on
#33.
v0.2.0
0.2.0
Added
- Add
and_then
as alias forthen
(partially fix #23). - Add
catch
toFailure
andSuccess
. It acts as an invertedthen
and has aor_else
alias. - Add support to custom
data
property to be passed when callingBase#Check
. - Add support to multiple type checks on
Result#on_success
andResult#on_failure
hooks. - Yields result type on blocks (
then
,on_success
andon_failure
). - Add type check on
Result#on_success
andResult#on_failure
hooks. - Add method
Base#Try
. It wraps exceptions in Failures. - Add method
Base#Check
. It converts booleans to Results. - Add methods
#Success(type, data:)
and#Failure(type, data:)
onFService::Base
.
These methods allow defining the type and value of the Result object. - Allow adding types on
Result
s. - Add
#on_success
and#on_failure
hooks on Result objects. - Link to Changelog on gemspec.
Changed
- [Deprecation] Mark
Base#result
as deprecated. They will be removed on the next release. Use theBase#Check
instead. - [Deprecation] Mark
Base#success
andBase#failure
as deprecated. They will be removed on the next release. Use theBase#Success
andBase#Failure
instead. - [Deprecation] Mark
Result#on
as deprecated. It will be removed on the next release. Use theResult#on_success
and/orResult#on_failure
hooks instead.
v0.1.1
Added
First usable version with:
- Result based services;
- Type check on results;
- Pattern matching with
#call
ables; - Safe chaining calls with
#then
;