Skip to content

Commit f4d05d9

Browse files
committed
Use QA linked data authorities for agrovoc keywords and oclc organizations
* use linked_data branch of QA gem * use linkeddata gem (dev and test only) * add app/views/records/edit_fields for both properties to use autocomplete Test * add a demo work -- Works -> New Work * type cornell in OCLC field (confirm an autocomplete list is shown below the field) * type milk in Agrovoc field (confirm an autocomplete list is shown below the field) * type lait in Agrovoc (French) field (confirm an autocomplete list is shown below the field) * complete rest of required metadata and add a file * save * confirm that selected values are in the controlled properties on the show page
1 parent 27e234f commit f4d05d9

File tree

5 files changed

+116
-9
lines changed

5 files changed

+116
-9
lines changed

Gemfile

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ git_source(:github) do |repo_name|
55
"https://github.com/#{repo_name}.git"
66
end
77

8+
gem 'qa', github: 'projecthydra-labs/questioning_authority', branch: 'linked_data'
9+
group :development, :test do
10+
gem 'linkeddata'
11+
end
812

913
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
1014
gem 'rails', '~> 5.0.2'

Gemfile.lock

+88-9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
GIT
2+
remote: https://github.com/projecthydra-labs/questioning_authority.git
3+
revision: 0e04aa482ac188594fc4daee31fb81d77744ab76
4+
branch: linked_data
5+
specs:
6+
qa (1.0.0)
7+
activerecord-import
8+
deprecation
9+
faraday
10+
nokogiri (~> 1.6)
11+
rails (>= 4.2.0, < 6.0)
12+
rdf (= 2.2.3)
13+
114
GEM
215
remote: https://rubygems.org/
316
specs:
@@ -81,6 +94,8 @@ GEM
8194
babel-transpiler (0.7.0)
8295
babel-source (>= 4.0, < 6)
8396
execjs (~> 2.0)
97+
bcp47 (0.3.3)
98+
i18n
8499
bcrypt (3.1.11)
85100
blacklight (6.7.3)
86101
bootstrap-sass (~> 3.2)
@@ -140,7 +155,7 @@ GEM
140155
declarative-option (0.1.0)
141156
deprecation (1.0.0)
142157
activesupport
143-
devise (4.2.0)
158+
devise (4.2.1)
144159
bcrypt (~> 3.0)
145160
orm_adapter (~> 0.1)
146161
railties (>= 4.1.0, < 5.1)
@@ -186,6 +201,8 @@ GEM
186201
ebnf (1.1.0)
187202
rdf (~> 2.0)
188203
sxp (~> 1.0)
204+
equivalent-xml (0.6.0)
205+
nokogiri (>= 1.4.3)
189206
erubis (2.7.0)
190207
execjs (2.7.0)
191208
faraday (0.11.0)
@@ -358,6 +375,12 @@ GEM
358375
kaminari-core (1.0.1)
359376
kaminari_route_prefix (0.1.1)
360377
kaminari (~> 1.0)
378+
ld-patch (0.3.1)
379+
ebnf (~> 1.0, >= 1.0.1)
380+
rdf (~> 2.0)
381+
rdf-xsd (~> 2.0)
382+
sparql (~> 2.0)
383+
sxp (~> 1.0)
361384
ldp (0.6.4)
362385
deprecation
363386
faraday
@@ -371,6 +394,28 @@ GEM
371394
legato (0.7.0)
372395
multi_json
373396
link_header (0.0.8)
397+
linkeddata (2.2.0)
398+
equivalent-xml (~> 0.6)
399+
json-ld (~> 2.1)
400+
ld-patch (~> 0.3)
401+
nokogiri (~> 1.7)
402+
rdf (~> 2.2)
403+
rdf-aggregate-repo (~> 2.1)
404+
rdf-isomorphic (~> 2.0)
405+
rdf-json (~> 2.0)
406+
rdf-microdata (~> 2.1)
407+
rdf-n3 (~> 2.1)
408+
rdf-rdfa (~> 2.1)
409+
rdf-rdfxml (~> 2.0)
410+
rdf-reasoner (~> 0.4)
411+
rdf-tabular (~> 2.2)
412+
rdf-trig (~> 2.0)
413+
rdf-trix (~> 2.0)
414+
rdf-turtle (~> 2.2)
415+
rdf-vocab (~> 2.1)
416+
rdf-xsd (~> 2.1)
417+
sparql (~> 2.1)
418+
sparql-client (~> 2.1)
374419
listen (3.0.8)
375420
rb-fsevent (~> 0.9, >= 0.9.4)
376421
rb-inotify (~> 0.9, >= 0.9.7)
@@ -399,6 +444,7 @@ GEM
399444
multipart-post (2.0.0)
400445
nest (2.1.0)
401446
redic
447+
net-http-persistent (2.9.4)
402448
nio4r (2.0.0)
403449
noid (0.9.0)
404450
nokogiri (1.7.1)
@@ -423,12 +469,6 @@ GEM
423469
power_converter (0.1.2)
424470
public_suffix (2.0.5)
425471
puma (3.8.2)
426-
qa (1.0.0)
427-
activerecord-import
428-
deprecation
429-
faraday
430-
nokogiri (~> 1.6)
431-
rails (>= 4.2.0, < 6.0)
432472
rack (2.0.1)
433473
rack-test (0.6.3)
434474
rack (>= 1.0)
@@ -461,13 +501,22 @@ GEM
461501
rb-fsevent (0.9.8)
462502
rb-inotify (0.9.8)
463503
ffi (>= 0.5.0)
464-
rdf (2.2.5)
504+
rdf (2.2.3)
465505
hamster (~> 3.0)
466506
link_header (~> 0.0, >= 0.0.8)
467507
rdf-aggregate-repo (2.1.0)
468508
rdf (~> 2.0)
469509
rdf-isomorphic (2.0.0)
470510
rdf (~> 2.0)
511+
rdf-json (2.0.0)
512+
rdf (~> 2.0)
513+
rdf-microdata (2.1.0)
514+
htmlentities (~> 4.3)
515+
nokogiri (~> 1.6)
516+
rdf (~> 2.0)
517+
rdf-xsd (~> 2.0)
518+
rdf-n3 (2.1.0)
519+
rdf (~> 2.0)
471520
rdf-rdfa (2.1.1)
472521
haml (~> 4.0)
473522
htmlentities (~> 4.3)
@@ -479,6 +528,23 @@ GEM
479528
rdf (~> 2.0)
480529
rdf-rdfa (~> 2.0)
481530
rdf-xsd (~> 2.0)
531+
rdf-reasoner (0.4.2)
532+
rdf (~> 2.2)
533+
rdf-vocab (~> 2.2)
534+
rdf-xsd (~> 2.1)
535+
rdf-tabular (2.2.0)
536+
addressable (~> 2.3)
537+
bcp47 (~> 0.3, >= 0.3.3)
538+
json-ld (~> 2.0)
539+
rdf (~> 2.1)
540+
rdf-vocab (~> 2.0)
541+
rdf-xsd (~> 2.0)
542+
rdf-trig (2.0.0)
543+
ebnf (~> 1.0, >= 1.0.1)
544+
rdf (~> 2.0)
545+
rdf-turtle (~> 2.0)
546+
rdf-trix (2.0.0)
547+
rdf (~> 2.0)
482548
rdf-turtle (2.2.0)
483549
ebnf (~> 1.1)
484550
rdf (~> 2.2)
@@ -549,7 +615,7 @@ GEM
549615
httparty (>= 0.11.0)
550616
oauth2 (>= 0.9.2)
551617
slop (4.4.1)
552-
solr_wrapper (0.21.0)
618+
solr_wrapper (0.22.0)
553619
faraday
554620
ruby-progressbar
555621
rubyzip
@@ -559,6 +625,17 @@ GEM
559625
nokogiri
560626
stomp
561627
xml-simple
628+
sparql (2.2.0)
629+
builder (~> 3.2)
630+
ebnf (~> 1.1)
631+
rdf (~> 2.1)
632+
rdf-aggregate-repo (~> 2.0)
633+
rdf-xsd (~> 2.1)
634+
sparql-client (~> 2.0)
635+
sxp (~> 1.0)
636+
sparql-client (2.1.0)
637+
net-http-persistent (~> 2.9)
638+
rdf (~> 2.0)
562639
spring (2.0.1)
563640
activesupport (>= 4.2)
564641
spring-watcher-listen (2.0.1)
@@ -626,8 +703,10 @@ DEPENDENCIES
626703
hyrax (= 1.0.0.rc1)
627704
jbuilder (~> 2.5)
628705
jquery-rails
706+
linkeddata
629707
listen (~> 3.0.5)
630708
puma (~> 3.0)
709+
qa!
631710
rails (~> 5.0.2)
632711
rsolr (~> 1.0)
633712
rspec-rails
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<%= f.input key,
2+
as: :multi_value,
3+
input_html: {
4+
class: 'form-control',
5+
data: { 'autocomplete-url' => '/authorities/search/linked_data/agrovoc?q=',
6+
'autocomplete' => key }
7+
},
8+
required: f.object.required?(key) %>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<%= f.input key,
2+
as: :multi_value,
3+
input_html: {
4+
class: 'form-control',
5+
data: { 'autocomplete-url' => '/authorities/search/linked_data/agrovoc?lang=fr&q=',
6+
'autocomplete' => key }
7+
},
8+
required: f.object.required?(key) %>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<%= f.input key,
2+
as: :multi_value,
3+
input_html: {
4+
class: 'form-control',
5+
data: { 'autocomplete-url' => "/authorities/search/linked_data/oclc_fast/corporate_name?maximumRecords=10&q=",
6+
'autocomplete' => key }
7+
},
8+
required: f.object.required?(key) %>

0 commit comments

Comments
 (0)