ruby-oembed 0.7.6 → 0.8.1
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.
- data/.gitignore +4 -1
- data/CHANGELOG.rdoc +49 -0
- data/Gemfile.lock +13 -8
- data/README.rdoc +79 -0
- data/Rakefile +21 -6
- data/lib/oembed/errors.rb +23 -4
- data/lib/oembed/formatter/json/backends/activesupportjson.rb +28 -0
- data/lib/oembed/formatter/json/backends/jsongem.rb +31 -0
- data/lib/oembed/formatter/json/backends/yaml.rb +85 -0
- data/lib/oembed/formatter/json.rb +69 -0
- data/lib/oembed/formatter/xml/backends/rexml.rb +44 -0
- data/lib/oembed/formatter/xml/backends/xmlsimple.rb +39 -0
- data/lib/oembed/formatter/xml.rb +76 -0
- data/lib/oembed/formatter.rb +97 -0
- data/lib/oembed/provider.rb +102 -38
- data/lib/oembed/provider_discovery.rb +19 -7
- data/lib/oembed/providers/embedly_urls.yml +487 -0
- data/lib/oembed/providers/oohembed_urls.yml +17 -0
- data/lib/oembed/providers.rb +68 -11
- data/lib/oembed/response/link.rb +14 -0
- data/lib/oembed/response/photo.rb +12 -0
- data/lib/oembed/response/rich.rb +11 -0
- data/lib/oembed/response/video.rb +10 -0
- data/lib/oembed/response.rb +58 -10
- data/lib/oembed/version.rb +18 -0
- data/lib/oembed.rb +2 -1
- data/lib/tasks/oembed.rake +45 -0
- data/lib/tasks/rspec.rake +5 -0
- data/ruby-oembed.gemspec +38 -17
- data/spec/formatter/json/.DS_Store +0 -0
- data/spec/formatter/json/jsongem_backend_spec.rb +34 -0
- data/spec/formatter/json/yaml_backend_spec.rb +30 -0
- data/spec/formatter/xml/rexml_backend_spec.rb +30 -0
- data/spec/formatter/xml/xmlsimple_backend_spec.rb +34 -0
- data/spec/formatter_spec.rb +35 -0
- data/spec/provider_spec.rb +189 -24
- data/spec/providers_spec.rb +20 -1
- data/spec/response_spec.rb +129 -48
- data/spec/spec_helper.rb +5 -6
- metadata +45 -38
- data/CHANGELOG.md +0 -29
- data/README.md +0 -50
- data/VERSION +0 -1
- data/lib/oembed/embedly_urls.json +0 -227
- data/lib/oembed/formatters.rb +0 -40
- data/rails/init.rb +0 -3
data/spec/spec_helper.rb
CHANGED
@@ -7,11 +7,10 @@ module OEmbedSpecHelper
|
|
7
7
|
:viddler => "http://www.viddler.com/explore/cdevroe/videos/424/",
|
8
8
|
:qik => "http://qik.com/video/49565",
|
9
9
|
:vimeo => "http://vimeo.com/3100878",
|
10
|
-
:pownce => "http://pownce.com/mmalone/notes/1756545/",
|
11
10
|
:rev3 => "http://revision3.com/diggnation/2008-04-17xsanned/",
|
12
11
|
:hulu => "http://www.hulu.com/watch/4569/firefly-serenity#x-0,vepisode,1",
|
13
12
|
:google_video => "http://video.google.com/videoplay?docid=8372603330420559198",
|
14
|
-
}
|
13
|
+
} unless defined?(EXAMPLE)
|
15
14
|
|
16
15
|
def example_url(site)
|
17
16
|
return "http://fake.com/" if site == :fake
|
@@ -37,15 +36,15 @@ module OEmbedSpecHelper
|
|
37
36
|
end
|
38
37
|
|
39
38
|
def valid_response(format)
|
40
|
-
case format
|
41
|
-
when
|
39
|
+
case format.to_s
|
40
|
+
when 'object'
|
42
41
|
{
|
43
42
|
"type" => "photo",
|
44
43
|
"version" => "1.0",
|
45
44
|
"fields" => "hello",
|
46
45
|
"__id__" => 1234
|
47
46
|
}
|
48
|
-
when
|
47
|
+
when 'json'
|
49
48
|
<<-JSON
|
50
49
|
{
|
51
50
|
"type": "photo",
|
@@ -54,7 +53,7 @@ module OEmbedSpecHelper
|
|
54
53
|
"__id__": 1234
|
55
54
|
}
|
56
55
|
JSON
|
57
|
-
when
|
56
|
+
when 'xml'
|
58
57
|
<<-XML
|
59
58
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
60
59
|
<oembed>
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-oembed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 7
|
9
|
-
- 6
|
10
|
-
version: 0.7.6
|
4
|
+
prerelease:
|
5
|
+
version: 0.8.1
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Magnus Holm
|
@@ -18,7 +13,7 @@ autorequire:
|
|
18
13
|
bindir: bin
|
19
14
|
cert_chain: []
|
20
15
|
|
21
|
-
date:
|
16
|
+
date: 2011-02-27 00:00:00 -06:00
|
22
17
|
default_executable:
|
23
18
|
dependencies:
|
24
19
|
- !ruby/object:Gem::Dependency
|
@@ -29,11 +24,8 @@ dependencies:
|
|
29
24
|
requirements:
|
30
25
|
- - ">="
|
31
26
|
- !ruby/object:Gem::Version
|
32
|
-
hash: 3
|
33
|
-
segments:
|
34
|
-
- 0
|
35
27
|
version: "0"
|
36
|
-
type: :
|
28
|
+
type: :development
|
37
29
|
version_requirements: *id001
|
38
30
|
- !ruby/object:Gem::Dependency
|
39
31
|
name: xml-simple
|
@@ -43,11 +35,8 @@ dependencies:
|
|
43
35
|
requirements:
|
44
36
|
- - ">="
|
45
37
|
- !ruby/object:Gem::Version
|
46
|
-
hash: 3
|
47
|
-
segments:
|
48
|
-
- 0
|
49
38
|
version: "0"
|
50
|
-
type: :
|
39
|
+
type: :development
|
51
40
|
version_requirements: *id002
|
52
41
|
- !ruby/object:Gem::Dependency
|
53
42
|
name: rspec
|
@@ -57,13 +46,10 @@ dependencies:
|
|
57
46
|
requirements:
|
58
47
|
- - ">="
|
59
48
|
- !ruby/object:Gem::Version
|
60
|
-
|
61
|
-
segments:
|
62
|
-
- 0
|
63
|
-
version: "0"
|
49
|
+
version: "2.0"
|
64
50
|
type: :development
|
65
51
|
version_requirements: *id003
|
66
|
-
description: An oEmbed
|
52
|
+
description: An oEmbed consumer library written in Ruby, letting you easily get embeddable HTML representations of supported web pages, based on their URLs. See http://oembed.com for more information about the protocol.
|
67
53
|
email: arisbartee@gmail.com
|
68
54
|
executables: []
|
69
55
|
|
@@ -71,44 +57,66 @@ extensions: []
|
|
71
57
|
|
72
58
|
extra_rdoc_files:
|
73
59
|
- LICENSE
|
74
|
-
- README.
|
60
|
+
- README.rdoc
|
75
61
|
files:
|
76
62
|
- .gitignore
|
77
63
|
- .rvmrc
|
78
|
-
- CHANGELOG.
|
64
|
+
- CHANGELOG.rdoc
|
79
65
|
- Gemfile
|
80
66
|
- Gemfile.lock
|
81
67
|
- LICENSE
|
82
|
-
- README.
|
68
|
+
- README.rdoc
|
83
69
|
- Rakefile
|
84
|
-
- VERSION
|
85
70
|
- integration_test/test.rb
|
86
71
|
- integration_test/test_urls.csv
|
87
72
|
- lib/oembed.rb
|
88
|
-
- lib/oembed/embedly_urls.json
|
89
73
|
- lib/oembed/errors.rb
|
90
|
-
- lib/oembed/
|
74
|
+
- lib/oembed/formatter.rb
|
75
|
+
- lib/oembed/formatter/json.rb
|
76
|
+
- lib/oembed/formatter/json/backends/activesupportjson.rb
|
77
|
+
- lib/oembed/formatter/json/backends/jsongem.rb
|
78
|
+
- lib/oembed/formatter/json/backends/yaml.rb
|
79
|
+
- lib/oembed/formatter/xml.rb
|
80
|
+
- lib/oembed/formatter/xml/backends/rexml.rb
|
81
|
+
- lib/oembed/formatter/xml/backends/xmlsimple.rb
|
91
82
|
- lib/oembed/provider.rb
|
92
83
|
- lib/oembed/provider_discovery.rb
|
93
84
|
- lib/oembed/providers.rb
|
85
|
+
- lib/oembed/providers/embedly_urls.yml
|
86
|
+
- lib/oembed/providers/oohembed_urls.yml
|
94
87
|
- lib/oembed/response.rb
|
95
88
|
- lib/oembed/response/link.rb
|
96
89
|
- lib/oembed/response/photo.rb
|
97
90
|
- lib/oembed/response/rich.rb
|
98
91
|
- lib/oembed/response/video.rb
|
99
|
-
-
|
92
|
+
- lib/oembed/version.rb
|
93
|
+
- lib/tasks/oembed.rake
|
94
|
+
- lib/tasks/rspec.rake
|
100
95
|
- ruby-oembed.gemspec
|
96
|
+
- spec/formatter/json/.DS_Store
|
97
|
+
- spec/formatter/json/jsongem_backend_spec.rb
|
98
|
+
- spec/formatter/json/yaml_backend_spec.rb
|
99
|
+
- spec/formatter/xml/rexml_backend_spec.rb
|
100
|
+
- spec/formatter/xml/xmlsimple_backend_spec.rb
|
101
|
+
- spec/formatter_spec.rb
|
101
102
|
- spec/provider_spec.rb
|
102
103
|
- spec/providers_spec.rb
|
103
104
|
- spec/response_spec.rb
|
104
105
|
- spec/spec_helper.rb
|
105
106
|
has_rdoc: true
|
106
107
|
homepage: http://github.com/judofyr/ruby-oembed
|
107
|
-
licenses:
|
108
|
-
|
108
|
+
licenses:
|
109
|
+
- MIT
|
109
110
|
post_install_message:
|
110
111
|
rdoc_options:
|
111
|
-
- --
|
112
|
+
- --main
|
113
|
+
- README.rdoc
|
114
|
+
- --title
|
115
|
+
- ruby-oembed-0.8.1
|
116
|
+
- --inline-source
|
117
|
+
- --exclude
|
118
|
+
- tasks
|
119
|
+
- CHANGELOG.rdoc
|
112
120
|
require_paths:
|
113
121
|
- lib
|
114
122
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -116,27 +124,26 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
116
124
|
requirements:
|
117
125
|
- - ">="
|
118
126
|
- !ruby/object:Gem::Version
|
119
|
-
hash: 3
|
120
|
-
segments:
|
121
|
-
- 0
|
122
127
|
version: "0"
|
123
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
129
|
none: false
|
125
130
|
requirements:
|
126
131
|
- - ">="
|
127
132
|
- !ruby/object:Gem::Version
|
128
|
-
hash: 3
|
129
|
-
segments:
|
130
|
-
- 0
|
131
133
|
version: "0"
|
132
134
|
requirements: []
|
133
135
|
|
134
136
|
rubyforge_project:
|
135
|
-
rubygems_version: 1.
|
137
|
+
rubygems_version: 1.5.2
|
136
138
|
signing_key:
|
137
139
|
specification_version: 3
|
138
140
|
summary: oEmbed for Ruby
|
139
141
|
test_files:
|
142
|
+
- spec/formatter/json/jsongem_backend_spec.rb
|
143
|
+
- spec/formatter/json/yaml_backend_spec.rb
|
144
|
+
- spec/formatter/xml/rexml_backend_spec.rb
|
145
|
+
- spec/formatter/xml/xmlsimple_backend_spec.rb
|
146
|
+
- spec/formatter_spec.rb
|
140
147
|
- spec/provider_spec.rb
|
141
148
|
- spec/providers_spec.rb
|
142
149
|
- spec/response_spec.rb
|
data/CHANGELOG.md
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# CHANGELOG
|
2
|
-
|
3
|
-
## 0.7.6 - 11 October 2010
|
4
|
-
|
5
|
-
* Released all recent changes to judofyr/master on GitHub. (Marcos Wright Kuhns)
|
6
|
-
* Added CHANGELOG & LICENSE information. (Marcos Wright Kuhns)
|
7
|
-
|
8
|
-
## 0.7.5 - 29 September 2010
|
9
|
-
|
10
|
-
* Updated the list of [Embedly][embedly] URL schemes. (Aris Bartee)
|
11
|
-
* [rvmrc file](http://rvm.beginrescueend.com/workflow/rvmrc/) added. (Aris Bartee)
|
12
|
-
|
13
|
-
## 0.7.0 - 23 August 2010
|
14
|
-
|
15
|
-
* Gemified. (Aris Bartee)
|
16
|
-
* Added the [Embedly][embedly] Provider. (Alex Kessinger)
|
17
|
-
* OEmbed::Response now includes the original request url. (Colin Shea)
|
18
|
-
* Unregistering providers with duplicate URL patterns works. (Marcos Wright Kuhns)
|
19
|
-
|
20
|
-
## 0.0.0 - May 2008 - July 2010
|
21
|
-
|
22
|
-
* Initial work & release as a library (Magnus Holm, et al.)
|
23
|
-
* Many Providers supported, including [OohEmbed][oohembed].
|
24
|
-
* Support for JSON (via the json gem) and XML (via the xml-simple gem).
|
25
|
-
|
26
|
-
[ruby-oembed]: http://github.com/judofyr/ruby-oembed "The ruby-oembed Library"
|
27
|
-
[oembed]: http://oembed.com "The oEmbed protocol"
|
28
|
-
[oohembed]: http://oohembed.com
|
29
|
-
[embedly]: http://embed.ly
|
data/README.md
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
# ruby-oembed
|
2
|
-
|
3
|
-
An oEmbed client written in Ruby, letting you easily get embeddable HTML representations of a supported web pages, based on their URLs. See [oembed.com][oembed] for more about the protocol.
|
4
|
-
|
5
|
-
# Installation
|
6
|
-
|
7
|
-
gem install ruby-oembed
|
8
|
-
|
9
|
-
# Get Started
|
10
|
-
|
11
|
-
You get embedable resources via an OEmbed::Provider. This gem comes with many Providers built right in, to make your life easy.
|
12
|
-
|
13
|
-
resource = OEmbed::Providers::YouTube.get("http://www.youtube.com/watch?v=2BYXBC8WQ5k")
|
14
|
-
resource.video? #=> true
|
15
|
-
resource.thumbnail_url #=> "http://i3.ytimg.com/vi/2BYXBC8WQ5k/hqdefault.jpg"
|
16
|
-
resource.html #=> '<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/2BYXBC8WQ5k?fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/2BYXBC8WQ5k?fs=1" type="application/x-shockwave-flash" width="425" height="344" allowscriptaccess="always" allowfullscreen="true"></embed></object>'
|
17
|
-
|
18
|
-
If you'd like to use a provider that isn't included in the library, it's easy to add one. Just provide the oEmbed API endpoint and URL scheme(s).
|
19
|
-
|
20
|
-
my_provider = OEmbed::Provider.new("http://my.cool-service.com/api/oembed_endpoint.{format}"
|
21
|
-
my_provider << "http://*.cool-service.com/image/*"
|
22
|
-
my_provider << "http://*.cool-service.com/video/*"
|
23
|
-
resource = my_provider.get("http://a.cool-service.com/video/1") #=> OEmbed::Response
|
24
|
-
resource.provider.name #=> "My Cool Service"
|
25
|
-
|
26
|
-
To use multiple Providers at once, simply register them.
|
27
|
-
|
28
|
-
OEmbed::Providers.register(OEmbed::Providers::YouTube, my_provider)
|
29
|
-
resource = OEmbed::Providers.get("http://www.youtube.com/watch?v=2BYXBC8WQ5k") #=> OEmbed::Response
|
30
|
-
resource.type #=> "video"
|
31
|
-
resource.provider.name #=> "YouTube"
|
32
|
-
|
33
|
-
Last but not least, ruby-oembed supports both [oohEmbed][oohembed] and [Embedly][embedly]. These services are provider aggregators. Each supports a wide array of websites ranging from [Amazon.com](http://www.amazon.com) to [xkcd](http://www.xkcd.com).
|
34
|
-
|
35
|
-
# Lend a Hand
|
36
|
-
|
37
|
-
Code for the ruby-oembed library is [hosted on GitHub][ruby-oembed].
|
38
|
-
|
39
|
-
If you encounter any bug, feel free to [Create an Issue](http://github.com/judofyr/ruby-oembed/issues).
|
40
|
-
|
41
|
-
To submit a patch, please [fork](http://help.github.com/forking/) the library and commit your changes along with relevant tests. Once you're happy with the changes, [send a pull request](http://help.github.com/pull-requests/).
|
42
|
-
|
43
|
-
# License
|
44
|
-
|
45
|
-
This code is free to use under the terms of the MIT license.
|
46
|
-
|
47
|
-
[ruby-oembed]: http://github.com/judofyr/ruby-oembed "The ruby-oembed Library"
|
48
|
-
[oembed]: http://oembed.com "The oEmbed protocol"
|
49
|
-
[oohembed]: http://oohembed.com
|
50
|
-
[embedly]: http://embed.ly
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.7.6
|
@@ -1,227 +0,0 @@
|
|
1
|
-
[
|
2
|
-
"http://*youtube.com/watch*",
|
3
|
-
"http://*.youtube.com/v/*",
|
4
|
-
"http://youtu.be/*",
|
5
|
-
"http://*.youtube.com/user/*#*",
|
6
|
-
"http://*.youtube.com/*#*/*",
|
7
|
-
"http://*justin.tv/*",
|
8
|
-
"http://*justin.tv/*/b/*",
|
9
|
-
"http://www.ustream.tv/recorded/*",
|
10
|
-
"http://www.ustream.tv/channel/*",
|
11
|
-
"http://www.ustream.tv/*",
|
12
|
-
"http://qik.com/video/*",
|
13
|
-
"http://qik.com/*",
|
14
|
-
"http://*revision3.com/*",
|
15
|
-
"http://*.dailymotion.com/video/*",
|
16
|
-
"http://*.dailymotion.com/*/video/*",
|
17
|
-
"http://www.collegehumor.com/video:*",
|
18
|
-
"http://*twitvid.com/*",
|
19
|
-
"http://www.break.com/*/*",
|
20
|
-
"http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid*",
|
21
|
-
"http://www.myspace.com/index.cfm?fuseaction=*&videoid*",
|
22
|
-
"http://www.metacafe.com/watch/*",
|
23
|
-
"http://blip.tv/file/*",
|
24
|
-
"http://*.blip.tv/file/*",
|
25
|
-
"http://video.google.com/videoplay?*",
|
26
|
-
"http://*revver.com/video/*",
|
27
|
-
"http://video.yahoo.com/watch/*/*",
|
28
|
-
"http://video.yahoo.com/network/*",
|
29
|
-
"http://*viddler.com/explore/*/videos/*",
|
30
|
-
"http://liveleak.com/view?*",
|
31
|
-
"http://www.liveleak.com/view?*",
|
32
|
-
"http://animoto.com/play/*",
|
33
|
-
"http://dotsub.com/view/*",
|
34
|
-
"http://www.overstream.net/view.php?oid=*",
|
35
|
-
"http://www.livestream.com/*",
|
36
|
-
"http://www.worldstarhiphop.com/videos/video*.php?v=*",
|
37
|
-
"http://worldstarhiphop.com/videos/video*.php?v=*",
|
38
|
-
"http://teachertube.com/viewVideo.php*",
|
39
|
-
"http://teachertube.com/viewVideo.php*",
|
40
|
-
"http://bambuser.com/v/*",
|
41
|
-
"http://bambuser.com/channel/*",
|
42
|
-
"http://bambuser.com/channel/*/broadcast/*",
|
43
|
-
"http://www.schooltube.com/video/*/*",
|
44
|
-
"http://*yfrog.*/*",
|
45
|
-
"http://tweetphoto.com/*",
|
46
|
-
"http://www.flickr.com/photos/*",
|
47
|
-
"http://flic.kr/*",
|
48
|
-
"http://*twitpic.com/*",
|
49
|
-
"http://*imgur.com/*",
|
50
|
-
"http://*.posterous.com/*",
|
51
|
-
"http://post.ly/*",
|
52
|
-
"http://twitgoo.com/*",
|
53
|
-
"http://i*.photobucket.com/albums/*",
|
54
|
-
"http://gi*.photobucket.com/groups/*",
|
55
|
-
"http://phodroid.com/*/*/*",
|
56
|
-
"http://www.mobypicture.com/user/*/view/*",
|
57
|
-
"http://moby.to/*",
|
58
|
-
"http://xkcd.com/*",
|
59
|
-
"http://www.xkcd.com/*",
|
60
|
-
"http://www.asofterworld.com/index.php?id=*",
|
61
|
-
"http://www.qwantz.com/index.php?comic=*",
|
62
|
-
"http://23hq.com/*/photo/*",
|
63
|
-
"http://www.23hq.com/*/photo/*",
|
64
|
-
"http://*dribbble.com/shots/*",
|
65
|
-
"http://drbl.in/*",
|
66
|
-
"http://*.smugmug.com/*",
|
67
|
-
"http://*.smugmug.com/*#*",
|
68
|
-
"http://emberapp.com/*/images/*",
|
69
|
-
"http://emberapp.com/*/images/*/sizes/*",
|
70
|
-
"http://emberapp.com/*/collections/*/*",
|
71
|
-
"http://emberapp.com/*/categories/*/*/*",
|
72
|
-
"http://embr.it/*",
|
73
|
-
"http://picasaweb.google.com*/*/*#*",
|
74
|
-
"http://picasaweb.google.com*/lh/photo/*",
|
75
|
-
"http://picasaweb.google.com*/*/*",
|
76
|
-
"http://dailybooth.com/*/*",
|
77
|
-
"http://brizzly.com/pic/*",
|
78
|
-
"http://pics.brizzly.com/*.jpg",
|
79
|
-
"http://img.ly/*",
|
80
|
-
"http://www.facebook.com/photo.php*",
|
81
|
-
"http://www.tinypic.com/view.php*",
|
82
|
-
"http://tinypic.com/view.php*",
|
83
|
-
"http://www.tinypic.com/player.php*",
|
84
|
-
"http://tinypic.com/player.php*",
|
85
|
-
"http://www.tinypic.com/r/*/*",
|
86
|
-
"http://tinypic.com/r/*/*",
|
87
|
-
"http://*.tinypic.com/*.jpg",
|
88
|
-
"http://*.tinypic.com/*.png",
|
89
|
-
"http://meadd.com/*/*",
|
90
|
-
"http://meadd.com/*",
|
91
|
-
"http://*.deviantart.com/art/*",
|
92
|
-
"http://*.deviantart.com/gallery/*",
|
93
|
-
"http://*.deviantart.com/#/*",
|
94
|
-
"http://fav.me/*",
|
95
|
-
"http://*.deviantart.com",
|
96
|
-
"http://*.deviantart.com/gallery",
|
97
|
-
"http://*.deviantart.com/*/*.jpg",
|
98
|
-
"http://*.deviantart.com/*/*.gif",
|
99
|
-
"http://*.deviantart.net/*/*.jpg",
|
100
|
-
"http://*.deviantart.net/*/*.gif",
|
101
|
-
"http://www.whitehouse.gov/photos-and-video/video/*",
|
102
|
-
"http://www.whitehouse.gov/video/*",
|
103
|
-
"http://wh.gov/photos-and-video/video/*",
|
104
|
-
"http://wh.gov/video/*",
|
105
|
-
"http://www.hulu.com/watch*",
|
106
|
-
"http://www.hulu.com/w/*",
|
107
|
-
"http://hulu.com/watch*",
|
108
|
-
"http://hulu.com/w/*",
|
109
|
-
"http://movieclips.com/watch/*/*/",
|
110
|
-
"http://movieclips.com/watch/*/*/*/*",
|
111
|
-
"http://*crackle.com/c/*",
|
112
|
-
"http://www.fancast.com/*/videos",
|
113
|
-
"http://www.funnyordie.com/videos/*",
|
114
|
-
"http://www.vimeo.com/groups/*/videos/*",
|
115
|
-
"http://www.vimeo.com/*",
|
116
|
-
"http://vimeo.com/groups/*/videos/*",
|
117
|
-
"http://vimeo.com/*",
|
118
|
-
"http://www.ted.com/talks/*.html*",
|
119
|
-
"http://www.ted.com/talks/lang/*/*.html*",
|
120
|
-
"http://www.ted.com/index.php/talks/*.html*",
|
121
|
-
"http://www.ted.com/index.php/talks/lang/*/*.html*",
|
122
|
-
"http://*omnisio.com/*",
|
123
|
-
"http://*nfb.ca/film/*",
|
124
|
-
"http://www.thedailyshow.com/watch/*",
|
125
|
-
"http://www.thedailyshow.com/full-episodes/*",
|
126
|
-
"http://www.thedailyshow.com/collection/*/*/*",
|
127
|
-
"http://movies.yahoo.com/movie/*/video/*",
|
128
|
-
"http://movies.yahoo.com/movie/*/info",
|
129
|
-
"http://movies.yahoo.com/movie/*/trailer",
|
130
|
-
"http://www.colbertnation.com/the-colbert-report-collections/*",
|
131
|
-
"http://www.colbertnation.com/full-episodes/*",
|
132
|
-
"http://www.colbertnation.com/the-colbert-report-videos/*",
|
133
|
-
"http://www.comedycentral.com/videos/index.jhtml?*",
|
134
|
-
"http://www.theonion.com/video/*",
|
135
|
-
"http://theonion.com/video/*",
|
136
|
-
"http://wordpress.tv/*/*/*/*/",
|
137
|
-
"http://www.traileraddict.com/trailer/*",
|
138
|
-
"http://www.traileraddict.com/clip/*",
|
139
|
-
"http://www.traileraddict.com/poster/*",
|
140
|
-
"http://www.escapistmagazine.com/videos/*",
|
141
|
-
"http://www.trailerspy.com/trailer/*/*",
|
142
|
-
"http://www.trailerspy.com/trailer/*",
|
143
|
-
"http://www.trailerspy.com/view_video.php*",
|
144
|
-
"http://www.atom.com/*/*/",
|
145
|
-
"http://fora.tv/*/*/*/*",
|
146
|
-
"http://www.spike.com/video/*",
|
147
|
-
"http://www.gametrailers.com/video/*",
|
148
|
-
"http://gametrailers.com/video/*",
|
149
|
-
"http://www.koldcast.tv/video/*",
|
150
|
-
"http://www.koldcast.tv/#video:*",
|
151
|
-
"http://techcrunch.tv/watch*",
|
152
|
-
"http://techcrunch.tv/*/watch*",
|
153
|
-
"http://www.godtube.com/featured/video/*",
|
154
|
-
"http://www.tangle.com/view_video*",
|
155
|
-
"http://soundcloud.com/*",
|
156
|
-
"http://soundcloud.com/*/*",
|
157
|
-
"http://soundcloud.com/*/sets/*",
|
158
|
-
"http://soundcloud.com/groups/*",
|
159
|
-
"http://www.last.fm/music/*",
|
160
|
-
"http://www.last.fm/music/+videos/*",
|
161
|
-
"http://www.last.fm/music/+images/*",
|
162
|
-
"http://www.last.fm/music/*/_/*",
|
163
|
-
"http://www.last.fm/music/*/*",
|
164
|
-
"http://www.mixcloud.com/*/*/",
|
165
|
-
"http://espn.go.com/video/clip*",
|
166
|
-
"http://espn.go.com/*/story*",
|
167
|
-
"http://cnbc.com/id/*",
|
168
|
-
"http://cbsnews.com/video/watch/*",
|
169
|
-
"http://www.cnn.com/video/*",
|
170
|
-
"http://edition.cnn.com/video/*",
|
171
|
-
"http://money.cnn.com/video/*",
|
172
|
-
"http://today.msnbc.msn.com/id/*/vp/*",
|
173
|
-
"http://www.msnbc.msn.com/id/*/vp/*",
|
174
|
-
"http://www.msnbc.msn.com/id/*/ns/*",
|
175
|
-
"http://today.msnbc.msn.com/id/*/ns/*",
|
176
|
-
"http://multimedia.foxsports.com/m/video/*/*",
|
177
|
-
"http://msn.foxsports.com/video*",
|
178
|
-
"http://*amazon.*/gp/product/*",
|
179
|
-
"http://*amazon.*/*/dp/*",
|
180
|
-
"http://*amazon.*/dp/*",
|
181
|
-
"http://*amazon.*/o/ASIN/*",
|
182
|
-
"http://*amazon.*/gp/offer-listing/*",
|
183
|
-
"http://*amazon.*/*/ASIN/*",
|
184
|
-
"http://*amazon.*/gp/product/images/*",
|
185
|
-
"http://www.amzn.com/*",
|
186
|
-
"http://amzn.com/*",
|
187
|
-
"http://www.shopstyle.com/browse*",
|
188
|
-
"http://www.shopstyle.com/action/apiVisitRetailer*",
|
189
|
-
"http://www.shopstyle.com/action/viewLook*",
|
190
|
-
"http://gist.github.com/*",
|
191
|
-
"http://twitter.com/*/status/*",
|
192
|
-
"http://twitter.com/*/statuses/*",
|
193
|
-
"http://www.crunchbase.com/*/*",
|
194
|
-
"http://crunchbase.com/*/*",
|
195
|
-
"http://www.slideshare.net/*/*",
|
196
|
-
"http://*.scribd.com/doc/*",
|
197
|
-
"http://screenr.com/*",
|
198
|
-
"http://polldaddy.com/community/poll/*",
|
199
|
-
"http://polldaddy.com/poll/*",
|
200
|
-
"http://answers.polldaddy.com/poll/*",
|
201
|
-
"http://www.5min.com/Video/*",
|
202
|
-
"http://www.howcast.com/videos/*",
|
203
|
-
"http://www.screencast.com/*/media/*",
|
204
|
-
"http://screencast.com/*/media/*",
|
205
|
-
"http://www.screencast.com/t/*",
|
206
|
-
"http://screencast.com/t/*",
|
207
|
-
"http://issuu.com/*/docs/*",
|
208
|
-
"http://www.kickstarter.com/projects/*/*",
|
209
|
-
"http://www.scrapblog.com/viewer/viewer.aspx*",
|
210
|
-
"http://my.opera.com/*/albums/show.dml?id=*",
|
211
|
-
"http://my.opera.com/*/albums/showpic.dml?album=*&picture=*",
|
212
|
-
"http://tumblr.com/*",
|
213
|
-
"http://*.tumblr.com/post/*",
|
214
|
-
"http://www.polleverywhere.com/polls/*",
|
215
|
-
"http://www.polleverywhere.com/multiple_choice_polls/*",
|
216
|
-
"http://www.polleverywhere.com/free_text_polls/*",
|
217
|
-
"http://www.quantcast.com/wd:*",
|
218
|
-
"http://www.quantcast.com/*",
|
219
|
-
"http://siteanalytics.compete.com/*",
|
220
|
-
"http://statsheet.com/statplot/charts/*/*/*/*",
|
221
|
-
"http://statsheet.com/statplot/charts/e/*",
|
222
|
-
"http://statsheet.com/*/teams/*/*",
|
223
|
-
"http://statsheet.com/tools/chartlets?chart=*",
|
224
|
-
"http://*.status.net/notice/*",
|
225
|
-
"http://identi.ca/notice/*",
|
226
|
-
"http://shitmydadsays.com/notice/*"
|
227
|
-
]
|
data/lib/oembed/formatters.rb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
module OEmbed
|
2
|
-
class Formatters
|
3
|
-
FORMATS = Hash.new { |_, format| raise OEmbed::FormatNotSupported, format }
|
4
|
-
|
5
|
-
# Load XML
|
6
|
-
begin
|
7
|
-
require 'xmlsimple'
|
8
|
-
FORMATS[:xml] = proc do |r|
|
9
|
-
begin
|
10
|
-
XmlSimple.xml_in(StringIO.new(r), 'ForceArray' => false)
|
11
|
-
rescue
|
12
|
-
case $!
|
13
|
-
when ::ArgumentError
|
14
|
-
raise $!
|
15
|
-
else
|
16
|
-
raise ::ArgumentError, "Couldn't parse the given document."
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
rescue LoadError
|
21
|
-
end
|
22
|
-
|
23
|
-
# Load JSON
|
24
|
-
begin
|
25
|
-
require 'json'
|
26
|
-
FORMATS[:json] = proc { |r| ::JSON.load(r.to_s) }
|
27
|
-
rescue LoadError
|
28
|
-
end
|
29
|
-
|
30
|
-
DEFAULT = FORMATS.keys.first
|
31
|
-
|
32
|
-
def self.verify?(type)
|
33
|
-
FORMATS[type] && type
|
34
|
-
end
|
35
|
-
|
36
|
-
def self.convert(type, value)
|
37
|
-
FORMATS[type].call(value)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
data/rails/init.rb
DELETED