diff --git a/src/Adapters/Sassmeister/Detectors/Code.php b/src/Adapters/Sassmeister/Detectors/Code.php deleted file mode 100644 index f421a52f..00000000 --- a/src/Adapters/Sassmeister/Detectors/Code.php +++ /dev/null @@ -1,48 +0,0 @@ - - */ -class Code extends Detector -{ - public function detect(): ?EmbedCode - { - $result = parent::detect(); - return $result !== null ? $result : $this->fallback(); - } - - private function fallback(): ?EmbedCode - { - $uri = $this->extractor->getUri(); - - if (!matchPath('/gist/*', $uri->getPath())) { - return null; - } - - $id = explode('/', $uri->getPath())[2]; - $height = 480; - - $html = [ - html('p', [ - 'class' => 'sassmeister', - 'data-gist-id' => $id, - 'data-height' => $height, - 'data-theme' => 'tomorrow', - ], 'Play with this gist on SassMeister.'), - html('script', [ - 'src' => 'http://cdn.sassmeister.com/js/embed.js', - 'async' => true, - ]), - ]; - - return new EmbedCode(implode('', $html), null, $height); - } -} diff --git a/src/Adapters/Sassmeister/Extractor.php b/src/Adapters/Sassmeister/Extractor.php deleted file mode 100644 index 4e3cde5a..00000000 --- a/src/Adapters/Sassmeister/Extractor.php +++ /dev/null @@ -1,19 +0,0 @@ -> - */ -class Extractor extends Base -{ - public function createCustomDetectors(): array - { - return [ - 'code' => new Detectors\Code($this), - ]; - } -} diff --git a/src/ExtractorFactory.php b/src/ExtractorFactory.php index dc43daa2..8e4dd5a7 100644 --- a/src/ExtractorFactory.php +++ b/src/ExtractorFactory.php @@ -24,7 +24,6 @@ class ExtractorFactory 'github.com' => Adapters\Github\Extractor::class, 'wikipedia.org' => Adapters\Wikipedia\Extractor::class, 'archive.org' => Adapters\Archive\Extractor::class, - 'sassmeister.com' => Adapters\Sassmeister\Extractor::class, 'facebook.com' => Adapters\Facebook\Extractor::class, 'instagram.com' => Adapters\Instagram\Extractor::class, 'imageshack.com' => Adapters\ImageShack\Extractor::class, diff --git a/src/resources/oembed.php b/src/resources/oembed.php index 2d744655..59a75534 100644 --- a/src/resources/oembed.php +++ b/src/resources/oembed.php @@ -181,9 +181,6 @@ 'http://embed.chartblocks.com/1.0/oembed' => [ '|^https?://public\\.chartblocks\\.com/c/.*$|i', ], - 'http://chirb.it/oembed.json' => [ - '|^https?://chirb\\.it/.*$|i', - ], 'https://chroco.ooo/embed' => [ '|^https?://chroco\\.ooo/mypage/.*$|i', '|^https?://chroco\\.ooo/story/.*$|i', diff --git a/tests/PagesTest.php b/tests/PagesTest.php index 3b09b94d..f04e4161 100644 --- a/tests/PagesTest.php +++ b/tests/PagesTest.php @@ -27,7 +27,6 @@ public function urlDataProvider(): array ['http://live.amcharts.com/czNjJ'], ['https://www.aol.com/video/view/pile-of-recovering-foster-kittens-is-purrfect/595fe75985eb42109b69bedb/'], ['http://jeanjean.bandcamp.com/track/coquin-l-l-phant'], - ['http://chirb.it/7A9L9B'], ['http://codepen.io/Zhouzi/pen/JoRazP'], ['http://www.dailymotion.com/video/xy0wd'], ['http://www.deviantart.com/art/Misty-510056679'], @@ -85,11 +84,6 @@ public function testSnipplr() $this->assertEmbed('http://snipplr.com/view/72914/better-html-5-basic-starter-template'); } - public function testSassmeister() - { - $this->assertEmbed('http://sassmeister.com/gist/1122e441f0434ec6eb2a'); - } - public function testImageShack() { $this->assertEmbed('https://imageshack.com/i/ip7wO0v7j'); diff --git a/tests/cache/chirb.it.7a9l9b.php b/tests/cache/chirb.it.7a9l9b.php deleted file mode 100644 index 76e3a688..00000000 --- a/tests/cache/chirb.it.7a9l9b.php +++ /dev/null @@ -1,503 +0,0 @@ - [ - 'server' => [ - 'nginx/1.18.0', - 'nginx/1.18.0' - ], - 'date' => [ - 'Sun, 04 Apr 2021 15:23:44 GMT', - 'Sun, 04 Apr 2021 15:23:44 GMT' - ], - 'content-type' => [ - 'text/html', - 'text/html; charset=UTF-8' - ], - 'content-length' => [ - '169' - ], - 'connection' => [ - 'keep-alive', - 'keep-alive' - ], - 'location' => [ - 'https://chirb.it/7A9L9B HTTP/1.1 200 OK' - ], - 'transfer-encoding' => [ - 'chunked' - ], - 'content-encoding' => [ - 'gzip' - ], - 'Content-Location' => [ - 'https://chirb.it/7A9L9B' - ], - 'X-Request-Time' => [ - '1.018 ms' - ] - ], - 'statusCode' => 200, - 'reasonPhrase' => 'OK', - 'body' => ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Chirbit - Encana conference call - - share audio easily - - - Chirbit - Listen | Encana conference call - - - - -
-
- -
- -
- - -
Encana conference call
- -
- -
- -
-
00:00
-
00:00:19
-
-
- -   - - -
-
- - -
- - #conference - -
- - - - -
- - - - -
- - -
-
- - - - - -
-
-

Comments

- - -
-
-
-
- - - - -
- - - -
-

Share This Chirbit

-
-
-
-
-
- -
-
-
-
-
-
-
- - - -
-
-
-
-
- -
- -
-
- - - - -
- - -
- - - - - - - - - - - - - - - - -' -]; diff --git a/tests/cache/chirb.it.oembed.json.0b6fc4888b3b29e8dea759841f8f9940.php b/tests/cache/chirb.it.oembed.json.0b6fc4888b3b29e8dea759841f8f9940.php deleted file mode 100644 index 2e3f9ea1..00000000 --- a/tests/cache/chirb.it.oembed.json.0b6fc4888b3b29e8dea759841f8f9940.php +++ /dev/null @@ -1,31 +0,0 @@ - [ - 'server' => [ - 'nginx/1.18.0' - ], - 'date' => [ - 'Sun, 04 Apr 2021 15:23:45 GMT' - ], - 'content-type' => [ - 'application/json' - ], - 'content-length' => [ - '627' - ], - 'connection' => [ - 'keep-alive' - ], - 'Content-Location' => [ - 'https://chirb.it/oembed.json?url=https%3A%2F%2Fchirb.it%2F7A9L9B' - ], - 'X-Request-Time' => [ - '0.629 ms' - ] - ], - 'statusCode' => 200, - 'reasonPhrase' => 'OK', - 'body' => '{"version":"1.0","type":"rich","provider_name":"chirbit","provider_url":"https:\\/\\/www.chirbit.com\\/","thumbnail_url":"https:\\/\\/chirb.it\\/chirbit_oembedpic.jpg","thumbnail_width":120,"thumbnail_height":120,"width":"380","height":"120","title":"Encana conference call","author_name":"nvanderklippe","author_url":"https:\\/\\/www.chirbit.com\\/nvanderklippe","html":"', - 'width' => 380, - 'height' => 120, - 'ratio' => 31.579 - ], - 'description' => 'Audio: - social audio', - 'favicon' => 'https://chirb.it/favicon.ico', - 'feeds' => [], - 'icon' => null, - 'image' => 'https://chirb.it/chirbit_oembedpic.jpg', - 'keywords' => [ - 'chirbit', - 'social audio', - '#conference' - ], - 'language' => null, - 'languages' => [], - 'license' => null, - 'providerName' => 'chirbit', - 'providerUrl' => 'https://www.chirbit.com/', - 'publishedTime' => null, - 'redirect' => null, - 'title' => 'Encana conference call', - 'url' => 'https://chirb.it/7A9L9B', - 'linkedData' => [], - 'oEmbed' => [ - 'version' => '1.0', - 'type' => 'rich', - 'provider_name' => 'chirbit', - 'provider_url' => 'https://www.chirbit.com/', - 'thumbnail_url' => 'https://chirb.it/chirbit_oembedpic.jpg', - 'thumbnail_width' => 120, - 'thumbnail_height' => 120, - 'width' => '380', - 'height' => '120', - 'title' => 'Encana conference call', - 'author_name' => 'nvanderklippe', - 'author_url' => 'https://www.chirbit.com/nvanderklippe', - 'html' => '' - ], - 'allLinkedData' => [] -]; diff --git a/tests/fixtures/sassmeister.com.gist-1122e441f0434ec6eb2a.php b/tests/fixtures/sassmeister.com.gist-1122e441f0434ec6eb2a.php deleted file mode 100644 index 88059153..00000000 --- a/tests/fixtures/sassmeister.com.gist-1122e441f0434ec6eb2a.php +++ /dev/null @@ -1,32 +0,0 @@ - 'Jed Foster and Dale Sande', - 'authorUrl' => null, - 'cms' => null, - 'code' => [ - 'html' => '

Play with this gist on SassMeister.

', - 'width' => null, - 'height' => 480, - 'ratio' => null - ], - 'description' => 'SassMeister is a playground for Sass. Add some Sass and SassMeister will show you the rendered CSS.', - 'favicon' => 'https://www.sassmeister.com/favicon.ico', - 'feeds' => [], - 'icon' => 'https://www.sassmeister.com/logo192.png', - 'image' => null, - 'keywords' => [], - 'language' => 'en', - 'languages' => [], - 'license' => null, - 'providerName' => 'Sassmeister', - 'providerUrl' => 'https://www.sassmeister.com', - 'publishedTime' => null, - 'redirect' => null, - 'title' => 'SassMeister | The Sass Playground!', - 'url' => 'https://www.sassmeister.com/gist/1122e441f0434ec6eb2a', - 'linkedData' => [], - 'oEmbed' => [], - 'allLinkedData' => [] -];