qa 3.1.0 → 4.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +16 -548
- data/app/controllers/qa/linked_data_terms_controller.rb +64 -42
- data/app/controllers/qa/terms_controller.rb +14 -6
- data/app/models/qa/iri_template/url_config.rb +47 -0
- data/app/models/qa/iri_template/variable_map.rb +62 -0
- data/app/models/qa/linked_data/config/context_map.rb +77 -0
- data/app/models/qa/linked_data/config/context_property_map.rb +144 -0
- data/app/models/qa/linked_data/config/helper.rb +34 -0
- data/app/services/qa/iri_template_service.rb +31 -0
- data/{lib/qa/authorities → app/services/qa}/linked_data/authority_service.rb +3 -4
- data/app/services/qa/linked_data/authority_url_service.rb +48 -0
- data/app/services/qa/linked_data/deep_sort_service.rb +238 -0
- data/app/services/qa/linked_data/graph_service.rb +106 -0
- data/app/services/qa/linked_data/language_service.rb +30 -0
- data/app/services/qa/linked_data/language_sort_service.rb +81 -0
- data/app/services/qa/linked_data/mapper/context_mapper_service.rb +59 -0
- data/app/services/qa/linked_data/mapper/graph_mapper_service.rb +40 -0
- data/app/services/qa/linked_data/mapper/search_results_mapper_service.rb +70 -0
- data/config/authorities/linked_data/loc.json +5 -2
- data/config/authorities/linked_data/oclc_fast.json +3 -2
- data/config/initializers/linked_data_authorities.rb +1 -1
- data/config/locales/qa.en.yml +9 -0
- data/lib/generators/qa/install/templates/config/initializers/qa.rb +4 -0
- data/lib/qa.rb +8 -0
- data/lib/qa/authorities/assign_fast/generic_authority.rb +1 -1
- data/lib/qa/authorities/base.rb +0 -11
- data/lib/qa/authorities/crossref/generic_authority.rb +1 -1
- data/lib/qa/authorities/geonames.rb +1 -1
- data/lib/qa/authorities/getty/aat.rb +7 -2
- data/lib/qa/authorities/getty/tgn.rb +7 -2
- data/lib/qa/authorities/getty/ulan.rb +7 -2
- data/lib/qa/authorities/linked_data.rb +0 -1
- data/lib/qa/authorities/linked_data/config.rb +29 -28
- data/lib/qa/authorities/linked_data/config/search_config.rb +21 -79
- data/lib/qa/authorities/linked_data/config/term_config.rb +7 -77
- data/lib/qa/authorities/linked_data/find_term.rb +25 -17
- data/lib/qa/authorities/linked_data/generic_authority.rb +6 -5
- data/lib/qa/authorities/linked_data/rdf_helper.rb +6 -73
- data/lib/qa/authorities/linked_data/search_query.rb +54 -101
- data/lib/qa/authorities/loc/generic_authority.rb +4 -4
- data/lib/qa/authorities/web_service_base.rb +1 -8
- data/lib/qa/configuration.rb +7 -0
- data/lib/qa/version.rb +1 -1
- data/lib/tasks/mesh.rake +19 -18
- data/spec/controllers/linked_data_terms_controller_spec.rb +51 -1
- data/spec/controllers/terms_controller_spec.rb +15 -15
- data/spec/fixtures/authorities/linked_data/lod_encoding_config.json +2 -1
- data/spec/fixtures/authorities/linked_data/lod_full_config.json +56 -2
- data/spec/fixtures/authorities/linked_data/lod_full_config_1_0.json +164 -0
- data/spec/fixtures/authorities/linked_data/lod_lang_defaults.json +5 -4
- data/spec/fixtures/authorities/linked_data/lod_lang_multi_defaults.json +3 -2
- data/spec/fixtures/authorities/linked_data/lod_lang_no_defaults.json +3 -2
- data/spec/fixtures/authorities/linked_data/lod_lang_param.json +3 -2
- data/spec/fixtures/authorities/linked_data/lod_min_config.json +3 -2
- data/spec/fixtures/authorities/linked_data/lod_search_only_config.json +2 -1
- data/spec/fixtures/authorities/linked_data/lod_sort.json +2 -1
- data/spec/fixtures/authorities/linked_data/lod_term_id_param_config.json +2 -1
- data/spec/fixtures/authorities/linked_data/lod_term_only_config.json +2 -1
- data/spec/fixtures/authorities/linked_data/lod_term_uri_param_config.json +2 -1
- data/spec/fixtures/getty-error-response.txt +10 -0
- data/spec/fixtures/lod_2_ranked_2_unranked.nt +17 -0
- data/spec/fixtures/lod_3_ranked_varying_preds.nt +16 -0
- data/spec/fixtures/lod_lang_search_filtering.nt +11 -0
- data/spec/fixtures/lod_search_with_blanknode_subjects.nt +18 -0
- data/spec/fixtures/lod_term_with_blanknode_objects.nt +8 -0
- data/spec/lib/authorities/assign_fast_spec.rb +1 -0
- data/spec/lib/authorities/getty/aat_spec.rb +14 -2
- data/spec/lib/authorities/getty/tgn_spec.rb +14 -2
- data/spec/lib/authorities/getty/ulan_spec.rb +14 -2
- data/spec/lib/authorities/linked_data/authority_service_spec.rb +2 -1
- data/spec/lib/authorities/linked_data/config_spec.rb +284 -5
- data/spec/lib/authorities/linked_data/find_term_spec.rb +3 -1
- data/spec/lib/authorities/linked_data/generic_authority_spec.rb +92 -42
- data/spec/lib/authorities/linked_data/search_config_spec.rb +67 -160
- data/spec/lib/authorities/linked_data/search_query_spec.rb +3 -127
- data/spec/lib/authorities/linked_data/term_config_spec.rb +6 -134
- data/spec/lib/authorities/loc_spec.rb +9 -9
- data/spec/lib/configuration_spec.rb +20 -7
- data/spec/lib/tasks/mesh.rake_spec.rb +2 -2
- data/spec/models/iri_template/url_config_spec.rb +102 -0
- data/spec/models/iri_template/variable_map_spec.rb +105 -0
- data/spec/models/linked_data/config/context_map_spec.rb +148 -0
- data/spec/models/linked_data/config/context_property_map_spec.rb +286 -0
- data/spec/services/iri_template_service_spec.rb +69 -0
- data/spec/services/linked_data/authority_url_service_spec.rb +107 -0
- data/spec/services/linked_data/deep_sort_service_spec.rb +260 -0
- data/spec/services/linked_data/graph_service_spec.rb +232 -0
- data/spec/services/linked_data/language_service_spec.rb +66 -0
- data/spec/services/linked_data/language_sort_service_spec.rb +58 -0
- data/spec/services/linked_data/mapper/context_mapper_service_spec.rb +137 -0
- data/spec/services/linked_data/mapper/graph_mapper_service_spec.rb +110 -0
- data/spec/services/linked_data/mapper/search_results_mapper_service_spec.rb +109 -0
- data/spec/spec_helper.rb +10 -2
- metadata +81 -11
data/spec/spec_helper.rb
CHANGED
@@ -8,8 +8,16 @@ require 'byebug' unless ENV['TRAVIS']
|
|
8
8
|
ENV["RAILS_ENV"] ||= "test"
|
9
9
|
|
10
10
|
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
|
11
|
-
SimpleCov.start
|
12
|
-
|
11
|
+
SimpleCov.start('rails') do
|
12
|
+
add_filter '/.internal_test_app'
|
13
|
+
add_filter '/lib/generators'
|
14
|
+
add_filter '/spec'
|
15
|
+
add_filter '/tasks'
|
16
|
+
add_filter '/lib/qa/version.rb'
|
17
|
+
add_filter '/lib/qa/engine.rb'
|
18
|
+
end
|
19
|
+
SimpleCov.command_name 'spec'
|
20
|
+
|
13
21
|
EngineCart.load_application!
|
14
22
|
Coveralls.wear!
|
15
23
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Anderson
|
@@ -13,10 +13,10 @@ authors:
|
|
13
13
|
- Mike Stroming
|
14
14
|
- Adam Wead
|
15
15
|
- E. Lynette Rayle
|
16
|
-
autorequire:
|
16
|
+
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date:
|
19
|
+
date: 2019-03-08 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: activerecord-import
|
@@ -60,6 +60,20 @@ dependencies:
|
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: ldpath
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
63
77
|
- !ruby/object:Gem::Dependency
|
64
78
|
name: nokogiri
|
65
79
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,14 +150,14 @@ dependencies:
|
|
136
150
|
requirements:
|
137
151
|
- - "~>"
|
138
152
|
- !ruby/object:Gem::Version
|
139
|
-
version: '0
|
153
|
+
version: '2.0'
|
140
154
|
type: :development
|
141
155
|
prerelease: false
|
142
156
|
version_requirements: !ruby/object:Gem::Requirement
|
143
157
|
requirements:
|
144
158
|
- - "~>"
|
145
159
|
- !ruby/object:Gem::Version
|
146
|
-
version: '0
|
160
|
+
version: '2.0'
|
147
161
|
- !ruby/object:Gem::Dependency
|
148
162
|
name: linkeddata
|
149
163
|
requirement: !ruby/object:Gem::Requirement
|
@@ -273,8 +287,23 @@ files:
|
|
273
287
|
- app/controllers/qa/linked_data_terms_controller.rb
|
274
288
|
- app/controllers/qa/terms_controller.rb
|
275
289
|
- app/helpers/qa/application_helper.rb
|
290
|
+
- app/models/qa/iri_template/url_config.rb
|
291
|
+
- app/models/qa/iri_template/variable_map.rb
|
292
|
+
- app/models/qa/linked_data/config/context_map.rb
|
293
|
+
- app/models/qa/linked_data/config/context_property_map.rb
|
294
|
+
- app/models/qa/linked_data/config/helper.rb
|
276
295
|
- app/models/qa/mesh_tree.rb
|
277
296
|
- app/models/qa/subject_mesh_term.rb
|
297
|
+
- app/services/qa/iri_template_service.rb
|
298
|
+
- app/services/qa/linked_data/authority_service.rb
|
299
|
+
- app/services/qa/linked_data/authority_url_service.rb
|
300
|
+
- app/services/qa/linked_data/deep_sort_service.rb
|
301
|
+
- app/services/qa/linked_data/graph_service.rb
|
302
|
+
- app/services/qa/linked_data/language_service.rb
|
303
|
+
- app/services/qa/linked_data/language_sort_service.rb
|
304
|
+
- app/services/qa/linked_data/mapper/context_mapper_service.rb
|
305
|
+
- app/services/qa/linked_data/mapper/graph_mapper_service.rb
|
306
|
+
- app/services/qa/linked_data/mapper/search_results_mapper_service.rb
|
278
307
|
- app/views/layouts/qa/application.html.erb
|
279
308
|
- config/authorities.yml
|
280
309
|
- config/authorities/linked_data/loc.json
|
@@ -282,6 +311,7 @@ files:
|
|
282
311
|
- config/authorities/states.yml
|
283
312
|
- config/initializers/authorities.rb
|
284
313
|
- config/initializers/linked_data_authorities.rb
|
314
|
+
- config/locales/qa.en.yml
|
285
315
|
- config/oclcts-authorities.yml
|
286
316
|
- config/routes.rb
|
287
317
|
- db/migrate/20130917200611_create_qa_subject_mesh_terms.rb
|
@@ -329,7 +359,6 @@ files:
|
|
329
359
|
- lib/qa/authorities/getty/tgn.rb
|
330
360
|
- lib/qa/authorities/getty/ulan.rb
|
331
361
|
- lib/qa/authorities/linked_data.rb
|
332
|
-
- lib/qa/authorities/linked_data/authority_service.rb
|
333
362
|
- lib/qa/authorities/linked_data/config.rb
|
334
363
|
- lib/qa/authorities/linked_data/config/search_config.rb
|
335
364
|
- lib/qa/authorities/linked_data/config/term_config.rb
|
@@ -374,6 +403,7 @@ files:
|
|
374
403
|
- spec/fixtures/authorities/authority_D.yml
|
375
404
|
- spec/fixtures/authorities/linked_data/lod_encoding_config.json
|
376
405
|
- spec/fixtures/authorities/linked_data/lod_full_config.json
|
406
|
+
- spec/fixtures/authorities/linked_data/lod_full_config_1_0.json
|
377
407
|
- spec/fixtures/authorities/linked_data/lod_lang_defaults.json
|
378
408
|
- spec/fixtures/authorities/linked_data/lod_lang_multi_defaults.json
|
379
409
|
- spec/fixtures/authorities/linked_data/lod_lang_no_defaults.json
|
@@ -391,6 +421,7 @@ files:
|
|
391
421
|
- spec/fixtures/geonames-find-response.json
|
392
422
|
- spec/fixtures/geonames-response.json
|
393
423
|
- spec/fixtures/getty-aat-find-response.json
|
424
|
+
- spec/fixtures/getty-error-response.txt
|
394
425
|
- spec/fixtures/getty-tgn-find-response.json
|
395
426
|
- spec/fixtures/getty-ulan-find-response.json
|
396
427
|
- spec/fixtures/journals-find-response-two-issn.json
|
@@ -403,9 +434,12 @@ files:
|
|
403
434
|
- spec/fixtures/loc-response.txt
|
404
435
|
- spec/fixtures/loc-subject-find-response.txt
|
405
436
|
- spec/fixtures/loc-subjects-response.txt
|
437
|
+
- spec/fixtures/lod_2_ranked_2_unranked.nt
|
438
|
+
- spec/fixtures/lod_3_ranked_varying_preds.nt
|
406
439
|
- spec/fixtures/lod_lang_search_en.rdf.xml
|
407
440
|
- spec/fixtures/lod_lang_search_enfr.rdf.xml
|
408
441
|
- spec/fixtures/lod_lang_search_enfrde.rdf.xml
|
442
|
+
- spec/fixtures/lod_lang_search_filtering.nt
|
409
443
|
- spec/fixtures/lod_lang_search_fr.rdf.xml
|
410
444
|
- spec/fixtures/lod_lang_term_en.rdf.xml
|
411
445
|
- spec/fixtures/lod_lang_term_enfr.rdf.xml
|
@@ -417,6 +451,8 @@ files:
|
|
417
451
|
- spec/fixtures/lod_oclc_personalName_query_3_results.rdf.xml
|
418
452
|
- spec/fixtures/lod_oclc_query_no_results.rdf.xml
|
419
453
|
- spec/fixtures/lod_oclc_term_found.rdf.xml
|
454
|
+
- spec/fixtures/lod_search_with_blanknode_subjects.nt
|
455
|
+
- spec/fixtures/lod_term_with_blanknode_objects.nt
|
420
456
|
- spec/fixtures/mesh.txt
|
421
457
|
- spec/fixtures/oclcts-response-mesh-1.txt
|
422
458
|
- spec/fixtures/oclcts-response-mesh-2.txt
|
@@ -452,10 +488,23 @@ files:
|
|
452
488
|
- spec/lib/mesh_data_parser_spec.rb
|
453
489
|
- spec/lib/services/rdf_authority_parser_spec.rb
|
454
490
|
- spec/lib/tasks/mesh.rake_spec.rb
|
491
|
+
- spec/models/iri_template/url_config_spec.rb
|
492
|
+
- spec/models/iri_template/variable_map_spec.rb
|
493
|
+
- spec/models/linked_data/config/context_map_spec.rb
|
494
|
+
- spec/models/linked_data/config/context_property_map_spec.rb
|
455
495
|
- spec/models/subject_mesh_term_spec.rb
|
456
496
|
- spec/requests/cors_headers_spec.rb
|
457
497
|
- spec/routing/linked_data_route_spec.rb
|
458
498
|
- spec/routing/route_spec.rb
|
499
|
+
- spec/services/iri_template_service_spec.rb
|
500
|
+
- spec/services/linked_data/authority_url_service_spec.rb
|
501
|
+
- spec/services/linked_data/deep_sort_service_spec.rb
|
502
|
+
- spec/services/linked_data/graph_service_spec.rb
|
503
|
+
- spec/services/linked_data/language_service_spec.rb
|
504
|
+
- spec/services/linked_data/language_sort_service_spec.rb
|
505
|
+
- spec/services/linked_data/mapper/context_mapper_service_spec.rb
|
506
|
+
- spec/services/linked_data/mapper/graph_mapper_service_spec.rb
|
507
|
+
- spec/services/linked_data/mapper/search_results_mapper_service_spec.rb
|
459
508
|
- spec/spec_helper.rb
|
460
509
|
- spec/test_app_templates/Gemfile.extra
|
461
510
|
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
@@ -463,7 +512,7 @@ homepage: https://github.com/projecthydra/questioning_authority
|
|
463
512
|
licenses:
|
464
513
|
- APACHE-2
|
465
514
|
metadata: {}
|
466
|
-
post_install_message:
|
515
|
+
post_install_message:
|
467
516
|
rdoc_options: []
|
468
517
|
require_paths:
|
469
518
|
- lib
|
@@ -474,16 +523,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
474
523
|
version: '0'
|
475
524
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
476
525
|
requirements:
|
477
|
-
- - "
|
526
|
+
- - ">"
|
478
527
|
- !ruby/object:Gem::Version
|
479
|
-
version:
|
528
|
+
version: 1.3.1
|
480
529
|
requirements: []
|
481
|
-
|
482
|
-
|
530
|
+
rubyforge_project:
|
531
|
+
rubygems_version: 2.6.14
|
532
|
+
signing_key:
|
483
533
|
specification_version: 4
|
484
534
|
summary: You should question your authorities.
|
485
535
|
test_files:
|
486
536
|
- spec/spec_helper.rb
|
537
|
+
- spec/models/linked_data/config/context_map_spec.rb
|
538
|
+
- spec/models/linked_data/config/context_property_map_spec.rb
|
539
|
+
- spec/models/iri_template/variable_map_spec.rb
|
540
|
+
- spec/models/iri_template/url_config_spec.rb
|
487
541
|
- spec/models/subject_mesh_term_spec.rb
|
488
542
|
- spec/requests/cors_headers_spec.rb
|
489
543
|
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
@@ -525,12 +579,15 @@ test_files:
|
|
525
579
|
- spec/fixtures/lod_lang_search_fr.rdf.xml
|
526
580
|
- spec/fixtures/oclcts-response-mesh-1.txt
|
527
581
|
- spec/fixtures/lod_lang_term_fr.rdf.xml
|
582
|
+
- spec/fixtures/lod_3_ranked_varying_preds.nt
|
583
|
+
- spec/fixtures/lod_lang_search_filtering.nt
|
528
584
|
- spec/fixtures/funders-noquery.json
|
529
585
|
- spec/fixtures/lod_lang_term_enfrde.rdf.xml
|
530
586
|
- spec/fixtures/assign-fast-oneresult.json
|
531
587
|
- spec/fixtures/getty-aat-find-response.json
|
532
588
|
- spec/fixtures/lod_lang_term_enfr_noalt.rdf.xml
|
533
589
|
- spec/fixtures/assign-fast-noresults.json
|
590
|
+
- spec/fixtures/getty-error-response.txt
|
534
591
|
- spec/fixtures/lod_loc_term_found.rdf.xml
|
535
592
|
- spec/fixtures/lod_lang_term_enfr.rdf.xml
|
536
593
|
- spec/fixtures/assign-fast-topical-result.json
|
@@ -538,11 +595,13 @@ test_files:
|
|
538
595
|
- spec/fixtures/loc-subjects-response.txt
|
539
596
|
- spec/fixtures/loc-subject-find-response.txt
|
540
597
|
- spec/fixtures/lod_oclc_all_query_3_results.rdf.xml
|
598
|
+
- spec/fixtures/lod_2_ranked_2_unranked.nt
|
541
599
|
- spec/fixtures/funders-noresults.json
|
542
600
|
- spec/fixtures/getty-tgn-find-response.json
|
543
601
|
- spec/fixtures/lod_lang_search_enfr.rdf.xml
|
544
602
|
- spec/fixtures/journals-find-response-two-issn.json
|
545
603
|
- spec/fixtures/mesh.txt
|
604
|
+
- spec/fixtures/lod_term_with_blanknode_objects.nt
|
546
605
|
- spec/fixtures/geonames-find-response.json
|
547
606
|
- spec/fixtures/lod_oclc_personalName_query_3_results.rdf.xml
|
548
607
|
- spec/fixtures/loc-response.txt
|
@@ -560,6 +619,7 @@ test_files:
|
|
560
619
|
- spec/fixtures/authorities/linked_data/lod_encoding_config.json
|
561
620
|
- spec/fixtures/authorities/linked_data/lod_term_id_param_config.json
|
562
621
|
- spec/fixtures/authorities/linked_data/lod_lang_multi_defaults.json
|
622
|
+
- spec/fixtures/authorities/linked_data/lod_full_config_1_0.json
|
563
623
|
- spec/fixtures/authorities/linked_data/lod_lang_defaults.json
|
564
624
|
- spec/fixtures/authorities/linked_data/lod_term_only_config.json
|
565
625
|
- spec/fixtures/authorities/linked_data/lod_lang_no_defaults.json
|
@@ -573,6 +633,7 @@ test_files:
|
|
573
633
|
- spec/fixtures/geonames-response.json
|
574
634
|
- spec/fixtures/tgn-response.txt
|
575
635
|
- spec/fixtures/lod_oclc_term_found.rdf.xml
|
636
|
+
- spec/fixtures/lod_search_with_blanknode_subjects.nt
|
576
637
|
- spec/fixtures/assign-fast-noheader.json
|
577
638
|
- spec/fixtures/lod_lang_search_enfrde.rdf.xml
|
578
639
|
- spec/fixtures/funders-result.json
|
@@ -581,3 +642,12 @@ test_files:
|
|
581
642
|
- spec/routing/route_spec.rb
|
582
643
|
- spec/controllers/terms_controller_spec.rb
|
583
644
|
- spec/controllers/linked_data_terms_controller_spec.rb
|
645
|
+
- spec/services/linked_data/graph_service_spec.rb
|
646
|
+
- spec/services/linked_data/language_sort_service_spec.rb
|
647
|
+
- spec/services/linked_data/mapper/search_results_mapper_service_spec.rb
|
648
|
+
- spec/services/linked_data/mapper/graph_mapper_service_spec.rb
|
649
|
+
- spec/services/linked_data/mapper/context_mapper_service_spec.rb
|
650
|
+
- spec/services/linked_data/deep_sort_service_spec.rb
|
651
|
+
- spec/services/linked_data/language_service_spec.rb
|
652
|
+
- spec/services/linked_data/authority_url_service_spec.rb
|
653
|
+
- spec/services/iri_template_service_spec.rb
|