zorbash / opus

A framework for pluggable business logic components
MIT License
354 stars 21 forks source link

Implements skip stage #2

Closed rafaels88 closed 6 years ago

rafaels88 commented 6 years ago

It introduces a new stage skip and solve the issue #1 .

Usage example:

  defmodule CreateUserPipeline do
    use Opus.Pipeline

    skip if: :user_exists?
    step :persist_user

    def user_exists?(_), do: true
  end

  CreateUserPipeline.call(%{}) # {:ok, :skipped}
coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 60


Totals Coverage Status
Change from base Build 53: 0.0%
Covered Lines: 151
Relevant Lines: 151

💛 - Coveralls
rafaels88 commented 6 years ago

Btw, sorry for the delay =/

zorbash commented 6 years ago

@rafaels88 Please make changes for

https://github.com/Zorbash/opus/pull/2#discussion_r202936935 https://github.com/Zorbash/opus/pull/2#discussion_r202937245

and it's good to merge :-)

rafaels88 commented 6 years ago

@Zorbash Changed! Thanks for the review!

zorbash commented 6 years ago

@rafaels88 Thanks for contributing, I'll update the changelog and releases it as 0.6.0.