Permalink
Browse files

Conform to latest conventions.

  • Loading branch information...
jaredhanson committed Feb 22, 2012
1 parent f6811e2 commit c11a6f30f31e98298c7394e2cc494c9323a43633
Showing with 20 additions and 0 deletions.
  1. +4 −0 .travis.yml
  2. +2 −0 README.md
  3. +4 −0 lib/passport-ohloh/strategy.js
  4. +3 −0 package.json
  5. +7 −0 test/strategy-test.js
View
@@ -0,0 +1,4 @@
+language: "node_js"
+node_js:
+ - 0.4
+ - 0.6
View
@@ -59,6 +59,8 @@ For a complete, working example, refer to the [login example](https://github.com
$ npm install --dev
$ make test
+[![Build Status](https://secure.travis-ci.org/jaredhanson/passport-ohloh.png)](http://travis-ci.org/jaredhanson/passport-ohloh)
+
## Credits
- [Jared Hanson](http://github.com/jaredhanson)
@@ -83,6 +83,10 @@ Strategy.prototype.userProfile = function(token, tokenSecret, params, done) {
var profile = { provider: 'ohloh' };
profile.id = xml.result.account.id;
profile.displayName = xml.result.account.name;
+
+ profile._raw = body;
+ profile._xml2json =
+ profile._xml2js = xml;
done(null, profile);
});
View
@@ -19,6 +19,9 @@
"devDependencies": {
"vows": "0.6.x"
},
+ "scripts": {
+ "test": "NODE_PATH=lib node_modules/.bin/vows test/*-test.js"
+ },
"engines": { "node": ">= 0.4.0" },
"licenses": [ {
"type": "MIT",
View
@@ -58,6 +58,13 @@ vows.describe('OhlohStrategy').addBatch({
assert.equal(profile.id, '7476');
assert.equal(profile.displayName, 'jaredhanson');
},
+ 'should set raw property' : function(err, profile) {
+ assert.isString(profile._raw);
+ },
+ 'should set xml2js property' : function(err, profile) {
+ assert.isObject(profile._xml2js);
+ assert.strictEqual(profile._xml2json, profile._xml2js);
+ },
},
},

0 comments on commit c11a6f3

Please sign in to comment.