ruby-oembed 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7678131f1e0f05d6cb7a47c34fc92965fbfafb93
4
- data.tar.gz: a1c6ccaca29f4f001027eb6e51c1ca6016fafaac
3
+ metadata.gz: 157ea3df0d0f3d89bc48f062c3db9825d1a2b381
4
+ data.tar.gz: 83c9d7ed8298497fa8d58451977e0605475abd51
5
5
  SHA512:
6
- metadata.gz: 50f755636f113f3b8c05beffceb1de302ee3285b6b353a5d2d62577984372d3fc99844aabc4a89176aed9c919a0bbaf7c6c32c9b4ad78948c512d6f97e4e6a8f
7
- data.tar.gz: 950b05436f26c660fd0d0978e8c9883625859b6e9f7c6cb977599c33cf8ced1b064f36ca4057ece5e7d31fb41e67e7dd3e6eae13532a2593bee919997a878216
6
+ metadata.gz: 3da1c0b22069ff15ae39153c2fc7efc3a249e26564ab86577f2ecd58707312187f777882b125e7e6d98cbb9568314545cfaff833f4e6f1decabdd117cc9001dc
7
+ data.tar.gz: 578994a5dea31536fdd73a09a6cbc1a37f1b47e49a0dfaaf769a8406ec4eb4e7e81414dbe0e50e68cdd9f9f626fd62d113dc7e02f5cd39589e4f0e21fae3b24d
data/.travis.yml CHANGED
@@ -1,10 +1,12 @@
1
1
  language: ruby
2
+ sudo: false
2
3
  before_install:
3
4
  - gem install bundler --version="~> 1.10"
5
+ bundler_args: --without guard
4
6
  cache: bundler
5
7
  rvm:
6
8
  - 1.9.3
7
9
  - 2.0.0
8
- - 2.1.1
9
- - 2.1.2
10
- - 2.2.0
10
+ - 2.1.8
11
+ - 2.2.4
12
+ - 2.3.0
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,12 @@
1
1
  = CHANGELOG
2
2
 
