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

Adding a way to configure a scope to factory function #29

Merged
merged 2 commits into from
Oct 8, 2014

Conversation

luizfilipe
Copy link
Contributor

This code with a test helps solve the issue #26

The layout of the new configuration is added as a unit test, but you can see how it is below:

{
    "testSelfProperty": {
        "enabled": true,
        "priority": 10,
        "module": {
            "name": "./fixtures/middleware/self",
            "method": "run",
            "self": true
        }
    }
}

@@ -0,0 +1,20 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Needless comments -- git annotate will show who created what.

@grawk
Copy link
Member

grawk commented Oct 1, 2014

@aredridel mentioned perhaps the this arg should just be module by default. That would greatly simplify this PR. I cannot think of any drawbacks to doing so.

@aredridel
Copy link
Contributor

Not just default, but the only option.

@grawk
Copy link
Member

grawk commented Oct 1, 2014

Yes, sorry. Semantics :)

@luizfilipe
Copy link
Contributor Author

Ok then I´ll use module as only option then, based in comments of @aredridel and @grawk the option self that would be changed to context will be completely removed then.
Let me know if is this, when possible, to proceed with readjustment of PR.
Another good thing to ask for, is about the Unrelated changes that I made. The reason for this changes is that the tests were failing.

@aredridel
Copy link
Contributor

In general, 'clean-up' fixes are good to add in a separate commit -- get the tests passing first, then add your tests + feature and make sure they still pass afterward.

It's not super problematic -- and bad on us for letting the lint fail the tests! -- but just a good practice. Makes changes more reviewable in the future.

@luizfilipe luizfilipe force-pushed the master branch 2 times, most recently from fec575f to 7f6ad82 Compare October 3, 2014 14:46
@luizfilipe
Copy link
Contributor Author

@grawk @aredridel I´ve finished, please review as soon as you can.

@aredridel
Copy link
Contributor

👍

@totherik
Copy link
Contributor

totherik commented Oct 8, 2014

Yep, LGTM.

totherik added a commit that referenced this pull request Oct 8, 2014
Adding a way to configure a scope to factory function
@totherik totherik merged commit 88d8dd9 into krakenjs:master Oct 8, 2014
totherik added a commit that referenced this pull request Mar 17, 2015
Adding a way to configure a scope to factory function
totherik added a commit that referenced this pull request Mar 17, 2015
Adding a way to configure a scope to factory function
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.

5 participants