blacklight-oembed 0.1.0 → 0.2.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.
@@ -8,24 +8,31 @@ 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
12
  end
12
13
 
13
14
  let :oembed_obj do
14
15
  double(html: "some-markup")
15
16
  end
16
17
 
17
- it "should fetch oembed markup for a url" do
18
- allow(OEmbed::Providers).to receive(:get).with('http://some/uri').and_return oembed_obj
19
- get :show, url: 'http://some/uri'
18
+ it "fetches oembed markup for a url" do
19
+ allow(OEmbed::Providers).to receive(:get).with('http://some/uri', {}).and_return oembed_obj
20
+ get :show, params: { url: 'http://some/uri' }
20
21
  json = JSON.parse(response.body)
21
22
  expect(json["html"]).to eq "some-markup"
22
23
  end
23
24
 
24
- it "should gracefully fail to a view link" do
25
- get :show, url: 'http://some/uri'
25
+ it "gracefully fails to a view link" do
26
+ get :show, params: { url: 'http://some/uri' }
26
27
  expect(response.status).to eq 400
27
28
  json = JSON.parse(response.body)
28
29
  expect(json["html"]).to be_blank
29
30
  end
31
+
32
+ it 'passes along configured additional keys' do
33
+ allow(OEmbed::Providers).to receive(:get).with('http://some/uri', canvas_index: '5').and_return oembed_obj
34
+ get :show, params: { url: 'http://some/uri', canvas_index: '5' }
35
+ expect(response.status).to eq 200
36
+ end
30
37
  end
31
- end
38
+ 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.1.0
4
+ version: 0.2.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: 2016-01-21 00:00:00.000000000 Z
11
+ date: 2017-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -157,7 +157,7 @@ dependencies:
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
159
  - !ruby/object:Gem::Dependency
160
- name: jettywrapper
160
+ name: solr_wrapper
161
161
  requirement: !ruby/object:Gem::Requirement
162
162
  requirements:
163
163
  - - ">="
@@ -240,6 +240,23 @@ files:
240
240
  - lib/generators/blacklight_oembed/templates/blacklight_oembed.css.scss
241
241
  - lib/generators/blacklight_oembed/templates/blacklight_oembed.js
242
242
  - lib/generators/blacklight_oembed/templates/oembed_providers.rb
243
+ - solr/conf/_rest_managed.json
244
+ - solr/conf/admin-extra.html
245
+ - solr/conf/elevate.xml
246
+ - solr/conf/mapping-ISOLatin1Accent.txt
247
+ - solr/conf/protwords.txt
248
+ - solr/conf/schema.xml
249
+ - solr/conf/scripts.conf
250
+ - solr/conf/solrconfig.xml
251
+ - solr/conf/spellings.txt
252
+ - solr/conf/stopwords.txt
253
+ - solr/conf/stopwords_en.txt
254
+ - solr/conf/synonyms.txt
255
+ - solr/conf/xslt/example.xsl
256
+ - solr/conf/xslt/example_atom.xsl
257
+ - solr/conf/xslt/example_rss.xsl
258
+ - solr/conf/xslt/luke.xsl
259
+ - solr/sample_solr_documents.yml
243
260
  - spec/controllers/embed_controller_spec.rb
244
261
  - spec/helpers/oembed_helper_spec.rb
245
262
  - spec/spec_helper.rb
@@ -264,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
264
281
  version: '0'
265
282
  requirements: []
266
283
  rubyforge_project:
267
- rubygems_version: 2.4.5.1
284
+ rubygems_version: 2.6.14
268
285
  signing_key:
269
286
  specification_version: 4
270
287
  summary: Oembed display for Blacklight