ruby-oembed 0.14.0 → 0.16.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.
- checksums.yaml +4 -4
- data/.travis.yml +5 -2
- data/CHANGELOG.rdoc +25 -2
- data/README.md +5 -7
- data/lib/oembed/provider.rb +54 -5
- data/lib/oembed/providers/builtin_providers.rb +292 -0
- data/lib/oembed/providers/facebook_post.rb +27 -17
- data/lib/oembed/providers/facebook_video.rb +22 -10
- data/lib/oembed/providers/instagram.rb +37 -20
- data/lib/oembed/providers/tiktok.rb +13 -0
- data/lib/oembed/providers.rb +39 -300
- data/lib/oembed/version.rb +2 -2
- data/lib/oembed.rb +1 -0
- data/ruby-oembed.gemspec +1 -2
- metadata +9 -53
- data/integration_test/test.rb +0 -31
- data/integration_test/test_urls.csv +0 -502
- data/spec/cassettes/OEmbed_Provider.yml +0 -987
- data/spec/cassettes/OEmbed_ProviderDiscovery.yml +0 -27184
- data/spec/cassettes/OEmbed_Providers_Slideshare.yml +0 -1433
- data/spec/cassettes/OEmbed_Providers_Twitter.yml +0 -612
- data/spec/formatter/ducktype_backend_spec.rb +0 -94
- data/spec/formatter/json/.DS_Store +0 -0
- data/spec/formatter/json/jsongem_backend_spec.rb +0 -71
- data/spec/formatter/json/yaml_backend_spec.rb +0 -55
- data/spec/formatter/xml/nokogiri_backend_spec.rb +0 -59
- data/spec/formatter/xml/rexml_backend_spec.rb +0 -55
- data/spec/formatter/xml/xmlsimple_backend_spec.rb +0 -59
- data/spec/formatter_spec.rb +0 -37
- data/spec/provider_discovery_spec.rb +0 -141
- data/spec/provider_spec.rb +0 -366
- data/spec/providers/facebook_spec.rb +0 -50
- data/spec/providers/slideshare_spec.rb +0 -42
- data/spec/providers/twitter_spec.rb +0 -44
- data/spec/providers_spec.rb +0 -306
- data/spec/response_spec.rb +0 -230
- data/spec/spec_helper.rb +0 -111
- data/spec/spec_helper_examples.yml +0 -27
- data/spec/support/shared_examples_for_providers.rb +0 -39
@@ -1,39 +0,0 @@
|
|
1
|
-
RSpec.shared_examples "an OEmbed::Proviers instance" do |expected_valid_urls, expected_invalid_urls|
|
2
|
-
expected_valid_urls.each do |valid_url|
|
3
|
-
context "given the valid URL #{valid_url}" do
|
4
|
-
describe ".include?" do
|
5
|
-
it "should be true" do
|
6
|
-
expect(provider_class.include?(valid_url)).to be_truthy
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
describe ".get" do
|
11
|
-
it "should return a response" do
|
12
|
-
response = nil
|
13
|
-
expect {
|
14
|
-
response = provider_class.get(valid_url)
|
15
|
-
}.to_not raise_error
|
16
|
-
expect(response).to be_a(OEmbed::Response)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
expected_invalid_urls.each do |invalid_url|
|
23
|
-
context "given the invalid URL #{invalid_url}" do
|
24
|
-
describe ".include?" do
|
25
|
-
it "should be false" do
|
26
|
-
expect(provider_class.include?(invalid_url)).to be_falsey
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
describe ".get" do
|
31
|
-
it "should not find a response" do
|
32
|
-
expect {
|
33
|
-
provider_class.get(invalid_url)
|
34
|
-
}.to raise_error(OEmbed::NotFound)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|