fitvidsjs_rails 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- Mjk4OGIwMmM3Zjg1ODNlOWEzNmJiZGIzYmIzYzQ3MmIzMTdkZmZjOQ==
5
- data.tar.gz: !binary |-
6
- M2Y0NGIyZGI3NmM5NzU5YzBkYTE2MWQ5ZTNjYzc0NTRjODUzMDViZA==
2
+ SHA1:
3
+ metadata.gz: 63cbe376cd7dccb7a528136f02058c11d98d7a6c
4
+ data.tar.gz: 76eceed53e49ffab5de6c554fd02d7b54cd4ae7a
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- Njg0NzRkZDYwNjA1OWI1ODk1MDIwZjEyNmRhOTRjYzlkZWE2YWMwYTFkZGFh
10
- ZWI4ZjVkMDk4NGJmZjRlY2VlMDJkNTAyYjZiMjA4MjE3OThkOWI1MDMwZWUy
11
- MTZkNTc3MTViZTM0Mzg2ZjI5MWI3Zjk5MWRjYjdmNDBhNTRkYTM=
12
- data.tar.gz: !binary |-
13
- YjA2NDFiMWM5ZjBhMjE3Yjc5NWQxYzA2MGEwZDQwYzBmNDUwNDIyYTQ4OWNi
14
- MTU4NWY1NTVkMjcxMDI4MzM5MDIzZDA2YTQxYWFjNDQ1OTE2NmI0ZTRhZDBj
15
- MWJkZWNiZmE5ODNkYzZlMzBiOTNmZWViZjFjODg4MmNkYjNjMjU=
6
+ metadata.gz: d5aa15e450948a9db404dffb6ad0349266364aa441e073b04bcdbff767f7ced525e4f5ade496bace05e78ede4b579449f55abcd473b3aae80a32341feb6b34d5
7
+ data.tar.gz: 1cbf1e1585f8221e1cb016f9e236582712f2bb23511ed1633199f186db1e9cafc1d540eb61ff2590e4cf878dfb00df8dc65a16a09276ddd18024066c3af14059
data/.DS_Store ADDED
Binary file
@@ -1,74 +1,67 @@
1
- /*global jQuery */
2
- /*jshint multistr:true browser:true */
3
- /*!
4
- * FitVids 1.0
5
- *
6
- * Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
7
- * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
8
- * Released under the WTFPL license - http://sam.zoy.org/wtfpl/
9
- *
10
- * Date: Thu Sept 01 18:00:00 2011 -0500
11
- */
12
-
13
- (function( $ ){
14
-
15
- "use strict";
16
-
17
- $.fn.fitVids = function( options ) {
18
- var settings = {
19
- customSelector: null
20
- };
21
-
22
- if(!document.getElementById('fit-vids-style')) {
23
-
24
- var div = document.createElement('div'),
25
- ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0],
26
- cssStyles = '&shy;<style>.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>';
27
-
28
- div.className = 'fit-vids-style';
29
- div.id = 'fit-vids-style';
30
- div.style.display = 'none';
31
- div.innerHTML = cssStyles;
32
-
33
- ref.parentNode.insertBefore(div,ref);
34
-
35
- }
36
-
37
- if ( options ) {
38
- $.extend( settings, options );
39
- }
40
-
41
- return this.each(function(){
42
- var selectors = [
43
- "iframe[src*='player.vimeo.com']",
44
- "iframe[src*='youtube.com']",
45
- "iframe[src*='youtube-nocookie.com']",
46
- "iframe[src*='kickstarter.com'][src*='video.html']",
47
- "object",
48
- "embed"
49
- ];
50
-
51
- if (settings.customSelector) {
52
- selectors.push(settings.customSelector);
53
- }
54
-
55
- var $allVideos = $(this).find(selectors.join(','));
56
- $allVideos = $allVideos.not("object object"); // SwfObj conflict patch
57
-
58
- $allVideos.each(function(){
59
- var $this = $(this);
60
- if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
61
- var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
62
- width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
63
- aspectRatio = height / width;
64
- if(!$this.attr('id')){
65
- var videoID = 'fitvid' + Math.floor(Math.random()*999999);
66
- $this.attr('id', videoID);
67
- }
68
- $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%");
69
- $this.removeAttr('height').removeAttr('width');
70
- });
71
- });
72
- };
73
- // Works with either jQuery or Zepto
74
- })( window.jQuery || window.Zepto );
1
+ /*global jQuery */
2
+ /*jshint browser:true */
3
+ /*!
4
+ * FitVids 1.1
5
+ *
6
+ * Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
7
+ * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
8
+ * Released under the WTFPL license - http://sam.zoy.org/wtfpl/
9
+ *
10
+ */
11
+
12
+ (function( $ ){
13
+
14
+ "use strict";
15
+
16
+ $.fn.fitVids = function( options ) {
17
+ var settings = {
18
+ customSelector: null
19
+ };
20
+
21
+ if(!document.getElementById('fit-vids-style')) {
22
+ // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
23
+ var head = document.head || document.getElementsByTagName('head')[0];
24
+ var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
25
+ var div = document.createElement('div');
26
+ div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
27
+ head.appendChild(div.childNodes[1]);
28
+ }
29
+
30
+ if ( options ) {
31
+ $.extend( settings, options );
32
+ }
33
+
34
+ return this.each(function(){
35
+ var selectors = [
36
+ "iframe[src*='player.vimeo.com']",
37
+ "iframe[src*='youtube.com']",
38
+ "iframe[src*='youtube-nocookie.com']",
39
+ "iframe[src*='kickstarter.com'][src*='video.html']",
40
+ "object",
41
+ "embed"
42
+ ];
43
+
44
+ if (settings.customSelector) {
45
+ selectors.push(settings.customSelector);
46
+ }
47
+
48
+ var $allVideos = $(this).find(selectors.join(','));
49
+ $allVideos = $allVideos.not("object object"); // SwfObj conflict patch
50
+
51
+ $allVideos.each(function(){
52
+ var $this = $(this);
53
+ if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
54
+ var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
55
+ width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
56
+ aspectRatio = height / width;
57
+ if(!$this.attr('id')){
58
+ var videoID = 'fitvid' + Math.floor(Math.random()*999999);
59
+ $this.attr('id', videoID);
60
+ }
61
+ $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%");
62
+ $this.removeAttr('height').removeAttr('width');
63
+ });
64
+ });
65
+ };
66
+ // Works with either jQuery or Zepto
67
+ })( window.jQuery || window.Zepto );
@@ -1,3 +1,3 @@
1
1
  module FitvidsjsRails
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fitvidsjs_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guy Israeli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-14 00:00:00.000000000 Z
11
+ date: 2014-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: railties
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.1'
55
55
  description: Wrapper for FitVids.js - Embedding a video resposively
@@ -58,7 +58,8 @@ executables: []
58
58
  extensions: []
59
59
  extra_rdoc_files: []
60
60
  files:
61
- - .gitignore
61
+ - ".DS_Store"
62
+ - ".gitignore"
62
63
  - Gemfile
63
64
  - LICENSE.txt
64
65
  - README.md
@@ -77,17 +78,17 @@ require_paths:
77
78
  - lib
78
79
  required_ruby_version: !ruby/object:Gem::Requirement
79
80
  requirements:
80
- - - ! '>='
81
+ - - ">="
81
82
  - !ruby/object:Gem::Version
82
83
  version: '0'
83
84
  required_rubygems_version: !ruby/object:Gem::Requirement
84
85
  requirements:
85
- - - ! '>='
86
+ - - ">="
86
87
  - !ruby/object:Gem::Version
87
88
  version: '0'
88
89
  requirements: []
89
90
  rubyforge_project:
90
- rubygems_version: 2.1.3
91
+ rubygems_version: 2.2.1
91
92
  signing_key:
92
93
  specification_version: 4
93
94
  summary: asset pipeline wrapper for Fitvids.js - Rails 3.1+