ruby-oembed 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/CHANGELOG.rdoc +7 -1
- data/README.md +23 -11
- data/lib/oembed/providers.rb +12 -1
- data/lib/oembed/providers/embedly_urls.yml +322 -63
- data/lib/oembed/providers/noembed_urls.yml +217 -0
- data/lib/oembed/version.rb +1 -1
- data/lib/tasks/oembed.rake +24 -23
- metadata +3 -2
@@ -0,0 +1,217 @@
|
|
1
|
+
---
|
2
|
+
- "//clips\\.twitch\\.tv/.*"
|
3
|
+
- "//twitch\\.tv/.*"
|
4
|
+
- "//www\\.twitch\\.tv/.*"
|
5
|
+
- http://(?:www\.)?theverge\.com/\d{4}/\d{1,2}/\d{1,2}/\d+/[^/]+/?$
|
6
|
+
- http://(?:www\.)?twitpic\.com/([^/]+)
|
7
|
+
- http://(?:www\.)?xkcd\.com/\d+/?
|
8
|
+
- http://amzn\.com/([^/]+)
|
9
|
+
- http://arstechnica\.com/[^/]+/\d+/\d+/[^/]+/?$
|
10
|
+
- http://bash\.org/\?(\d+)
|
11
|
+
- http://boingboing\.net/\d{4}/\d{2}/\d{2}/[^/]+\.html
|
12
|
+
- http://cl\.ly/(?:image/)?[0-9a-zA-Z]+/?$
|
13
|
+
- http://gfycat\.com/([a-zA-Z]+)
|
14
|
+
- http://lockerz\.com/[sd]/\d+
|
15
|
+
- http://picplz\.com/user/[^/]+/pic/[^/]+
|
16
|
+
- http://qik\.com/video/.*
|
17
|
+
- http://skit.ch/[^/]+
|
18
|
+
- http://tl\.gd/[^/]+
|
19
|
+
- http://trailers\.apple\.com/trailers/[^/]+/[^/]+
|
20
|
+
- http://www.traileraddict.com/trailer/[^/]+/trailer
|
21
|
+
- http://www\.amazon\.com/(?:.+/)?[gd]p/(?:product/)?(?:tags-on-product/)?([a-zA-Z0-9]+)
|
22
|
+
- http://www\.asciiartfarts\.com/[0-9]+\.html
|
23
|
+
- http://www\.clickhole\.com/[^/]+/[^/]?
|
24
|
+
- http://www\.duffelblog\.com/\d{4}/\d{1,2}/[^/]+/?$
|
25
|
+
- http://www\.monoprice\.com/products/product\.asp\?.*p_id=\d+
|
26
|
+
- http://www\.theonion\.com/articles?/[^/]+/?
|
27
|
+
- http://www\.twitlonger\.com/show/[a-zA-Z0-9]+
|
28
|
+
- http://www\.urbandictionary\.com/define\.php\?term=.+
|
29
|
+
- https://tube.switch.ch/videos/([a-z0-9]+)
|
30
|
+
- https?://(?:[^\.]+\.)?(?:youtu\.be|youtube\.com/embed)/([a-zA-Z0-9_-]+)
|
31
|
+
- https?://(?:[^\.]+\.)?youtube\.com/watch/?\?(?:.+&)?v=([^&]+)
|
32
|
+
- https?://(?:www.)?skitch.com/([^/]+)/[^/]+/.+
|
33
|
+
- https?://(?:www\.)?avclub\.com/article/[^/]+/?$
|
34
|
+
- https?://(?:www\.)?vice\.com/[^/]+/?
|
35
|
+
- https?://(?:www\.)?vimeo\.com/.+
|
36
|
+
- https?://(?:www\.)?wired\.com/([^/]+/)?\d+/\d+/[^/]+/?$
|
37
|
+
- https?://(?:www|mobile\.)?twitter\.com/(?:#!/)?([^/]+)/status(?:es)?/(\d+)
|
38
|
+
- https?://.*\.channel\.geographs\.org/.*
|
39
|
+
- https?://.*\.deviantart\.com/.*#/d.*
|
40
|
+
- https?://.*\.deviantart\.com/art/.*
|
41
|
+
- https?://.*\.didacte\.com/a/course/.*
|
42
|
+
- https?://.*\.flickr\.com/photos/.*
|
43
|
+
- https?://.*\.geograph\.co\.uk/.*
|
44
|
+
- https?://.*\.geograph\.ie/.*
|
45
|
+
- https?://.*\.geograph\.org\.gg/.*
|
46
|
+
- https?://.*\.geograph\.org\.je/.*
|
47
|
+
- https?://.*\.geograph\.org\.uk/.*
|
48
|
+
- https?://.*\.nfb\.ca/film/.*
|
49
|
+
- https?://.*\.polldaddy\.com/poll/.*
|
50
|
+
- https?://.*\.polldaddy\.com/ratings/.*
|
51
|
+
- https?://.*\.polldaddy\.com/s/.*
|
52
|
+
- https?://.*\.silk\.co/explore/.*
|
53
|
+
- https?://.*\.silk\.co/explore/.*
|
54
|
+
- https?://.*\.silk\.co/s/embed/.*
|
55
|
+
- https?://.*\.silk\.co/s/embed/.*
|
56
|
+
- https?://.*\.smugmug\.com/.*
|
57
|
+
- https?://.*\.ustream\.com/.*
|
58
|
+
- https?://.*\.ustream\.tv/.*
|
59
|
+
- https?://.*\.wikimedia\.org/.*_geograph\.org\.uk_.*
|
60
|
+
- https?://.*\.wiredrive\.com/.*
|
61
|
+
- https?://.*\.wizer\.me/learn/.*
|
62
|
+
- https?://.*\.wizer\.me/learn/.*
|
63
|
+
- https?://.*\.wizer\.me/preview/.*
|
64
|
+
- https?://.*\.wizer\.me/preview/.*
|
65
|
+
- https?://.*\.yfrog\.com/.*
|
66
|
+
- https?://alpha\.app\.net/.*/post/.*
|
67
|
+
- https?://animatron\.com/project/.*
|
68
|
+
- https?://animoto\.com/play/.*
|
69
|
+
- https?://audiosnaps\.com/k/.*
|
70
|
+
- https?://blackfire\.io/profiles/.*/graph
|
71
|
+
- https?://blackfire\.io/profiles/compare/.*/graph
|
72
|
+
- https?://cacoo\.com/diagrams/.*
|
73
|
+
- https?://channel-islands\.geograph\.org/.*
|
74
|
+
- https?://channel-islands\.geographs\.org/.*
|
75
|
+
- https?://chirb\.it/.*
|
76
|
+
- https?://clyp\.it/.*
|
77
|
+
- https?://clyp\.it/playlist/.*
|
78
|
+
- https?://codepen\.io/.*
|
79
|
+
- https?://codepen\.io/.*
|
80
|
+
- https?://codepoints\.net/.*
|
81
|
+
- https?://codepoints\.net/.*
|
82
|
+
- https?://content\.streamonecloud\.net/embed/.*
|
83
|
+
- https?://coub\.com/embed/.*
|
84
|
+
- https?://coub\.com/view/.*
|
85
|
+
- https?://crowdranking\.com/.*/.*
|
86
|
+
- https?://db\.tt/[a-zA-Z0-9]+
|
87
|
+
- https?://de\.slideshare\.net/.*/.*
|
88
|
+
- https?://docs\.com/.*
|
89
|
+
- https?://dotsub\.com/view/.*
|
90
|
+
- https?://edocr\.com/docs/.*
|
91
|
+
- https?://egliseinfo\.catholique\.fr/.*
|
92
|
+
- https?://embedarticles\.com/.*
|
93
|
+
- https?://es\.slideshare\.net/.*/.*
|
94
|
+
- https?://fav\.me/.*
|
95
|
+
- https?://fiso\.foxsports\.com\.au/isomorphic-widget/.*
|
96
|
+
- https?://fiso\.foxsports\.com\.au/isomorphic-widget/.*
|
97
|
+
- https?://flic\.kr/p/.*
|
98
|
+
- https?://fr\.slideshare\.net/.*/.*
|
99
|
+
- https?://geo-en\.hlipp\.de/.*
|
100
|
+
- https?://geo\.hlipp\.de/.*
|
101
|
+
- https?://germany\.geograph\.org/.*
|
102
|
+
- https?://gfycat\.com/.*
|
103
|
+
- https?://gfycat\.com/.*
|
104
|
+
- https?://gty\.im/.*
|
105
|
+
- https?://gyazo\.com/.*
|
106
|
+
- https?://huffduffer\.com/.*/.*
|
107
|
+
- https?://ifttt\.com/recipes/.*
|
108
|
+
- https?://img\.catbo\.at/.*
|
109
|
+
- https?://imgur\.com/(?:[^\/]+/)?[0-9a-zA-Z]+$
|
110
|
+
- https?://infogr\.am/.*
|
111
|
+
- https?://instagr\.am/p/.*
|
112
|
+
- https?://instagr\.am/p/.*
|
113
|
+
- https?://instagram\.com/p/.*
|
114
|
+
- https?://instagram\.com/p/.*
|
115
|
+
- https?://learningapps\.org/.*
|
116
|
+
- https?://live\.amcharts\.com/.*
|
117
|
+
- https?://mathembed\.com/latex\?inputText=.*
|
118
|
+
- https?://mathembed\.com/latex\?inputText=.*
|
119
|
+
- https?://meetu\.ps/.*
|
120
|
+
- https?://meetup\.com/.*
|
121
|
+
- https?://mix\.office\.com/embed/.*
|
122
|
+
- https?://mix\.office\.com/watch/.*
|
123
|
+
- https?://moby\.to/.*
|
124
|
+
- https?://mybeweeg\.com/w/.*
|
125
|
+
- https?://news.vice\.com/[^/]+/?
|
126
|
+
- https?://official\.fm/playlists/.*
|
127
|
+
- https?://official\.fm/tracks/.*
|
128
|
+
- https?://on\.aol\.com/video/.*
|
129
|
+
- https?://pastery\.net/.*
|
130
|
+
- https?://pastery\.net/.*
|
131
|
+
- https?://path\.com/p/([0-9a-zA-Z]+)$
|
132
|
+
- https?://photos\.app\.net/.*/.*
|
133
|
+
- https?://play\.soundsgood\.co/playlist/.*
|
134
|
+
- https?://player\.vimeo\.com/video/.*
|
135
|
+
- https?://portfolium\.com/entry/.*
|
136
|
+
- https?://pt\.slideshare\.net/.*/.*
|
137
|
+
- https?://public\.chartblocks\.com/c/.*
|
138
|
+
- https?://rapidengage\.com/s/.*
|
139
|
+
- https?://reddit\.com/r/.*/comments/.*/.*
|
140
|
+
- https?://repubhub\.icopyright\.net/freePost\.act\?.*
|
141
|
+
- https?://roomshare\.jp/en/post/.*
|
142
|
+
- https?://roomshare\.jp/post/.*
|
143
|
+
- https?://rwire\.com/.*
|
144
|
+
- https?://shoud\.io/.*
|
145
|
+
- https?://shoudio\.com/.*
|
146
|
+
- https?://showtheway\.io/to/.*
|
147
|
+
- https?://sketchfab\.com/.*/folders/.*
|
148
|
+
- https?://sketchfab\.com/models/.*
|
149
|
+
- https?://sketchfab\.com/models/.*
|
150
|
+
- https?://soundcloud.com/.*/.*
|
151
|
+
- https?://soundcloud\.com/.*
|
152
|
+
- https?://soundsgood\.co/playlist/.*
|
153
|
+
- https?://speakerdeck\.com/.*/.*
|
154
|
+
- https?://speakerdeck\.com/.*/.*
|
155
|
+
- https?://sta\.sh/.*
|
156
|
+
- https?://streamable\.com/.*
|
157
|
+
- https?://streamable\.com/.*
|
158
|
+
- https?://sway\.com/.*
|
159
|
+
- https?://ted\.com/talks/.*
|
160
|
+
- https?://theysaidso\.com/image/.*
|
161
|
+
- https?://uttles\.com/uttle/.*
|
162
|
+
- https?://v\.nldg\.me/.+
|
163
|
+
- https?://videos\.sapo\.pt/.*
|
164
|
+
- https?://vidl\.it/.*
|
165
|
+
- https?://vimeo\.com/.*
|
166
|
+
- https?://vimeo\.com/album/.*/video/.*
|
167
|
+
- https?://vimeo\.com/channels/.*/.*
|
168
|
+
- https?://vimeo\.com/groups/.*/videos/.*
|
169
|
+
- https?://vimeo\.com/ondemand/.*/.*
|
170
|
+
- https?://vine.co/v/[a-zA-Z0-9]+
|
171
|
+
- https?://vine\.co/v/.*
|
172
|
+
- https?://vine\.co/v/.*
|
173
|
+
- https?://www\.(dropbox\.com/s/.+\.(?:jpg|png|gif))
|
174
|
+
- https?://www\.23hq\.com/.*/photo/.*
|
175
|
+
- https?://www\.animatron\.com/project/.*
|
176
|
+
- https?://www\.circuitlab\.com/circuit/.*
|
177
|
+
- https?://www\.clipland\.com/v/.*
|
178
|
+
- https?://www\.clipland\.com/v/.*
|
179
|
+
- https?://www\.codepoints\.net/.*
|
180
|
+
- https?://www\.codepoints\.net/.*
|
181
|
+
- https?://www\.collegehumor\.com/video/.*
|
182
|
+
- https?://www\.dailymile\.com/people/.*/entries/.*
|
183
|
+
- https?://www\.dailymotion\.com/video/.*
|
184
|
+
- https?://www\.dipity\.com/.*/.*/
|
185
|
+
- https?://www\.docs\.com/.*
|
186
|
+
- https?://www\.funnyordie\.com/videos/.*
|
187
|
+
- https?://www\.gfycat\.com/.*
|
188
|
+
- https?://www\.gfycat\.com/.*
|
189
|
+
- https?://www\.giantbomb\.com/videos/[^/]+/\d+-\d+/?
|
190
|
+
- https?://www\.globalgiving\.org/((micro)?projects|funds)/.*
|
191
|
+
- https?://www\.hulu\.com/watch/.*
|
192
|
+
- https?://www\.ifixit\.com/Guide/View/.*
|
193
|
+
- https?://www\.isnare\.com/.*
|
194
|
+
- https?://www\.kickstarter\.com/projects/.*
|
195
|
+
- https?://www\.kitchenbowl\.com/recipe/.*
|
196
|
+
- https?://www\.mixcloud\.com/.*/.*/
|
197
|
+
- https?://www\.mobypicture\.com/user/.*/view/.*
|
198
|
+
- https?://www\.nooledge\.com/\!/Vid/.+
|
199
|
+
- https?://www\.nytimes\.com/svc/oembed
|
200
|
+
- https?://www\.oumy\.com/v/.*
|
201
|
+
- https?://www\.pastery\.net/.*
|
202
|
+
- https?://www\.pastery\.net/.*
|
203
|
+
- https?://www\.quiz\.biz/quizz-.*\.html
|
204
|
+
- https?://www\.quizz\.biz/quizz-.*\.html
|
205
|
+
- https?://www\.reverbnation\.com/.*
|
206
|
+
- https?://www\.reverbnation\.com/.*/songs/.*
|
207
|
+
- https?://www\.screenr\.com/.*/
|
208
|
+
- https?://www\.scribd\.com/doc/.*
|
209
|
+
- https?://www\.shortnote\.jp/view/notes/.*
|
210
|
+
- https?://www\.slideshare\.net/.*/.*
|
211
|
+
- https?://www\.sway\.com/.*
|
212
|
+
- https?://www\.topy\.se/image/.*
|
213
|
+
- https?://www\.vevo\.com/.*
|
214
|
+
- https?://www\.vevo\.com/.*
|
215
|
+
- https?://www\.videojug\.com/film/.*
|
216
|
+
- https?://www\.videojug\.com/interview/.*
|
217
|
+
- https?://yfrog\.us/.*
|
data/lib/oembed/version.rb
CHANGED
data/lib/tasks/oembed.rake
CHANGED
@@ -4,43 +4,44 @@ begin
|
|
4
4
|
require 'open-uri'
|
5
5
|
|
6
6
|
namespace :oembed do
|
7
|
-
desc "Update the
|
8
|
-
task :
|
7
|
+
desc "Update the noembed_urls.yml file using the services api."
|
8
|
+
task :update_noembed do
|
9
9
|
# Details at http://api.embed.ly/docs/service
|
10
|
-
json_uri = URI.parse("
|
11
|
-
yaml_path = File.join(File.dirname(__FILE__), "../oembed/providers/
|
12
|
-
|
10
|
+
json_uri = URI.parse("https://noembed.com/providers")
|
11
|
+
yaml_path = File.join(File.dirname(__FILE__), "../oembed/providers/noembed_urls.yml")
|
12
|
+
|
13
13
|
services = JSON.parse(json_uri.read)
|
14
|
-
|
14
|
+
|
15
15
|
url_regexps = []
|
16
16
|
services.each do |service|
|
17
|
-
url_regexps += service['
|
17
|
+
url_regexps += service['patterns'].map{|r| r.strip }
|
18
18
|
end
|
19
19
|
url_regexps.sort!
|
20
|
-
|
20
|
+
|
21
21
|
YAML.dump(url_regexps, File.open(yaml_path, 'w'))
|
22
22
|
end
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
json_uri = URI.parse("http://oohembed.com/static/endpoints.json")
|
31
|
-
yaml_path = File.join(File.dirname(__FILE__), "../oembed/providers/oohembed_urls.yml")
|
32
|
-
|
23
|
+
|
24
|
+
desc "Update the embedly_urls.yml file using the services api."
|
25
|
+
task :update_embedly do
|
26
|
+
# Details at http://api.embed.ly/docs/service
|
27
|
+
json_uri = URI.parse("http://api.embed.ly/1/services")
|
28
|
+
yaml_path = File.join(File.dirname(__FILE__), "../oembed/providers/embedly_urls.yml")
|
29
|
+
|
33
30
|
services = JSON.parse(json_uri.read)
|
34
|
-
|
31
|
+
|
35
32
|
url_regexps = []
|
36
33
|
services.each do |service|
|
37
|
-
url_regexps
|
34
|
+
url_regexps += service['regex'].map{|r| r.strip }
|
38
35
|
end
|
39
36
|
url_regexps.sort!
|
40
|
-
|
37
|
+
|
41
38
|
YAML.dump(url_regexps, File.open(yaml_path, 'w'))
|
42
39
|
end
|
43
|
-
|
40
|
+
|
41
|
+
task :update_oohembed do
|
42
|
+
raise "Unfortunately the oohembed has discontinued."
|
43
|
+
end
|
44
|
+
end
|
44
45
|
rescue LoadError
|
45
46
|
puts "The oembed rake tasks require JSON. Install it with: gem install json"
|
46
|
-
end
|
47
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-oembed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Magnus Holm
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- lib/oembed/provider_discovery.rb
|
151
151
|
- lib/oembed/providers.rb
|
152
152
|
- lib/oembed/providers/embedly_urls.yml
|
153
|
+
- lib/oembed/providers/noembed_urls.yml
|
153
154
|
- lib/oembed/providers/oohembed_urls.yml
|
154
155
|
- lib/oembed/response.rb
|
155
156
|
- lib/oembed/response/link.rb
|
@@ -190,7 +191,7 @@ rdoc_options:
|
|
190
191
|
- "--main"
|
191
192
|
- README.rdoc
|
192
193
|
- "--title"
|
193
|
-
- ruby-oembed-0.
|
194
|
+
- ruby-oembed-0.12.0
|
194
195
|
- "--inline-source"
|
195
196
|
- "--exclude"
|
196
197
|
- tasks
|