zemus 0.0.12 → 0.0.13

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25f905849440a06f329e4288e6941e6cd34ecd7b
4
- data.tar.gz: 3467322fef20a79f809495702c56ac34111bc2e4
3
+ metadata.gz: 9c4310af1ff2da883112e45f0a684eb9fdb80b9a
4
+ data.tar.gz: 0556598d0d880e8979ad748c422b7a6c1bcca8ce
5
5
  SHA512:
6
- metadata.gz: 4359fb188dea3affab0c788af2b6087209aba4486d95212b88843831f7220b8e560d551bb15e6bbcd3f403189db934f9358fdd7480a4b5fea26e9590ab9bc127
7
- data.tar.gz: a73b845a06907489149d442e5fd5cb95881ddf6a70b5698f3d8cdf41c9538a9e24ad446b38185e23fe482190d1c6cdb632ccf93bec78b16a8d69e74a73dae6cf
6
+ metadata.gz: b5e841b839821a2f5156416753554e0404c9ac5deadea5cd84f853a0bc549dd80cda1df8454585afef84163e1dde0f90b025e003859aa63051a820428e10dc72
7
+ data.tar.gz: ae051ccb8eeea59080bb2020cd84ec30e9823032b652706c8f7c7b44de7ecb879e5842fbfb1152316ff2e55c1444105186a3c0daf0f2cfb47bc1a2d155562a2e
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.3.1
data/lib/zemus/sound.rb CHANGED
@@ -12,7 +12,7 @@ module Zemus
12
12
  def to_embed
13
13
  filename = @url.split("/").last
14
14
 
15
- embed = "<audio controls='controls' class='media-object'>"
15
+ embed = "<audio controls='controls' class='media-object' preload='none'>"
16
16
  embed += "<source src='#{@url}' type='audio/mpeg' />"
17
17
  embed += "</audio>"
18
18
  embed += "<div><a href='#{@url}' target='_blank' class='img-thumbnail' download='#{filename}'><i class='glyphicon glyphicon-music'></i> Download this podcast.</a></div>"
@@ -21,4 +21,4 @@ module Zemus
21
21
  end
22
22
 
23
23
  end
24
- end
24
+ end
data/lib/zemus/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Zemus
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
@@ -1,10 +1,10 @@
1
1
  require_relative('../spec_helper')
2
-
2
+
3
3
  describe Zemus::Image do
4
4
  it "embeds images" do
5
5
  url = "http://google.com/image.gif"
6
6
  Zemus::Image.new(url).to_embed.
7
- should eq("<img src='http://google.com/image.gif' class='img-responsive img-thumbnail' alt='http://google.com/image.gif' />")
7
+ should eq("<img src='http://google.com/image.gif' class='img-responsive' alt='http://google.com/image.gif' />")
8
8
  end
9
9
 
10
10
  end
@@ -1,12 +1,12 @@
1
1
  require_relative('../spec_helper')
