22 |
We're sorry, but something went wrong.
23 |
We've been notified about this issue and we'll take a look at it shortly.
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keithpitt/ember-rails-example/262ec6920fe722c4f7d2105e88d498a405174d09/public/favicon.ico
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2 | #
3 | # To ban all spiders from the entire site uncomment the next two lines:
4 | # User-Agent: *
5 | # Disallow: /
6 |
--------------------------------------------------------------------------------
/script/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3 |
4 | APP_PATH = File.expand_path('../../config/application', __FILE__)
5 | require File.expand_path('../../config/boot', __FILE__)
6 | require 'rails/commands'
7 |
--------------------------------------------------------------------------------
/test/fixtures/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keithpitt/ember-rails-example/262ec6920fe722c4f7d2105e88d498a405174d09/test/fixtures/.gitkeep
--------------------------------------------------------------------------------
/test/functional/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keithpitt/ember-rails-example/262ec6920fe722c4f7d2105e88d498a405174d09/test/functional/.gitkeep
--------------------------------------------------------------------------------
/test/integration/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keithpitt/ember-rails-example/262ec6920fe722c4f7d2105e88d498a405174d09/test/integration/.gitkeep
--------------------------------------------------------------------------------
/test/performance/browsing_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 | require 'rails/performance_test_help'
3 |
4 | class BrowsingTest < ActionDispatch::PerformanceTest
5 | # Refer to the documentation for all available options
6 | # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
7 | # :output => 'tmp/performance', :formats => [:flat] }
8 |
9 | def test_homepage
10 | get '/'
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | ENV["RAILS_ENV"] = "test"
2 | require File.expand_path('../../config/environment', __FILE__)
3 | require 'rails/test_help'
4 |
5 | class ActiveSupport::TestCase
6 | # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
7 | #
8 | # Note: You'll currently still have to declare fixtures explicitly in integration tests
9 | # -- they do not yet inherit this setting
10 | fixtures :all
11 |
12 | # Add more helper methods to be used by all tests here...
13 | end
14 |
--------------------------------------------------------------------------------
/test/unit/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keithpitt/ember-rails-example/262ec6920fe722c4f7d2105e88d498a405174d09/test/unit/.gitkeep
--------------------------------------------------------------------------------
/vendor/assets/javascripts/head.js:
--------------------------------------------------------------------------------
1 | /**
2 | Head JS The only script in your
3 | Copyright Tero Piirainen (tipiirai)
4 | License MIT / http://bit.ly/mit-license
5 | Version 0.96
6 |
7 | http://headjs.com
8 | */
9 | (function(doc) {
10 |
11 | var html = doc.documentElement,
12 | conf = {
13 | screens: [320, 480, 640, 768, 1024, 1280, 1440, 1680, 1920],
14 | section: "-section",
15 | page: "-page",
16 | head: "head"
17 | },
18 | klass = [];
19 |
20 |
21 | if (window.head_conf) {
22 | for (var key in head_conf) {
23 | if (head_conf[key] !== undefined) {
24 | conf[key] = head_conf[key];
25 | }
26 | }
27 | }
28 |
29 | function pushClass(name) {
30 | klass[klass.length] = name;
31 | }
32 |
33 | function removeClass(name) {
34 | var re = new RegExp("\\b" + name + "\\b");
35 | html.className = html.className.replace(re, '');
36 | }
37 |
38 | function each(arr, fn) {
39 | for (var i = 0, arr_length = arr.length; i < arr_length; i++) {
40 | fn.call(arr, arr[i], i);
41 | }
42 | }
43 |
44 | // API
45 | var api = window[conf.head] = function() {
46 | api.ready.apply(null, arguments);
47 | };
48 |
49 | api.feature = function(key, enabled, queue) {
50 |
51 | // internal: apply all classes
52 | if (!key) {
53 | html.className += ' ' + klass.join( ' ' );
54 | klass = [];
55 | return;
56 | }
57 |
58 | if (Object.prototype.toString.call(enabled) == '[object Function]') {
59 | enabled = enabled.call();
60 | }
61 |
62 | pushClass((enabled ? '' : 'no-') + key);
63 | api[key] = !!enabled;
64 |
65 | // apply class to HTML element
66 | if (!queue) {
67 | removeClass('no-' + key);
68 | removeClass(key);
69 | api.feature();
70 | }
71 |
72 | return api;
73 | };
74 |
75 | // browser type & version
76 | var ua = navigator.userAgent.toLowerCase();
77 |
78 | ua = /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
79 | /(opera)(?:.*version)?[ \/]([\w.]+)/.exec( ua ) ||
80 | /(msie) ([\w.]+)/.exec( ua ) ||
81 | !/compatible/.test( ua ) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec( ua ) || [];
82 |
83 |
84 | if (ua[1] == 'msie') {
85 | ua[1] = 'ie';
86 | ua[2] = document.documentMode || ua[2];
87 | }
88 |
89 | pushClass(ua[1]);
90 |
91 | api.browser = { version: ua[2] };
92 | api.browser[ua[1]] = true;
93 |
94 | // IE specific
95 | if (api.browser.ie) {
96 |
97 | pushClass("ie" + parseFloat(ua[2]));
98 |
99 | // IE versions
100 | for (var ver = 3; ver < 11; ver++) {
101 | if (parseFloat(ua[2]) < ver) { pushClass("lt-ie" + ver); }
102 | }
103 |
104 | // HTML5 support
105 | each("abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video".split("|"), function(el) {
106 | doc.createElement(el);
107 | });
108 |
109 | }
110 |
111 |
112 | // CSS "router"
113 | each(location.pathname.split("/"), function(el, i) {
114 |
115 | if (this.length > 2 && this[i + 1] !== undefined) {
116 | if (i) { pushClass(this.slice(1, i+1).join("-") + conf.section); }
117 |
118 | } else {
119 |
120 | // pageId
121 | var id = el || "index", index = id.indexOf(".");
122 | if (index > 0) { id = id.substring(0, index); }
123 | html.id = id + conf.page;
124 |
125 | // on root?
126 | if (!i) { pushClass("root" + conf.section); }
127 | }
128 | });
129 |
130 |
131 | // screen resolution: w-100, lt-480, lt-1024 ...
132 | function screenSize() {
133 | var w = window.outerWidth || html.clientWidth;
134 |
135 | // remove earlier widths
136 | html.className = html.className.replace(/ (w|lt)-\d+/g, "");
137 |
138 | // add new ones
139 | pushClass("w-" + Math.round(w / 100) * 100);
140 |
141 | each(conf.screens, function(width) {
142 | if (w <= width) { pushClass("lt-" + width); }
143 | });
144 |
145 | api.feature();
146 | }
147 |
148 | screenSize();
149 | window.onresize = screenSize;
150 |
151 | api.feature("js", true).feature();
152 |
153 | })(document);
154 |
155 |
156 | /**
157 | Head JS The only script in your
158 | Copyright Tero Piirainen (tipiirai)
159 | License MIT / http://bit.ly/mit-license
160 | Version 0.96
161 |
162 | http://headjs.com
163 | */
164 | (function() {
165 | /*
166 | To add a new test:
167 |
168 | head.feature("video", function() {
169 | var tag = document.createElement('video');
170 | return !!tag.canPlayType;
171 | });
172 |
173 | Good place to grab more tests
174 |
175 | https://github.com/Modernizr/Modernizr/blob/master/modernizr.js
176 | */
177 |
178 |
179 | /* CSS modernizer */
180 | var el = document.createElement("i"),
181 | style = el.style,
182 | prefs = ' -o- -moz- -ms- -webkit- -khtml- '.split(' '),
183 | domPrefs = 'Webkit Moz O ms Khtml'.split(' '),
184 |
185 | head_var = window.head_conf && head_conf.head || "head",
186 | api = window[head_var];
187 |
188 |
189 | // Thanks Paul Irish!
190 | function testProps(props) {
191 | for (var i in props) {
192 | if (style[props[i]] !== undefined) {
193 | return true;
194 | }
195 | }
196 | }
197 |
198 |
199 | function testAll(prop) {
200 | var camel = prop.charAt(0).toUpperCase() + prop.substr(1),
201 | props = (prop + ' ' + domPrefs.join(camel + ' ') + camel).split(' ');
202 |
203 | return !!testProps(props);
204 | }
205 |
206 | var tests = {
207 |
208 | gradient: function() {
209 | var s1 = 'background-image:',
210 | s2 = 'gradient(linear,left top,right bottom,from(#9f9),to(#fff));',
211 | s3 = 'linear-gradient(left top,#eee,#fff);';
212 |
213 | style.cssText = (s1 + prefs.join(s2 + s1) + prefs.join(s3 + s1)).slice(0,-s1.length);
214 | return !!style.backgroundImage;
215 | },
216 |
217 | rgba: function() {
218 | style.cssText = "background-color:rgba(0,0,0,0.5)";
219 | return !!style.backgroundColor;
220 | },
221 |
222 | opacity: function() {
223 | return el.style.opacity === "";
224 | },
225 |
226 | textshadow: function() {
227 | return style.textShadow === '';
228 | },
229 |
230 | multiplebgs: function() {
231 | style.cssText = "background:url(//:),url(//:),red url(//:)";
232 | return new RegExp("(url\\s*\\(.*?){3}").test(style.background);
233 | },
234 |
235 | boxshadow: function() {
236 | return testAll("boxShadow");
237 | },
238 |
239 | borderimage: function() {
240 | return testAll("borderImage");
241 | },
242 |
243 | borderradius: function() {
244 | return testAll("borderRadius");
245 | },
246 |
247 | cssreflections: function() {
248 | return testAll("boxReflect");
249 | },
250 |
251 | csstransforms: function() {
252 | return testAll("transform");
253 | },
254 |
255 | csstransitions: function() {
256 | return testAll("transition");
257 | },
258 |
259 | /*
260 | font-face support. Uses browser sniffing but is synchronous.
261 |
262 | http://paulirish.com/2009/font-face-feature-detection/
263 | */
264 | fontface: function() {
265 | var ua = navigator.userAgent, parsed;
266 |
267 | if (/*@cc_on@if(@_jscript_version>=5)!@end@*/0)
268 | return true;
269 |
270 | if (parsed = ua.match(/Chrome\/(\d+\.\d+\.\d+\.\d+)/))
271 | return parsed[1] >= '4.0.249.4' || 1 * parsed[1].split(".")[0] > 5;
272 | if ((parsed = ua.match(/Safari\/(\d+\.\d+)/)) && !/iPhone/.test(ua))
273 | return parsed[1] >= '525.13';
274 | if (/Opera/.test({}.toString.call(window.opera)))
275 | return opera.version() >= '10.00';
276 | if (parsed = ua.match(/rv:(\d+\.\d+\.\d+)[^b].*Gecko\//))
277 | return parsed[1] >= '1.9.1';
278 |
279 | return false;
280 | }
281 | };
282 |
283 | // queue features
284 | for (var key in tests) {
285 | if (tests[key]) {
286 | api.feature(key, tests[key].call(), true);
287 | }
288 | }
289 |
290 | // enable features at once
291 | api.feature();
292 |
293 | })();
294 |
295 |
296 | /**
297 | Head JS The only script in your
298 | Copyright Tero Piirainen (tipiirai)
299 | License MIT / http://bit.ly/mit-license
300 | Version 0.96
301 |
302 | http://headjs.com
303 | */
304 | (function(doc) {
305 |
306 | var head = doc.documentElement,
307 | isHeadReady,
308 | isDomReady,
309 | domWaiters = [],
310 | queue = [], // waiters for the "head ready" event
311 | handlers = {}, // user functions waiting for events
312 | scripts = {}, // loadable scripts in different states
313 | isAsync = doc.createElement("script").async === true || "MozAppearance" in doc.documentElement.style || window.opera;
314 |
315 |
316 | /*** public API ***/
317 | var head_var = window.head_conf && head_conf.head || "head",
318 | api = window[head_var] = (window[head_var] || function() { api.ready.apply(null, arguments); });
319 |
320 | // states
321 | var PRELOADED = 1,
322 | PRELOADING = 2,
323 | LOADING = 3,
324 | LOADED = 4;
325 |
326 |
327 | // Method 1: simply load and let browser take care of ordering
328 | if (isAsync) {
329 |
330 | api.js = function() {
331 |
332 | var args = arguments,
333 | fn = args[args.length -1],
334 | els = {};
335 |
336 | if (!isFunc(fn)) { fn = null; }
337 |
338 | each(args, function(el, i) {
339 |
340 | if (el != fn) {
341 | el = getScript(el);
342 | els[el.name] = el;
343 |
344 | load(el, fn && i == args.length -2 ? function() {
345 | if (allLoaded(els)) { one(fn); }
346 |
347 | } : null);
348 | }
349 | });
350 |
351 | return api;
352 | };
353 |
354 |
355 | // Method 2: preload with text/cache hack
356 | } else {
357 |
358 | api.js = function() {
359 |
360 | var args = arguments,
361 | rest = [].slice.call(args, 1),
362 | next = rest[0];
363 |
364 | // wait for a while. immediate execution causes some browsers to ignore caching
365 | if (!isHeadReady) {
366 | queue.push(function() {
367 | api.js.apply(null, args);
368 | });
369 | return api;
370 | }
371 |
372 | // multiple arguments
373 | if (next) {
374 |
375 | // load
376 | each(rest, function(el) {
377 | if (!isFunc(el)) {
378 | preload(getScript(el));
379 | }
380 | });
381 |
382 | // execute
383 | load(getScript(args[0]), isFunc(next) ? next : function() {
384 | api.js.apply(null, rest);
385 | });
386 |
387 |
388 | // single script
389 | } else {
390 | load(getScript(args[0]));
391 | }
392 |
393 | return api;
394 | };
395 | }
396 |
397 | api.ready = function(key, fn) {
398 |
399 | // DOM ready check: head.ready(document, function() { });
400 | if (key == doc) {
401 | if (isDomReady) { one(fn); }
402 | else { domWaiters.push(fn); }
403 | return api;
404 | }
405 |
406 | // shift arguments
407 | if (isFunc(key)) {
408 | fn = key;
409 | key = "ALL";
410 | }
411 |
412 | // make sure arguments are sane
413 | if (typeof key != 'string' || !isFunc(fn)) { return api; }
414 |
415 | var script = scripts[key];
416 |
417 | // script already loaded --> execute and return
418 | if (script && script.state == LOADED || key == 'ALL' && allLoaded() && isDomReady) {
419 | one(fn);
420 | return api;
421 | }
422 |
423 | var arr = handlers[key];
424 | if (!arr) { arr = handlers[key] = [fn]; }
425 | else { arr.push(fn); }
426 | return api;
427 | };
428 |
429 |
430 | // perform this when DOM is ready
431 | api.ready(doc, function() {
432 |
433 | if (allLoaded()) {
434 | each(handlers.ALL, function(fn) {
435 | one(fn);
436 | });
437 | }
438 |
439 | if (api.feature) {
440 | api.feature("domloaded", true);
441 | }
442 | });
443 |
444 |
445 | /*** private functions ***/
446 |
447 |
448 | // call function once
449 | function one(fn) {
450 | if (fn._done) { return; }
451 | fn();
452 | fn._done = 1;
453 | }
454 |
455 |
456 | function toLabel(url) {
457 | var els = url.split("/"),
458 | name = els[els.length -1],
459 | i = name.indexOf("?");
460 |
461 | return i != -1 ? name.substring(0, i) : name;
462 | }
463 |
464 |
465 | function getScript(url) {
466 |
467 | var script;
468 |
469 | if (typeof url == 'object') {
470 | for (var key in url) {
471 | if (url[key]) {
472 | script = { name: key, url: url[key] };
473 | }
474 | }
475 | } else {
476 | script = { name: toLabel(url), url: url };
477 | }
478 |
479 | var existing = scripts[script.name];
480 | if (existing && existing.url === script.url) { return existing; }
481 |
482 | scripts[script.name] = script;
483 | return script;
484 | }
485 |
486 |
487 | function each(arr, fn) {
488 | if (!arr) { return; }
489 |
490 | // arguments special type
491 | if (typeof arr == 'object') { arr = [].slice.call(arr); }
492 |
493 | // do the job
494 | for (var i = 0; i < arr.length; i++) {
495 | fn.call(arr, arr[i], i);
496 | }
497 | }
498 |
499 | function isFunc(el) {
500 | return Object.prototype.toString.call(el) == '[object Function]';
501 | }
502 |
503 | function allLoaded(els) {
504 |
505 | els = els || scripts;
506 |
507 | var loaded;
508 |
509 | for (var name in els) {
510 | if (els.hasOwnProperty(name) && els[name].state != LOADED) { return false; }
511 | loaded = true;
512 | }
513 |
514 | return loaded;
515 | }
516 |
517 |
518 | function onPreload(script) {
519 | script.state = PRELOADED;
520 |
521 | each(script.onpreload, function(el) {
522 | el.call();
523 | });
524 | }
525 |
526 | function preload(script, callback) {
527 |
528 | if (script.state === undefined) {
529 |
530 | script.state = PRELOADING;
531 | script.onpreload = [];
532 |
533 | scriptTag({ src: script.url, type: 'cache'}, function() {
534 | onPreload(script);
535 | });
536 | }
537 | }
538 |
539 | function load(script, callback) {
540 |
541 | if (script.state == LOADED) {
542 | return callback && callback();
543 | }
544 |
545 | if (script.state == LOADING) {
546 | return api.ready(script.name, callback);
547 | }
548 |
549 | if (script.state == PRELOADING) {
550 | return script.onpreload.push(function() {
551 | load(script, callback);
552 | });
553 | }
554 |
555 | script.state = LOADING;
556 |
557 | scriptTag(script.url, function() {
558 |
559 | script.state = LOADED;
560 |
561 | if (callback) { callback(); }
562 |
563 | // handlers for this script
564 | each(handlers[script.name], function(fn) {
565 | one(fn);
566 | });
567 |
568 | // everything ready
569 | if (allLoaded() && isDomReady) {
570 | each(handlers.ALL, function(fn) {
571 | one(fn);
572 | });
573 | }
574 | });
575 | }
576 |
577 |
578 | function scriptTag(src, callback) {
579 |
580 | var s = doc.createElement('script');
581 | s.type = 'text/' + (src.type || 'javascript');
582 | s.src = src.src || src;
583 | s.async = false;
584 |
585 | s.onreadystatechange = s.onload = function() {
586 |
587 | var state = s.readyState;
588 |
589 | if (!callback.done && (!state || /loaded|complete/.test(state))) {
590 | callback.done = true;
591 | callback();
592 | }
593 | };
594 |
595 | // use body if available. more safe in IE
596 | (doc.body || head).appendChild(s);
597 | }
598 |
599 | /*
600 | The much desired DOM ready check
601 | Thanks to jQuery and http://javascript.nwbox.com/IEContentLoaded/
602 | */
603 |
604 | function fireReady() {
605 | if (!isDomReady) {
606 | isDomReady = true;
607 | each(domWaiters, function(fn) {
608 | one(fn);
609 | });
610 | }
611 | }
612 |
613 | // W3C
614 | if (window.addEventListener) {
615 | doc.addEventListener("DOMContentLoaded", fireReady, false);
616 |
617 | // fallback. this is always called
618 | window.addEventListener("load", fireReady, false);
619 |
620 | // IE
621 | } else if (window.attachEvent) {
622 |
623 | // for iframes
624 | doc.attachEvent("onreadystatechange", function() {
625 | if (doc.readyState === "complete" ) {
626 | fireReady();
627 | }
628 | });
629 |
630 |
631 | // avoid frames with different domains issue
632 | var frameElement = 1;
633 |
634 | try {
635 | frameElement = window.frameElement;
636 |
637 | } catch(e) {}
638 |
639 |
640 | if (!frameElement && head.doScroll) {
641 |
642 | (function() {
643 | try {
644 | head.doScroll("left");
645 | fireReady();
646 |
647 | } catch(e) {
648 | setTimeout(arguments.callee, 1);
649 | return;
650 | }
651 | })();
652 | }
653 |
654 | // fallback
655 | window.attachEvent("onload", fireReady);
656 | }
657 |
658 |
659 | // enable document.readyState for Firefox <= 3.5
660 | if (!doc.readyState && doc.addEventListener) {
661 | doc.readyState = "loading";
662 | doc.addEventListener("DOMContentLoaded", handler = function () {
663 | doc.removeEventListener("DOMContentLoaded", handler, false);
664 | doc.readyState = "complete";
665 | }, false);
666 | }
667 |
668 | /*
669 | We wait for 300 ms before script loading starts. for some reason this is needed
670 | to make sure scripts are cached. Not sure why this happens yet. A case study:
671 |
672 | https://github.com/headjs/headjs/issues/closed#issue/83
673 | */
674 | setTimeout(function() {
675 | isHeadReady = true;
676 | each(queue, function(fn) { fn(); });
677 |
678 | }, 300);
679 |
680 | })(document);
681 |
682 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keithpitt/ember-rails-example/262ec6920fe722c4f7d2105e88d498a405174d09/vendor/assets/stylesheets/.gitkeep
--------------------------------------------------------------------------------
/vendor/plugins/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keithpitt/ember-rails-example/262ec6920fe722c4f7d2105e88d498a405174d09/vendor/plugins/.gitkeep
--------------------------------------------------------------------------------