hooloo 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +0 -1
- data/lib/hooloo/version.rb +1 -1
- data/lib/hooloo/video.rb +3 -0
- data/spec/hooloo/video_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f4f095f6794fb08c27b89da708e199b775aacfa
|
4
|
+
data.tar.gz: b5cbca03b377ac16a3318c1ecd2cf0b7257852e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ceb4f432f0f795e0731cf84a3b2c51aedb7357493f884c5cf43242737a5cd70ebedb08fc8b66a34021f72b868a25395cdad4cdf0b94bc710b890740f53f9b192
|
7
|
+
data.tar.gz: 693349abfc7048bfa83e5abf7694326b33aa16feb11bc6d95af520fd2467effb58a2e1329a874245c0d5ddbe3e66b150d371ab014ffa58f0ef00298dd80fe25b
|
data/Rakefile
CHANGED
data/lib/hooloo/version.rb
CHANGED
data/lib/hooloo/video.rb
CHANGED
@@ -6,6 +6,9 @@ class Hooloo::Video < Hooloo::MozartHash
|
|
6
6
|
@obj = Hooloo.request("videos/#{id}")['data'][0]['video']
|
7
7
|
end
|
8
8
|
end
|
9
|
+
def oembed
|
10
|
+
Hooloo.request '/api/oembed.json', url: "http://www.hulu.com/watch/#{@obj['id']}"
|
11
|
+
end
|
9
12
|
def copyright
|
10
13
|
@obj['copyright'].split(',').map(&:strip)
|
11
14
|
end
|
data/spec/hooloo/video_spec.rb
CHANGED
@@ -7,4 +7,10 @@ describe Hooloo::Video do
|
|
7
7
|
video.copyright.must_be_instance_of Array
|
8
8
|
video.copyright.must_include "Reki Kawahara"
|
9
9
|
end
|
10
|
+
it 'should retrieve the oembed data' do
|
11
|
+
video.oembed.must_be_instance_of Hash
|
12
|
+
video.oembed.must_include 'title'
|
13
|
+
video.oembed.must_include 'thumbnail_url'
|
14
|
+
video.oembed.must_include 'large_thumbnail_url'
|
15
|
+
end
|
10
16
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hooloo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Lejeck
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|