From 9b86ddc01e1bead6ea6d94480088a9d78f796f64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Lombra=C3=B1a=20Gonz=C3=A1lez?= Date: Mon, 4 Apr 2016 14:25:33 +0200 Subject: [PATCH 1/4] Include api context. --- pybossa.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybossa.js b/pybossa.js index cbc8e4b..76a4a67 100644 --- a/pybossa.js +++ b/pybossa.js @@ -31,7 +31,7 @@ function _fetchProject(projectname) { return $.ajax({ url: url + 'api/project', - data: 'short_name='+projectname, + data: 'all=1&short_name='+projectname, dataType:'json' }); } From dfe7a746fa2ed235eec7bc24dc29126f58fec252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Lombra=C3=B1a=20Gonz=C3=A1lez?= Date: Mon, 4 Apr 2016 14:30:02 +0200 Subject: [PATCH 2/4] Fix tests. --- tests/test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test.js b/tests/test.js index 04129c8..dc08ac6 100644 --- a/tests/test.js +++ b/tests/test.js @@ -8,7 +8,7 @@ test('should get a new task for the "slug" project from the server', function() // The endpoint for the FakeServer: server.respondWith( - "GET", "/api/project?short_name=slug", + "GET", "/api/project?all=1&short_name=slug", [200, { "Content-type": "application/json" }, JSON.stringify(project)] ); @@ -117,7 +117,7 @@ test('should get a new task for the "slug" project from the server', function() // The endpoint for the FakeServer: server.respondWith( - "GET", "/api/project?short_name=slug", + "GET", "/api/project?all=1&short_name=slug", [200, { "Content-type": "application/json" }, JSON.stringify(project)] ); @@ -173,7 +173,7 @@ test('should get the task specified in the url (server/project/projectName/task/ // The endpoint for the FakeServer: server.respondWith( - "GET", "/api/project?short_name=slug", + "GET", "/api/project?all=1&short_name=slug", [200, { "Content-type": "application/json" }, JSON.stringify(project)] ); @@ -245,7 +245,7 @@ test('loads a different "next" task when requesting what would be returned as "n // The endpoint for the FakeServer: server.respondWith( - "GET", "/api/project?short_name=slug", + "GET", "/api/project?all=1&short_name=slug", [200, { "Content-type": "application/json" }, JSON.stringify(project)] ); From 897e1b24f7bb4547258a695c03f98b73555e5740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Lombra=C3=B1a=20Gonz=C3=A1lez?= Date: Mon, 4 Apr 2016 14:35:26 +0200 Subject: [PATCH 3/4] New version with api contexts. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 81cc553..a5f9bea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pybossa.js", - "version": "0.3.0", + "version": "0.4.0", "description": "JavaScript library to interact with a PyBossa server.", "main": "pybossa.js", "directories": { From fca545f4a3dadfe8f4e385cc523f472e856ba3a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Lombra=C3=B1a=20Gonz=C3=A1lez?= Date: Mon, 4 Apr 2016 14:38:17 +0200 Subject: [PATCH 4/4] New version. Fixed previous one. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a5f9bea..acda43e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pybossa.js", - "version": "0.4.0", + "version": "1.1.0", "description": "JavaScript library to interact with a PyBossa server.", "main": "pybossa.js", "directories": {