embed 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1 +1,7 @@
1
1
  require "bundler/gem_tasks"
2
+
3
+ require 'rspec/core/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ task default: :spec
@@ -1,3 +1,3 @@
1
1
  module Embed
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -8,7 +8,7 @@ module Embed
8
8
  module EmbedHelper
9
9
  def _youtube_embed(url, width, height)
10
10
  video_id = Embed.youtube_video_id(url)
11
- html = %Q{<iframe id="#{video_id}" type="text/html" width="#{width}" height="#{height}" src="http://www.youtube.com/embed/#{video_id}?autoplay=0 frameborder="0"/>}
11
+ html = %Q{<iframe id="#{video_id}" type="text/html" width="#{width}" height="#{height}" src="http://www.youtube.com/embed/#{video_id}?autoplay=0" frameborder="0"/>}
12
12
  html.respond_to?(:html_safe) ? html.html_safe : html
13
13
  end
14
14
 
@@ -12,7 +12,7 @@ describe Embed::EmbedHelper do
12
12
 
13
13
  describe '::_youtube_embed(url, 640, 390)' do
14
14
  it 'returns the embedding html for a YouTube URL' do
15
- _youtube_embed(youtube_url, 640, 390).should == %Q{<iframe id="u1zgFlCw8Aw" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/u1zgFlCw8Aw?autoplay=0 frameborder="0"/>}
15
+ _youtube_embed(youtube_url, 640, 390).should == %Q{<iframe id="u1zgFlCw8Aw" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/u1zgFlCw8Aw?autoplay=0" frameborder="0"/>}
16
16
  end
17
17
  end
18
18
 
@@ -30,13 +30,13 @@ describe Embed::EmbedHelper do
30
30
 
31
31
  describe '::_wistia_embed(url, 640, 390)' do
32
32
  it 'returns the embedding html for a Wisita URL' do
33
- _wistia_embed(wistia_url, 640, 390).should == %Q{<iframe src="http://fast.wistia.com/embed/iframe/2cf8fbb2c0?version=v1&videoHeight=360&videoWidth=640" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" width="640" height="390"></iframe>}
33
+ _wistia_embed(wistia_url, 640, 390).should == %Q{<iframe src="http://fast.wistia.net/embed/iframe/2cf8fbb2c0?version=v1&videoHeight=390&videoWidth=640" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" width="640" height="390"></iframe>}
34
34
  end
35
35
  end
36
36
 
37
37
  describe '::embed(url)' do
38
38
  it 'embeds an YouTube video' do
39
- embed(youtube_url).should == %Q{<iframe id="u1zgFlCw8Aw" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/u1zgFlCw8Aw?autoplay=0 frameborder="0"/>}
39
+ embed(youtube_url).should == %Q{<iframe id="u1zgFlCw8Aw" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/u1zgFlCw8Aw?autoplay=0" frameborder="0"/>}
40
40
  end
41
41
 
42
42
  it 'embeds a Vimeo video' do
@@ -50,7 +50,7 @@ describe Embed::EmbedHelper do
50
50
 
51
51
  describe '::embed(url, 540, 290)' do
52
52
  it 'embeds an YouTube video with custom sizes' do
53
- embed(youtube_url, {:width => 540, :height => 290}).should == %Q{<iframe id="u1zgFlCw8Aw" type="text/html" width="540" height="290" src="http://www.youtube.com/embed/u1zgFlCw8Aw?autoplay=0 frameborder="0"/>}
53
+ embed(youtube_url, {:width => 540, :height => 290}).should == %Q{<iframe id="u1zgFlCw8Aw" type="text/html" width="540" height="290" src="http://www.youtube.com/embed/u1zgFlCw8Aw?autoplay=0" frameborder="0"/>}
54
54
  end
55
55
 
56
56
  it 'embeds a Vimeo video with custom sizes' do
@@ -59,7 +59,7 @@ describe Embed::EmbedHelper do
59
59
 
60
60
  #FIXME: Wistia always return videoHeight=360&videoWidth=640 ??
61
61
  it 'embeds a Wistia video with custom sizes' do
62
- embed(wistia_url, {:width => 540, :height => 290}).should == %Q{<iframe src="http://fast.wistia.com/embed/iframe/2cf8fbb2c0?version=v1&videoHeight=360&videoWidth=640" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" width="540" height="290"></iframe>}
62
+ embed(wistia_url, {:width => 540, :height => 290}).should == %Q{<iframe src="http://fast.wistia.net/embed/iframe/2cf8fbb2c0?version=v1&videoHeight=290&videoWidth=540" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" width="540" height="290"></iframe>}
63
63
  end
64
64
 
65
65
  it 'embeds a SoundCloud audio' do
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-04 00:00:00.000000000 Z
12
+ date: 2013-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -75,8 +75,8 @@ files:
75
75
  - lib/embed.rb
76
76
  - lib/embed/version.rb
77
77
  - lib/embed_helper.rb
78
- - lib/spec/embed_helper_spec.rb
79
- - lib/spec/embed_spec.rb
78
+ - spec/embed_helper_spec.rb
79
+ - spec/embed_spec.rb
80
80
  homepage: https://github.com/neilvilela/embed
81
81
  licenses: []
82
82
  post_install_message:
@@ -91,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  segments:
93
93
  - 0
94
- hash: 2927421669210399932
94
+ hash: 488596979403717978
95
95
  required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
@@ -100,11 +100,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  segments:
102
102
  - 0
103
- hash: 2927421669210399932
103
+ hash: 488596979403717978
104
104
  requirements: []
105
105
  rubyforge_project:
106
- rubygems_version: 1.8.23
106
+ rubygems_version: 1.8.25
107
107
  signing_key:
108
108
  specification_version: 3
109
109
  summary: An easy way to embed media to your Rails app
110
- test_files: []
110
+ test_files:
111
+ - spec/embed_helper_spec.rb
112
+ - spec/embed_spec.rb