flow 0.10.2 → 0.10.7.1.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +107 -1116
  3. data/lib/flow.rb +17 -2
  4. data/lib/flow/flow/callbacks.rb +7 -5
  5. data/lib/flow/flow/core.rb +16 -14
  6. data/lib/flow/flow/flux.rb +36 -32
  7. data/lib/flow/flow/operations.rb +16 -14
  8. data/lib/flow/flow/status.rb +15 -13
  9. data/lib/flow/flow/transactions.rb +7 -5
  10. data/lib/flow/flow/trigger.rb +26 -24
  11. data/lib/flow/flow_base.rb +5 -6
  12. data/lib/flow/malfunction/base.rb +10 -0
  13. data/lib/flow/operation/core.rb +12 -1
  14. data/lib/flow/operation/error_handler.rb +1 -1
  15. data/lib/flow/operation/execute.rb +1 -1
  16. data/lib/flow/operation_base.rb +10 -15
  17. data/lib/flow/{spec_helper/rspec_configuration.rb → rspec/configuration.rb} +0 -0
  18. data/lib/flow/{spec_helper → rspec}/custom_matchers.rb +3 -0
  19. data/lib/flow/rspec/custom_matchers/access_state.rb +27 -0
  20. data/lib/flow/{spec_helper → rspec}/custom_matchers/define_failure.rb +0 -0
  21. data/lib/flow/{spec_helper → rspec}/custom_matchers/define_output.rb +0 -0
  22. data/lib/flow/{spec_helper → rspec}/custom_matchers/handle_error.rb +0 -0
  23. data/lib/flow/{spec_helper → rspec}/custom_matchers/have_on_state.rb +6 -1
  24. data/lib/flow/rspec/custom_matchers/read_state.rb +23 -0
  25. data/lib/flow/{spec_helper → rspec}/custom_matchers/use_operations.rb +0 -0
  26. data/lib/flow/{spec_helper → rspec}/custom_matchers/wrap_in_transaction.rb +0 -0
  27. data/lib/flow/rspec/custom_matchers/write_state.rb +23 -0
  28. data/lib/flow/{spec_helper → rspec}/shared_contexts.rb +0 -0
  29. data/lib/flow/{spec_helper → rspec}/shared_contexts/with_failing_operation.rb +0 -0
  30. data/lib/flow/{spec_helper → rspec}/shoulda_matcher_helper.rb +0 -0
  31. data/lib/flow/spec_helper.rb +4 -4
  32. data/lib/flow/state/output.rb +1 -1
  33. data/lib/flow/state_base.rb +5 -4
  34. data/lib/flow/state_proxy.rb +30 -0
  35. data/lib/flow/version.rb +1 -1
  36. data/lib/generators/flow/operation/templates/operation.rb.erb +4 -0
  37. data/lib/generators/rspec/application_operation/templates/application_operation_spec.rb +9 -5
  38. data/lib/generators/rspec/operation/templates/operation_spec.rb.erb +4 -0
  39. metadata +73 -66
  40. data/lib/flow/flow/errors/state_invalid.rb +0 -7
  41. data/lib/flow/operation/errors/already_executed.rb +0 -9
  42. data/lib/flow/operation/errors/already_rewound.rb +0 -9
  43. data/lib/flow/state/errors/not_validated.rb +0 -9
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Flow
4
- module Errors
5
- class StateInvalid < StandardError; end
6
- end
7
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Flow
4
- module Operation
5
- module Errors
6
- class AlreadyExecuted < StandardError; end
7
- end
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Flow
4
- module Operation
5
- module Errors
6
- class AlreadyRewound < StandardError; end
7
- end
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Flow
4
- module State
5
- module Errors
6
- class NotValidated < StandardError; end
7
- end
8
- end
9
- end