blacklight-oembed 0.2.0 → 0.3.0

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
- SHA1:
3
- metadata.gz: c83a7f422815420859e82c0093226852c3b5a64e
4
- data.tar.gz: ae6b4939e1e3b0c014b035790e3900da36c79c16
2
+ SHA256:
3
+ metadata.gz: 4fe96157b6f6dd72911293afced519e74b4c39e7188f79c2c12834364f4e5b18
4
+ data.tar.gz: d6ee6dbba7baa58134947c201f216246b23e197fd78573f6705df9e3608675c3
5
5
  SHA512:
6
- metadata.gz: 54cdaa19c1360b734d11095331ddf6a6b80016caeba9a87c6e2fa85ba4450a3cd3728d16ee41bc414ef7e4b8d4c5479aabb38d46fbeca8f7db7a0e395e531824
7
- data.tar.gz: 2f06ae881e04618a07ccaeb41b455be3f4b729bb60c38ea9fe5125db24ab9172c9771db71937027ff417fbf9e5622115c3a34d0ba086171cbfb652bedc26c316
6
+ metadata.gz: af4c4475ee693b7e3a111137c46bfc38caa484f00bb25e3cf3e1e2a18a47e286c9943fa40f43a786d739241231b7c2210d01feb20af8b2e9c243d904d1a889a3
7
+ data.tar.gz: 207f064e2d30c1fd00d156c10b26387e32f0736e599c17e52a7100aec31b30727fd5969686e93157062ba25c59756ff54291703052612bc350c286777a7ebb57
@@ -2,7 +2,7 @@ notifications:
2
2
  email: false
3
3
 
4
4
  rvm:
5
- - 2.4.2
5
+ - 2.5.3
6
6
 
7
7
  env:
8
8
  global:
@@ -9,7 +9,7 @@ module Blacklight::Oembed
9
9
 
10
10
  def get_embed_content(url, add_params)
11
11
  begin
12
- OEmbed::Providers.get(url, **add_params).html.html_safe
12
+ OEmbed::Providers.get(url, **add_params.transform_values { |v| URI.encode(v) }).html.html_safe
13
13
  rescue OEmbed::NotFound
14
14
  response.status = 400
15
15
  ""
@@ -22,14 +22,14 @@ Gem::Specification.new do |spec|
22
22
  spec.add_dependency "bootstrap-sass", "~> 3.0"
23
23
  spec.add_dependency "ruby-oembed"
24
24
 
25
- spec.add_development_dependency "bundler", "~> 1.5"
25
+ spec.add_development_dependency "bundler", ">= 1.5"
26
26
  spec.add_development_dependency "rake"
27
27
  spec.add_development_dependency "rspec-rails", "~> 3.1"
28
28
  spec.add_development_dependency "rspec-its"
29
29
  spec.add_development_dependency "rspec-activemodel-mocks"
30
30
  spec.add_development_dependency "rspec-collection_matchers"
31
31
  spec.add_development_dependency "solr_wrapper"
32
- spec.add_development_dependency "engine_cart", "~> 0.8"
32
+ spec.add_development_dependency "engine_cart", "~> 2.0"
33
33
  spec.add_development_dependency "capybara"
34
34
  spec.add_development_dependency "poltergeist", ">= 1.5.0"
35
35
  end
@@ -1,5 +1,5 @@
1
1
  module Blacklight
2
2
  module Oembed
3
- VERSION = '0.2.0'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
@@ -308,7 +308,6 @@
308
308
  <analyzer>
309
309
  <tokenizer class="solr.StandardTokenizerFactory"/>
310
310
  <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
311
- <filter class="solr.StandardFilterFactory"/>
312
311
  <filter class="solr.LowerCaseFilterFactory"/>
313
312
  <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
314
313
  </analyzer>
@@ -317,7 +316,6 @@
317
316
  <fieldType class="solr.TextField" name="textSuggest" positionIncrementGap="100">
318
317
  <analyzer>
319
318
  <tokenizer class="solr.KeywordTokenizerFactory"/>
320
- <filter class="solr.StandardFilterFactory"/>
321
319
  <filter class="solr.LowerCaseFilterFactory"/>
322
320
  <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
323
321
  </analyzer>
@@ -8,7 +8,7 @@ describe Blacklight::Oembed::EmbedController do
8
8
 
9
9
  before do
10
10
  Blacklight::Oembed::Engine.config.render_helper = :render_oembed_tag_embed
11
- Blacklight::Oembed::Engine.config.additional_params = [:canvas_index]
11
+ Blacklight::Oembed::Engine.config.additional_params = [:canvas_index, :suggested_search]
12
12
  end
13
13
 
14
14
  let :oembed_obj do
@@ -34,5 +34,11 @@ describe Blacklight::Oembed::EmbedController do
34
34
  get :show, params: { url: 'http://some/uri', canvas_index: '5' }
35
35
  expect(response.status).to eq 200
36
36
  end
37
+
38
+ it 'URI encodes data from additional keys' do
39
+ allow(OEmbed::Providers).to receive(:get).with('http://some/uri', suggested_search: 'ep%C3%A9e').and_return oembed_obj
40
+ get :show, params: { url: 'http://some/uri', suggested_search: 'epée' }
41
+ expect(response.status).to eq 200
42
+ end
37
43
  end
38
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-oembed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-05 00:00:00.000000000 Z
11
+ date: 2019-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -76,14 +76,14 @@ dependencies:
76
76
  name: bundler
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - "~>"
79
+ - - ">="
80
80
  - !ruby/object:Gem::Version
81
81
  version: '1.5'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - "~>"
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: '1.5'
89
89
  - !ruby/object:Gem::Dependency
@@ -176,14 +176,14 @@ dependencies:
176
176
  requirements:
177
177
  - - "~>"
178
178
  - !ruby/object:Gem::Version
179
- version: '0.8'
179
+ version: '2.0'
180
180
  type: :development
181
181
  prerelease: false
182
182
  version_requirements: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - "~>"
185
185
  - !ruby/object:Gem::Version
186
- version: '0.8'
186
+ version: '2.0'
187
187
  - !ruby/object:Gem::Dependency
188
188
  name: capybara
189
189
  requirement: !ruby/object:Gem::Requirement
@@ -280,8 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
280
280
  - !ruby/object:Gem::Version
281
281
  version: '0'
282
282
  requirements: []
283
- rubyforge_project:
284
- rubygems_version: 2.6.14
283
+ rubygems_version: 3.0.3
285
284
  signing_key:
286
285
  specification_version: 4
287
286
  summary: Oembed display for Blacklight