speedo 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. data/app/assets/javascripts/speedo.js +12 -12
  2. data/app/views/layouts/speedo/application.html.haml +2 -2
  3. data/lib/speedo/sass.rb +1 -1
  4. data/lib/speedo/version.rb +1 -1
  5. data/test/dummy/log/development.log +889 -0
  6. data/test/dummy/tmp/cache/assets/BC8/350/sprockets%2F3357f02a74351649de62769431854154 +0 -0
  7. data/test/dummy/tmp/cache/assets/BFD/090/sprockets%2F50267839603d9c7384477250f0169f0e +0 -0
  8. data/test/dummy/tmp/cache/assets/C4F/220/sprockets%2F19a6a3539a4ed0526c356691798032a3 +0 -0
  9. data/test/dummy/tmp/cache/assets/C55/E10/sprockets%2F9da121566709335e3081059e7774a9bb +957 -0
  10. data/test/dummy/tmp/cache/assets/C5F/4E0/sprockets%2F4c17092a9c628e66645a4586e9b50717 +57 -0
  11. data/test/dummy/tmp/cache/assets/C82/BB0/sprockets%2F904cd2f9283528b32d94a1d2a6711489 +41 -0
  12. data/test/dummy/tmp/cache/assets/CDE/600/sprockets%2F205a8cce7806d7c77117f1dc263146a8 +0 -0
  13. data/test/dummy/tmp/cache/assets/CE0/930/sprockets%2Fb6670296cd6b3ce81034c8d5d31e5725 +8 -0
  14. data/test/dummy/tmp/cache/assets/CE1/3B0/sprockets%2Fe8865654d2d075e6bba1074193e443dc +350 -0
  15. data/test/dummy/tmp/cache/assets/CF5/F40/sprockets%2F72637ea0f394f68dcc931527509e79ec +0 -0
  16. data/test/dummy/tmp/cache/assets/CF9/7C0/sprockets%2F488b6dcdeb1301268a65202e7101ed2a +974 -0
  17. data/test/dummy/tmp/cache/assets/D0C/C60/sprockets%2F39d93fba83bb3b50a75826703c5a28c5 +311 -0
  18. data/test/dummy/tmp/cache/assets/D1D/D50/sprockets%2F5b87bedce3ae871f14e41e2479290866 +0 -0
  19. data/test/dummy/tmp/cache/assets/D2A/5C0/sprockets%2Fe12edc211b1935a76d3aab4e8716006d +394 -0
  20. data/test/dummy/tmp/cache/assets/D3A/090/sprockets%2F0d24039ad1b8ef3525e367fe51905fbb +11635 -0
  21. data/test/dummy/tmp/cache/assets/D3B/1E0/sprockets%2Fe5f2362b8b1eb8273f1a7764cbb15e35 +11618 -0
  22. data/test/dummy/tmp/cache/assets/D3D/F80/sprockets%2Fadfc8f7271b3a873f3462e149a6a34e0 +374 -0
  23. data/test/dummy/tmp/cache/assets/D3F/0A0/sprockets%2Fc4574a4ea12e8efe636123e1a17f7d66 +11773 -0
  24. data/test/dummy/tmp/cache/assets/D42/CB0/sprockets%2F6c01eb50fe79d82720a649960dee5dd0 +20 -0
  25. data/test/dummy/tmp/cache/assets/D49/2B0/sprockets%2F34363288c95affbe232a199c6938ceab +391 -0
  26. data/test/dummy/tmp/cache/assets/D5B/120/sprockets%2F525577d56abcec9969e805ddc2997fd0 +332 -0
  27. data/test/dummy/tmp/cache/assets/D65/820/sprockets%2F4e91290eae5edd2f4d287ca2952be000 +327 -0
  28. data/test/dummy/tmp/cache/assets/D6C/3D0/sprockets%2Fa62ebc5f479b52c204f4c71ea65594ca +55 -0
  29. data/test/dummy/tmp/cache/assets/D71/D90/sprockets%2F7bb9508df3d877f853823addd4b0a22b +19 -0
  30. data/test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +0 -0
  31. data/test/dummy/tmp/cache/assets/D97/830/sprockets%2Fd55ede995a2705ab74db22acf510dd90 +0 -0
  32. data/test/dummy/tmp/cache/assets/D9B/400/sprockets%2Fec83dc0dc78764b460a3ffc063df25e0 +11789 -0
  33. data/test/dummy/tmp/cache/assets/DA1/670/sprockets%2Fb71f32bbfb530e59ad7a177cf54a888b +0 -0
  34. data/test/dummy/tmp/cache/assets/DA8/760/sprockets%2F1359bb83c703a91d57cfebdaf879a4d7 +9288 -0
  35. data/test/dummy/tmp/cache/assets/DB3/C60/sprockets%2F1ff86e3b1c5bf1c179ac719fced99829 +53 -0
  36. data/test/dummy/tmp/cache/assets/DBE/F80/sprockets%2F8647fc3439abdaa0eb161dadf2fc4304 +694 -0
  37. data/test/dummy/tmp/cache/assets/DC3/CC0/sprockets%2Fa04ece65c59a7a325cab61861da2be7e +0 -0
  38. data/test/dummy/tmp/cache/assets/DC5/290/sprockets%2F1c5dee9b02ab66fbf6e62627a13e27ba +37 -0
  39. data/test/dummy/tmp/cache/assets/DE9/520/sprockets%2Fe9f8259c99da2f355198dc4bcdebb69d +0 -0
  40. data/test/dummy/tmp/cache/assets/DEA/500/sprockets%2F485fc5ba3f81b49ccdd788885ea8de5e +0 -0
  41. data/test/dummy/tmp/cache/assets/DF2/CB0/sprockets%2F4500acae993e0fa07bd48dceee07e2b3 +0 -0
  42. data/test/dummy/tmp/cache/assets/DF9/EB0/sprockets%2Ffcaa51a13d86ac9cf245f2a5d70c9d8c +256 -0
  43. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  44. data/test/dummy/tmp/cache/assets/E7F/BB0/sprockets%2Ffdeefdc424a13a04addae542356dffae +678 -0
  45. data/test/dummy/tmp/cache/assets/E82/D20/sprockets%2Fcdce4acb88dcbeaba64a06a254a9e09f +0 -0
  46. metadata +192 -88
  47. /data/vendor/assets/javascripts/{chosen.jquery.js → speedo/chosen.jquery.js} +0 -0
  48. /data/vendor/assets/javascripts/{jquery.autoSuggest.js → speedo/jquery.autoSuggest.js} +0 -0
  49. /data/vendor/assets/javascripts/{jquery.autogrow.js → speedo/jquery.autogrow.js} +0 -0
  50. /data/vendor/assets/javascripts/{jquery.dataTables.js → speedo/jquery.dataTables.js} +0 -0
  51. /data/vendor/assets/javascripts/{jquery.livequery.js → speedo/jquery.livequery.js} +0 -0
  52. /data/vendor/assets/javascripts/{jquery.mousewheel-3.0.4.pack.js → speedo/jquery.mousewheel-3.0.4.pack.js} +0 -0
  53. /data/vendor/assets/javascripts/{jquery.placeholder.min.js → speedo/jquery.placeholder.min.js} +0 -0
  54. /data/vendor/assets/javascripts/{jquery.spin.js → speedo/jquery.spin.js} +0 -0
  55. /data/vendor/assets/javascripts/{jquery.timeago.js → speedo/jquery.timeago.js} +0 -0
  56. /data/vendor/assets/javascripts/{jquery.tools.min.js → speedo/jquery.tools.min.js} +0 -0
  57. /data/vendor/assets/javascripts/{jquery.uniform.js → speedo/jquery.uniform.js} +0 -0
  58. /data/vendor/assets/javascripts/{modernizr.min.js → speedo/modernizr.min.js} +0 -0
  59. /data/vendor/assets/javascripts/{respond.js → speedo/respond.js} +0 -0
  60. /data/vendor/assets/javascripts/{spin.js → speedo/spin.js} +0 -0
  61. /data/vendor/assets/stylesheets/{autoSuggest.css → speedo/autoSuggest.css} +0 -0
  62. /data/vendor/assets/stylesheets/{chosen-sprite.png → speedo/chosen-sprite.png} +0 -0
  63. /data/vendor/assets/stylesheets/{chosen.css → speedo/chosen.css} +0 -0
  64. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/Sorting icons.psd +0 -0
  65. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/back_disabled.png +0 -0
  66. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/back_enabled.png +0 -0
  67. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/back_enabled_hover.png +0 -0
  68. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/favicon.ico +0 -0
  69. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/forward_disabled.png +0 -0
  70. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/forward_enabled.png +0 -0
  71. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/forward_enabled_hover.png +0 -0
  72. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/sort_asc.png +0 -0
  73. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/sort_asc_disabled.png +0 -0
  74. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/sort_both.png +0 -0
  75. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/sort_desc.png +0 -0
  76. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/sort_desc_disabled.png +0 -0
  77. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  78. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  79. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_glass_65_ffffff_1x400.png +0 -0
  80. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_glass_75_dadada_1x400.png +0 -0
  81. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  82. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_glass_75_ffffff_1x400.png +0 -0
  83. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  84. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
  85. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-icons_222222_256x240.png +0 -0
  86. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-icons_2e83ff_256x240.png +0 -0
  87. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-icons_454545_256x240.png +0 -0
  88. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-icons_888888_256x240.png +0 -0
  89. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-icons_cd0a0a_256x240.png +0 -0
  90. /data/vendor/assets/stylesheets/{formtastic-buttonless.css → speedo/formtastic-buttonless.css} +0 -0
  91. /data/vendor/assets/stylesheets/{gh-buttons.css → speedo/gh-buttons.css} +0 -0
  92. /data/vendor/assets/stylesheets/{gh-icons.png → speedo/gh-icons.png} +0 -0
  93. /data/vendor/assets/stylesheets/{jquery-ui-1.8.18.custom.css → speedo/jquery-ui-1.8.18.custom.css} +0 -0
  94. /data/vendor/assets/stylesheets/{jquery.dataTables.css → speedo/jquery.dataTables.css} +0 -0
  95. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  96. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  97. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_glass_65_ffffff_1x400.png +0 -0
  98. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_glass_75_dadada_1x400.png +0 -0
  99. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  100. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_glass_75_ffffff_1x400.png +0 -0
  101. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  102. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
  103. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-icons_222222_256x240.png +0 -0
  104. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-icons_2e83ff_256x240.png +0 -0
  105. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-icons_454545_256x240.png +0 -0
  106. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-icons_888888_256x240.png +0 -0
  107. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-icons_cd0a0a_256x240.png +0 -0
  108. /data/vendor/assets/stylesheets/{normalize.css → speedo/normalize.css} +0 -0
  109. /data/vendor/assets/stylesheets/{uniform → speedo/uniform}/bg-input-focus.png +0 -0
  110. /data/vendor/assets/stylesheets/{uniform → speedo/uniform}/bg-input.png +0 -0
  111. /data/vendor/assets/stylesheets/{uniform → speedo/uniform}/sprite-aristo.png +0 -0
  112. /data/vendor/assets/stylesheets/{uniform → speedo/uniform}/sprite.png +0 -0
  113. /data/vendor/assets/stylesheets/{uniform.default.css → speedo/uniform.default.css} +0 -0