2
-
2
+
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='600px' 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
-
6
+ should eq("<iframe width='100%' height='600px' scrolling='no' src='https://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
+
8
8
  # fix for a bug where a kickstarter URL had a # sign at the end
9
9
  Zemus::Kickstarter.new("http://www.kickstarter.com/projects/sleepninja/monsters-ate-my-birthday-cake#").to_embed.
10
- should eq("<iframe width='100%' height='600px' 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>")
10
+ should eq("<iframe width='100%' height='600px' scrolling='no' src='https://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>")
11
11
  end
12
- end
12
+ end
@@ -1,8 +1,8 @@
1
1
  require_relative('../spec_helper')
2
-
2
+
3
3
  describe Zemus::Sound do
4
4
  it "embeds sound" do
5
5
  Zemus::Sound.new("http://www.podtrac.com/pts/redirect.mp3/content.duckfeed.tv/bsc/bsc_E001.mp3").to_embed.
6
- should eq("<audio controls='controls' class='media-object'><source src='http://www.podtrac.com/pts/redirect.mp3/content.duckfeed.tv/bsc/bsc_E001.mp3' type='audio/mpeg' /></audio><div><a href='http://www.podtrac.com/pts/redirect.mp3/content.duckfeed.tv/bsc/bsc_E001.mp3' target='_blank' class='img-thumbnail' download='bsc_E001.mp3'><i class='glyphicon glyphicon-music'></i> Download this podcast.</a></div>")
6
+ should eq("<audio controls='controls' class='media-object' preload='none'><source src='http://www.podtrac.com/pts/redirect.mp3/content.duckfeed.tv/bsc/bsc_E001.mp3' type='audio/mpeg' /></audio><div><a href='http://www.podtrac.com/pts/redirect.mp3/content.duckfeed.tv/bsc/bsc_E001.mp3' target='_blank' class='img-thumbnail' download='bsc_E001.mp3'><i class='glyphicon glyphicon-music'></i> Download this podcast.</a></div>")
7
7
  end
8
- end
8
+ end
@@ -1,8 +1,8 @@
1
1
  require_relative('../spec_helper')
2
-
2
+
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='600px' frameborder='0'></iframe>")
6
+ should eq("<iframe src='https://player.vimeo.com/video/21929292' width='100%' height='600px' frameborder='0'></iframe>")
7
7
  end
8
- end
8
+ end
@@ -1,13 +1,13 @@
1
1
  require_relative('../spec_helper')
2
-
2
+
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='600px' src='http://www.youtube.com/embed/Ai7pMPCDHpo?wmode=opaque' frameborder='0' allowfullscreen></iframe>")
6
+ should eq("<iframe width='100%' height='600px' src='https://www.youtube.com/embed/Ai7pMPCDHpo?wmode=opaque' frameborder='0' allowfullscreen></iframe>")
7
7
  end
8
8
 
9
9
  it "get youtube embed image" do
10
10
  Zemus::Youtube.new("youtube.com/watch?v=Ai7pMPCDHpo").
11
11
  to_embed_image.should eq("http://img.youtube.com/vi/Ai7pMPCDHpo/hqdefault.jpg")
12
12
  end
13
- end
13
+ end
data/spec/zemus_spec.rb CHANGED
@@ -1,22 +1,22 @@
1
1
  require_relative('./spec_helper')
2
-
2
+
3
3
  describe Zemus do
4
4
 
5
5
  it "accepts test for images" do
6
6
  url = "www.google.com/sample.gif"
7
- Zemus.embed(url).should == "<img src='www.google.com/sample.gif' class='img-responsive img-thumbnail' alt='www.google.com/sample.gif' />"
8
-
7
+ Zemus.embed(url).should == "<img src='www.google.com/sample.gif' class='img-responsive' alt='www.google.com/sample.gif' />"
8
+
9
9
  url = 'http://play-mario-onlne.com/old-school-mario.png'
10
- Zemus.embed(url).should == "<img src='http://play-mario-onlne.com/old-school-mario.png' class='img-responsive img-thumbnail' alt='http://play-mario-onlne.com/old-school-mario.png' />"
10
+ Zemus.embed(url).should == "<img src='http://play-mario-onlne.com/old-school-mario.png' class='img-responsive' alt='http://play-mario-onlne.com/old-school-mario.png' />"
11
11
 
12
12
  url = 'http://play-mario-onlne.com/old-school-mario.jpg'
13
- Zemus.embed(url).should == "<img src='http://play-mario-onlne.com/old-school-mario.jpg' class='img-responsive img-thumbnail' alt='http://play-mario-onlne.com/old-school-mario.jpg' />"
13
+ Zemus.embed(url).should == "<img src='http://play-mario-onlne.com/old-school-mario.jpg' class='img-responsive' alt='http://play-mario-onlne.com/old-school-mario.jpg' />"
14
14
 
15
15
  url = 'http://play-mario-onlne.com/old-school-mario.jpeg'
16
- Zemus.embed(url).should == "<img src='http://play-mario-onlne.com/old-school-mario.jpeg' class='img-responsive img-thumbnail' alt='http://play-mario-onlne.com/old-school-mario.jpeg' />"
17
-
16
+ Zemus.embed(url).should == "<img src='http://play-mario-onlne.com/old-school-mario.jpeg' class='img-responsive' alt='http://play-mario-onlne.com/old-school-mario.jpeg' />"
17
+
18
18
  url = 'http://play-mario-onlne.com/old-school-mario.GIF'
19
- Zemus.embed(url).should == "<img src='http://play-mario-onlne.com/old-school-mario.GIF' class='img-responsive img-thumbnail' alt='http://play-mario-onlne.com/old-school-mario.GIF' />"
19
+ Zemus.embed(url).should == "<img src='http://play-mario-onlne.com/old-school-mario.GIF' class='img-responsive' alt='http://play-mario-onlne.com/old-school-mario.GIF' />"
20
20
  end
21
21
 
22
22
  it "acceptance tests for (kick start) starter" do
@@ -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='600px' src='http://www.youtube.com/embed/Ai7pMPCDHpo?wmode=opaque' frameborder='0' allowfullscreen></iframe>")
32
+ Zemus.embed(url).should eq("<iframe width='100%' height='600px' src='https://www.youtube.com/embed/Ai7pMPCDHpo?wmode=opaque' frameborder='0' allowfullscreen></iframe>")
33
33
  end
34
34
  end
35
35
  end
@@ -37,19 +37,19 @@ describe Zemus do
37
37
  it "acceptance tests for sound" do
38
38
  url = "http://www.podtrac.com/pts/redirect.mp3/content.duckfeed.tv/bsc/bsc_E001.mp3"
39
39
 
40
- Zemus.embed(url).should eq("<audio controls='controls' class='media-object'><source src='http://www.podtrac.com/pts/redirect.mp3/content.duckfeed.tv/bsc/bsc_E001.mp3' type='audio/mpeg' /></audio><div><a href='http://www.podtrac.com/pts/redirect.mp3/content.duckfeed.tv/bsc/bsc_E001.mp3' target='_blank' class='img-thumbnail' download='bsc_E001.mp3'><i class='glyphicon glyphicon-music'></i> Download this podcast.</a></div>")
40
+ Zemus.embed(url).should eq("<audio controls='controls' class='media-object' preload='none'><source src='http://www.podtrac.com/pts/redirect.mp3/content.duckfeed.tv/bsc/bsc_E001.mp3' type='audio/mpeg' /></audio><div><a href='http://www.podtrac.com/pts/redirect.mp3/content.duckfeed.tv/bsc/bsc_E001.mp3' target='_blank' class='img-thumbnail' download='bsc_E001.mp3'><i class='glyphicon glyphicon-music'></i> Download this podcast.</a></div>")
41
41
  end
42
42
 
43
43
  it "acceptance test for sound-claus" do
44
44
  url = "https://soundcloud.com/destructoid/super-mario-world-by-video"
45
-
45
+
46
46
  Zemus.embed(url).should eq("<iframe autosize='false' width='100%' height='166px' scrolling='no' frameborder='no' src='https://w.soundcloud.com/player/?url=https://soundcloud.com/destructoid/super-mario-world-by-video'></iframe>")
47
47
  end
48
48
 
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='600px' frameborder='0'></iframe>")
52
+ Zemus.embed(url).should eq("<iframe src='https://player.vimeo.com/video/21929292' width='100%' height='600px' frameborder='0'></iframe>")
53
53
  end
54
54
 
55
55
  it "acceptance test for vine" do
@@ -57,10 +57,10 @@ describe Zemus do
57
57
 
58
58
  Zemus.embed(url).should eq("<iframe class='vine-embed' src='https://vine.co/v/bFPjjheVnau/embed/simple' width='100%' height='600px' 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
62
62
  url = "http://google.com/asdfhjklkjsdf/43123123/32124lkjklj123123/foo.html"
63
63
 
64
64
  Zemus.embed(url).should eq("<a href='http://google.com/asdfhjklkjsdf/43123123/32124lkjklj123123/foo.html' target='_blank'>http://google.com/asdfhjklkjsdf/43123123..</a>")
65
65
  end
66
- end
66
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zemus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Dodson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-11-12 00:00:00.000000000 Z
12
+ date: 2017-06-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -76,6 +76,7 @@ extensions: []
76
76
  extra_rdoc_files: []
77
77
  files:
78
78
  - ".gitignore"
79
+ - ".ruby-version"
79
80
  - Gemfile
80
81
  - LICENSE.txt
81
82
  - README.md