3
+ == 0.10.0 - 6 March 2016
4
+
5
+ * Add built-in Tumblr provider; Pull #55 (unknown)
6
+ * Add bulit-in FacebookPost and FacebookVideo providers; Pull #54 (John Crowe)
7
+ * Change ProviderDiscovery.discover_provider to better find tags on some sites; Issue #56 + Pull #57 (Marcos Wright-Kuhns)
8
+ * Updated the list of {Embedly}[http://embed.ly] URL schemes. (Marcos Wright-Kuhns)
9
+
3
10
  == 0.9.0 - 12 December 2015
4
11
 
5
12
  * Add support for HTTP redirects in ProviderDiscovery; Pull #39 (Sebastian de Castelberg) and Pull #38 (Sven Schwyn)
data/Gemfile CHANGED
@@ -9,3 +9,9 @@ source "https://rubygems.org"
9
9
  gem 'bundler', '~>1.10'
10
10
 
11
11
  gemspec
12
+
13
+ group :guard do
14
+ gem "guard-rspec"
15
+ gem "guard-bundler"
16
+ gem "rb-fsevent"
17
+ end
data/Guardfile ADDED
@@ -0,0 +1,35 @@
1
+ guard "bundler" do
2
+ watch("Gemfile")
3
+ end
4
+
5
+ group :red_green_refactor, :halt_on_fail => true do
6
+ guard "rspec", :cmd => "bundle exec rspec" do
7
+ watch(%r{^spec/.+_spec\.rb$})
8
+ watch(%r{^spec/cassettes/.+.yml$}) { "spec" }
9
+ watch(%r{^lib/(.+)\.rb$}) do |m|
10
+ # Split up the file path into an Array
11
+ path_parts = []
12
+ remaining_path = m[1]
13
+ while File.dirname(remaining_path) != '.'
14
+ remaining_path, file = File.split(remaining_path)
15
+ path_parts << file
16
+ end
17
+ path_parts << remaining_path
18
+ path_parts.reverse!
19
+
20
+ # Specs don't contain an oembed subdir
21
+ path_parts.shift
22
+ # Special case for formatter specs
23
+ if path_parts.include?('formatter') && path_parts.include?('backends')
24
+ path_parts.delete('backends')
25
+ path_parts.last.gsub!(/$/, "_backend")
26
+ end
27
+ # Add on the _spec.rb postfix
28
+ path_parts.last.gsub!(/$/, "_spec.rb")
29
+
30
+ f = File.join("spec", *path_parts)
31
+ puts "#{m.inspect} => #{f.inspect}"
32
+ f
33
+ end
34
+ end
35
+ end
data/README.rdoc CHANGED
@@ -48,7 +48,7 @@ This library works wonderfully on its own, but can get a speed boost by using 3r
48
48
  require 'json'
49
49
  require 'xmlsimple'
50
50
  require 'oembed'
51
-
51
+
52
52
  OEmbed::Formatter::JSON.backend #=> OEmbed::Formatter::JSON::Backends::JSONGem
53
53
  OEmbed::Formatter::XML.backend #=> OEmbed::Formatter::XML::Backends::XmlSimple
54
54
 
@@ -69,6 +69,8 @@ Code for the ruby-oembed library is {hosted on GitHub}[https://github.com/judofy
69
69
  bundle install
70
70
  # Run the tests.
71
71
  bundle exec rake
72
+ # or run the test continually
73
+ bundle exec guard
72
74
 
73
75
  If you encounter any bug, feel free to {create an Issue}[https://github.com/judofyr/ruby-oembed/issues].
74
76
 
@@ -3,17 +3,17 @@ module OEmbed
3
3
  # These are methods that are shared by the OEmbed::Formatter sub-classes
4
4
  # (i.e. OEmbed::Formatter:JSON and OEmbed::Formatter::XML).
5
5
  module Base
6
-
6
+
7
7
  # Returns true if there is a valid backend. Otherwise, raises OEmbed::FormatNotSupported
8
8
  def supported?
9
9
  !!backend
10
10
  end
11
-
11
+
12
12
  # Parses a String or IO and convert it into an Object
13
13
  def decode(value)
14
14
  backend.decode(value)
15
15
  end
16
-
16
+
17
17
  # Given either a String (the name of the backend to use) or an Object (which
18
18
  # must respond to the decode method), sets the current backend. Raises a LoadError
19
19
  # if the given backend cannot be loaded (e.g. an invalid String name, or the
@@ -23,29 +23,22 @@ module OEmbed
23
23
  def backend=(new_backend)
24
24
  new_backend_obj = case new_backend
25
25
  when String
26
- already_required = false
27
- begin
28
- already_required = self::Backends.const_defined?(new_backend, false)
29
- rescue ArgumentError # we're dealing with ruby < 1.9 where const_defined? only takes 1 argument, but behaves the way we want it to.
30
- already_required = self::Backends.const_defined?(new_backend)
31
- rescue NameError # no backends have been loaded yet
32
- already_required = false
26
+ unless already_loaded?(new_backend)
27
+ load "oembed/formatter/#{backend_path}/#{new_backend.downcase}.rb"
33
28
  end
34
-
35
- require "oembed/formatter/#{backend_path}/#{new_backend.downcase}" unless already_required
36
29
  self::Backends.const_get(new_backend)
37
30
  else
38
31
  new_backend
39
32
  end
40
-
33
+
41
34
  test_backend(new_backend_obj)
42
-
35
+
43
36
  @backend = new_backend_obj
44
-
37
+
45
38
  rescue
46
39
  raise LoadError, "There was an error setting the backend: #{new_backend.inspect} - #{$!.message}"
47
40
  end
48
-
41
+
49
42
  # Perform a set of operations using a backend other than the current one.
50
43
  # OEmbed::Formatter::XML.with_backend('XmlSimple') do
51
44
  # OEmbed::Formatter::XML.decode(xml_value)
@@ -56,23 +49,23 @@ module OEmbed
56
49
  ensure
57
50
  self.backend = old_backend
58
51
  end
59
-
52
+
60
53
  private
61
-
54
+
62
55
  # Makes sure the given backend can correctly parse values using the decode
63
56
  # method.
64
57
  def test_backend(new_backend)
65
58
  raise LoadError, "The given backend must respond to the decode method: #{new_backend.inspect}" unless new_backend.respond_to?(:decode)
66
-
59
+
67
60
  expected = {
68
61
  "version"=>1.0,
69
62
  "string"=>"test",
70
63
  "int"=>42,
71
64
  "html"=>"<i>Cool's</i>\n the \"word\"!",
72
65
  }
73
-
66
+
74
67
  actual = new_backend.decode(test_value)
75
-
68
+
76
69
  # For the test to be true the actual output Hash should have the
77
70
  # exact same list of keys _and_ the values should be the same
78
71
  # if we ignoring typecasting.
@@ -85,13 +78,23 @@ module OEmbed
85
78
  raise LoadError, "#{msg}: #{new_backend.inspect}"
86
79
  end
87
80
  end
88
-
81
+
82
+ def already_loaded?(new_backend)
83
+ begin
84
+ self::Backends.const_defined?(new_backend, false)
85
+ rescue ArgumentError # we're dealing with ruby < 1.9 where const_defined? only takes 1 argument, but behaves the way we want it to.
86
+ self::Backends.const_defined?(new_backend)
87
+ rescue NameError # no backends have been loaded yet
88
+ false
89
+ end
90
+ end
91
+
89
92
  # Must return a String representing the sub-directory where in-library
90
93
  # backend rb files live (e.g. 'json/backends')
91
94
  def backend_path
92
95
  raise "This method must be defined by a format-specific OEmbed::Formatter sub-class."
93
96
  end
94
-
97
+
95
98
  # Must return a String that when parsed by a backend returns the following ruby Hash
96
99
  # {
97
100
  # "version"=>1.0,
@@ -102,7 +105,7 @@ module OEmbed
102
105
  def test_value
103
106
  raise "This method must be defined by a format-specific OEmbed::Formatter sub-class."
104
107
  end
105
-
108
+
106
109
  end # SharedMethods
107
110
  end
108
111
  end
@@ -1,5 +1,5 @@
1
1
  # Only allow this backend the json gem is already loaded
2
- raise LoadError, "The json library isn't available. require 'json'" unless defined?(JSON)
2
+ raise LoadError, "The json library isn't available. require 'json'" unless Object.const_defined?('JSON')
3
3
 
4
4
  module OEmbed
5
5
  module Formatter
@@ -15,15 +15,15 @@ module OEmbed
15
15
  end
16
16
  ::JSON.parse(json)
17
17
  end
18
-
18
+
19
19
  def decode_fail_msg
20
20
  "The version of the json library you have installed isn't parsing JSON like ruby-oembed expected."
21
21
  end
22
-
22
+
23
23
  def parse_error
24
24
  ::JSON::ParserError
25
25
  end
26
-
26
+
27
27
  end
28
28
  end
29
29
  end
@@ -1,3 +1,5 @@
1
+ require 'openssl'
2
+
1
3
  module OEmbed
2
4
  module HttpHelper
3
5
 
@@ -37,15 +37,15 @@ module OEmbed
37
37
  format = options[:format]
38
38
 
39
39
  if format.nil? || format == :json
40
- provider_endpoint ||= /<link.*href=['"]*([^\s'"]+)['"]*.*application\/json\+oembed.*>/.match(res)[1] rescue nil
41
- provider_endpoint ||= /<link.*application\/json\+oembed.*href=['"]*([^\s'"]+)['"]*.*>/.match(res)[1] rescue nil
40
+ provider_endpoint ||= /<link[^>]*href=['"]*([^\s'"]+)['"]*[^>]*application\/json\+oembed[^>]*>/.match(res)[1] rescue nil
41
+ provider_endpoint ||= /<link[^>]*application\/json\+oembed[^>]*href=['"]*([^\s'"]+)['"]*[^>]*>/.match(res)[1] rescue nil
42
42
  format ||= :json if provider_endpoint
43
43
  end
44
44
  if format.nil? || format == :xml
45
45
  # {The specification}[http://oembed.com/#section4] says XML discovery should have
46
46
  # type="text/xml+oembed" but some providers use type="application/xml+oembed"
47
- provider_endpoint ||= /<link.*href=['"]*([^\s'"]+)['"]*.*(application|text)\/xml\+oembed.*>/.match(res)[1] rescue nil
48
- provider_endpoint ||= /<link.*(application|text)\/xml\+oembed.*href=['"]*([^\s'"]+)['"]*.*>/.match(res)[2] rescue nil
47
+ provider_endpoint ||= /<link[^>]*href=['"]*([^\s'"]+)['"]*[^>]*(application|text)\/xml\+oembed[^>]*>/.match(res)[1] rescue nil
48
+ provider_endpoint ||= /<link[^>]*(application|text)\/xml\+oembed[^>]*href=['"]*([^\s'"]+)['"]*[^>]*>/.match(res)[2] rescue nil
49
49
  format ||= :xml if provider_endpoint
50
50
  end
51
51
 
@@ -94,6 +94,7 @@
94
94
  - http://alpha.vrchive.com/*
95
95
  - http://alphahat.com/view/*
96
96
  - http://amzn.com/*
97
+ - http://anchor.fm/*
97
98
  - http://aniboom.com/animation-video/*
98
99
  - http://animal.discovery.com/videos/*
99
100
  - http://animoto.com/play/*
@@ -118,8 +119,6 @@
118
119
  - http://behance.net/gallery/*
119
120
  - http://beta-sliderocket.com/*
120
121
  - http://beta.polstir.com/*/*
121
- - http://bigthink.com/ideas/*
122
- - http://bigthink.com/series/*
123
122
  - http://blab.im/*
124
123
  - http://blip.tv/*/*
125
124
  - http://boo.fm/b*
@@ -131,6 +130,7 @@
131
130
  - http://bravotv.com/*/*/videos/*
132
131
  - http://break.com/*/*
133
132
  - http://bubb.li/*
133
+ - http://bumpers.fm/e/*
134
134
  - http://bunkrapp.com/*/*
135
135
  - http://calameo.com/*
136
136
  - http://canalplus.fr/*
@@ -154,6 +154,7 @@
154
154
  - http://collegehumor.com/video:*
155
155
  - http://confreaks.com/videos/*
156
156
  - http://confreaks.net/videos/*
157
+ - http://content.newsbound.com/*/*
157
158
  - http://coub.com/embed/*
158
159
  - http://coub.com/view/*
159
160
  - http://crocodoc.com/*
@@ -163,6 +164,7 @@
163
164
  - http://dashboard.minoto-video.com/main/video/details/*
164
165
  - http://distrify.com/film/*
165
166
  - http://dnbradio.com/*
167
+ - http://docs.com/*
166
168
  - http://dotsub.com/view/*
167
169
  - http://drbl.in/*
168
170
  - http://dreambroker.com/channel/*
@@ -173,7 +175,7 @@
173
175
  - http://embed.minoto-video.com/*
174
176
  - http://espn.go.com/*/story*
175
177
  - http://espn.go.com/video/clip*
176
- - http://etsy.com/listing/*
178
+ - http://etsy.com/*
177
179
  - http://fav.me/*
178
180
  - http://fb.com
179
181
  - http://fb.me/*
@@ -301,9 +303,6 @@
301
303
  - http://pastie.org/*
302
304
  - http://photozou.jp/photo/photo_only/*/*
303
305
  - http://photozou.jp/photo/show/*/*
304
- - http://picasaweb.google.com*/*/*
305
- - http://picasaweb.google.com*/*/*#*
306
- - http://picasaweb.google.com*/lh/photo/*
307
306
  - http://pics.lockerz.com/s/*
308
307
  - http://pikchur.com/*
309
308
  - http://pixorial.com/watch/*
@@ -344,7 +343,7 @@
344
343
  - http://redux.com/stream/item/*/*
345
344
  - http://relayto.com/*
346
345
  - http://reuters.com/video/*
347
- - http://reuters.com/video/*
346
+ - http://rocketium.com/*
348
347
  - http://s*.photobucket.com/albums/*
349
348
  - http://say.ly/*
350
349
  - http://science.discovery.com/videos/*
@@ -360,7 +359,7 @@
360
359
  - http://sendables.jibjab.com/view/*
361
360
  - http://sendvid.com/*
362
361
  - http://shoplocket.com/products/*
363
- - http://shorti.org/*
362
+ - http://shorti.com/*
364
363
  - http://showme.com/sh/*
365
364
  - http://siteanalytics.compete.com/*
366
365
  - http://skitch.com/*/*/*
@@ -413,6 +412,7 @@
413
412
  - http://twitpic.com/photos/*
414
413
  - http://twitrpix.com/*
415
414
  - http://ustre.am/*
415
+ - http://v.embedly.com/*
416
416
  - http://v.youku.com/v_playlist/*
417
417
  - http://v.youku.com/v_show/*
418
418
  - http://veoh.com/watch/*
@@ -434,6 +434,7 @@
434
434
  - http://videodonor.com/video/*
435
435
  - http://videos.nymag.com/*
436
436
  - http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid*
437
+ - http://view.stacker.cc/*
437
438
  - http://vimeo.com/*
438
439
  - http://vimeo.com/groups/*/videos/*
439
440
  - http://vimeo.com/m/#/*
@@ -499,7 +500,7 @@
499
500
  - http://www.dailymile.com/people/*/entries/*
500
501
  - http://www.dnbradio.com/*
501
502
  - http://www.dreambroker.com/channel/*
502
- - http://www.etsy.com/listing/*
503
+ - http://www.etsy.com/*
503
504
  - http://www.eyeem.com/a/*
504
505
  - http://www.eyeem.com/p/*
505
506
  - http://www.eyeem.com/u/*
@@ -609,7 +610,6 @@
609
610
  - http://www.quora.com/*/answer/*
610
611
  - http://www.qwantz.com/index.php?comic=*
611
612
  - http://www.qwiki.com/q/*
612
- - http://www.qzzr.com/quiz/*
613
613
  - http://www.radioreddit.com/?q=songs*
614
614
  - http://www.radioreddit.com/songs*
615
615
  - http://www.rdio.com/#/artist/*/album/*
@@ -618,7 +618,6 @@
618
618
  - http://www.redux.com/stream/item/*/*
619
619
  - http://www.relayto.com/*
620
620
  - http://www.reuters.com/video/*
621
- - http://www.reuters.com/video/*
622
621
  - http://www.rts.ch/play/tv/*
623
622
  - http://www.saynow.com/playMsg.html*
624
623
  - http://www.saynow.com/playMsg.html*
@@ -640,7 +639,7 @@
640
639
  - http://www.shopstyle.com/action/apiVisitRetailer*
641
640
  - http://www.shopstyle.com/action/viewLook*
642
641
  - http://www.shopstyle.com/browse*
643
- - http://www.shorti.org/*
642
+ - http://www.shorti.com/*
644
643
  - http://www.showme.com/sh/*
645
644
  - http://www.sliderocket.com/*
646
645
  - http://www.slideshare.net/*/*
@@ -678,6 +677,7 @@
678
677
  - http://www.tinypic.com/player.php*
679
678
  - http://www.tinypic.com/r/*/*
680
679
  - http://www.tinypic.com/view.php*
680
+ - http://www.touchcast.com/*/*
681
681
  - http://www.traileraddict.com/clip/*
682
682
  - http://www.traileraddict.com/poster/*
683
683
  - http://www.traileraddict.com/trailer/*
@@ -768,10 +768,13 @@
768
768
  - https://*youtube.com/watch*
769
769
  - https://23video.com/*
770
770
  - https://accredible.com/*
771
+ - https://airtable.com/shr*
771
772
  - https://alpha.vrchive.com/*
773
+ - https://anchor.fm/*
772
774
  - https://animoto.com/play/*
773
775
  - https://api.lovelive.tv/v1/*
774
776
  - https://app.devhv.com/oembed/*
777
+ - https://app.ilosvideos.com/view/*
775
778
  - https://app.stghv.com/*
776
779
  - https://app.videocheckout.com/embed/*
777
780
  - https://app.wistia.com/embed/medias/*
@@ -781,6 +784,7 @@
781
784
  - https://bop.fm/s/*/*
782
785
  - https://brainshark.com/*/*
783
786
  - https://brainsonic.com/*
787
+ - https://bumpers.fm/e/*
784
788
  - https://bunkrapp.com/*/*
785
789
  - https://calameo.com/*
786
790
  - https://chirb.it/*
@@ -792,10 +796,13 @@
792
796
  - https://clyp.it/*
793
797
  - https://codepicnic.com/bites/*
794
798
  - https://codepicnic.com/consoles/*
799
+ - https://content.newsbound.com/*/*
795
800
  - https://coub.com/embed/*
796
801
  - https://coub.com/view/*
797
802
  - https://crocodoc.com/*
803
+ - https://docs.com/*
798
804
  - https://dreambroker.com/channel/*
805
+ - https://etsy.com/*
799
806
  - https://fb.me/*
800
807
  - https://flowvella.com/s/*
801
808
  - https://foursquare.com/*
@@ -835,9 +842,6 @@
835
842
  - https://newhive.com/*/*
836
843
  - https://open.spotify.com/*
837
844
  - https://oumy.com/v/*
838
- - https://picasaweb.google.com*/*/*
839
- - https://picasaweb.google.com*/*/*#*
840
- - https://picasaweb.google.com*/lh/photo/*
841
845
  - https://play.spotify.com/*
842
846
  - https://player.videopath.com/*
843
847
  - https://player.vimeo.com/*
@@ -847,12 +851,15 @@
847
851
  - https://portfolium.com/entry/*
848
852
  - https://projects.invisionapp.com/share/*
849
853
  - https://public.chartblocks.com/c/*
854
+ - https://publicgood.com/campaign/*
850
855
  - https://publons.com/author/*
851
856
  - https://quora.com/*/answer/*
857
+ - https://qwip.it/watch/*
852
858
  - https://rapidengage.com/s/*
853
859
  - https://readtapestry.com/s/*/
854
860
  - https://reelhouse.org/*
855
861
  - https://relayto.com/*
862
+ - https://rocketium.com/*
856
863
  - https://screen.yahoo.com/*/*
857
864
  - https://scribblemaps.com/maps/view/*/*
858
865
  - https://sendvid.com/*
@@ -870,18 +877,19 @@
870
877
  - https://storify.com/*/*
871
878
  - https://streamable.com/*
872
879
  - https://streamio.com/api/v1/*
880
+ - https://sway.com/*
873
881
  - https://tr.instela.com/*
874
882
  - https://tun.in/*
875
883
  - https://tunein.com/*
876
884
  - https://uploadly.com/*
877
885
  - https://urtak.com/clr/*
878
886
  - https://urtak.com/u/*
887
+ - https://v.embedly.com/*
879
888
  - https://vid.me/*
880
889
  - https://vidd.me/*
881
890
  - https://video.esri.com/*
882
891
  - https://video214.com/play/*
883
892
  - https://view.stacker.cc/*
884
- - https://view.stacker.cc/*
885
893
  - https://vimeo.com/*
886
894
  - https://vine.co/v/*
887
895
  - https://w.graphiq.com/w/*
@@ -893,6 +901,7 @@
893
901
  - https://www.calameo.com/*
894
902
  - https://www.clippituser.tv/*
895
903
  - https://www.dreambroker.com/channel/*
904
+ - https://www.etsy.com/*
896
905
  - https://www.facebook.com/*/photos/*
897
906
  - https://www.facebook.com/*/posts/*
898
907
  - https://www.facebook.com/*/videos/*
@@ -913,11 +922,11 @@
913
922
  - https://www.oumy.com/v/*
914
923
  - https://www.publons.com/author/*
915
924
  - https://www.quora.com/*/answer/*
916
- - https://www.qzzr.com/quiz/*
917
925
  - https://www.reelhouse.org/*
918
926
  - https://www.relayto.com/*
919
927
  - https://www.scribblemaps.com/maps/view/*/*
920
928
  - https://www.streamio.com/api/v1/*
929
+ - https://www.vibby.com/watch*
921
930
  - https://www.vimeo.com/*
922
931
  - https://www.vine.co/v/*
923
932
  - https://www.wedgies.com/question/*
@@ -205,6 +205,25 @@ module OEmbed
205
205
  Instagram << "https://www.instagram.com/p/*"
206
206
  add_official_provider(Instagram)
207
207
 
208
+ # Providers for Facebook Posts & Videos
209
+ # https://developers.facebook.com/docs/plugins/oembed-endpoints
210
+ FacebookPost = OEmbed::Provider.new('https://www.facebook.com/plugins/post/oembed.json/', :json)
211
+ FacebookPost << 'https://www.facebook.com/*/posts/*'
212
+ FacebookPost << 'https://www.facebook.com/*/activity/*'
213
+ FacebookPost << 'https://www.facebook.com/photo*'
214
+ FacebookPost << 'https://www.facebook.com/photos*'
215
+ FacebookPost << 'https://www.facebook.com/*/photos*'
216
+ FacebookPost << 'https://www.facebook.com/permalink*'
217
+ FacebookPost << 'https://www.facebook.com/media*'
218
+ FacebookPost << 'https://www.facebook.com/questions*'
219
+ FacebookPost << 'https://www.facebook.com/notes*'
220
+ add_official_provider(FacebookPost)
221
+
222
+ FacebookVideo = OEmbed::Provider.new('https://www.facebook.com/plugins/video/oembed.json/', :json)
223
+ FacebookVideo << 'https://www.facebook.com/*/videos/*'
224
+ FacebookVideo << 'https://www.facebook.com/video*'
225
+ add_official_provider(FacebookVideo)
226
+
208
227
  # Provider for slideshare.net
209
228
  # http://www.slideshare.net/developers/oembed
210
229
  Slideshare = OEmbed::Provider.new("https://www.slideshare.net/api/oembed/2")
@@ -299,6 +318,12 @@ module OEmbed
299
318
  Skitch << "https://*.skitch.com/*"
300
319
  add_official_provider(Skitch)
301
320
 
321
+ # Provider for tumblr.com
322
+ Tumblr = OEmbed::Provider.new("http://www.tumblr.com/oembed/1.0/", :json)
323
+ Tumblr << "http://*.tumblr.com/post/*"
324
+ Tumblr << "https://*.tumblr.com/post/*"
325
+ add_official_provider(Tumblr)
326
+
302
327
  ## Provider for clikthrough.com
303
328
  # http://corporate.clikthrough.com/wp/?p=275
304
329
  #Clickthrough = OEmbed::Provider.new("http://www.clikthrough.com/services/oembed/")
@@ -1,7 +1,7 @@
1
1
  module OEmbed
2
2
  class Version
3
3
  MAJOR = 0
4
- MINOR = 9
4
+ MINOR = 10
5
5
  PATCH = 0
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7