requestanimationframe_polyfill-rails 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3688e67dd8b88dc03404c49ce1fd2af46ae8df03
4
+ data.tar.gz: acb122c6012021c6f537e91a725bef815891d066
5
+ SHA512:
6
+ metadata.gz: aca3ecad8fb5b7bd4b4fc94a37f914acd588d58c3d826c9b727979dfc8db536fecdde312ef456879d58b1ebee0232d01ba23013571e09a3b0eb41b48bdaa0cb2
7
+ data.tar.gz: a62196e10ea2e704d61f72dacebcc998a5279804af428814c874ac8f2807ebd1494ffdecedc08e82aac007a5e3407e8d9d5354d1f7d857e9c50253934b3d2611
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Chris Cressman
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,37 @@
1
+ requestanimationframe_polyfill-rails
2
+ ================================================================================
3
+
4
+ [requestAnimationFrame polyfill](https://gist.github.com/paulirish/1579671)
5
+ packaged for the Rails asset pipeline.
6
+
7
+
8
+ Usage
9
+ --------------------------------------------------------------------------------
10
+
11
+ Add the gem to your Gemfile:
12
+
13
+ gem 'requestanimationframe_polyfill-rails'
14
+
15
+ Load the library within an asset manifest such as `application.js`:
16
+
17
+ //= require requestanimationframe_polyfill-rails/rAF.js
18
+
19
+ If you've included the gem in your Gemfile, Bundler will generally take care of
20
+ `require`ing the necessary files, but if for some reason you need to manually
21
+ `require` the gem:
22
+
23
+ require 'requestanimationframe_polyfill/rails'
24
+
25
+
26
+ Versioning
27
+ --------------------------------------------------------------------------------
28
+
29
+ [requestAnimationFrame polyfill](https://gist.github.com/paulirish/1579671) is
30
+ published as a Gist and therefore does not have versioned releases.
31
+
32
+ The following table indicates which version of the JS file (indicated by Gist
33
+ revision ID) is included with each version of the gem.
34
+
35
+ | Gem Version | Gist Revision ID |
36
+ | ----------- | ---------------- |
37
+ | 1.0.0 | [682e5c8](https://gist.github.com/paulirish/1579671/682e5c880c92b445650c4880a6bf9f3897ec1c5b) |
@@ -0,0 +1,2 @@
1
+ require 'requestanimationframe_polyfill/rails/engine'
2
+ require 'requestanimationframe_polyfill/rails/version'
@@ -0,0 +1,6 @@
1
+ module RequestanimationframePolyfill
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module RequestanimationframePolyfill
2
+ module Rails
3
+ VERSION = '1.0.0'
4
+ end
5
+ end
@@ -0,0 +1,31 @@
1
+ // http://paulirish.com/2011/requestanimationframe-for-smart-animating/
2
+ // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
3
+
4
+ // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
5
+
6
+ // MIT license
7
+
8
+ (function() {
9
+ var lastTime = 0;
10
+ var vendors = ['ms', 'moz', 'webkit', 'o'];
11
+ for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
12
+ window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
13
+ window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
14
+ || window[vendors[x]+'CancelRequestAnimationFrame'];
15
+ }
16
+
17
+ if (!window.requestAnimationFrame)
18
+ window.requestAnimationFrame = function(callback, element) {
19
+ var currTime = new Date().getTime();
20
+ var timeToCall = Math.max(0, 16 - (currTime - lastTime));
21
+ var id = window.setTimeout(function() { callback(currTime + timeToCall); },
22
+ timeToCall);
23
+ lastTime = currTime + timeToCall;
24
+ return id;
25
+ };
26
+
27
+ if (!window.cancelAnimationFrame)
28
+ window.cancelAnimationFrame = function(id) {
29
+ clearTimeout(id);
30
+ };
31
+ }());
metadata ADDED
@@ -0,0 +1,50 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: requestanimationframe_polyfill-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Chris Cressman
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-09-18 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: 'requestAnimationFrame polyfill packaged for the Rails '
14
+ email:
15
+ - ccressman@weblinc.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - LICENSE
21
+ - README.md
22
+ - lib/requestanimationframe_polyfill/rails.rb
23
+ - lib/requestanimationframe_polyfill/rails/engine.rb
24
+ - lib/requestanimationframe_polyfill/rails/version.rb
25
+ - vendor/assets/javascripts/requestanimationframe_polyfill-rails/rAF.js
26
+ homepage: http://github.com/chriscressman/requestanimationframe-polyfill-rails
27
+ licenses:
28
+ - MIT
29
+ metadata: {}
30
+ post_install_message:
31
+ rdoc_options: []
32
+ require_paths:
33
+ - lib
34
+ required_ruby_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ required_rubygems_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ requirements: []
45
+ rubyforge_project:
46
+ rubygems_version: 2.4.8
47
+ signing_key:
48
+ specification_version: 4
49
+ summary: requestAnimationFrame polyfill packaged for the Rails
50
+ test_files: []