oembed_proxy 0.1.1 → 0.1.2

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
- SHA256:
3
- metadata.gz: f3acdba9c57aea0439314dad83fbfc748599761d8d62e9f4d4307868c465fa53
4
- data.tar.gz: 90ad161b2bdffeaa2eac32d16f16d234f8fa9ca5c847f8133e9c48f8bdb3e547
2
+ SHA1:
3
+ metadata.gz: dce3a35ae294f0038a42c0ac8fa78a42d0810789
4
+ data.tar.gz: 2c35584063b4311a23bd0f0cd0879215d94d5920
5
5
  SHA512:
6
- metadata.gz: 53148ae8e7de2e44bce008b73b4981ddf35a8d4ad6a906608bcc50b6e2c5e9b91e42d893371c79448dd5398cd8fb13896eb82bcfc47df15ca34ae1bb50e9e2c7
7
- data.tar.gz: 2897c2303c3d0c2fe7822c1a62fd99538cd6e5130a03a1ae9ef722463e2c7c3cfc51fe84247f74427c418312700375742276804adc452fbaf73c5a75be009f6e
6
+ metadata.gz: 3a6237bb8137a38938d6efea1275860011464c643726cd7e39118d774f430ce6ddb252cf2cba41ee645159b664b98a41b5964cfc0665f72cbf39ae379d785088
7
+ data.tar.gz: 7040ee255130612f9fecb5da7f5075d5efb3579f13c952bd2c3dba88475e8422574a9c4e9bc6c67f01445c523195805483779d6224349c6fedd89754b48d4233
data/.rubocop.yml CHANGED
@@ -9,7 +9,9 @@ Metrics/LineLength:
9
9
  Metrics/BlockLength:
10
10
  Exclude:
11
11
  - 'spec/**/*'
12
- Style/TrailingCommaInLiteral:
12
+ Style/TrailingCommaInArrayLiteral:
13
+ EnforcedStyleForMultiline: comma
14
+ Style/TrailingCommaInHashLiteral:
13
15
  EnforcedStyleForMultiline: comma
14
16
  Style/RescueStandardError:
15
17
  EnforcedStyle: implicit
data/.travis.yml CHANGED
@@ -4,7 +4,7 @@ rvm:
4
4
  - 2.5
5
5
  - 2.4
6
6
  - 2.3
7
- before_install: gem install bundler -v 1.16.0
7
+ before_install: gem install bundler
8
8
  script:
9
9
  - 'bin/rspec'
10
10
  - 'bin/rubocop'
data/CHANGELOG.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # oEmbed Proxy Changelog
2
2
 
3
- ## [master]
3
+ ## [`0.1.2`] (2018-03-29)
4
4
 
5
- [master]: https://github.com/APMG/oembed_proxy/compare/v0.1.1...HEAD
5
+ [`0.1.2`]: https://github.com/APMG/oembed_proxy/compare/v0.1.0...v0.1.2
6
6
 
7
- * Your change here!
7
+ * Add support for Radio Public by adding it to the embed.ly providers list.
8
8
 
9
9
  ## [`0.1.1`] (2018-02-27)
10
10
 
11
- [master]: https://github.com/APMG/oembed_proxy/compare/v0.1.0...v0.1.1
11
+ [`0.1.1`]: https://github.com/APMG/oembed_proxy/compare/v0.1.0...v0.1.1
12
12
 
13
13
  * Fix file references for first party and embedly providers.
14
14
 
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ source 'https://rubygems.org'
5
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
 
7
7
  group :development do
8
- gem 'rubocop'
8
+ gem 'rubocop', '~> 0.54.0'
9
9
  end
10
10
 
11
11
  group :test do
data/README.md CHANGED
@@ -87,6 +87,10 @@ handler.register OembedProxy::AssociatedPress.new
87
87
 
88
88
  Once providers have been registered, calling `#handles_url?` and `#get_data` on the handler will operate on the composition of the registered providers.
89
89
 
90
+ ### Using existing embed.ly providers
91
+
92
+ [Embed.ly](http://embed.ly/) supports more than 400 content providers. Be sure to check the [embed.ly providers list](http://embed.ly/providers) prior to implementing your own custom provider. If your desired provider is already supported, simply add its URL to the bottom of the existing list `/lib/providers/embedly_patterns.def`.
93
+
90
94
  ### Implementing your own providers
91
95
 
92
96
  You are able to easily implement additional providers by creating an object which implements the `#handles_url?(url)` and `#get_data(url, other_params)` methods. Take a look at the existing provider classes for examples.
@@ -13,7 +13,7 @@ module OembedProxy
13
13
  @pattern_hash = {}
14
14
  @embedly_key = embedly_key
15
15
 
16
- File.open(File.expand_path('../../providers/embedly_patterns.def', __FILE__), 'r') do |f|
16
+ File.open(File.expand_path('../providers/embedly_patterns.def', __dir__), 'r') do |f|
17
17
  f.each do |line|
18
18
  regex = Utility.clean_pattern(line)
19
19
  @pattern_hash[regex] = EMBEDLY_URL
@@ -17,7 +17,7 @@ module OembedProxy
17
17
  # Import the expected first party providers.
18
18
  @pattern_hash = {}
19
19
 
20
- yaml_hash = YAML.load_file(File.expand_path('../../providers/first_party.yml', __FILE__))
20
+ yaml_hash = YAML.load_file(File.expand_path('../providers/first_party.yml', __dir__))
21
21
  yaml_hash.each_value do |hsh|
22
22
  hsh['pattern_list'].each do |pattern|
23
23
  regex = Utility.clean_pattern(pattern)
@@ -72,7 +72,7 @@ module OembedProxy
72
72
  raise OembedException, (ERROR_CLASS_MAPPING[res.class] || "Unknown response: #{res.class}")
73
73
  end
74
74
  rescue JSON::ParserError
75
- return nil
75
+ return nil # rubocop:disable Style/RedundantReturn
76
76
  end
77
77
 
78
78
  def request_builder(uri)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OembedProxy
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
@@ -645,3 +645,4 @@
645
645
  #\Ahttp://video\.foxnews\.com/v/.*#i
646
646
  #\Ahttp://video\.foxbusiness\.com/v/.*#i
647
647
  #\Ahttp://bcove.me/.*#i
648
+ #\Ahttps://play\.radiopublic\.com/.*#i
data/oembed_proxy.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  # frozen_string_literal: true
3
3
 
4
- lib = File.expand_path('../lib', __FILE__)
4
+ lib = File.expand_path('lib', __dir__)
5
5
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
6
  require 'oembed_proxy/version'
7
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oembed_proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Johnston
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-27 00:00:00.000000000 Z
11
+ date: 2018-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.7.6
112
+ rubygems_version: 2.6.14
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: Simple library to manage first party, embedly, and custom oembeds