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

Feature/services user realms #100

Closed
wants to merge 12 commits into from
Closed

Conversation

ghost
Copy link

@ghost ghost commented Mar 16, 2016

Add services (both public and internal) to add or remove user realms.

@@ -42,37 +48,98 @@ describe('user', function () {
});
}

beforeEach(function (done) {
dao.deleteAllUsers(function (err) {
function configOptions(port, path, method, body, auth, version) {
Copy link
Contributor

Choose a reason for hiding this comment

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

In Node (or JavaScript in general), if you have a function with lots of input parameters it may be considered a code-smell. Its really hard to read function calls like configOptions('/test', 'GET', true, null, false, true). I'd rather have calls like this:

configOptions({
 url: '/test',
 method: 'GET', 
 body: {/* some object */},
 auth: false, 
 version: true
});

Of course, this became obvious only after you made this refactor. And we have worst duplication problems. So, 👍 to you!

Copy link
Member

Choose a reason for hiding this comment

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

You're right thx for the catch up. I'll change its signature as soon as i have 5 free mins 👍

@coveralls
Copy link

Coverage Status

Coverage decreased (-9.6%) to 70.999% when pulling 950a7c7 on feature/services_user_realms into 585c4d5 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.3%) to 81.901% when pulling e1c2c15 on feature/services_user_realms into 585c4d5 on master.

@guumaster guumaster mentioned this pull request Mar 19, 2016
@guumaster
Copy link
Contributor

Merged into #103

@guumaster guumaster closed this Mar 19, 2016
luismesas added a commit that referenced this pull request Mar 28, 2016
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.

None yet

3 participants