diff --git a/app.js b/app.js index dff8270448..602cd14e8c 100644 --- a/app.js +++ b/app.js @@ -139,6 +139,7 @@ var trusted = [ '*.ionicframework.com', 'https://syndication.twitter.com', '*.youtube.com', + '*.jsdelivr.net' ]; app.use(helmet.contentSecurityPolicy({ 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 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",