Skip to content

Instantly share code, notes, and snippets.

View pjanik's full-sized avatar

Piotr Janik pjanik

  • Kraków, Poland
View GitHub Profile
<div id="bin-view"></div>
<script>
var MATERIALS = [
{
category: "Cat A",
children: [
{
category: "Cat A1",
children: [
# This class implements two main functionalities:
# 1. Checks if global interactive state is availble on page load and if so,
# it posts 'interactiveLoadGlobal' to all interactives (iframes).
# 2. When 'interactiveStateGlobal' message is received from any iframe, it:
# 2.1. sends the state to LARA server
# 2.2. posts 'interactiveLoadGlobal' message with a new state to all interactives
# (except from sender of save message).
class GlobalIframeSaver
This file has been truncated, but you can view the full file.
diff --git a/air-pollution/javascripts/app.js.map b/air-pollution/javascripts/app.js.map
index 4ae7e7c..e85b6fa 100644
--- a/air-pollution/javascripts/app.js.map
+++ b/air-pollution/javascripts/app.js.map
@@ -1 +1 @@
-{"version":3,"file":"public/javascripts/app.js","sources":["app/src/controls.coffee","app/src/main.coffee","app/src/model.coffee"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA;oCACE;;AAAA,kDAAgB,KAAhB;;AAAA,iCACA,QAAO;AACL,QAAG,IAAC,eAAJ;aACE,EAAE,WAAF,CAAc,CAAC,IAAf,GADF;KAAA;AAIE,UAAC,WAAD;AAAA,MACA,IAAC,cAAD,EADA;AAAA,MAEA,IAAC,aAAD,EAFA;AAAA,MAIA,EAAE,WAAF,CAAc,CAAC,IAAf,EAJA;aAKA,IAAC,eAAD,GAAkB,KATpB;KADK;EAAA,CADP;;AAAA,iCAaA,iBAAgB,IAbhB;;AAAA,iCAcA,aAAY;AACV;AAAA,QAAG,EAAE,gBAAF,CAAmB,CAAC,MAApB,KAA8B,CAAjC;AAAwC,aAAxC;KAAA;AAAA,IAKA,mBAAmB,SAAC,OAAD,EAAU,GAAV,EAAe,SAAf;AACjB;AAAA,eAAS,EAAG,MAAE,OAAL,CAAT;AAAA,MACA,MAAM,CAAC,MAAP,CAAc,2CAAd,CADA;aAEA,MAAM,CAAC,IAAP,CAAY,WAAZ,CAAwB,CAAC,KAAzB,CAA+B;AAC7B;AA
On branch dev-gh-pages
Your branch is up-to-date with 'dev/gh-pages'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: air-pollution/javascripts/app.js.map
modified: air-pollution/javascripts/vendor.js
modified: air-pollution/javascripts/vendor.js.map
piotrs-mbp:xproject piotr$ RAILS_ENV=development rake app:setup:create_default_data
Problem processing key 'host' in config/mailer.yml
undefined method `host=' for ActionMailer::Base:Class
Generating default data from default data ymls
Updated default project
names_in_old_order = sequence_with_activities.activities.map { |a| a.name }
sequence_with_activities.activities[0].name.should == names_in_old_order[0]
sequence_with_activities.activities[1].name.should == names_in_old_order[1]
sequence_with_activities.activities[2].name.should == names_in_old_order[2]
sequence_with_activities.lightweight_activities_sequences[0].update_attributes!(position: 1)
sequence_with_activities.lightweight_activities_sequences[1].update_attributes!(position: 0)
sequence_with_activities.lightweight_activities_sequences[2].update_attributes!(position: 2)
sequence_with_activities.reload # sequence_with_activities.activities.reset
names_in_new_order = sequence_with_activities.activities.map { |a| a.name }
names_in_new_order[1].should == names_in_old_order[0]
(function() {
function Foo() {
this.bigData = new Array(5000000).join("XXXXX");
this.smallData = "bla bla";
}
Foo.prototype.m = function() {
var smallData = this.smallData;
$(window).on('click', function() {
(function() {
function Foo() {
this.bigData = new Array(5000000).join("XXXXX");
this.smallData = "bla bla";
}
Foo.prototype.m = function() {
var smallData = this.smallData;
$(window).on('click', function() {
(function() {
function Foo() {
this.bigData = new Array(5000000).join("XXXXX");
this.smallData = "bla bla";
}
Foo.prototype.m = function() {
var smallData = this.smallData;
$(window).on('click', function() {
Failures:
1) Activity is run from the portal with a domain, external_id, and return url
Failure/Error: stub.should have_been_requested
The request POST http://portal.org/return/1234 with body "[{\"type\":\"open_response\",\"question_id\":\"1\",\"answer\":\"something\"}]" with headers {'Authorization'=>'Bearer token', 'Content-Type'=>'application/json'} was expected to execute 1 time but it executed 0 times
The following requests were made:
GET http://127.0.0.1:54627/__identify__ with headers {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Ruby'} was made 7 times
POST http://portal.org/return/1234 with body '[{"type":"open_response","question_id":"14","answer":"something"}]' with headers {'Authorization'=>'Bearer token', 'Content-Type'=>'application/json'} was made 1 time