fitvidsjs_rails 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63cbe376cd7dccb7a528136f02058c11d98d7a6c
4
- data.tar.gz: 76eceed53e49ffab5de6c554fd02d7b54cd4ae7a
3
+ metadata.gz: eec309f4238e1c396f97c5f2ab013f82db17737e
4
+ data.tar.gz: b08ca01fdce432aec699b2d09a5b910cc13a5c4a
5
5
  SHA512:
6
- metadata.gz: d5aa15e450948a9db404dffb6ad0349266364aa441e073b04bcdbff767f7ced525e4f5ade496bace05e78ede4b579449f55abcd473b3aae80a32341feb6b34d5
7
- data.tar.gz: 1cbf1e1585f8221e1cb016f9e236582712f2bb23511ed1633199f186db1e9cafc1d540eb61ff2590e4cf878dfb00df8dc65a16a09276ddd18024066c3af14059
6
+ metadata.gz: 5e80140df5f71f11ad2bf655b31dc7d4629f4e08059018e4ed9a2224b558d5f554945d65965a7ac53f36c566be2b7063d4d7210eaa26ef9b8530b74b3afe6d0c
7
+ data.tar.gz: 748aab0bf0645fc85d3f72ecf34514a3af55bc6708a7f4b7bcbad55c1c172623e7917deb820fd770534b61584c793c92849306503514897d7cf7948fde011445
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ .DS_Store
@@ -1,13 +1,13 @@
1
1
  /*global jQuery */
2
2
  /*jshint browser:true */
3
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
- */
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
11
 
12
12
  (function( $ ){
13
13
 
@@ -51,9 +51,14 @@
51
51
  $allVideos.each(function(){
52
52
  var $this = $(this);
53
53
  if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
54
+ if (isNaN($this.attr('height')) || isNaN($this.attr('width')))
55
+ {
56
+ $this.attr('height', 9);
57
+ $this.attr('width', 16);
58
+ }
54
59
  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;
60
+ width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
61
+ aspectRatio = height / width;
57
62
  if(!$this.attr('id')){
58
63
  var videoID = 'fitvid' + Math.floor(Math.random()*999999);
59
64
  $this.attr('id', videoID);
@@ -64,4 +69,4 @@
64
69
  });
65
70
  };
66
71
  // Works with either jQuery or Zepto
67
- })( window.jQuery || window.Zepto );
72
+ })( window.jQuery || window.Zepto );
@@ -1,3 +1,3 @@
1
1
  module FitvidsjsRails
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fitvidsjs_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guy Israeli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-14 00:00:00.000000000 Z
11
+ date: 2014-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler