blacklight-oembed 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -2
- data/.travis.yml +1 -1
- data/README.md +8 -0
- data/Rakefile +8 -18
- data/app/controllers/blacklight/oembed/embed_controller.rb +14 -4
- data/blacklight-oembed.gemspec +1 -1
- data/lib/blacklight/oembed/engine.rb +4 -0
- data/lib/blacklight/oembed/version.rb +1 -1
- data/solr/conf/_rest_managed.json +3 -0
- data/solr/conf/admin-extra.html +31 -0
- data/solr/conf/elevate.xml +36 -0
- data/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/solr/conf/protwords.txt +21 -0
- data/solr/conf/schema.xml +629 -0
- data/solr/conf/scripts.conf +24 -0
- data/solr/conf/solrconfig.xml +401 -0
- data/solr/conf/spellings.txt +2 -0
- data/solr/conf/stopwords.txt +58 -0
- data/solr/conf/stopwords_en.txt +58 -0
- data/solr/conf/synonyms.txt +31 -0
- data/solr/conf/xslt/example.xsl +132 -0
- data/solr/conf/xslt/example_atom.xsl +67 -0
- data/solr/conf/xslt/example_rss.xsl +66 -0
- data/solr/conf/xslt/luke.xsl +337 -0
- data/solr/sample_solr_documents.yml +2692 -0
- data/spec/controllers/embed_controller_spec.rb +13 -6
- metadata +21 -4
@@ -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 "
|
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 "
|
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.
|
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:
|
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:
|
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.
|
284
|
+
rubygems_version: 2.6.14
|
268
285
|
signing_key:
|
269
286
|
specification_version: 4
|
270
287
|
summary: Oembed display for Blacklight
|