Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add completed and started signals to Action #105

Merged
merged 6 commits into from
Apr 22, 2016

Conversation

larryonoff
Copy link
Contributor

What's in this pull request?

This PR adds completed and started signals to Action. I often use empty Action as a trigger that some logic should begin executing. So these two properties were introduced.

@larryonoff larryonoff changed the title add completed and started signals to Action Add completed and started signals to Action Apr 20, 2016
@@ -14,6 +14,26 @@ extension Action {
public static var rex_disabled: Action {
return Action(enabledIf: ConstantProperty(false)) { _ in .empty }
}

/// Whether the action execution was completed succesfully.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a typo here.

succesfullysuccessfully

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Fixed it.

@RuiAAPeres
Copy link
Member

@larryonoff I really like this! Could you add some tests as well?

@larryonoff
Copy link
Contributor Author

Sure. Will do it a bit later.

@larryonoff
Copy link
Contributor Author

@RuiAAPeres Just added tests.


func testCompleted() {
let (producer, sink) = SignalProducer<Int, TestError>.buffer(Int.max)
let action = Action { producer }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you change sink to observer. The sink nomenclature was abandoned a while back. (ReactiveCocoa/ReactiveCocoa#2475)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Will do it in 2 hours.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@RuiAAPeres
Copy link
Member

@larryonoff could you rebase?

@larryonoff larryonoff force-pushed the feature/extend-action branch from 86f0459 to b3b6e29 Compare April 22, 2016 14:45
@larryonoff
Copy link
Contributor Author

@RuiAAPeres rebase done.

@RuiAAPeres RuiAAPeres merged commit 08f9f5c into RACCommunity:master Apr 22, 2016
@larryonoff larryonoff deleted the feature/extend-action branch April 22, 2016 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants