rasputin 0.12.1 → 0.13.1

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rasputin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.13.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-03 00:00:00.000000000Z
12
+ date: 2012-01-07 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &70163152645040 !ruby/object:Gem::Requirement
16
+ requirement: &70125371417800 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70163152645040
24
+ version_requirements: *70125371417800
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: actionpack
27
- requirement: &70163152643820 !ruby/object:Gem::Requirement
27
+ requirement: &70125371551500 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.1.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70163152643820
35
+ version_requirements: *70125371551500
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sprockets
38
- requirement: &70163152643080 !ruby/object:Gem::Requirement
38
+ requirement: &70125371672120 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 2.0.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70163152643080
46
+ version_requirements: *70125371672120
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: jquery-rails
49
- requirement: &70163152642360 !ruby/object:Gem::Requirement
49
+ requirement: &70125371783760 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '1.0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70163152642360
57
+ version_requirements: *70125371783760
58
58
  description: Ember.js for the Rails asset pipeline.
59
59
  email:
60
60
  - paul@chavard.net
@@ -71,16 +71,13 @@ files:
71
71
  - lib/rasputin/haml.rb
72
72
  - lib/rasputin/handlebars/compiler.rb
73
73
  - lib/rasputin/handlebars/template.rb
74
+ - lib/rasputin/require_preprocessor.rb
74
75
  - lib/rasputin/slim.rb
75
76
  - lib/rasputin/version.rb
76
77
  - rasputin.gemspec
77
- - vendor/assets/javascripts/TransformJS.js
78
78
  - vendor/assets/javascripts/ember-data.js
79
79
  - vendor/assets/javascripts/ember-datetime.js
80
- - vendor/assets/javascripts/ember-i18n.js
81
80
  - vendor/assets/javascripts/ember-precompiler.js
82
- - vendor/assets/javascripts/ember-routing.js
83
- - vendor/assets/javascripts/ember-touch.js
84
81
  - vendor/assets/javascripts/ember.js
85
82
  - vendor/assets/javascripts/modernizr.js
86
83
  - vendor/assets/stylesheets/normalize.css
