media_meta_hash 0.0.6b → 0.0.6c
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/media_meta_hash/version.rb +1 -1
- data/lib/media_meta_hash.rb +5 -1
- data/spec/media_meta_hash_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe0dae082e46be12f8811fb6be148eb486876109
|
4
|
+
data.tar.gz: 47a91214a1fe1b7e113bd7be3e50ebb3b9270663
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e200556c3b69f63e7464fb8350cec2da58a5102dfd91fd562fd4b41570983fe68a471f96098768f148ec5e807c1df29891969a502dfd51a771777cb9dfa9f1ac
|
7
|
+
data.tar.gz: 4bb81c02f66595e2584e6f2b0c5a14dc9c556daa27191a0cee0ce1e4edad2949f08e56d7b0ece9dd5ea22ea9d18282a782d8a82445d61f9d7ba143587aa39425
|
data/lib/media_meta_hash.rb
CHANGED
@@ -56,7 +56,11 @@ module MediaMetaHash
|
|
56
56
|
:height => (480 * 0.5625).to_i
|
57
57
|
)
|
58
58
|
else
|
59
|
-
|
59
|
+
begin
|
60
|
+
info = VideoInfo.get(url)
|
61
|
+
rescue VideoInfo::UrlError => e
|
62
|
+
info = nil
|
63
|
+
end
|
60
64
|
|
61
65
|
if url =~ /(youtube.com|youtu.be)/ && info
|
62
66
|
class << info
|
@@ -112,11 +112,11 @@ describe MediaMetaHash do
|
|
112
112
|
end
|
113
113
|
|
114
114
|
it "the :og key" do
|
115
|
-
@info_hash[:og].should include(:
|
115
|
+
@info_hash[:og].should include(:type, :video)
|
116
116
|
end
|
117
117
|
|
118
118
|
it "the :twitter key" do
|
119
|
-
@info_hash[:twitter].should include(:
|
119
|
+
@info_hash[:twitter].should include(:player, :card, :app)
|
120
120
|
end
|
121
121
|
|
122
122
|
it "the :twitter => :player should be an array" do
|