ruby-oembed 0.16.1 → 0.18.0
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/.github/workflows/ruby.yml +38 -0
- data/CHANGELOG.rdoc +12 -1
- data/README.md +3 -3
- data/lib/oembed/formatter/base.rb +6 -1
- data/lib/oembed/formatter/json.rb +8 -8
- data/lib/oembed/providers/builtin_providers.rb +2 -0
- data/lib/oembed/providers/matterport.rb +12 -0
- data/lib/oembed/version.rb +2 -2
- metadata +6 -6
- data/.coveralls.yml +0 -1
- data/.travis.yml +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 657a2bb7e88539ae0374eb8cbb9344b7a41b4c8bf1c7e7ee3e3e7912c7a958ee
|
4
|
+
data.tar.gz: b1d9474d8ff3a5c974b75056722e69d3b45620a50207e9b3b8d0c46b96a31f32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 268482f4dfb73808af059f84c44deea8b70794e58baf1c594953259ce76fd79b6af9e0e7f1c0ae13713e6d78252eabfc714b44a7811d4e8c0aeb8c819e86b49b
|
7
|
+
data.tar.gz: f93bb90ae26808eaac26cf9bc61829cbeaf874d14c46745a12d4fa97895a8c2087266fdf507d1663a20abc21417e4cd082ec10bef9723a1e6fcaa9b2ef74b774
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ "master" ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ "master" ]
|
15
|
+
|
16
|
+
permissions:
|
17
|
+
contents: read
|
18
|
+
|
19
|
+
jobs:
|
20
|
+
test:
|
21
|
+
|
22
|
+
runs-on: ubuntu-latest
|
23
|
+
strategy:
|
24
|
+
matrix:
|
25
|
+
ruby-version: ['2.6', '3.0', '3.2']
|
26
|
+
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v3
|
29
|
+
- name: Set up Ruby
|
30
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
31
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
32
|
+
# uses: ruby/setup-ruby@v1
|
33
|
+
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
|
34
|
+
with:
|
35
|
+
ruby-version: ${{ matrix.ruby-version }}
|
36
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
37
|
+
- name: Run tests
|
38
|
+
run: bundle exec rake
|
data/CHANGELOG.rdoc
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
= CHANGELOG
|
2
2
|
|
3
|
-
== Unreleased (0.
|
3
|
+
== Unreleased (0.18.1)
|
4
|
+
|
5
|
+
== 0.18.0 - 31 August 2024
|
6
|
+
|
7
|
+
* Add support for `x.com` URLs to `OEmbed::Providers::Twitter`; Pull #97 (Maxime)
|
8
|
+
* Refresh a few test casettes; Pull #96 (Marcos Wright-Kuhns)
|
9
|
+
|
10
|
+
== 0.17.0 - 25 February 2024
|
11
|
+
|
12
|
+
* Add a built-in Matterport provider; Pull #93 (Nathan Papes)
|
13
|
+
* Updated tests to run with Ruby 2.6, 3.0, & 3.2
|
14
|
+
* Switched to using GitHub Actions for CI instead of Travis CI
|
4
15
|
|
5
16
|
== 0.16.1 - 13 January 2022
|
6
17
|
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# ruby-oembed
|
2
2
|
|
3
3
|
[](https://rubygems.org/gems/ruby-oembed)
|
4
|
-
[](https://github.com/ruby-oembed/ruby-oembed/actions/workflows/ruby.yml)
|
5
5
|
[](https://codeclimate.com/github/ruby-oembed/ruby-oembed)
|
6
6
|
[](https://coveralls.io/github/ruby-oembed/ruby-oembed?branch=coveralls)
|
7
|
-

|
8
8
|
|
9
9
|
|
10
10
|
An oEmbed consumer library written in Ruby, letting you easily get embeddable HTML representations of supported web pages, based on their URLs. See [oembed.com](http://oembed.com) for more about the protocol.
|
@@ -125,7 +125,7 @@ If you encounter any bug, feel free to [create an Issue](https://github.com/ruby
|
|
125
125
|
|
126
126
|
We gladly accept pull requests! Just [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/).
|
127
127
|
|
128
|
-
We do our best to [keep our tests green](https://
|
128
|
+
We do our best to [keep our tests green](https://github.com/ruby-oembed/ruby-oembed/actions/workflows/ruby.yml)
|
129
129
|
|
130
130
|
# Contributors
|
131
131
|
|
@@ -50,6 +50,11 @@ module OEmbed
|
|
50
50
|
self.backend = old_backend
|
51
51
|
end
|
52
52
|
|
53
|
+
def reset_backend
|
54
|
+
@backend = nil
|
55
|
+
remove_instance_variable(:@backend)
|
56
|
+
end
|
57
|
+
|
53
58
|
private
|
54
59
|
|
55
60
|
# Makes sure the given backend can correctly parse values using the decode
|
@@ -108,4 +113,4 @@ module OEmbed
|
|
108
113
|
|
109
114
|
end # SharedMethods
|
110
115
|
end
|
111
|
-
end
|
116
|
+
end
|
@@ -4,10 +4,10 @@ module OEmbed
|
|
4
4
|
module JSON
|
5
5
|
# A Array of all available backends, listed in order of preference.
|
6
6
|
DECODERS = %w(ActiveSupportJSON JSONGem Yaml)
|
7
|
-
|
7
|
+
|
8
8
|
class << self
|
9
9
|
include ::OEmbed::Formatter::Base
|
10
|
-
|
10
|
+
|
11
11
|
# Returns the current JSON backend.
|
12
12
|
def backend
|
13
13
|
set_default_backend unless defined?(@backend)
|
@@ -26,21 +26,21 @@ module OEmbed
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
private
|
31
|
-
|
31
|
+
|
32
32
|
def backend_path
|
33
33
|
'json/backends'
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
36
|
def test_value
|
37
37
|
<<-JSON
|
38
38
|
{"version":"1.0", "string":"test", "int":42,"html":"<i>Cool's</i>\\n the \\"word\\"\\u0021"}
|
39
39
|
JSON
|
40
40
|
end
|
41
|
-
|
41
|
+
|
42
42
|
end # self
|
43
|
-
|
43
|
+
|
44
44
|
end # JSON
|
45
45
|
end
|
46
|
-
end
|
46
|
+
end
|
@@ -5,6 +5,7 @@
|
|
5
5
|
require 'oembed/providers/facebook_post'
|
6
6
|
require 'oembed/providers/facebook_video'
|
7
7
|
require 'oembed/providers/instagram'
|
8
|
+
require 'oembed/providers/matterport'
|
8
9
|
require 'oembed/providers/tiktok'
|
9
10
|
|
10
11
|
module OEmbed
|
@@ -75,6 +76,7 @@ module OEmbed
|
|
75
76
|
# https://dev.twitter.com/rest/reference/get/statuses/oembed
|
76
77
|
Twitter = OEmbed::Provider.new("https://publish.twitter.com/oembed", format: :json)
|
77
78
|
Twitter << "https://*.twitter.com/*/status/*"
|
79
|
+
Twitter << "https://*.x.com/*/status/*"
|
78
80
|
add_official_provider(Twitter)
|
79
81
|
|
80
82
|
# Provider for vine.co
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module OEmbed
|
2
|
+
class Providers
|
3
|
+
# Provider for my.matterport.com
|
4
|
+
Matterport = OEmbed::Provider.new(
|
5
|
+
"https://my.matterport.com/api/v1/models/oembed/",
|
6
|
+
format: :json
|
7
|
+
)
|
8
|
+
Matterport << "https://*.matterport.com/show/*"
|
9
|
+
|
10
|
+
add_official_provider(Matterport)
|
11
|
+
end
|
12
|
+
end
|
data/lib/oembed/version.rb
CHANGED
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.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Magnus Holm
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2024-08-31 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: xml-simple
|
@@ -51,9 +51,8 @@ extra_rdoc_files:
|
|
51
51
|
- CHANGELOG.rdoc
|
52
52
|
- LICENSE
|
53
53
|
files:
|
54
|
-
- ".
|
54
|
+
- ".github/workflows/ruby.yml"
|
55
55
|
- ".gitignore"
|
56
|
-
- ".travis.yml"
|
57
56
|
- ".yardopts"
|
58
57
|
- CHANGELOG.rdoc
|
59
58
|
- Gemfile
|
@@ -84,6 +83,7 @@ files:
|
|
84
83
|
- lib/oembed/providers/facebook_post.rb
|
85
84
|
- lib/oembed/providers/facebook_video.rb
|
86
85
|
- lib/oembed/providers/instagram.rb
|
86
|
+
- lib/oembed/providers/matterport.rb
|
87
87
|
- lib/oembed/providers/tiktok.rb
|
88
88
|
- lib/oembed/response.rb
|
89
89
|
- lib/oembed/response/link.rb
|
@@ -103,7 +103,7 @@ rdoc_options:
|
|
103
103
|
- "--main"
|
104
104
|
- README.rdoc
|
105
105
|
- "--title"
|
106
|
-
- ruby-oembed-0.
|
106
|
+
- ruby-oembed-0.18.0
|
107
107
|
- "--inline-source"
|
108
108
|
- "--exclude"
|
109
109
|
- tasks
|
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
|
-
rubygems_version: 3.
|
124
|
+
rubygems_version: 3.3.3
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: oEmbed for Ruby
|
data/.coveralls.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
service_name: travis-ci
|