Граф коммитов

34 Коммитов

Автор SHA1 Сообщение Дата
Joe Curlee 8299240006 added shortname to program data in openbadger test 2013-06-06 11:12:52 -05:00
Atul Varma ed45d73261 oops ... forgot about calling .end() on result of s3.get() for s3-fake. 2013-06-03 15:53:06 -04:00
Atul Varma df491ba015 added deleteFile() method to fake-s3. 2013-06-03 15:17:30 -04:00
Atul Varma abc6ffcd84 Merge pull request #357 from toolness/issue-356
Fix failing api middleware test.
2013-06-02 09:09:40 -07:00
Atul Varma 460933d499 Added better test output and docs from mozilla/openbadger project.
Also removed an empty test file.
2013-06-02 09:39:35 -04:00
Atul Varma 8ff6528051 Fix failing api middleware test.
Not sure if it's right to throw a "bad gateway" error if the server is
returning 404, though, so I'd like this reviewed. This should fix #356.
2013-06-02 08:59:54 -04:00
Atul Varma beba59045e allow openbadger.test.js to pass if required env vars aren't defined. 2013-06-02 08:42:50 -04:00
Joe Curlee 199e5c99b8 renamed /learn to /explore. fixes #344 2013-06-01 17:44:36 -05:00
Chris McAvoy 4e3fd2b8c7 Merge branch 'my-badges' of https://github.com/stenington/CSOL-site 2013-05-31 11:26:48 -05:00
Mike Larsson 9d7b65d500 Change /backpack/badges to /mybadges
Remove /backpack
Require login for /mybadges
Add openbadger method to fetch user badges
Add session to query object passed to api methods
Basic /mybadges display (doesn't really work until openbadger changes are made)
2013-05-31 11:52:41 -04:00
Atul Varma e0fdd878a6 added s3-fake.js and smoke test. 2013-05-31 10:03:53 -04:00
Mike Larsson 0d65f6f0cc Move arg wrangling down into remote method 2013-05-29 09:33:41 -04:00
Mike Larsson fc6237648f Add openbadger.claim() method, and implement basic badge claim flow 2013-05-28 20:56:49 -04:00
Mike Larsson c573cd64f2 Adding optional options passthrough on api to request methods 2013-05-28 16:18:29 -04:00
Mike Larsson bce2de2dd8 This change allows the api paginate method to pass through empty
data, and introduces a no_data block into the templates to render
a message when no data is found on the badges or programs pages,
instead of erroring out.
2013-05-17 16:45:33 -04:00
Mike Larsson 19d857ac22 Remove /v2/ as that should now be part of config url 2013-05-17 11:14:53 -04:00
Mike Larsson ba23cd2751 Adds issuers endpoint to Open Badger API client, and passes
the data along to the About page. About page renders org list
in three columns.
2013-05-17 11:14:05 -04:00
Mike Larsson eb3b2e70b5 remove /v2/ from tests 2013-05-17 11:00:19 -04:00
Mike Larsson 2615f39d01 Allow api origins to have paths.
Add basic logging wrapper for winston to start using.
Connect express.logger to logger module.
Use example.org instead of origin.org juuuuuust to be safe.
2013-05-17 10:57:48 -04:00
Mike Larsson 3854da7788 Be less cavalier about building api endpoint urls 2013-05-17 10:57:47 -04:00
Mike Larsson ff2e9f62e7 Updating tests to pass with new error handling, and
fix issues uncovered in the process.
2013-05-16 16:52:30 -04:00
Mike Larsson 81c0075a2b Error out if trying to paginate unpageable data 2013-05-15 15:38:31 -04:00
Mike Larsson b327dbfbf1 This changes openbadger.js and api.js such that openbadger now
uses api, and the app only has to use openbadger. api(openbadger.x)
calls now look like openbadger.middleware('x'), and otherwise
the same methods are exposed on the openbadger object.

Note that this means api.js has a new usage as well. If you create
a new api, e.g.
  var api = new Api('ORIGIN');
you will have an object with all the get/post/head/etc. helpers
that could also be used if you want to fetch data from an API
without the layer of abstraction that providing additional functions
gives. This usage isn't well tested.
2013-05-15 15:25:41 -04:00
Mike Larsson bf5ce3393e Incorporating /v2/program and /v2/programs endpoints, and
refining badge endpoints. The program endpoints currently
do not return enough data from the OpenBadger side to fully
build out their pages. I'm also not sure about the controllers
organizational strategy, and whether I'm breaking it. Changing
site main navigation and major endpoints to "Earn, Learn, Level Up".
2013-05-14 16:18:25 -04:00
Mike Larsson 5d549f0d3a Pull openbadger url from env, and fix a few tests 2013-05-13 22:59:46 -04:00
Mike Larsson b35b09dc5d Test explicitly for correct v2 badge endpoints 2013-05-13 15:49:07 -04:00
Mike Larsson b3f0cc577b Bring openbadger into closer conformance with v2 badge endpoints 2013-05-13 15:46:49 -04:00
Mike Larsson 806412880d Trying to separate api util methods from actual OpenBadger API calls
so utils can be reused for other APIs too, like Aestimia. This also
helps a little bit with testing to avoid testing e.g. pagination
fully on every paginated endpoint (although having a small sanity check
is still advisable).
2013-05-13 14:27:20 -04:00
Mike Larsson aee8a357d6 Fix tests broken by latest merge 2013-05-10 11:56:00 -04:00
Mike Larsson 0da5bd8990 Adding getBadge tests 2013-05-09 14:16:02 -04:00
Mike Larsson cd027b602d Adding tests for api.js 2013-05-09 14:16:02 -04:00
Andrew Hayward b4bf4d38c3 Test files 2013-04-19 14:31:31 +01:00
Brian J Brennan 47f8cba882 Add documentation about how to use `prepare` 2013-04-08 14:55:08 -04:00
Brian J Brennan 9ec6938d20 Implement fixture generation for testing. 2013-04-08 14:29:06 -04:00