zemus 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/zemus/kickstarter.rb +1 -1
- data/lib/zemus/version.rb +1 -1
- data/lib/zemus/vimeo.rb +1 -1
- data/lib/zemus/vine.rb +1 -1
- data/lib/zemus/youtube.rb +1 -1
- data/spec/zemus/kickstarter_spec.rb +1 -1
- data/spec/zemus/vimeo_spec.rb +1 -1
- data/spec/zemus/vine_spec.rb +1 -1
- data/spec/zemus/youtube_spec.rb +1 -1
- data/spec/zemus_spec.rb +3 -3
- metadata +13 -5
- checksums.yaml +0 -7
data/README.md
CHANGED
@@ -38,7 +38,7 @@ And then execute:
|
|
38
38
|
|
39
39
|
## TODO / Contributions
|
40
40
|
|
41
|
-
When we output HTML for images and other
|
41
|
+
When we output HTML for images and other URLs we tack on some HTML and classes some people may not need. For instance, to get the images we embed to be responsive we tack on the Bootstrap 3 "img-responsive img-thumbnail" classes. We also put a link under the Kickstarter embed to take the person to the page itself. I totally get some people may not want that so feel free to submit a patch to fix this.
|
42
42
|
|
43
43
|
If there is another URL you want to embed, submit the patch. As long as you can create the embed from the URL itself, we will consider the patch. Also, we currently want to keep the things we embed to HTML5 widgets.
|
44
44
|
|
data/lib/zemus/kickstarter.rb
CHANGED
@@ -10,7 +10,7 @@ module Zemus
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def to_embed
|
13
|
-
embed = "<iframe width='100%' height='' scrolling='no' src='http://www.kickstarter.com/projects/#{kickstarter_id}/widget/video.html' frameborder='0'> </iframe>"
|
13
|
+
embed = "<iframe width='100%' height='600' scrolling='no' src='http://www.kickstarter.com/projects/#{kickstarter_id}/widget/video.html' frameborder='0'> </iframe>"
|
14
14
|
embed += "<a href='#{@url}' target='_blank' class='btn btn-default btn-xs'><i class='glyphicon glyphicon-heart'></i> Back this on Kickstarter!</a>"
|
15
15
|
|
16
16
|
embed
|
data/lib/zemus/version.rb
CHANGED
data/lib/zemus/vimeo.rb
CHANGED
@@ -12,7 +12,7 @@ module Zemus
|
|
12
12
|
def to_embed
|
13
13
|
id = @url.split('/').last
|
14
14
|
|
15
|
-
"<iframe src='http://player.vimeo.com/video/#{id}' width='100%' height='' frameborder='0'></iframe>"
|
15
|
+
"<iframe src='http://player.vimeo.com/video/#{id}' width='100%' height='600' frameborder='0'></iframe>"
|
16
16
|
end
|
17
17
|
|
18
18
|
end
|
data/lib/zemus/vine.rb
CHANGED
@@ -10,7 +10,7 @@ module Zemus
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def to_embed
|
13
|
-
"<iframe class='vine-embed' src='https://vine.co/v/#{vine_id}/embed/simple' width='100%' height='' frameborder='0'></iframe><script async src='//platform.vine.co/static/scripts/embed.js' charset='utf-8'></script>"
|
13
|
+
"<iframe class='vine-embed' src='https://vine.co/v/#{vine_id}/embed/simple' width='100%' height='600' frameborder='0'></iframe><script async src='//platform.vine.co/static/scripts/embed.js' charset='utf-8'></script>"
|
14
14
|
end
|
15
15
|
|
16
16
|
def vine_id
|
data/lib/zemus/youtube.rb
CHANGED
@@ -14,7 +14,7 @@ module Zemus
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def to_embed
|
17
|
-
"<iframe width='100%' height='' src='http://www.youtube.com/embed/#{youtube_id}?wmode=opaque' frameborder='0' allowfullscreen></iframe>"
|
17
|
+
"<iframe width='100%' height='600' src='http://www.youtube.com/embed/#{youtube_id}?wmode=opaque' frameborder='0' allowfullscreen></iframe>"
|
18
18
|
end
|
19
19
|
|
20
20
|
def youtube_id
|
@@ -3,6 +3,6 @@ require_relative('../spec_helper')
|
|
3
3
|
describe Zemus::Kickstarter do
|
4
4
|
it "embeds kickstarter" do
|
5
5
|
Zemus::Kickstarter.new("http://www.kickstarter.com/projects/sleepninja/monsters-ate-my-birthday-cake").to_embed.
|
6
|
-
should eq("<iframe width='100%' height='' scrolling='no' src='http://www.kickstarter.com/projects/sleepninja/monsters-ate-my-birthday-cake/widget/video.html' frameborder='0'> </iframe><a href='http://www.kickstarter.com/projects/sleepninja/monsters-ate-my-birthday-cake' target='_blank' class='btn btn-default btn-xs'><i class='glyphicon glyphicon-heart'></i> Back this on Kickstarter!</a>")
|
6
|
+
should eq("<iframe width='100%' height='600' scrolling='no' src='http://www.kickstarter.com/projects/sleepninja/monsters-ate-my-birthday-cake/widget/video.html' frameborder='0'> </iframe><a href='http://www.kickstarter.com/projects/sleepninja/monsters-ate-my-birthday-cake' target='_blank' class='btn btn-default btn-xs'><i class='glyphicon glyphicon-heart'></i> Back this on Kickstarter!</a>")
|
7
7
|
end
|
8
8
|
end
|
data/spec/zemus/vimeo_spec.rb
CHANGED
@@ -3,6 +3,6 @@ require_relative('../spec_helper')
|
|
3
3
|
describe Zemus::Vimeo do
|
4
4
|
it "embeds vimeo" do
|
5
5
|
Zemus::Vimeo.new("http://vimeo.com/21929292").to_embed.
|
6
|
-
should eq("<iframe src='http://player.vimeo.com/video/21929292' width='100%' height='' frameborder='0'></iframe>")
|
6
|
+
should eq("<iframe src='http://player.vimeo.com/video/21929292' width='100%' height='600' frameborder='0'></iframe>")
|
7
7
|
end
|
8
8
|
end
|
data/spec/zemus/vine_spec.rb
CHANGED
@@ -3,6 +3,6 @@ require_relative('../spec_helper')
|
|
3
3
|
describe Zemus::Vine do
|
4
4
|
it "embeds vine" do
|
5
5
|
Zemus::Vine.new("https://vine.co/v/bFPjjheVnau/embed/simple").to_embed.
|
6
|
-
should eq("<iframe class='vine-embed' src='https://vine.co/v/bFPjjheVnau/embed/simple' width='100%' height='' frameborder='0'></iframe><script async src='//platform.vine.co/static/scripts/embed.js' charset='utf-8'></script>")
|
6
|
+
should eq("<iframe class='vine-embed' src='https://vine.co/v/bFPjjheVnau/embed/simple' width='100%' height='600' frameborder='0'></iframe><script async src='//platform.vine.co/static/scripts/embed.js' charset='utf-8'></script>")
|
7
7
|
end
|
8
8
|
end
|
data/spec/zemus/youtube_spec.rb
CHANGED
@@ -3,6 +3,6 @@ require_relative('../spec_helper')
|
|
3
3
|
describe Zemus::Youtube do
|
4
4
|
it "embeds youtube" do
|
5
5
|
Zemus::Youtube.new("youtube.com/watch?v=Ai7pMPCDHpo").to_embed.
|
6
|
-
should eq("<iframe width='100%' height='' src='http://www.youtube.com/embed/Ai7pMPCDHpo?wmode=opaque' frameborder='0' allowfullscreen></iframe>")
|
6
|
+
should eq("<iframe width='100%' height='600' src='http://www.youtube.com/embed/Ai7pMPCDHpo?wmode=opaque' frameborder='0' allowfullscreen></iframe>")
|
7
7
|
end
|
8
8
|
end
|
data/spec/zemus_spec.rb
CHANGED
@@ -29,7 +29,7 @@ describe Zemus do
|
|
29
29
|
[ "", "http://", "http://www.", "https://", "https://www." ].each do |subdomain|
|
30
30
|
url = "#{subdomain}#{url_format}"
|
31
31
|
|
32
|
-
Zemus.embed(url).should eq("<iframe width='100%' height='' src='http://www.youtube.com/embed/Ai7pMPCDHpo?wmode=opaque' frameborder='0' allowfullscreen></iframe>")
|
32
|
+
Zemus.embed(url).should eq("<iframe width='100%' height='600' src='http://www.youtube.com/embed/Ai7pMPCDHpo?wmode=opaque' frameborder='0' allowfullscreen></iframe>")
|
33
33
|
end
|
34
34
|
end
|
35
35
|
end
|
@@ -49,13 +49,13 @@ describe Zemus do
|
|
49
49
|
it "acceptance test for vimeo" do
|
50
50
|
url = "http://vimeo.com/21929292"
|
51
51
|
|
52
|
-
Zemus.embed(url).should eq("<iframe src='http://player.vimeo.com/video/21929292' width='100%' height='' frameborder='0'></iframe>")
|
52
|
+
Zemus.embed(url).should eq("<iframe src='http://player.vimeo.com/video/21929292' width='100%' height='600' frameborder='0'></iframe>")
|
53
53
|
end
|
54
54
|
|
55
55
|
it "acceptance test for vine" do
|
56
56
|
url = "https://vine.co/v/bFPjjheVnau/embed/simple"
|
57
57
|
|
58
|
-
Zemus.embed(url).should eq("<iframe class='vine-embed' src='https://vine.co/v/bFPjjheVnau/embed/simple' width='100%' height='' frameborder='0'></iframe><script async src='//platform.vine.co/static/scripts/embed.js' charset='utf-8'></script>")
|
58
|
+
Zemus.embed(url).should eq("<iframe class='vine-embed' src='https://vine.co/v/bFPjjheVnau/embed/simple' width='100%' height='600' frameborder='0'></iframe><script async src='//platform.vine.co/static/scripts/embed.js' charset='utf-8'></script>")
|
59
59
|
end
|
60
60
|
|
61
61
|
it "acceptance test for the generic fallback" do
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zemus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Jon Dodson
|
@@ -9,11 +10,12 @@ authors:
|
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
13
|
+
date: 2013-10-18 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: bundler
|
16
17
|
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
17
19
|
requirements:
|
18
20
|
- - ~>
|
19
21
|
- !ruby/object:Gem::Version
|
@@ -21,6 +23,7 @@ dependencies:
|
|
21
23
|
type: :development
|
22
24
|
prerelease: false
|
23
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
24
27
|
requirements:
|
25
28
|
- - ~>
|
26
29
|
- !ruby/object:Gem::Version
|
@@ -28,6 +31,7 @@ dependencies:
|
|
28
31
|
- !ruby/object:Gem::Dependency
|
29
32
|
name: rake
|
30
33
|
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
31
35
|
requirements:
|
32
36
|
- - ! '>='
|
33
37
|
- !ruby/object:Gem::Version
|
@@ -35,6 +39,7 @@ dependencies:
|
|
35
39
|
type: :development
|
36
40
|
prerelease: false
|
37
41
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
38
43
|
requirements:
|
39
44
|
- - ! '>='
|
40
45
|
- !ruby/object:Gem::Version
|
@@ -42,6 +47,7 @@ dependencies:
|
|
42
47
|
- !ruby/object:Gem::Dependency
|
43
48
|
name: rspec
|
44
49
|
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
45
51
|
requirements:
|
46
52
|
- - ! '>='
|
47
53
|
- !ruby/object:Gem::Version
|
@@ -49,6 +55,7 @@ dependencies:
|
|
49
55
|
type: :development
|
50
56
|
prerelease: false
|
51
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
52
59
|
requirements:
|
53
60
|
- - ! '>='
|
54
61
|
- !ruby/object:Gem::Version
|
@@ -91,26 +98,27 @@ files:
|
|
91
98
|
homepage: https://github.com/jdodson/zemus
|
92
99
|
licenses:
|
93
100
|
- MIT
|
94
|
-
metadata: {}
|
95
101
|
post_install_message:
|
96
102
|
rdoc_options: []
|
97
103
|
require_paths:
|
98
104
|
- lib
|
99
105
|
required_ruby_version: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
100
107
|
requirements:
|
101
108
|
- - ! '>='
|
102
109
|
- !ruby/object:Gem::Version
|
103
110
|
version: '0'
|
104
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
105
113
|
requirements:
|
106
114
|
- - ! '>='
|
107
115
|
- !ruby/object:Gem::Version
|
108
116
|
version: '0'
|
109
117
|
requirements: []
|
110
118
|
rubyforge_project:
|
111
|
-
rubygems_version:
|
119
|
+
rubygems_version: 1.8.25
|
112
120
|
signing_key:
|
113
|
-
specification_version:
|
121
|
+
specification_version: 3
|
114
122
|
summary: Parses and embeds various media URLs as viewable content
|
115
123
|
test_files:
|
116
124
|
- spec/spec_helper.rb
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 8f9c95005347d4c551e7d81aaa1e4abc17e9fbcc
|
4
|
-
data.tar.gz: 41c2318997c156fd777e51825cf058d93c3773cc
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 7c9d610602bf7cacc0673e923c35a3eaf69f149f025e944497b9e2e142c7f55f8aeae12460f8af1d4808a52d51ae94e9bd35a696ba669894cd30590510c09d35
|
7
|
-
data.tar.gz: 339ceabd4bf6cba44d7bb30921181568a0e8112f19dfb09b3103a7c5c8e7292948d763be7ce611a492b6fe7f7407d9aa86e24877846e6964260136f1bf6ba611
|