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

@ashfurrow => Dsl refactor #77

Merged
merged 6 commits into from
May 5, 2014
Merged

@ashfurrow => Dsl refactor #77

merged 6 commits into from
May 5, 2014

Conversation

orta
Copy link
Owner

@orta orta commented May 4, 2014

Hello there, decided to devote some time to cleanup & tests since you've now done all the hard work.

Switched to @steipete's Aspect library, ( /cc Pete, found it a bit odd that the API for removal of aspects is a class method, yet theres a different API for classes and instances. ) which changed the block params to be an NSArray of the arguments. This is a breaking change for the Artsy stuff you've been doing I imagine 😉 🍷

I found it a bit hard to write some more of the tests, as state would leak between tests. so I added a way to add / remove / remove all to the public API.

I also tightened up the example JSON, I like the idea of being super specific with the tabbing, but for examples I'd rather it be more readable. One day I'll make a ruby script to tab these things, doing it in Xcode is a massive hassle.

( there's also a bunch of cleanup around the project in here too to make it fancier )

@steipete
Copy link
Sponsor

steipete commented May 4, 2014

Initially, there were two aspect_remove: methods, but since really all state is saved in the opaque token, all we need is one method, so I opted for the class one.

@@ -7,7 +7,7 @@
//

#import <ARAnalytics/ARAnalytics.h>
#import <ReactiveCocoa/RACTuple.h>
#import <Aspects/NSObject+Aspects.h>
Copy link
Sponsor

Choose a reason for hiding this comment

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

(API-Question) Would it be cleaner if I change it to <Aspects/Aspects.h> ?

Copy link
Owner Author

Choose a reason for hiding this comment

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

IMO, yeah

Copy link
Sponsor

Choose a reason for hiding this comment

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

Will change this in 1.1 to <Aspects/Aspects.h>.
Also changed aspect_remove:. Adding aspects now returns id<Aspect> which has one method, remove. Sorry for the API changes :)

Copy link
Owner Author

Choose a reason for hiding this comment

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

All super cool to me, will update tomorrow morning 👍

@ashfurrow
Copy link
Collaborator

Super cool! Yeah I'll have to move some Artsy stuff around. I'll wait until the 1.1 release of aspects?

@steipete
Copy link
Sponsor

steipete commented May 4, 2014

Just pushed the 1.1. Also adds a myriad of test cases and tries to clean up everything on aspect removal. There's one downside that makes me a bit sad, see steipete/Aspects#2. But that's really no different for ReactiveCocoa... and I doubt that this will affect your use case.

@orta
Copy link
Owner Author

orta commented May 4, 2014

rock

@orta
Copy link
Owner Author

orta commented May 4, 2014

will fix up tomorrow morning with 1.1 and change our internals

@orta
Copy link
Owner Author

orta commented May 5, 2014

rock, updated.

@ashfurrow
Copy link
Collaborator

:shipit:

ashfurrow added a commit that referenced this pull request May 5, 2014
@ashfurrow ashfurrow merged commit 3de458a into master May 5, 2014
@ashfurrow ashfurrow deleted the dsl_refactor branch May 5, 2014 06:44
@ashfurrow
Copy link
Collaborator

I'm good to issue a release?

@steipete
Copy link
Sponsor

steipete commented May 5, 2014

U gonna hate me, but I've refined the API once more in 1.3. I hope that's it now. Position became options, and for the flow I had to change the withBlock to usingBlock.

@ashfurrow
Copy link
Collaborator

No problemo. I'll get on that.

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