videodrome 0.0.1 → 0.0.2

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.
@@ -1,3 +1,3 @@
1
1
  module Videodrome
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -30,7 +30,7 @@ module Videodrome
30
30
  end
31
31
 
32
32
  def thumbnail(size = "standard")
33
- thumbnails.find { |k, _| k == size }[1]
33
+ thumbnails[size]
34
34
  end
35
35
 
36
36
  def embed_html
data/spec/video_spec.rb CHANGED
@@ -17,7 +17,7 @@ describe Videodrome::Video do
17
17
  "standard" => { "url" => "https://i.ytimg.com/vi/NZ8RiLLt6yg/sddefault.jpg", "width" => 640, "height" => 480 }
18
18
  },
19
19
  :embeddable => true,
20
- :embed_html => "<iframe type='text/hftml' src='http://www.youtube.com/embed/NZ8RiLLt6yg' width='640' height='360' frameborder='0' allowfullscreen='true'/>"
20
+ :embed_html => "<iframe type='text/html' src='http://www.youtube.com/embed/NZ8RiLLt6yg' width='640' height='360' frameborder='0' allowfullscreen='true'/>"
21
21
  }
22
22
  end
23
23
  describe "#published_at" do
@@ -41,5 +41,12 @@ describe Videodrome::Video do
41
41
  it("returns the embeddable player iframe") { expect(video.embed_html).to eq attrs[:embed_html] }
42
42
  end
43
43
  end
44
+ context "given a video with no standard thumbnail" do
45
+ let(:url) { "https://youtube.com/watch?v=eyNIHWawwXk" }
46
+ describe "#thumbnails" do
47
+ it("returns no standard thumbnail") { expect(video.thumbnail).to be nil }
48
+ it("returns others thumbnails") { expect(video.thumbnails.size).to be > 0 }
49
+ end
50
+ end
44
51
 
45
52
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: videodrome
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Aitor Garc\xC3\xADa"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2015-05-12 00:00:00 Z
18
+ date: 2015-05-15 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  prerelease: false