@@ -0,0 +1,332 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1339771359.9211788: @value{ I" length:EFi8%I" digest;
2
+ F"%a3f5ecc4cdcd85969a03335f1be355a3I" source;
3
+ FI"8%/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
4
+ /*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
5
+
6
+ window.matchMedia = window.matchMedia || (function(doc, undefined){
7
+
8
+ var bool,
9
+ docElem = doc.documentElement,
10
+ refNode = docElem.firstElementChild || docElem.firstChild,
11
+ // fakeBody required for <FF4 when executed in <head>
12
+ fakeBody = doc.createElement('body'),
13
+ div = doc.createElement('div');
14
+
15
+ div.id = 'mq-test-1';
16
+ div.style.cssText = "position:absolute;top:-100em";
17
+ fakeBody.style.background = "none";
18
+ fakeBody.appendChild(div);
19
+
20
+ return function(q){
21
+
22
+ div.innerHTML = '&shy;<style media="'+q+'"> #mq-test-1 { width: 42px; }</style>';
23
+
24
+ docElem.insertBefore(fakeBody, refNode);
25
+ bool = div.offsetWidth == 42;
26
+ docElem.removeChild(fakeBody);
27
+
28
+ return { matches: bool, media: q };
29
+ };
30
+
31
+ })(document);
32
+
33
+
34
+
35
+
36
+ /*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
37
+ (function( win ){
38
+ //exposed namespace
39
+ win.respond = {};
40
+
41
+ //define update even in native-mq-supporting browsers, to avoid errors
42
+ respond.update = function(){};
43
+
44
+ //expose media query support flag for external use
45
+ respond.mediaQueriesSupported = win.matchMedia && win.matchMedia( "only all" ).matches;
46
+
47
+ //if media queries are supported, exit here
48
+ if( respond.mediaQueriesSupported ){ return; }
49
+
50
+ //define vars
51
+ var doc = win.document,
52
+ docElem = doc.documentElement,
53
+ mediastyles = [],
54
+ rules = [],
55
+ appendedEls = [],
56
+ parsedSheets = {},
57
+ resizeThrottle = 30,
58
+ head = doc.getElementsByTagName( "head" )[0] || docElem,
59
+ base = doc.getElementsByTagName( "base" )[0],
60
+ links = head.getElementsByTagName( "link" ),
61
+ requestQueue = [],
62
+
63
+ //loop stylesheets, send text content to translate
64
+ ripCSS = function(){
65
+ var sheets = links,
66
+ sl = sheets.length,
67
+ i = 0,
68
+ //vars for loop:
69
+ sheet, href, media, isCSS;
70
+
71
+ for( ; i < sl; i++ ){
72
+ sheet = sheets[ i ],
73
+ href = sheet.href,
74
+ media = sheet.media,
75
+ isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
76
+
77
+ //only links plz and prevent re-parsing
78
+ if( !!href && isCSS && !parsedSheets[ href ] ){
79
+ // selectivizr exposes css through the rawCssText expando
80
+ if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
81
+ translate( sheet.styleSheet.rawCssText, href, media );
82
+ parsedSheets[ href ] = true;
83
+ } else {
84
+ if( (!/^([a-zA-Z:]*\/\/)/.test( href ) && !base)
85
+ || href.replace( RegExp.$1, "" ).split( "/" )[0] === win.location.host ){
86
+ requestQueue.push( {
87
+ href: href,
88
+ media: media
89
+ } );
90
+ }
91
+ }
92
+ }
93
+ }
94
+ makeRequests();
95
+ },
96
+
97
+ //recurse through request queue, get css text
98
+ makeRequests = function(){
99
+ if( requestQueue.length ){
100
+ var thisRequest = requestQueue.shift();
101
+
102
+ ajax( thisRequest.href, function( styles ){
103
+ translate( styles, thisRequest.href, thisRequest.media );
104
+ parsedSheets[ thisRequest.href ] = true;
105
+ makeRequests();
106
+ } );
107
+ }
108
+ },
109
+
110
+ //find media blocks in css text, convert to style blocks
111
+ translate = function( styles, href, media ){
112
+ var qs = styles.match( /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi ),
113
+ ql = qs && qs.length || 0,
114
+ //try to get CSS path
115
+ href = href.substring( 0, href.lastIndexOf( "/" )),
116
+ repUrls = function( css ){
117
+ return css.replace( /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, "$1" + href + "$2$3" );
118
+ },
119
+ useMedia = !ql && media,
120
+ //vars used in loop
121
+ i = 0,
122
+ j, fullq, thisq, eachq, eql;
123
+
124
+ //if path exists, tack on trailing slash
125
+ if( href.length ){ href += "/"; }
126
+
127
+ //if no internal queries exist, but media attr does, use that
128
+ //note: this currently lacks support for situations where a media attr is specified on a link AND
129
+ //its associated stylesheet has internal CSS media queries.
130
+ //In those cases, the media attribute will currently be ignored.
131
+ if( useMedia ){
132
+ ql = 1;
133
+ }
134
+
135
+
136
+ for( ; i < ql; i++ ){
137
+ j = 0;
138
+
139
+ //media attr
140
+ if( useMedia ){
141
+ fullq = media;
142
+ rules.push( repUrls( styles ) );
143
+ }
144
+ //parse for styles
145
+ else{
146
+ fullq = qs[ i ].match( /@media *([^\{]+)\{([\S\s]+?)$/ ) && RegExp.$1;
147
+ rules.push( RegExp.$2 && repUrls( RegExp.$2 ) );
148
+ }
149
+
150
+ eachq = fullq.split( "," );
151
+ eql = eachq.length;
152
+
153
+ for( ; j < eql; j++ ){
154
+ thisq = eachq[ j ];
155
+ mediastyles.push( {
156
+ media : thisq.split( "(" )[ 0 ].match( /(only\s+)?([a-zA-Z]+)\s?/ ) && RegExp.$2 || "all",
157
+ rules : rules.length - 1,
158
+ hasquery: thisq.indexOf("(") > -1,
159
+ minw : thisq.match( /\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" ),
160
+ maxw : thisq.match( /\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" )
161
+ } );
162
+ }
163
+ }
164
+
165
+ applyMedia();
166
+ },
167
+
168
+ lastCall,
169
+
170
+ resizeDefer,
171
+
172
+ // returns the value of 1em in pixels
173
+ getEmValue = function() {
174
+ var ret,
175
+ div = doc.createElement('div'),
176
+ body = doc.body,
177
+ fakeUsed = false;
178
+
179
+ div.style.cssText = "position:absolute;font-size:1em;width:1em";
180
+
181
+ if( !body ){
182
+ body = fakeUsed = doc.createElement( "body" );
183
+ body.style.background = "none";
184
+ }
185
+
186
+ body.appendChild( div );
187
+
188
+ docElem.insertBefore( body, docElem.firstChild );
189
+
190
+ ret = div.offsetWidth;
191
+
192
+ if( fakeUsed ){
193
+ docElem.removeChild( body );
194
+ }
195
+ else {
196
+ body.removeChild( div );
197
+ }
198
+
199
+ //also update eminpx before returning
200
+ ret = eminpx = parseFloat(ret);
201
+
202
+ return ret;
203
+ },
204
+
205
+ //cached container for 1em value, populated the first time it's needed
206
+ eminpx,
207
+
208
+ //enable/disable styles
209
+ applyMedia = function( fromResize ){
210
+ var name = "clientWidth",
211
+ docElemProp = docElem[ name ],
212
+ currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[ name ] || docElemProp,
213
+ styleBlocks = {},
214
+ lastLink = links[ links.length-1 ],
215
+ now = (new Date()).getTime();
216
+
217
+ //throttle resize calls
218
+ if( fromResize && lastCall && now - lastCall < resizeThrottle ){
219
+ clearTimeout( resizeDefer );
220
+ resizeDefer = setTimeout( applyMedia, resizeThrottle );
221
+ return;
222
+ }
223
+ else {
224
+ lastCall = now;
225
+ }
226
+
227
+ for( var i in mediastyles ){
228
+ var thisstyle = mediastyles[ i ],
229
+ min = thisstyle.minw,
230
+ max = thisstyle.maxw,
231
+ minnull = min === null,
232
+ maxnull = max === null,
233
+ em = "em";
234
+
235
+ if( !!min ){
236
+ min = parseFloat( min ) * ( min.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 );
237
+ }
238
+ if( !!max ){
239
+ max = parseFloat( max ) * ( max.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 );
240
+ }
241
+
242
+ // if there's no media query at all (the () part), or min or max is not null, and if either is present, they're true
243
+ if( !thisstyle.hasquery || ( !minnull || !maxnull ) && ( minnull || currWidth >= min ) && ( maxnull || currWidth <= max ) ){
244
+ if( !styleBlocks[ thisstyle.media ] ){
245
+ styleBlocks[ thisstyle.media ] = [];
246
+ }
247
+ styleBlocks[ thisstyle.media ].push( rules[ thisstyle.rules ] );
248
+ }
249
+ }
250
+
251
+ //remove any existing respond style element(s)
252
+ for( var i in appendedEls ){
253
+ if( appendedEls[ i ] && appendedEls[ i ].parentNode === head ){
254
+ head.removeChild( appendedEls[ i ] );
255
+ }
256
+ }
257
+
258
+ //inject active styles, grouped by media type
259
+ for( var i in styleBlocks ){
260
+ var ss = doc.createElement( "style" ),
261
+ css = styleBlocks[ i ].join( "\n" );
262
+
263
+ ss.type = "text/css";
264
+ ss.media = i;
265
+
266
+ //originally, ss was appended to a documentFragment and sheets were appended in bulk.
267
+ //this caused crashes in IE in a number of circumstances, such as when the HTML element had a bg image set, so appending beforehand seems best. Thanks to @dvelyk for the initial research on this one!
268
+ head.insertBefore( ss, lastLink.nextSibling );
269
+
270
+ if ( ss.styleSheet ){
271
+ ss.styleSheet.cssText = css;
272
+ }
273
+ else {
274
+ ss.appendChild( doc.createTextNode( css ) );
275
+ }
276
+
277
+ //push to appendedEls to track for later removal
278
+ appendedEls.push( ss );
279
+ }
280
+ },
281
+ //tweaked Ajax functions from Quirksmode
282
+ ajax = function( url, callback ) {
283
+ var req = xmlHttp();
284
+ if (!req){
285
+ return;
286
+ }
287
+ req.open( "GET", url, true );
288
+ req.onreadystatechange = function () {
289
+ if ( req.readyState != 4 || req.status != 200 && req.status != 304 ){
290
+ return;
291
+ }
292
+ callback( req.responseText );
293
+ }
294
+ if ( req.readyState == 4 ){
295
+ return;
296
+ }
297
+ req.send( null );
298
+ },
299
+ //define ajax obj
300
+ xmlHttp = (function() {
301
+ var xmlhttpmethod = false;
302
+ try {
303
+ xmlhttpmethod = new XMLHttpRequest();
304
+ }
305
+ catch( e ){
306
+ xmlhttpmethod = new ActiveXObject( "Microsoft.XMLHTTP" );
307
+ }
308
+ return function(){
309
+ return xmlhttpmethod;
310
+ };
311
+ })();
312
+
313
+ //translate CSS
314
+ ripCSS();
315
+
316
+ //expose update for re-running respond later on
317
+ respond.update = ripCSS;
318
+
319
+ //adjust on resize
320
+ function callMedia(){
321
+ applyMedia( true );
322
+ }
323
+ if( win.addEventListener ){
324
+ win.addEventListener( "resize", callMedia, false );
325
+ }
326
+ else if( win.attachEvent ){
327
+ win.attachEvent( "onresize", callMedia );
328
+ }
329
+ })(this);
330
+ ;
331
+ FI"
332
+ F"%5e3daa5dcbbf93b153c284cb6b7bf8f5
@@ -0,0 +1,327 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1339771359.539938: @value{I"
2
+ class:EFI"BundledAsset;
3
+ FI"id;
4
+ F"%91640474eacd68aef96ef1b45feca45cI"logical_path;
5
+ F"speedo/spin.jsI"
6
+ F"a/Users/stu/Documents/Work/CrankApps/Projects/speedo/vendor/assets/javascripts/speedo/spin.jsI"content_type;
7
+ FI"application/javascript;
8
+ FI"
9
+ mtime;
10
+ FI"2012-05-17T10:26:31-04:00;
11
+ FI" body;
12
+ FI"�#//fgnass.github.com/spin.js#v1.2.5
13
+ (function(window, document, undefined) {
14
+
15
+ /**
16
+ * Copyright (c) 2011 Felix Gnass [fgnass at neteye dot de]
17
+ * Licensed under the MIT license
18
+ */
19
+
20
+ var prefixes = ['webkit', 'Moz', 'ms', 'O']; /* Vendor prefixes */
21
+ var animations = {}; /* Animation rules keyed by their name */
22
+ var useCssAnimations;
23
+
24
+ /**
25
+ * Utility function to create elements. If no tag name is given,
26
+ * a DIV is created. Optionally properties can be passed.
27
+ */
28
+ function createEl(tag, prop) {
29
+ var el = document.createElement(tag || 'div');
30
+ var n;
31
+
32
+ for(n in prop) {
33
+ el[n] = prop[n];
34
+ }
35
+ return el;
36
+ }
37
+
38
+ /**
39
+ * Appends children and returns the parent.
40
+ */
41
+ function ins(parent /* child1, child2, ...*/) {
42
+ for (var i=1, n=arguments.length; i<n; i++) {
43
+ parent.appendChild(arguments[i]);
44
+ }
45
+ return parent;
46
+ }
47
+
48
+ /**
49
+ * Insert a new stylesheet to hold the @keyframe or VML rules.
50
+ */
51
+ var sheet = function() {
52
+ var el = createEl('style');
53
+ ins(document.getElementsByTagName('head')[0], el);
54
+ return el.sheet || el.styleSheet;
55
+ }();
56
+
57
+ /**
58
+ * Creates an opacity keyframe animation rule and returns its name.
59
+ * Since most mobile Webkits have timing issues with animation-delay,
60
+ * we create separate rules for each line/segment.
61
+ */
62
+ function addAnimation(alpha, trail, i, lines) {
63
+ var name = ['opacity', trail, ~~(alpha*100), i, lines].join('-');
64
+ var start = 0.01 + i/lines*100;
65
+ var z = Math.max(1-(1-alpha)/trail*(100-start) , alpha);
66
+ var prefix = useCssAnimations.substring(0, useCssAnimations.indexOf('Animation')).toLowerCase();
67
+ var pre = prefix && '-'+prefix+'-' || '';
68
+
69
+ if (!animations[name]) {
70
+ sheet.insertRule(
71
+ '@' + pre + 'keyframes ' + name + '{' +
72
+ '0%{opacity:'+z+'}' +
73
+ start + '%{opacity:'+ alpha + '}' +
74
+ (start+0.01) + '%{opacity:1}' +
75
+ (start+trail)%100 + '%{opacity:'+ alpha + '}' +
76
+ '100%{opacity:'+ z + '}' +
77
+ '}', 0);
78
+ animations[name] = 1;
79
+ }
80
+ return name;
81
+ }
82
+
83
+ /**
84
+ * Tries various vendor prefixes and returns the first supported property.
85
+ **/
86
+ function vendor(el, prop) {
87
+ var s = el.style;
88
+ var pp;
89
+ var i;
90
+
91
+ if(s[prop] !== undefined) return prop;
92
+ prop = prop.charAt(0).toUpperCase() + prop.slice(1);
93
+ for(i=0; i<prefixes.length; i++) {
94
+ pp = prefixes[i]+prop;
95
+ if(s[pp] !== undefined) return pp;
96
+ }
97
+ }
98
+
99
+ /**
100
+ * Sets multiple style properties at once.
101
+ */
102
+ function css(el, prop) {
103
+ for (var n in prop) {
104
+ el.style[vendor(el, n)||n] = prop[n];
105
+ }
106
+ return el;
107
+ }
108
+
109
+ /**
110
+ * Fills in default values.
111
+ */
112
+ function merge(obj) {
113
+ for (var i=1; i < arguments.length; i++) {
114
+ var def = arguments[i];
115
+ for (var n in def) {
116
+ if (obj[n] === undefined) obj[n] = def[n];
117
+ }
118
+ }
119
+ return obj;
120
+ }
121
+
122
+ /**
123
+ * Returns the absolute page-offset of the given element.
124
+ */
125
+ function pos(el) {
126
+ var o = {x:el.offsetLeft, y:el.offsetTop};
127
+ while((el = el.offsetParent)) {
128
+ o.x+=el.offsetLeft;
129
+ o.y+=el.offsetTop;
130
+ }
131
+ return o;
132
+ }
133
+
134
+ var defaults = {
135
+ lines: 12, // The number of lines to draw
136
+ length: 7, // The length of each line
137
+ width: 5, // The line thickness
138
+ radius: 10, // The radius of the inner circle
139
+ rotate: 0, // rotation offset
140
+ color: '#000', // #rgb or #rrggbb
141
+ speed: 1, // Rounds per second
142
+ trail: 100, // Afterglow percentage
143
+ opacity: 1/4, // Opacity of the lines
144
+ fps: 20, // Frames per second when using setTimeout()
145
+ zIndex: 2e9, // Use a high z-index by default
146
+ className: 'spinner', // CSS class to assign to the element
147
+ top: 'auto', // center vertically
148
+ left: 'auto' // center horizontally
149
+ };
150
+
151
+ /** The constructor */
152
+ var Spinner = function Spinner(o) {
153
+ if (!this.spin) return new Spinner(o);
154
+ this.opts = merge(o || {}, Spinner.defaults, defaults);
155
+ };
156
+
157
+ Spinner.defaults = {};
158
+ merge(Spinner.prototype, {
159
+ spin: function(target) {
160
+ this.stop();
161
+ var self = this;
162
+ var o = self.opts;
163
+ var el = self.el = css(createEl(0, {className: o.className}), {position: 'relative', zIndex: o.zIndex});
164
+ var mid = o.radius+o.length+o.width;
165
+ var ep; // element position
166
+ var tp; // target position
167
+
168
+ if (target) {
169
+ target.insertBefore(el, target.firstChild||null);
170
+ tp = pos(target);
171
+ ep = pos(el);
172
+ css(el, {
173
+ left: (o.left == 'auto' ? tp.x-ep.x + (target.offsetWidth >> 1) : o.left+mid) + 'px',
174
+ top: (o.top == 'auto' ? tp.y-ep.y + (target.offsetHeight >> 1) : o.top+mid) + 'px'
175
+ });
176
+ }
177
+
178
+ el.setAttribute('aria-role', 'progressbar');
179
+ self.lines(el, self.opts);
180
+
181
+ if (!useCssAnimations) {
182
+ // No CSS animation support, use setTimeout() instead
183
+ var i = 0;
184
+ var fps = o.fps;
185
+ var f = fps/o.speed;
186
+ var ostep = (1-o.opacity)/(f*o.trail / 100);
187
+ var astep = f/o.lines;
188
+
189
+ !function anim() {
190
+ i++;
191
+ for (var s=o.lines; s; s--) {
192
+ var alpha = Math.max(1-(i+s*astep)%f * ostep, o.opacity);
193
+ self.opacity(el, o.lines-s, alpha, o);
194
+ }
195
+ self.timeout = self.el && setTimeout(anim, ~~(1000/fps));
196
+ }();
197
+ }
198
+ return self;
199
+ },
200
+ stop: function() {
201
+ var el = this.el;
202
+ if (el) {
203
+ clearTimeout(this.timeout);
204
+ if (el.parentNode) el.parentNode.removeChild(el);
205
+ this.el = undefined;
206
+ }
207
+ return this;
208
+ },
209
+ lines: function(el, o) {
210
+ var i = 0;
211
+ var seg;
212
+
213
+ function fill(color, shadow) {
214
+ return css(createEl(), {
215
+ position: 'absolute',
216
+ width: (o.length+o.width) + 'px',
217
+ height: o.width + 'px',
218
+ background: color,
219
+ boxShadow: shadow,
220
+ transformOrigin: 'left',
221
+ transform: 'rotate(' + ~~(360/o.lines*i+o.rotate) + 'deg) translate(' + o.radius+'px' +',0)',
222
+ borderRadius: (o.width>>1) + 'px'
223
+ });
224
+ }
225
+ for (; i < o.lines; i++) {
226
+ seg = css(createEl(), {
227
+ position: 'absolute',
228
+ top: 1+~(o.width/2) + 'px',
229
+ transform: o.hwaccel ? 'translate3d(0,0,0)' : '',
230
+ opacity: o.opacity,
231
+ animation: useCssAnimations && addAnimation(o.opacity, o.trail, i, o.lines) + ' ' + 1/o.speed + 's linear infinite'
232
+ });
233
+ if (o.shadow) ins(seg, css(fill('#000', '0 0 4px ' + '#000'), {top: 2+'px'}));
234
+ ins(el, ins(seg, fill(o.color, '0 0 1px rgba(0,0,0,.1)')));
235
+ }
236
+ return el;
237
+ },
238
+ opacity: function(el, i, val) {
239
+ if (i < el.childNodes.length) el.childNodes[i].style.opacity = val;
240
+ }
241
+ });
242
+
243
+ /////////////////////////////////////////////////////////////////////////
244
+ // VML rendering for IE
245
+ /////////////////////////////////////////////////////////////////////////
246
+
247
+ /**
248
+ * Check and init VML support
249
+ */
250
+ !function() {
251
+
252
+ function vml(tag, attr) {
253
+ return createEl('<' + tag + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', attr);
254
+ }
255
+
256
+ var s = css(createEl('group'), {behavior: 'url(#default#VML)'});
257
+
258
+ if (!vendor(s, 'transform') && s.adj) {
259
+
260
+ // VML support detected. Insert CSS rule ...
261
+ sheet.addRule('.spin-vml', 'behavior:url(#default#VML)');
262
+
263
+ Spinner.prototype.lines = function(el, o) {
264
+ var r = o.length+o.width;
265
+ var s = 2*r;
266
+
267
+ function grp() {
268
+ return css(vml('group', {coordsize: s +' '+s, coordorigin: -r +' '+-r}), {width: s, height: s});
269
+ }
270
+
271
+ var margin = -(o.width+o.length)*2+'px';
272
+ var g = css(grp(), {position: 'absolute', top: margin, left: margin});
273
+
274
+ var i;
275
+
276
+ function seg(i, dx, filter) {
277
+ ins(g,
278
+ ins(css(grp(), {rotation: 360 / o.lines * i + 'deg', left: ~~dx}),
279
+ ins(css(vml('roundrect', {arcsize: 1}), {
280
+ width: r,
281
+ height: o.width,
282
+ left: o.radius,
283
+ top: -o.width>>1,
284
+ filter: filter
285
+ }),
286
+ vml('fill', {color: o.color, opacity: o.opacity}),
287
+ vml('stroke', {opacity: 0}) // transparent stroke to fix color bleeding upon opacity change
288
+ )
289
+ )
290
+ );
291
+ }
292
+
293
+ if (o.shadow) {
294
+ for (i = 1; i <= o.lines; i++) {
295
+ seg(i, -2, 'progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)');
296
+ }
297
+ }
298
+ for (i = 1; i <= o.lines; i++) seg(i);
299
+ return ins(el, g);
300
+ };
301
+ Spinner.prototype.opacity = function(el, i, val, o) {
302
+ var c = el.firstChild;
303
+ o = o.shadow && o.lines || 0;
304
+ if (c && i+o < c.childNodes.length) {
305
+ c = c.childNodes[i+o]; c = c && c.firstChild; c = c && c.firstChild;
306
+ if (c) c.opacity = val;
307
+ }
308
+ };
309
+ }
310
+ else {
311
+ useCssAnimations = vendor(s, 'animation');
312
+ }
313
+ }();
314
+
315
+ window.Spinner = Spinner;
316
+
317
+ })(window, document);
318
+ ;
319
+ FI"asset_paths;
320
+ F["a/Users/stu/Documents/Work/CrankApps/Projects/speedo/vendor/assets/javascripts/speedo/spin.jsI"dependency_paths;
321
+ F[{I" path;
322
+ F"a/Users/stu/Documents/Work/CrankApps/Projects/speedo/vendor/assets/javascripts/speedo/spin.jsI"
323
+ mtime;
324
+ FIu: Time
325
+ T: offseti���I"hexdigest;
326
+ F"%9ea5971910210b3c941b82d1b7d64defI"
327
+ F"%46dde6621c301f4928e3b34efee9e3b5