@@ -1,432 +0,0 @@
1
- (function() {
2
- // Vector and Matrix mathematics modules for JavaScript
3
- // Copyright (c) 2007 James Coglan
4
- //
5
- // Permission is hereby granted, free of charge, to any person obtaining
6
- // a copy of this software and associated documentation files (the "Software"),
7
- // to deal in the Software without restriction, including without limitation
8
- // the rights to use, copy, modify, merge, publish, distribute, sublicense,
9
- // and/or sell copies of the Software, and to permit persons to whom the
10
- // Software is furnished to do so, subject to the following conditions:
11
- //
12
- // The above copyright notice and this permission notice shall be included
13
- // in all copies or substantial portions of the Software.
14
- //
15
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
- // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- // DEALINGS IN THE SOFTWARE.
22
-
23
- var Sylvester = {
24
- version: '0.1.3',
25
- precision: 1e-6
26
- };
27
-
28
- function Matrix() {}
29
- Matrix.prototype = {
30
-
31
- // Returns element (i,j) of the matrix
32
- e: function(i,j) {
33
- if (i < 1 || i > this.elements.length || j < 1 || j > this.elements[0].length) { return null; }
34
- return this.elements[i-1][j-1];
35
- },
36
-
37
- // Maps the matrix to another matrix (of the same dimensions) according to the given function
38
- map: function(fn) {
39
- var els = [], ni = this.elements.length, ki = ni, i, nj, kj = this.elements[0].length, j;
40
- do { i = ki - ni;
41
- nj = kj;
42
- els[i] = [];
43
- do { j = kj - nj;
44
- els[i][j] = fn(this.elements[i][j], i + 1, j + 1);
45
- } while (--nj);
46
- } while (--ni);
47
- return Matrix.create(els);
48
- },
49
-
50
- // Returns the result of multiplying the matrix from the right by the argument.
51
- // If the argument is a scalar then just multiply all the elements. If the argument is
52
- // a vector, a vector is returned, which saves you having to remember calling
53
- // col(1) on the result.
54
- multiply: function(matrix) {
55
- if (!matrix.elements) {
56
- return this.map(function(x) { return x * matrix; });
57
- }
58
- var returnVector = matrix.modulus ? true : false;
59
- var M = matrix.elements || matrix;
60
- if (typeof(M[0][0]) == 'undefined') { M = Matrix.create(M).elements; }
61
- if (!this.canMultiplyFromLeft(M)) { return null; }
62
- var ni = this.elements.length, ki = ni, i, nj, kj = M[0].length, j;
63
- var cols = this.elements[0].length, elements = [], sum, nc, c;
64
- do { i = ki - ni;
65
- elements[i] = [];
66
- nj = kj;
67
- do { j = kj - nj;
68
- sum = 0;
69
- nc = cols;
70
- do { c = cols - nc;
71
- sum += this.elements[i][c] * M[c][j];
72
- } while (--nc);
73
- elements[i][j] = sum;
74
- } while (--nj);
75
- } while (--ni);
76
- var M = Matrix.create(elements);
77
- return returnVector ? M.col(1) : M;
78
- },
79
-
80
- x: function(matrix) { return this.multiply(matrix); },
81
-
82
- // Returns true iff the matrix can multiply the argument from the left
83
- canMultiplyFromLeft: function(matrix) {
84
- var M = matrix.elements || matrix;
85
- if (typeof(M[0][0]) == 'undefined') { M = Matrix.create(M).elements; }
86
- // this.columns should equal matrix.rows
87
- return (this.elements[0].length == M.length);
88
- },
89
-
90
- // Set the matrix's elements from an array. If the argument passed
91
- // is a vector, the resulting matrix will be a single column.
92
- setElements: function(els) {
93
- var i, elements = els.elements || els;
94
- if (typeof(elements[0][0]) != 'undefined') {
95
- var ni = elements.length, ki = ni, nj, kj, j;
96
- this.elements = [];
97
- do { i = ki - ni;
98
- nj = elements[i].length; kj = nj;
99
- this.elements[i] = [];
100
- do { j = kj - nj;
101
- this.elements[i][j] = elements[i][j];
102
- } while (--nj);
103
- } while(--ni);
104
- return this;
105
- }
106
- var n = elements.length, k = n;
107
- this.elements = [];
108
- do { i = k - n;
109
- this.elements.push([elements[i]]);
110
- } while (--n);
111
- return this;
112
- }
113
- };
114
-
115
- // Constructor function
116
- Matrix.create = function(elements) {
117
- var M = new Matrix();
118
- return M.setElements(elements);
119
- };
120
-
121
- // Utility functions
122
- $M = Matrix.create;
123
-
124
- })();
125
-
126
- // ==========================================================================
127
- // Project: TransformJS
128
- // Copyright: ©2011 Strobe Inc.
129
- // License: Licensed under MIT license (see license.js)
130
- // ==========================================================================
131
-
132
- (function($) {
133
-
134
- if ( !$.cssHooks ) {
135
- throw("jQuery 1.4.3+ is needed for this plugin to work");
136
- return;
137
- }
138
-
139
- var translationUnit = ''
140
-
141
- var prop = "transform",
142
- vendorProp, supportedProp, supports3d, supports2d, supportsFilter,
143
-
144
- // capitalize first character of the prop to test vendor prefix
145
- capProp = prop.charAt(0).toUpperCase() + prop.slice(1),
146
- prefixes = [ "Moz", "Webkit", "O", "ms" ],
147
- div = document.createElement( "div" );
148
-
149
- if ( prop in div.style ) {
150
-
151
- // browser supports standard CSS property name
152
- supportedProp = prop;
153
- supports3d = div.style.perspective !== undefined;
154
- }
155
- else {
156
-
157
- // otherwise test support for vendor-prefixed property names
158
- for ( var i = 0; i < prefixes.length; i++ ) {
159
- vendorProp = prefixes[i] + capProp;
160
-
161
- if ( vendorProp in div.style ) {
162
- supportedProp = vendorProp;
163
- if (prefixes[i] === 'Moz') {
164
- translationUnit = 'px'
165
- }
166
- if((prefixes[i] + 'Perspective') in div.style) {
167
- supports3d = true;
168
- }
169
- else {
170
- supports2d = true;
171
- }
172
- break;
173
- }
174
- }
175
- }
176
-
177
- if (!supportedProp) {
178
- supportsFilter = ('filter' in div.style);
179
- supportedProp = 'filter';
180
- }
181
-
182
- // console.log('supportedProp: '+supportedProp+', 2d: '+supports2d+', 3d: '+supports3d+', filter: '+supportsFilter);
183
-
184
- // avoid memory leak in IE
185
- div = null;
186
-
187
- // add property to $.support so it can be accessed elsewhere
188
- $.support[ prop ] = supportedProp;
189
-
190
- var transformProperty = supportedProp;
191
-
192
- var properties = {
193
- rotateX: {
194
- defaultValue: 0,
195
- matrix: function(a) {
196
- if (supports3d) {
197
- return $M([
198
- [1,0,0,0],
199
- [0,Math.cos(a), Math.sin(-a), 0],
200
- [0,Math.sin(a), Math.cos( a), 0],
201
- [0,0,0,1]
202
- ]);
203
- }
204
- else {
205
- return $M([
206
- [1, 0,0],
207
- [0, 1,0],
208
- [0,0,1]
209
- ]);
210
- }
211
- }
212
- },
213
- rotateY: {
214
- defaultValue: 0,
215
- matrix: function(b) {
216
- if (supports3d) {
217
- return $M([
218
- [Math.cos( b), 0, Math.sin(b),0],
219
- [0,1,0,0],
220
- [Math.sin(-b), 0, Math.cos(b), 0],
221
- [0,0,0,1]
222
- ]);
223
- }
224
- else {
225
- return $M([
226
- [1, 0,0],
227
- [0, 1,0],
228
- [0,0,1]
229
- ]);
230
- }
231
- }
232
- },
233
- rotateZ: {
234
- defaultValue: 0,
235
- matrix: function(c) {
236
- if (supports3d) {
237
- return $M([
238
- [Math.cos(c), Math.sin(-c), 0, 0],
239
- [Math.sin(c), Math.cos( c), 0, 0],
240
- [0,0,1,0],
241
- [0,0,0,1]
242
- ]);
243
- }
244
- else {
245
- return $M([
246
- [Math.cos(c), Math.sin(-c),0],
247
- [Math.sin(c), Math.cos( c),0],
248
- [0,0,1]
249
- ]);
250
- }
251
- }
252
- },
253
- scale: {
254
- defaultValue: 1,
255
- matrix: function(s) {
256
- if (supports3d) {
257
- return $M([
258
- [s,0,0,0],
259
- [0,s,0,0],
260
- [0,0,s,0],
261
- [0,0,0,1]
262
- ]);
263
- }
264
- else {
265
- return $M([
266
- [s, 0,0],
267
- [0, s,0],
268
- [0,0,1]
269
- ]);
270
- }
271
- }
272
- },
273
- translateX: {
274
- defaultValue: 0,
275
- matrix: function(tx) {
276
- if (supports3d) {
277
- return $M([
278
- [1,0,0,0],
279
- [0,1,0,0],
280
- [0,0,1,0],
281
- [tx,0,0,1]
282
- ]);
283
- }
284
- else {
285
- return $M([
286
- [1, 0,0],
287
- [0, 1,0],
288
- [tx,0,1]
289
- ]);
290
- }
291
- }
292
- },
293
- translateY: {
294
- defaultValue: 0,
295
- matrix: function(ty) {
296
- if (supports3d) {
297
- return $M([
298
- [1,0,0,0],
299
- [0,1,0,0],
300
- [0,0,1,0],
301
- [0,ty,0,1]
302
- ]);
303
- }
304
- else {
305
- return $M([
306
- [1, 0,0],
307
- [0, 1,0],
308
- [0,ty,1]
309
- ]);
310
- }
311
- }
312
- },
313
- translateZ: {
314
- defaultValue: 0,
315
- matrix: function(tz) {
316
- if (supports3d) {
317
- return $M([
318
- [1,0,0,0],
319
- [0,1,0,0],
320
- [0,0,1,0],
321
- [0,0,tz,1]
322
- ]);
323
- }
324
- else {
325
- return $M([
326
- [1, 0,0],
327
- [0, 1,0],
328
- [0,0,1]
329
- ]);
330
- }
331
- }
332
- }
333
- };
334
-
335
- var applyMatrix = function(elem) {
336
- var transforms = $(elem).data('transforms');
337
- var tM;
338
-
339
- if (supports3d) {
340
- tM = $M([
341
- [1,0,0,0],
342
- [0,1,0,0],
343
- [0,0,1,0],
344
- [0,0,0,1]
345
- ]);
346
- }
347
- else {
348
- tM = $M([
349
- [1,0,0],
350
- [0,1,0],
351
- [0,0,1]
352
- ]);
353
- }
354
-
355
- for (var name in properties) {
356
- tM = tM.x(properties[name].matrix(transforms[name] || properties[name].defaultValue))
357
- }
358
-
359
- if (supports3d) {
360
- s = "matrix3d(";
361
- s += tM.e(1,1).toFixed(10) + "," + tM.e(1,2).toFixed(10) + "," + tM.e(1,3).toFixed(10) + "," + tM.e(1,4).toFixed(10) + ",";
362
- s += tM.e(2,1).toFixed(10) + "," + tM.e(2,2).toFixed(10) + "," + tM.e(2,3).toFixed(10) + "," + tM.e(2,4).toFixed(10) + ",";
363
- s += tM.e(3,1).toFixed(10) + "," + tM.e(3,2).toFixed(10) + "," + tM.e(3,3).toFixed(10) + "," + tM.e(3,4).toFixed(10) + ",";
364
- s += tM.e(4,1).toFixed(10) + "," + tM.e(4,2).toFixed(10) + "," + tM.e(4,3).toFixed(10) + "," + tM.e(4,4).toFixed(10);
365
- s += ")";
366
- }
367
- else if (supports2d) {
368
- s = "matrix(";
369
- s += tM.e(1,1).toFixed(10) + "," + tM.e(1,2).toFixed(10) + ",";
370
- s += tM.e(2,1).toFixed(10) + "," + tM.e(2,2).toFixed(10) + ",";
371
- s += tM.e(3,1).toFixed(10) + translationUnit + "," + tM.e(3,2).toFixed(10) + translationUnit;
372
- s += ")";
373
- }
374
- else if (supportsFilter) {
375
- s = "progid:DXImageTransform.Microsoft.";
376
- s += "Matrix(";
377
- s += "M11="+tM.e(1,1).toFixed(10) + ",";
378
- s += "M12="+tM.e(1,2).toFixed(10) + ",";
379
- s += "M21="+tM.e(2,1).toFixed(10) + ",";
380
- s += "M22="+tM.e(2,2).toFixed(10) + ",";
381
- s += "SizingMethod='auto expand'";
382
- s += ")";
383
-
384
- elem.style.top = tM.e(3,1);
385
- elem.style.left = tM.e(3,2);
386
- }
387
-
388
- elem.style[transformProperty] = s;
389
- }
390
-
391
- var hookFor = function(name) {
392
-
393
- $.fx.step[name] = function(fx){
394
- $.cssHooks[name].set( fx.elem, fx.now + fx.unit );
395
- };
396
-
397
- return {
398
- get: function( elem, computed, extra ) {
399
- var transforms = $(elem).data('transforms');
400
- if (transforms === undefined) {
401
- transforms = {};
402
- $(elem).data('transforms',transforms);
403
- }
404
-
405
- return transforms[name] || properties[name].defaultValue;
406
- },
407
- set: function( elem, value) {
408
- var transforms = $(elem).data('transforms');
409
- if (transforms === undefined) transforms = {};
410
- var propInfo = properties[name];
411
-
412
- if (typeof propInfo.apply === 'function') {
413
- transforms[name] = propInfo.apply(transforms[name] || propInfo.defaultValue, value);
414
- } else {
415
- transforms[name] = value
416
- }
417
-
418
- $(elem).data('transforms',transforms);
419
-
420
- applyMatrix(elem);
421
- }
422
- }
423
- }
424
-
425
- if (transformProperty) {
426
- for (var name in properties) {
427
- $.cssHooks[name] = hookFor(name);
428
- $.cssNumber[name] = true;
429
- }
430
- }
431
-
432
- })(jQuery);