ruby-oembed 0.16.1 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +38 -0
- data/CHANGELOG.rdoc +7 -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 +1 -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: 1069e6bb460642bffc61ef34c7fed08f099a0549ddfe3c56e6ad625c7037b2ea
|
4
|
+
data.tar.gz: 903a06ee3df23939394d9479c0ebe487c3d9c15becbae332a9929a81b7a323dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddae8f1d85297a686fa368af3fa64e9c58f78bbfdb6c83cf7aa52f3e6fcaaa6d44dd6a1d24a93925e29ff802895ae7399e8591d408a9c089967402e890568d38
|
7
|
+
data.tar.gz: 198299b6e80a9e6723b5f72a12015bac7ea488075a3c27c457a87230c18882ab3dfc4371ea34201f192070e747f83d53237fd0c4ff55f3e5bb85ecb8a6a72c08
|
@@ -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,12 @@
|
|
1
1
|
= CHANGELOG
|
2
2
|
|
3
|
-
== Unreleased (0.
|
3
|
+
== Unreleased (0.17.1)
|
4
|
+
|
5
|
+
== 0.17.0 - 25 February 2024
|
6
|
+
|
7
|
+
* Add a built-in Matterport provider; Pull #93 (Nathan Papes)
|
8
|
+
* Updated tests to run with Ruby 2.6, 3.0, & 3.2
|
9
|
+
* Switched to using GitHub Actions for CI instead of Travis CI
|
4
10
|
|
5
11
|
== 0.16.1 - 13 January 2022
|
6
12
|
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# ruby-oembed
|
2
2
|
|
3
3
|
[![Gem](https://img.shields.io/gem/v/ruby-oembed.svg)](https://rubygems.org/gems/ruby-oembed)
|
4
|
-
[![
|
4
|
+
[![Test Coverage](https://github.com/ruby-oembed/ruby-oembed/actions/workflows/ruby.yml/badge.svg)](https://github.com/ruby-oembed/ruby-oembed/actions/workflows/ruby.yml)
|
5
5
|
[![Code Climate](https://img.shields.io/codeclimate/maintainability/ruby-oembed/ruby-oembed.svg)](https://codeclimate.com/github/ruby-oembed/ruby-oembed)
|
6
6
|
[![Coveralls](https://coveralls.io/repos/github/ruby-oembed/ruby-oembed/badge.svg?branch=coveralls)](https://coveralls.io/github/ruby-oembed/ruby-oembed?branch=coveralls)
|
7
|
-
![Maintenance](https://img.shields.io/maintenance/yes/
|
7
|
+
![Maintenance](https://img.shields.io/maintenance/yes/2024.svg)
|
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
|
@@ -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.17.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-02-25 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.17.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
|