ArmedGuy/discourse_sso_node — pull request #2 by bioball (2014-04-26 06:41:35+00:00)
Title: make code more javascript-y and remove unncessary pseudoclass

Hey man,

So I'm using your module in my app, thanks a lot!

However, I noticed that you wrote things in a way that doesn't make too much sense. There really isn't a reason to return a pseudoclass (something that has to be `new`'d), because the object would be instantiated at most one time, which defeats the purpose of using a pseudoclass. It just leads to more clutter both your code, and my code when I use your module. Instead of just doing

`var sso = require('discourse-sso')(SSO_SECRET);`

I have to go

````
var discourse-sso = require('discourse-sso');
var sso = new discourse-sso(SSO_SECRET);
````

All in all, the former is just a much better way of doing this

Also, I took the liberty of renaming your variables to use javascript convention of camelcasing everything. Hope you don't mind. If you do, though, let me know and I can send you another PR with the variables renamed.

I also updated the test file, and it passes the changes I made