fitvids-rails 1.0.3 → 1.1.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.
- checksums.yaml +4 -4
- data/Rakefile +23 -0
- data/lib/fitvids-rails/version.rb +1 -1
- data/vendor/assets/javascripts/fitvids.js +8 -15
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6df7e053f64f760111c5dc72585785fed1b850ad
|
4
|
+
data.tar.gz: 83f05c2f96b7a586548e0b7e2696c83593d64257
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b60fc0ff06bc8393b3324f8692bb2c8a6bcd5bd018677fd24b3b853be47ce13a6a409fd3d2d1dc9555acb0bc35c2bac0f2d24fcd00dae93c1408ac17e52e622
|
7
|
+
data.tar.gz: 4ba3cfe9428ce20732bffb8f8f2948c853aa1edb682226721269337f2e26c9900ddad6855f93197017367c36cf288649008450c9ad3cc4b8b6bd51f098113940
|
data/Rakefile
CHANGED
@@ -1 +1,24 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
+
|
3
|
+
task :update do
|
4
|
+
require 'net/http'
|
5
|
+
require 'json'
|
6
|
+
|
7
|
+
tags_url = 'https://api.github.com/repos/davatron5000/FitVids.js/tags'
|
8
|
+
tags = JSON.parse(Net::HTTP.get(URI(tags_url)))
|
9
|
+
latest_tag = tags.first
|
10
|
+
|
11
|
+
if latest_tag['name'] > Fitvids::Rails::VERSION
|
12
|
+
upstream_location = "/davatron5000/FitVids.js/#{latest_tag['commit']['sha']}/jquery.fitvids.js"
|
13
|
+
file_location = File.join(File.dirname(File.absolute_path(__FILE__)), 'vendor', 'assets', 'javascripts', 'fitvids.js')
|
14
|
+
puts "Downloading new version (#{latest_tag['name']}):"
|
15
|
+
puts upstream_location
|
16
|
+
Net::HTTP.start('raw2.github.com', use_ssl: true) do |http|
|
17
|
+
resp = http.get(upstream_location)
|
18
|
+
File.open(file_location, 'w') { |file| file.write(resp.body) }
|
19
|
+
end
|
20
|
+
puts "Please bump the version.rb, commit and open a pull request with the new version. (#{latest_tag['name']})"
|
21
|
+
else
|
22
|
+
puts "Already up to date. (#{latest_tag['name']})"
|
23
|
+
end
|
24
|
+
end
|
@@ -1,13 +1,12 @@
|
|
1
1
|
/*global jQuery */
|
2
|
-
/*jshint
|
2
|
+
/*jshint browser:true */
|
3
3
|
/*!
|
4
|
-
* FitVids 1.
|
4
|
+
* FitVids 1.1
|
5
5
|
*
|
6
6
|
* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
|
7
7
|
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
|
8
8
|
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
|
9
9
|
*
|
10
|
-
* Date: Thu Sept 01 18:00:00 2011 -0500
|
11
10
|
*/
|
12
11
|
|
13
12
|
(function( $ ){
|
@@ -20,18 +19,12 @@
|
|
20
19
|
};
|
21
20
|
|
22
21
|
if(!document.getElementById('fit-vids-style')) {
|
23
|
-
|
24
|
-
var
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
div.
|
29
|
-
div.id = 'fit-vids-style';
|
30
|
-
div.style.display = 'none';
|
31
|
-
div.innerHTML = cssStyles;
|
32
|
-
|
33
|
-
ref.parentNode.insertBefore(div,ref);
|
34
|
-
|
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]);
|
35
28
|
}
|
36
29
|
|
37
30
|
if ( options ) {
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fitvids-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Caleb Thompson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.2.0
|
20
20
|
type: :runtime
|
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: 3.2.0
|
27
27
|
description: Rails wrapper for fitvids, a lightweight, easy-to-use jQuery plugin for
|
@@ -32,7 +32,7 @@ executables: []
|
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
35
|
-
- .gitignore
|
35
|
+
- ".gitignore"
|
36
36
|
- Gemfile
|
37
37
|
- LICENSE.txt
|
38
38
|
- README.md
|
@@ -51,17 +51,17 @@ require_paths:
|
|
51
51
|
- lib
|
52
52
|
required_ruby_version: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
|
-
- -
|
54
|
+
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: '0'
|
57
57
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
requirements: []
|
63
63
|
rubyforge_project:
|
64
|
-
rubygems_version: 2.
|
64
|
+
rubygems_version: 2.2.2
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: Rails wrapper for fitvids.js
|