From 6c6307be2e036874c70fa7f0e130b04295d5d600 Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Sun, 22 Feb 2015 06:14:05 +0900 Subject: [PATCH 1/3] Update helmet rules for ramda --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 3500428e0c..602cd14e8c 100644 --- a/app.js +++ b/app.js @@ -139,7 +139,7 @@ var trusted = [ '*.ionicframework.com', 'https://syndication.twitter.com', '*.youtube.com', - 'cdn.jsdelivr.net/' + '*.jsdelivr.net' ]; app.use(helmet.contentSecurityPolicy({ From f077a0f3337578b7693f4f05ea32f142a9ede61b Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Sun, 22 Feb 2015 06:18:38 +0900 Subject: [PATCH 2/3] New bonfire challenge --- seed_data/bonfires.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/seed_data/bonfires.json b/seed_data/bonfires.json index 8b9b95f867..2f9da459a1 100644 --- a/seed_data/bonfires.json +++ b/seed_data/bonfires.json @@ -497,6 +497,22 @@ "bob.setFullName('Bob Ross');" ] }, + { + "_id": "af4afb223120f7348cdfc9fd", + "name": "Map the Debris", + "difficulty": "3.50", + "description": [ + "Return a new array that transforms the element's average altitude into their orbital periods.", + "The array will contain objects in the format {name: 'name', avgAlt: avgAlt}.", + "You can read about orbital periods on wikipedia.", + "The values should be rounded to the nearest whole number. Assume the body being orbited is Earth." + ], + "challengeSeed": "function orbitalPeriod(arr) {\n return arr;\r\n}\r\n\r\norbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}]);", + "tests": [ + "expect(orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputkin\", orbitalPeriod: 86400}]);", + "expect(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])).to.eqls([{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]);" + ] + }, { "_id": "aff0395860f5d3034dc0bfc9", "name": "Validate US Telephone Numbers", From b32f6133db796cb56ac446346c217522d71cfc9f Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Sun, 22 Feb 2015 06:23:44 +0900 Subject: [PATCH 3/3] Update bonfire plugin version number to force fresh import on browsers --- public/js/lib/bonfire/bonfireInit.js | 2 +- public/js/lib/bonfire/{plugin_v0.1.3.js => plugin_v0.1.4.js} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename public/js/lib/bonfire/{plugin_v0.1.3.js => plugin_v0.1.4.js} (100%) diff --git a/public/js/lib/bonfire/bonfireInit.js b/public/js/lib/bonfire/bonfireInit.js index c5caaa9ec5..2b8d872e89 100644 --- a/public/js/lib/bonfire/bonfireInit.js +++ b/public/js/lib/bonfire/bonfireInit.js @@ -67,7 +67,7 @@ var requests; // (re)initializes the plugin var reset = function() { requests = 0; - plugin = new jailed.Plugin(path+'plugin_v0.1.3.js', api); + plugin = new jailed.Plugin(path+'plugin_v0.1.4.js', api); plugin.whenDisconnected( function() { // give some time to handle the last responce setTimeout( function() { diff --git a/public/js/lib/bonfire/plugin_v0.1.3.js b/public/js/lib/bonfire/plugin_v0.1.4.js similarity index 100% rename from public/js/lib/bonfire/plugin_v0.1.3.js rename to public/js/lib/bonfire/plugin_v0.1.4.js