o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1365130833.268545: @value"[{I" class:EFI"BundledAsset;FI"logical_path;FI"teabag/base/fixture.js;FI" pathname;FI"W/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/fixture.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2013-03-04T18:14:44-07:00;FI" length;Fi}I" digest;F"%71c9bc8db14f78c1969334fe55170952I" source;FI"}(function() { var __slice = [].slice; Teabag.fixture = (function() { var addContent, cleanup, create, load, loadComplete, preload, putContent, set, xhr, xhrRequest, _this = this; fixture.cache = {}; fixture.el = null; fixture.$el = null; fixture.json = []; fixture.preload = function() { var url, urls, _i, _len, _results; urls = 1 <= arguments.length ? __slice.call(arguments, 0) : []; _results = []; for (_i = 0, _len = urls.length; _i < _len; _i++) { url = urls[_i]; _results.push(preload(url)); } return _results; }; fixture.load = function() { var append, index, url, urls, _i, _j, _len, _results; urls = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), append = arguments[_i++]; if (append == null) { append = false; } if (typeof append !== "boolean") { urls.push(append); append = false; } _results = []; for (index = _j = 0, _len = urls.length; _j < _len; index = ++_j) { url = urls[index]; _results.push(load(url, append || index > 0)); } return _results; }; fixture.set = function() { var append, html, htmls, index, _i, _j, _len, _results; htmls = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), append = arguments[_i++]; if (append == null) { append = false; } if (typeof append !== "boolean") { htmls.push(append); append = false; } _results = []; for (index = _j = 0, _len = htmls.length; _j < _len; index = ++_j) { html = htmls[index]; _results.push(set(html, append || index > 0)); } return _results; }; fixture.cleanup = function() { return cleanup(); }; function fixture() { Teabag.fixture.load.apply(window, arguments); } xhr = null; preload = function(url) { return load(url, false, true); }; load = function(url, append, preload) { var cached, value; if (preload == null) { preload = false; } if (cached = Teabag.fixture.cache[url]) { return loadComplete(url, cached.type, cached.content, append, preload); } value = null; xhrRequest(url, function() { if (xhr.readyState !== 4) { return; } if (xhr.status !== 200) { throw "Unable to load fixture \"" + url + "\"."; } return value = loadComplete(url, xhr.getResponseHeader("content-type"), xhr.responseText, append, preload); }); return value; }; loadComplete = function(url, type, content, append, preload) { Teabag.fixture.cache[url] = { type: type, content: content }; if (type.match(/application\/json;/)) { return fixture.json[fixture.json.push(JSON.parse(content)) - 1]; } if (preload) { return content; } if (append) { addContent(content); } else { putContent(content); } return Teabag.fixture.el; }; set = function(content, append) { if (append) { return addContent(content); } else { return putContent(content); } }; putContent = function(content) { cleanup(); create(); return Teabag.fixture.el.innerHTML = content; }; addContent = function(content) { if (!Teabag.fixture.el) { create(); } return Teabag.fixture.el.innerHTML += content; }; create = function() { var _ref; Teabag.fixture.el = document.createElement("div"); if (typeof window.$ === 'function') { Teabag.fixture.$el = $(Teabag.fixture.el); } Teabag.fixture.el.id = "teabag-fixtures"; return (_ref = document.body) != null ? _ref.appendChild(Teabag.fixture.el) : void 0; }; cleanup = function() { var _base, _ref, _ref1; (_base = Teabag.fixture).el || (_base.el = document.getElementById("teabag-fixtures")); if ((_ref = Teabag.fixture.el) != null) { if ((_ref1 = _ref.parentNode) != null) { _ref1.removeChild(Teabag.fixture.el); } } return Teabag.fixture.el = null; }; xhrRequest = function(url, callback) { if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); } else if (window.ActiveXObject) { try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { } } } if (!xhr) { throw "Unable to make Ajax Request"; } xhr.onreadystatechange = callback; xhr.open("GET", "" + Teabag.root + "/fixtures/" + url, false); return xhr.send(); }; return fixture; }).call(this); }).call(this); ;FI"required_assets_digest;F"%acd20f189765612f9b5cc210f129fcb9I" _version;F"%6776f581a4329e299531e1d52aa59832