qa 5.8.1 → 5.10.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
2
  SHA256:
3
- metadata.gz: a7529be1fa8e0db065216d3fd303c3db02c739ede3ffed6ca0d56cda3b0d8bc5
4
- data.tar.gz: ae2e1179e435d2cc82f6c8e068c413cfb6cf0e3fdee0a478fff4eccfff82b64c
3
+ metadata.gz: 30ab17e283e9e6cf2e8234ef90d32bbbebe83ecdb7f52e7b07ccccf853eebd2c
4
+ data.tar.gz: 83abfe73a222b69a782c54ed9120ec08c07db796656c9e942b5494c3cd32f847
5
5
  SHA512:
6
- metadata.gz: 05b1ea7d2611b2fd349d070171a9856059ae0c0a5ea8dfab12fcdddab55e76b6a0939c6e451e3c7852f6bdf782e3aff8f2dda0c2f8c043a2a61c9407c7a76fce
7
- data.tar.gz: 0454fd9d3ce8663f9cc3e00e4a922cca3b33c6657213448f40de9b7601fb553b236dd822f1b8e5fb196ca91b1e7973134950003f52f4d33153c1e8e6c36b0517
6
+ metadata.gz: e8e0c392d5c1c54c29e53281e2903722de989e6ce2eea8e50edef227604f4de74855f9d029123e76ce42948951603bbe56be8f32d7af5d4709c82e8dd7d35e97
7
+ data.tar.gz: 28c4963e4852df3ce295c8df16cf074bb00ea123a18e62011c6f020cfaaa81c2da2da05134956d0a6a5dac921471c0bc4ea9764e81c50d810ff64d145c96f8b6
data/README.md CHANGED
@@ -1,10 +1,15 @@
1
1
  # Questioning Authority
2
2
 
3
- Code: [![Gem Version](https://badge.fury.io/rb/qa.png)](http://badge.fury.io/rb/qa) [![Build Status](https://circleci.com/gh/samvera/questioning_authority.svg?style=svg)](https://circleci.com/gh/samvera/questioning_authority) [![Coverage Status](https://coveralls.io/repos/github/samvera/questioning_authority/badge.svg?branch=main)](https://coveralls.io/github/samvera/questioning_authority?branch=main)
3
+ Code:
4
+ [![Gem Version](https://badge.fury.io/rb/qa.png)](http://badge.fury.io/rb/qa)
5
+ [![Build Status](https://circleci.com/gh/samvera/questioning_authority.svg?style=svg)](https://circleci.com/gh/samvera/questioning_authority)
6
+ [![Coverage Status](https://coveralls.io/repos/github/samvera/questioning_authority/badge.svg?branch=main)](https://coveralls.io/github/samvera/questioning_authority?branch=main)
4
7
 
5
- Docs: [![Contribution Guidelines](http://img.shields.io/badge/CONTRIBUTING-Guidelines-blue.svg)](./CONTRIBUTING.md) [![Apache 2.0 License](http://img.shields.io/badge/APACHE2-license-blue.svg)](./LICENSE)
8
+ Docs:
9
+ [![Contribution Guidelines](http://img.shields.io/badge/CONTRIBUTING-Guidelines-blue.svg)](./CONTRIBUTING.md)
10
+ [![Apache 2.0 License](http://img.shields.io/badge/APACHE2-license-blue.svg)](./LICENSE)
6
11
 
7
- Jump In: [![Slack Status](http://slack.samvera.org/badge.svg)](http://slack.samvera.org/)
12
+ Community Support: [![Samvera Community Slack](https://img.shields.io/badge/samvera-slack-blueviolet)](http://slack.samvera.org/)
8
13
 
9
14
  You should question your authorities.
10
15
 
@@ -145,24 +150,31 @@ rake ci
145
150
 
146
151
  Commit your features into a new branch and submit a pull request.
147
152
 
148
- ## Contributing
153
+ ## Contributing
149
154
 
150
- If you're working on PR for this project, create a feature branch off of `main`.
155
+ If you're working on PR for this project, create a feature branch off of `main`.
151
156
 
152
157
  This repository follows the [Samvera Community Code of Conduct](https://samvera.atlassian.net/wiki/spaces/samvera/pages/405212316/Code+of+Conduct) and [language recommendations](https://github.com/samvera/maintenance/blob/main/templates/CONTRIBUTING.md#language). Please ***do not*** create a branch called `master` for this repository or as part of your pull request; the branch will either need to be removed or renamed before it can be considered for inclusion in the code base and history of this repository.
153
158
 
154
159
  ## Compatibility
160
+ This gem works with Rails 5.0-7.0 and Ruby 2.5-3.1, provided the version of Rails supports the version of Ruby.
161
+ - Consult `.circleci/config.yml` for a list of supported combinations.
162
+ - The combination of Ruby 3.1 and Rails 6.0 comes with three caveats:
163
+ - your app will not be able to use `psych 4` (which ordinarily comes with 3.1). See https://bugs.ruby-lang.org/issues/17866 and https://stackoverflow.com/questions/71191685/visit-psych-nodes-alias-unknown-alias-default-psychbadalias/71192990#71192990 for an explanation. One workaround is to modify your app's `Gemfile` to hold back `psych`: `gem 'psych', '< 4'`.
164
+ - likewise, you want to add gem 'net-smtp', require: false to your Gemfile to get around the bug described in https://stackoverflow.com/questions/70500220/rails-7-ruby-3-1-loaderror-cannot-load-such-file-net-smtp .
165
+ - finally, you may want to opt in to the latest version of "mail". Again, add to your Gemfile the line `gem "mail", ">= 2.8.0.rc1"`.
155
166
 
156
- - Ruby 2.5 or the latest 2.4 version is recommended. Later versions may also work.
157
- - Rails 5 is required. We recommend the latest Rails 5.2 release.
167
+ See also `.circleci/config.yml` and `spec/test_app_templates/Gemfile.extra`.
158
168
 
159
169
  ## Product Owner & Maintenance
160
170
 
161
- Questioning Authority is a Core Component of the Samvera community. The documentation for what this means can be found [here](http://samvera.github.io/core_components.html#requirements-for-a-core-component).
171
+ `qa` was a Core Component of the Samvera Community. Given a decline in available labor required for maintenance, this project no longer has a dedicated Product Owner. The documentation for what this means can be found [here](http://samvera.github.io/core_components.html#requirements-for-a-core-component).
162
172
 
163
173
  ### Product Owner
164
174
 
165
- [elrayle](https://github.com/elrayle)
175
+ **Vacant**
176
+
177
+ _Until a Product Owner has been identified, we ask that you please direct all requests for support, bug reports, and general questions to the [`#dev` Channel on the Samvera Slack](https://samvera.slack.com/app_redirect?channel=dev)._
166
178
 
167
179
  ## Releasing
168
180
 
@@ -57,7 +57,7 @@ module Qa
57
57
  def deep_copy(graph:)
58
58
  new_graph = RDF::Graph.new
59
59
  graph.statements.each do |st|
60
- new_graph.insert(st.dup)
60
+ new_graph << st.dup
61
61
  end
62
62
  new_graph
63
63
  end
@@ -4,7 +4,9 @@ module Qa::Authorities
4
4
  # http://www.oclc.org/developer/develop/web-services/fast-api/assign-fast.en.html
5
5
  class AssignFast::GenericAuthority < Base
6
6
  attr_reader :subauthority
7
+
7
8
  def initialize(subauthority)
9
+ super()
8
10
  @subauthority = subauthority
9
11
  end
10
12
 
@@ -5,6 +5,7 @@ module Qa::Authorities
5
5
  attr_reader :subauthority
6
6
 
7
7
  def initialize(subauthority)
8
+ super()
8
9
  @subauthority = subauthority
9
10
  end
10
11
 
@@ -11,6 +11,7 @@ module Qa::Authorities
11
11
 
12
12
  # @param [String] subauthority to use
13
13
  def initialize(subauthority)
14
+ super()
14
15
  @subauthority = subauthority
15
16
  self.primary_artists = []
16
17
  self.work_uri = "workn1"
@@ -64,7 +64,7 @@ module Qa::Authorities
64
64
  # Reformats the data received from the service
65
65
  def parse_authority_response(response)
66
66
  response['geonames'].map do |result|
67
- # Note: the trailing slash is meaningful.
67
+ # NOTE: the trailing slash is meaningful.
68
68
  { 'id' => "https://sws.geonames.org/#{result['geonameId']}/",
69
69
  'label' => label.call(result) }
70
70
  end
@@ -60,7 +60,7 @@ module Qa::Authorities
60
60
  def authority_config
61
61
  @authority_config ||= Qa::LinkedData::AuthorityService.authority_config(@authority_name)
62
62
  raise Qa::InvalidLinkedDataAuthority, "Unable to initialize linked data authority '#{@authority_name}'" if @authority_config.nil?
63
- convert_1_0_to_2_0 if @authority_config.fetch(:QA_CONFIG_VERSION, '1.0') == '1.0'
63
+ convert_1_0_to_2_0_version if @authority_config.fetch(:QA_CONFIG_VERSION, '1.0') == '1.0'
64
64
  @authority_config
65
65
  end
66
66
 
@@ -78,7 +78,7 @@ module Qa::Authorities
78
78
 
79
79
  private
80
80
 
81
- def convert_1_0_to_2_0
81
+ def convert_1_0_to_2_0_version
82
82
  convert_1_0_url_to_2_0_url(:search)
83
83
  convert_1_0_url_to_2_0_url(:term)
84
84
  end
@@ -136,7 +136,11 @@ module Qa::Authorities
136
136
  # Special processing for loc ids for backward compatibility. IDs may be in the form 'n123' or 'n 123'. This adds
137
137
  # the <blank> into the ID to allow it to be found as the object of a triple in the graph.
138
138
  def loc_id
139
- loc_id = URI.unescape(id)
139
+ # NOTE: this call to unescape may not be necessary.
140
+ # loc_id = id.dup works just as well.
141
+ # See https://github.com/samvera/questioning_authority/pull/369
142
+ # for more discussion.
143
+ loc_id = CGI.unescape(id)
140
144
  digit_idx = loc_id.index(/\d/)
141
145
  loc_id.insert(digit_idx, ' ') if loc? && loc_id.index(' ').blank? && digit_idx > 0
142
146
  loc_id
@@ -162,9 +166,11 @@ module Qa::Authorities
162
166
  end
163
167
 
164
168
  def extract_uri_by_id(id_predicate)
169
+ # NOTE: calls to CGI.unescape in this method may not be necessary.
170
+ # See discussion at https://github.com/samvera/questioning_authority/pull/369 .
165
171
  @uri = graph_service.subjects_for_object_value(graph: @filtered_graph,
166
172
  predicate: id_predicate,
167
- object_value: URI.unescape(id)).first
173
+ object_value: CGI.unescape(id)).first
168
174
  return if @uri.present? || !loc?
169
175
 
170
176
  # NOTE: Second call to try and extract using the loc_id allows for special processing on the id for LOC authorities.
@@ -172,7 +178,7 @@ module Qa::Authorities
172
178
  # the ID is provided without the <blank>, this tries a second time to find it with the <blank>.
173
179
  @uri = graph_service.subjects_for_object_value(graph: @filtered_graph,
174
180
  predicate: id_predicate,
175
- object_value: URI.unescape(loc_id)).first
181
+ object_value: CGI.unescape(loc_id)).first
176
182
  return if @uri.blank? # only show the depercation warning if the loc_id was used
177
183
  Qa.deprecation_warning(
178
184
  in_msg: 'Qa::Authorities::LinkedData::FindTerm',
@@ -20,6 +20,7 @@ module Qa::Authorities
20
20
  delegate :subauthority?, :subauthorities?, to: :search_config, prefix: 'search'
21
21
 
22
22
  def initialize(auth_name)
23
+ super()
23
24
  @authority_config = Qa::Authorities::LinkedData::Config.new(auth_name)
24
25
  end
25
26
 
@@ -2,6 +2,7 @@ module Qa::Authorities
2
2
  class Loc::GenericAuthority < Base
3
3
  attr_reader :subauthority
4
4
  def initialize(subauthority)
5
+ super()
5
6
  @subauthority = subauthority
6
7
  end
7
8
 
@@ -2,6 +2,7 @@ module Qa::Authorities
2
2
  class Local::FileBasedAuthority < Base
3
3
  attr_reader :subauthority
4
4
  def initialize(subauthority)
5
+ super()
5
6
  @subauthority = subauthority
6
7
  end
7
8
 
@@ -19,9 +19,7 @@ module Qa::Authorities
19
19
  end
20
20
 
21
21
  def self.logger
22
- @logger ||= begin
23
- ::Rails.logger if defined? Rails && Rails.respond_to?(:logger)
24
- end
22
+ @logger ||= ::Rails.logger if defined? Rails && Rails.respond_to?(:logger)
25
23
  end
26
24
 
27
25
  class << self
@@ -34,6 +34,7 @@ module Qa::Authorities
34
34
  attr_reader :subauthority
35
35
 
36
36
  def initialize(subauthority)
37
+ super()
37
38
  self.class.check_for_index
38
39
  @subauthority = subauthority
39
40
  end
@@ -36,10 +36,8 @@ module Qa::Authorities
36
36
  end
37
37
 
38
38
  def registry
39
- @registry ||= begin
40
- Registry.new do |reg|
41
- register_defaults(reg)
42
- end
39
+ @registry ||= Registry.new do |reg|
40
+ register_defaults(reg)
43
41
  end
44
42
  end
45
43
 
@@ -7,7 +7,9 @@ module Qa::Authorities
7
7
  @file = file
8
8
  end
9
9
 
10
- def each_mesh_record # rubocop:disable Metrics/MethodLength
10
+ # rubocop:disable Metrics/MethodLength
11
+ # rubocop:disable Metrics/CyclomaticComplexity
12
+ def each_mesh_record
11
13
  current_data = {}
12
14
  in_record = false
13
15
  file.each_line do |line|
@@ -3,6 +3,7 @@ module Qa::Authorities
3
3
  attr_reader :subauthority
4
4
 
5
5
  def initialize(subauthority)
6
+ super()
6
7
  @subauthority = subauthority
7
8
  end
8
9
  include WebServiceBase
@@ -34,7 +35,7 @@ module Qa::Authorities
34
35
 
35
36
  def get_raw_response(query_type, id)
36
37
  query_url = Oclcts.url_pattern(query_type).gsub("{query}", id).gsub("{id}", id).gsub("{authority-id}", subauthority)
37
- @raw_response = Nokogiri::XML(open(query_url))
38
+ @raw_response = Nokogiri::XML(URI.open(query_url))
38
39
  end
39
40
  end
40
41
  end
data/lib/qa/engine.rb CHANGED
@@ -1,3 +1,6 @@
1
+ # used in initializer where autoload is unavailable, must be required here:
2
+ require 'qa/linked_data/authority_service'
3
+
1
4
  module Qa
2
5
  class Engine < ::Rails::Engine
3
6
  isolate_namespace Qa
data/lib/qa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Qa
2
- VERSION = "5.8.1".freeze
2
+ VERSION = "5.10.0".freeze
3
3
  end
@@ -65,6 +65,7 @@ describe Qa::TermsController, type: :controller do
65
65
  class Qa::Authorities::Local::TwoArgs < Qa::Authorities::Base
66
66
  attr_reader :subauthority
67
67
  def initialize(subauthority)
68
+ super()
68
69
  @subauthority = subauthority
69
70
  end
70
71
 
@@ -212,7 +212,7 @@ describe Qa::Authorities::Discogs::GenericAuthority do
212
212
  expect(JSON.parse(results).keys).to match_array ["@context", "@graph"]
213
213
  expect(JSON.parse(results)["@context"]["bf2"]).to eq("http://id.loc.gov/ontologies/bibframe/")
214
214
  expect(results).to include("You Go To My Head")
215
- expect(results).to include("Rodgers & Hart")
215
+ expect(JSON.parse(results).inspect).to include("Rodgers & Hart")
216
216
  expect(results).to include("Ray Brown")
217
217
  expect(results).to include("1952")
218
218
  expect(results).to include("Single")
@@ -35,7 +35,10 @@ describe Qa::Authorities::Getty::AAT do
35
35
  end
36
36
 
37
37
  it 'logs error and returns empty results' do
38
- expect(Rails.logger).to receive(:warn).with(" ERROR fetching Getty response: undefined method `[]' for nil:NilClass; cause: UNKNOWN")
38
+ # Rails 3.1 actually quotes the failing code in the error message,
39
+ # so let's match this error message with a multiline regex instead of
40
+ # a string.
41
+ expect(Rails.logger).to receive(:warn).with(/ERROR fetching Getty response: .*undefined method.*for nil:NilClass.*; cause: UNKNOWN/m)
39
42
  expect(subject).to be {}
40
43
  end
41
44
  end
@@ -35,7 +35,10 @@ describe Qa::Authorities::Getty::TGN do
35
35
  end
36
36
 
37
37
  it 'logs error and returns empty results' do
38
- expect(Rails.logger).to receive(:warn).with(" ERROR fetching Getty response: undefined method `[]' for nil:NilClass; cause: UNKNOWN")
38
+ # Rails 3.1 actually quotes the failing code in the error message,
39
+ # so let's match this error message with a multiline regex instead of
40
+ # a string.
41
+ expect(Rails.logger).to receive(:warn).with(/ERROR fetching Getty response: .*undefined method.*for nil:NilClass.*; cause: UNKNOWN/m)
39
42
  expect(subject).to be {}
40
43
  end
41
44
  end
@@ -35,7 +35,10 @@ describe Qa::Authorities::Getty::Ulan do
35
35
  end
36
36
 
37
37
  it 'logs error and returns empty results' do
38
- expect(Rails.logger).to receive(:warn).with(" ERROR fetching Getty response: undefined method `[]' for nil:NilClass; cause: UNKNOWN")
38
+ # Rails 3.1 actually quotes the failing code in the error message,
39
+ # so let's match this error message with a multiline regex instead of
40
+ # a string.
41
+ expect(Rails.logger).to receive(:warn).with(/ERROR fetching Getty response: .*undefined method.*for nil:NilClass.*; cause: UNKNOWN/m)
39
42
  expect(subject).to be {}
40
43
  end
41
44
  end
data/spec/spec_helper.rb CHANGED
@@ -1,25 +1,17 @@
1
- require 'linkeddata'
1
+ # Not sure why these RDF-related gems are only being used in CI and not general
2
+ # dependencies... maybe meant to be optional dependencies?
3
+ require 'rdf/n3'
4
+ require 'rdf/rdfxml'
5
+ require 'json/ld'
6
+ require 'rdf/vocab'
7
+
2
8
  require 'json'
3
9
  require 'engine_cart'
4
- require 'simplecov'
5
- require 'coveralls'
6
10
  require 'byebug' unless ENV['TRAVIS']
7
11
 
8
12
  ENV["RAILS_ENV"] ||= "test"
9
13
 
10
- SimpleCov.formatter = Coveralls::SimpleCov::Formatter
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
-
21
14
  EngineCart.load_application!
22
- Coveralls.wear!
23
15
 
24
16
  require 'rspec/rails'
25
17
  require 'webmock/rspec'
@@ -1,5 +1,24 @@
1
1
  # Use this file to reference specific commits of gems.
2
2
 
3
+
3
4
  group :development do
4
- gem 'linkeddata'
5
+ # Rails < 6.1 are not compatible with psych 4, although doesn't know it.
6
+ # Local apps using old Rails will have to lock locally. Latest versions
7
+ # of Rails 6.1+ has been updated to work with psych 4.
8
+ # See also:
9
+ #
10
+ # https://stackoverflow.com/questions/71191685/visit-psych-nodes-alias-unknown-alias-default-psychbadalias/71192990#71192990
11
+ #
12
+ if ENV['RAILS_VERSION'] && Gem::Version.new(ENV['RAILS_VERSION']) < Gem::Version.new("6.1")
13
+ gem 'psych', '< 4'
14
+ end
15
+
16
+ if ENV['RAILS_VERSION'] =~ /^6\.1\./ && ENV['RUBY_VERSION'] =~ /^3\.1\./
17
+ # opt into mail 2.8.0.rc1 so we get extra dependencies
18
+ # Once mail 2.8.0 final is released this will not be required.
19
+ # https://github.com/mikel/mail/pull/1472
20
+ gem "mail", ">= 2.8.0.rc1"
21
+ # See https://stackoverflow.com/questions/70500220/rails-7-ruby-3-1-loaderror-cannot-load-such-file-net-smtp
22
+ gem 'net-smtp', require: false
23
+ end
5
24
  end
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: 5.8.1
4
+ version: 5.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Anderson
@@ -16,7 +16,7 @@ authors:
16
16
  autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
- date: 2022-02-07 00:00:00.000000000 Z
19
+ date: 2022-12-05 00:00:00.000000000 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: activerecord-import
@@ -52,14 +52,20 @@ dependencies:
52
52
  requirements:
53
53
  - - "<"
54
54
  - !ruby/object:Gem::Version
55
- version: '2.0'
55
+ version: '3.0'
56
+ - - "!="
57
+ - !ruby/object:Gem::Version
58
+ version: 2.0.0
56
59
  type: :runtime
57
60
  prerelease: false
58
61
  version_requirements: !ruby/object:Gem::Requirement
59
62
  requirements:
60
63
  - - "<"
61
64
  - !ruby/object:Gem::Version
62
- version: '2.0'
65
+ version: '3.0'
66
+ - - "!="
67
+ - !ruby/object:Gem::Version
68
+ version: 2.0.0
63
69
  - !ruby/object:Gem::Dependency
64
70
  name: geocoder
65
71
  requirement: !ruby/object:Gem::Requirement
@@ -111,7 +117,7 @@ dependencies:
111
117
  version: '5.0'
112
118
  - - "<"
113
119
  - !ruby/object:Gem::Version
114
- version: '6.2'
120
+ version: '7.1'
115
121
  type: :runtime
116
122
  prerelease: false
117
123
  version_requirements: !ruby/object:Gem::Requirement
@@ -121,7 +127,7 @@ dependencies:
121
127
  version: '5.0'
122
128
  - - "<"
123
129
  - !ruby/object:Gem::Version
124
- version: '6.2'
130
+ version: '7.1'
125
131
  - !ruby/object:Gem::Dependency
126
132
  name: rdf
127
133
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +148,20 @@ dependencies:
142
148
  requirements:
143
149
  - - "~>"
144
150
  - !ruby/object:Gem::Version
145
- version: 3.0.0
151
+ version: '5.0'
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ version: 5.0.2
146
155
  type: :development
147
156
  prerelease: false
148
157
  version_requirements: !ruby/object:Gem::Requirement
149
158
  requirements:
150
159
  - - "~>"
151
160
  - !ruby/object:Gem::Version
152
- version: 3.0.0
161
+ version: '5.0'
162
+ - - ">="
163
+ - !ruby/object:Gem::Version
164
+ version: 5.0.2
153
165
  - !ruby/object:Gem::Dependency
154
166
  name: rails
155
167
  requirement: !ruby/object:Gem::Requirement
@@ -205,35 +217,63 @@ dependencies:
205
217
  - !ruby/object:Gem::Version
206
218
  version: '2.0'
207
219
  - !ruby/object:Gem::Dependency
208
- name: linkeddata
220
+ name: rdf-n3
209
221
  requirement: !ruby/object:Gem::Requirement
210
222
  requirements:
211
- - - ">="
223
+ - - "~>"
212
224
  - !ruby/object:Gem::Version
213
- version: '0'
225
+ version: '3.0'
214
226
  type: :development
215
227
  prerelease: false
216
228
  version_requirements: !ruby/object:Gem::Requirement
217
229
  requirements:
218
- - - ">="
230
+ - - "~>"
219
231
  - !ruby/object:Gem::Version
220
- version: '0'
232
+ version: '3.0'
221
233
  - !ruby/object:Gem::Dependency
222
- name: pry
234
+ name: rdf-rdfxml
223
235
  requirement: !ruby/object:Gem::Requirement
224
236
  requirements:
225
- - - ">="
237
+ - - "~>"
226
238
  - !ruby/object:Gem::Version
227
- version: '0'
239
+ version: '3.0'
228
240
  type: :development
229
241
  prerelease: false
230
242
  version_requirements: !ruby/object:Gem::Requirement
231
243
  requirements:
232
- - - ">="
244
+ - - "~>"
233
245
  - !ruby/object:Gem::Version
234
- version: '0'
246
+ version: '3.0'
235
247
  - !ruby/object:Gem::Dependency
236
- name: pry-byebug
248
+ name: json-ld
249
+ requirement: !ruby/object:Gem::Requirement
250
+ requirements:
251
+ - - "~>"
252
+ - !ruby/object:Gem::Version
253
+ version: '3.0'
254
+ type: :development
255
+ prerelease: false
256
+ version_requirements: !ruby/object:Gem::Requirement
257
+ requirements:
258
+ - - "~>"
259
+ - !ruby/object:Gem::Version
260
+ version: '3.0'
261
+ - !ruby/object:Gem::Dependency
262
+ name: rdf-vocab
263
+ requirement: !ruby/object:Gem::Requirement
264
+ requirements:
265
+ - - "~>"
266
+ - !ruby/object:Gem::Version
267
+ version: '3.0'
268
+ type: :development
269
+ prerelease: false
270
+ version_requirements: !ruby/object:Gem::Requirement
271
+ requirements:
272
+ - - "~>"
273
+ - !ruby/object:Gem::Version
274
+ version: '3.0'
275
+ - !ruby/object:Gem::Dependency
276
+ name: pry
237
277
  requirement: !ruby/object:Gem::Requirement
238
278
  requirements:
239
279
  - - ">="
@@ -247,7 +287,7 @@ dependencies:
247
287
  - !ruby/object:Gem::Version
248
288
  version: '0'
249
289
  - !ruby/object:Gem::Dependency
250
- name: rspec-rails
290
+ name: pry-byebug
251
291
  requirement: !ruby/object:Gem::Requirement
252
292
  requirements:
253
293
  - - ">="
@@ -261,7 +301,7 @@ dependencies:
261
301
  - !ruby/object:Gem::Version
262
302
  version: '0'
263
303
  - !ruby/object:Gem::Dependency
264
- name: simplecov
304
+ name: rspec-rails
265
305
  requirement: !ruby/object:Gem::Requirement
266
306
  requirements:
267
307
  - - ">="
@@ -355,7 +395,6 @@ files:
355
395
  - app/models/qa/mesh_tree.rb
356
396
  - app/models/qa/subject_mesh_term.rb
357
397
  - app/services/qa/iri_template_service.rb
358
- - app/services/qa/linked_data/authority_service.rb
359
398
  - app/services/qa/linked_data/authority_url_service.rb
360
399
  - app/services/qa/linked_data/deep_sort_service.rb
361
400
  - app/services/qa/linked_data/graph_service.rb
@@ -464,6 +503,7 @@ files:
464
503
  - lib/qa/configuration.rb
465
504
  - lib/qa/data/TGN_LANGUAGES.xml
466
505
  - lib/qa/engine.rb
506
+ - lib/qa/linked_data/authority_service.rb
467
507
  - lib/qa/services.rb
468
508
  - lib/qa/services/rdf_authority_parser.rb
469
509
  - lib/qa/version.rb
@@ -636,156 +676,156 @@ required_rubygems_version: !ruby/object:Gem::Requirement
636
676
  - !ruby/object:Gem::Version
637
677
  version: '0'
638
678
  requirements: []
639
- rubygems_version: 3.0.8
679
+ rubygems_version: 3.3.20
640
680
  signing_key:
641
681
  specification_version: 4
642
682
  summary: You should question your authorities.
643
683
  test_files:
644
- - spec/spec_helper.rb
684
+ - spec/controllers/linked_data_terms_controller_spec.rb
685
+ - spec/controllers/terms_controller_spec.rb
645
686
  - spec/features/linked_data/language_spec.rb
646
- - spec/models/linked_data/config/context_map_spec.rb
647
- - spec/models/linked_data/config/context_property_map_spec.rb
648
- - spec/models/iri_template/variable_map_spec.rb
649
- - spec/models/iri_template/url_config_spec.rb
650
- - spec/models/subject_mesh_term_spec.rb
651
- - spec/requests/cors_headers_spec.rb
652
- - spec/support/matchers/include_hash.rb
653
- - spec/test_app_templates/lib/generators/test_app_generator.rb
654
- - spec/test_app_templates/Gemfile.extra
655
- - spec/lib/tasks/mesh.rake_spec.rb
656
- - spec/lib/configuration_spec.rb
657
- - spec/lib/authorities_loc_subauthorities.rb
658
- - spec/lib/mesh_data_parser_spec.rb
659
- - spec/lib/authorities/linked_data/config_spec.rb
660
- - spec/lib/authorities/linked_data/search_config_spec.rb
661
- - spec/lib/authorities/linked_data/search_query_spec.rb
662
- - spec/lib/authorities/linked_data/term_config_spec.rb
663
- - spec/lib/authorities/linked_data/find_term_spec.rb
664
- - spec/lib/authorities/linked_data/generic_authority_spec.rb
665
- - spec/lib/authorities/loc_spec.rb
666
- - spec/lib/authorities/tgnlang_spec.rb
667
- - spec/lib/authorities/crossref_spec.rb
668
- - spec/lib/authorities/oclcts_spec.rb
669
- - spec/lib/authorities/local/file_based_authority_spec.rb
670
- - spec/lib/authorities/local/table_based_authority_spec.rb
671
- - spec/lib/authorities/local/mysql_table_based_authority_spec.rb
672
- - spec/lib/authorities/space_fix_encoder.rb
673
- - spec/lib/authorities/assign_fast_spec.rb
674
- - spec/lib/authorities/getty/tgn_spec.rb
675
- - spec/lib/authorities/getty/ulan_spec.rb
676
- - spec/lib/authorities/getty/aat_spec.rb
677
- - spec/lib/authorities/discogs_spec.rb
678
- - spec/lib/authorities/mesh_spec.rb
679
- - spec/lib/authorities/local_spec.rb
680
- - spec/lib/authorities/discogs/generic_authority_spec.rb
681
- - spec/lib/authorities/geonames_spec.rb
682
- - spec/lib/authorities/base_spec.rb
683
- - spec/lib/authorities/getty_spec.rb
684
- - spec/lib/services/rdf_authority_parser_spec.rb
685
- - spec/fixtures/lod_lang_search_enesfrde.rdf.xml
686
- - spec/fixtures/oclcts-response-mesh-3.txt
687
- - spec/fixtures/discogs-search-response-set-record.json
688
- - spec/fixtures/loc-names-response.txt
689
- - spec/fixtures/oclcts-response-mesh-2.txt
690
- - spec/fixtures/lod_loc_term_bad_id.rdf.xml
691
687
  - spec/fixtures/aat-response.txt
692
- - spec/fixtures/journals-result.json
693
- - spec/fixtures/discogs-search-response-no-subauth.json
694
- - spec/fixtures/lod_lang_search_fr.rdf.xml
695
- - spec/fixtures/oclcts-response-mesh-1.txt
696
- - spec/fixtures/lod_lang_term_fr.rdf.xml
697
- - spec/fixtures/discogs-search-response-no-auth.json
698
- - spec/fixtures/lod_3_ranked_varying_preds.nt
699
- - spec/fixtures/lod_lang_search_filtering.nt
700
- - spec/fixtures/discogs-find-response-jsonld-release.json
701
- - spec/fixtures/funders-noquery.json
702
- - spec/fixtures/lod_lang_term_enfrde.rdf.xml
703
- - spec/fixtures/assign-fast-oneresult.json
704
- - spec/fixtures/discogs-id-not-found-master.json
705
- - spec/fixtures/getty-aat-find-response.json
706
- - spec/fixtures/lod_lang_term_enfr_noalt.rdf.xml
688
+ - spec/fixtures/assign-fast-noheader.json
707
689
  - spec/fixtures/assign-fast-noresults.json
708
- - spec/fixtures/discogs-search-response-per-page.json
709
- - spec/fixtures/getty-error-response.txt
710
- - spec/fixtures/lod_loc_term_found.rdf.xml
711
- - spec/fixtures/lod_lang_term_enfr.rdf.xml
690
+ - spec/fixtures/assign-fast-oneresult.json
712
691
  - spec/fixtures/assign-fast-topical-result.json
713
- - spec/fixtures/getty-ulan-find-response.json
714
- - spec/fixtures/loc-subjects-response.txt
692
+ - spec/fixtures/authorities/authority_A.yml
693
+ - spec/fixtures/authorities/authority_B.yml
694
+ - spec/fixtures/authorities/authority_C.yml
695
+ - spec/fixtures/authorities/authority_D.yml
696
+ - spec/fixtures/authorities/authority_U.yml
697
+ - spec/fixtures/authorities/linked_data/lod_encoding_config.json
698
+ - spec/fixtures/authorities/linked_data/lod_full_config.json
699
+ - spec/fixtures/authorities/linked_data/lod_full_config_1_0.json
700
+ - spec/fixtures/authorities/linked_data/lod_lang_defaults.json
701
+ - spec/fixtures/authorities/linked_data/lod_lang_multi_defaults.json
702
+ - spec/fixtures/authorities/linked_data/lod_lang_no_defaults.json
703
+ - spec/fixtures/authorities/linked_data/lod_lang_param.json
704
+ - spec/fixtures/authorities/linked_data/lod_min_config.json
705
+ - spec/fixtures/authorities/linked_data/lod_search_only_config.json
706
+ - spec/fixtures/authorities/linked_data/lod_sort.json
707
+ - spec/fixtures/authorities/linked_data/lod_term_id_param_config.json
708
+ - spec/fixtures/authorities/linked_data/lod_term_only_config.json
709
+ - spec/fixtures/authorities/linked_data/lod_term_uri_param_config.json
715
710
  - spec/fixtures/discogs-find-response-json.json
716
- - spec/fixtures/loc-subject-find-response.txt
717
- - spec/fixtures/lod_oclc_all_query_3_results.rdf.xml
718
- - spec/fixtures/lod_2_ranked_2_unranked.nt
711
+ - spec/fixtures/discogs-find-response-jsonld-master.json
712
+ - spec/fixtures/discogs-find-response-jsonld-release.json
713
+ - spec/fixtures/discogs-id-matches-master.json
714
+ - spec/fixtures/discogs-id-matches-release.json
715
+ - spec/fixtures/discogs-id-not-found-master.json
716
+ - spec/fixtures/discogs-id-not-found-release.json
717
+ - spec/fixtures/discogs-search-response-no-auth.json
718
+ - spec/fixtures/discogs-search-response-no-subauth.json
719
+ - spec/fixtures/discogs-search-response-per-page.json
720
+ - spec/fixtures/discogs-search-response-set-record.json
721
+ - spec/fixtures/discogs-search-response-subauth.json
722
+ - spec/fixtures/funders-find-response.json
723
+ - spec/fixtures/funders-noquery.json
719
724
  - spec/fixtures/funders-noresults.json
725
+ - spec/fixtures/funders-result.json
726
+ - spec/fixtures/geonames-find-response.json
727
+ - spec/fixtures/geonames-response.json
728
+ - spec/fixtures/getty-aat-find-response.json
729
+ - spec/fixtures/getty-error-response.txt
720
730
  - spec/fixtures/getty-tgn-find-response.json
721
- - spec/fixtures/lod_lang_search_enfr.rdf.xml
731
+ - spec/fixtures/getty-ulan-find-response.json
722
732
  - spec/fixtures/journals-find-response-two-issn.json
723
- - spec/fixtures/mesh.txt
724
- - spec/fixtures/discogs-search-response-subauth.json
725
- - spec/fixtures/lod_term_with_blanknode_objects.nt
726
- - spec/fixtures/geonames-find-response.json
727
- - spec/fixtures/lod_oclc_personalName_query_3_results.rdf.xml
728
- - spec/fixtures/loc-response.txt
729
- - spec/fixtures/discogs-id-not-found-release.json
730
- - spec/fixtures/funders-find-response.json
731
- - spec/fixtures/lexvo_snippet.rdf.xml
732
733
  - spec/fixtures/journals-find-response.json
733
- - spec/fixtures/discogs-id-matches-master.json
734
- - spec/fixtures/discogs-find-response-jsonld-master.json
734
+ - spec/fixtures/journals-noquery.json
735
+ - spec/fixtures/journals-noresults.json
736
+ - spec/fixtures/journals-result.json
737
+ - spec/fixtures/lexvo_snippet.rdf.xml
738
+ - spec/fixtures/loc-names-response.txt
739
+ - spec/fixtures/loc-response.txt
740
+ - spec/fixtures/loc-subject-find-response.txt
741
+ - spec/fixtures/loc-subjects-response.txt
742
+ - spec/fixtures/lod_2_ranked_2_unranked.nt
743
+ - spec/fixtures/lod_3_ranked_varying_preds.nt
735
744
  - spec/fixtures/lod_lang_search_en.rdf.xml
745
+ - spec/fixtures/lod_lang_search_enesfrde.rdf.xml
746
+ - spec/fixtures/lod_lang_search_enfr.rdf.xml
747
+ - spec/fixtures/lod_lang_search_enfrde.rdf.xml
748
+ - spec/fixtures/lod_lang_search_filtering.nt
749
+ - spec/fixtures/lod_lang_search_fr.rdf.xml
750
+ - spec/fixtures/lod_lang_search_sv.rdf.xml
736
751
  - spec/fixtures/lod_lang_term_en.rdf.xml
737
- - spec/fixtures/journals-noresults.json
738
- - spec/fixtures/discogs-id-matches-release.json
739
- - spec/fixtures/journals-noquery.json
752
+ - spec/fixtures/lod_lang_term_enfr.rdf.xml
753
+ - spec/fixtures/lod_lang_term_enfr_noalt.rdf.xml
754
+ - spec/fixtures/lod_lang_term_enfrde.rdf.xml
755
+ - spec/fixtures/lod_lang_term_fr.rdf.xml
756
+ - spec/fixtures/lod_loc_second_term_found.rdf.xml
757
+ - spec/fixtures/lod_loc_term_bad_id.rdf.xml
758
+ - spec/fixtures/lod_loc_term_found.rdf.xml
759
+ - spec/fixtures/lod_oclc_all_query_3_results.rdf.xml
760
+ - spec/fixtures/lod_oclc_personalName_query_3_results.rdf.xml
740
761
  - spec/fixtures/lod_oclc_query_no_results.rdf.xml
741
- - spec/fixtures/authorities/linked_data/lod_search_only_config.json
742
- - spec/fixtures/authorities/linked_data/lod_sort.json
743
- - spec/fixtures/authorities/linked_data/lod_min_config.json
744
- - spec/fixtures/authorities/linked_data/lod_encoding_config.json
745
- - spec/fixtures/authorities/linked_data/lod_term_id_param_config.json
746
- - spec/fixtures/authorities/linked_data/lod_lang_multi_defaults.json
747
- - spec/fixtures/authorities/linked_data/lod_full_config_1_0.json
748
- - spec/fixtures/authorities/linked_data/lod_lang_defaults.json
749
- - spec/fixtures/authorities/linked_data/lod_term_only_config.json
750
- - spec/fixtures/authorities/linked_data/lod_lang_no_defaults.json
751
- - spec/fixtures/authorities/linked_data/lod_term_uri_param_config.json
752
- - spec/fixtures/authorities/linked_data/lod_full_config.json
753
- - spec/fixtures/authorities/linked_data/lod_lang_param.json
754
- - spec/fixtures/authorities/authority_D.yml
755
- - spec/fixtures/authorities/authority_A.yml
756
- - spec/fixtures/authorities/authority_C.yml
757
- - spec/fixtures/authorities/authority_U.yml
758
- - spec/fixtures/authorities/authority_B.yml
759
- - spec/fixtures/geonames-response.json
760
- - spec/fixtures/tgn-response.txt
761
- - spec/fixtures/lod_oclc_term_found.rdf.xml
762
762
  - spec/fixtures/lod_oclc_term_bad_id.nt
763
+ - spec/fixtures/lod_oclc_term_found.rdf.xml
763
764
  - spec/fixtures/lod_search_with_blanknode_subjects.nt
764
- - spec/fixtures/assign-fast-noheader.json
765
- - spec/fixtures/lod_loc_second_term_found.rdf.xml
766
- - spec/fixtures/lod_lang_search_enfrde.rdf.xml
767
- - spec/fixtures/funders-result.json
768
- - spec/fixtures/lod_lang_search_sv.rdf.xml
765
+ - spec/fixtures/lod_term_with_blanknode_objects.nt
766
+ - spec/fixtures/mesh.txt
767
+ - spec/fixtures/oclcts-response-mesh-1.txt
768
+ - spec/fixtures/oclcts-response-mesh-2.txt
769
+ - spec/fixtures/oclcts-response-mesh-3.txt
770
+ - spec/fixtures/tgn-response.txt
769
771
  - spec/fixtures/ulan-response.txt
772
+ - spec/lib/authorities/assign_fast_spec.rb
773
+ - spec/lib/authorities/base_spec.rb
774
+ - spec/lib/authorities/crossref_spec.rb
775
+ - spec/lib/authorities/discogs/generic_authority_spec.rb
776
+ - spec/lib/authorities/discogs_spec.rb
777
+ - spec/lib/authorities/geonames_spec.rb
778
+ - spec/lib/authorities/getty/aat_spec.rb
779
+ - spec/lib/authorities/getty/tgn_spec.rb
780
+ - spec/lib/authorities/getty/ulan_spec.rb
781
+ - spec/lib/authorities/getty_spec.rb
782
+ - spec/lib/authorities/linked_data/config_spec.rb
783
+ - spec/lib/authorities/linked_data/find_term_spec.rb
784
+ - spec/lib/authorities/linked_data/generic_authority_spec.rb
785
+ - spec/lib/authorities/linked_data/search_config_spec.rb
786
+ - spec/lib/authorities/linked_data/search_query_spec.rb
787
+ - spec/lib/authorities/linked_data/term_config_spec.rb
788
+ - spec/lib/authorities/loc_spec.rb
789
+ - spec/lib/authorities/local/file_based_authority_spec.rb
790
+ - spec/lib/authorities/local/mysql_table_based_authority_spec.rb
791
+ - spec/lib/authorities/local/table_based_authority_spec.rb
792
+ - spec/lib/authorities/local_spec.rb
793
+ - spec/lib/authorities/mesh_spec.rb
794
+ - spec/lib/authorities/oclcts_spec.rb
795
+ - spec/lib/authorities/space_fix_encoder.rb
796
+ - spec/lib/authorities/tgnlang_spec.rb
797
+ - spec/lib/authorities_loc_subauthorities.rb
798
+ - spec/lib/configuration_spec.rb
799
+ - spec/lib/mesh_data_parser_spec.rb
800
+ - spec/lib/services/rdf_authority_parser_spec.rb
801
+ - spec/lib/tasks/mesh.rake_spec.rb
802
+ - spec/models/iri_template/url_config_spec.rb
803
+ - spec/models/iri_template/variable_map_spec.rb
804
+ - spec/models/linked_data/config/context_map_spec.rb
805
+ - spec/models/linked_data/config/context_property_map_spec.rb
806
+ - spec/models/subject_mesh_term_spec.rb
807
+ - spec/requests/cors_headers_spec.rb
770
808
  - spec/routing/linked_data_route_spec.rb
771
809
  - spec/routing/route_spec.rb
772
- - spec/controllers/terms_controller_spec.rb
773
- - spec/controllers/linked_data_terms_controller_spec.rb
774
- - spec/services/linked_data/request_header_service_spec.rb
810
+ - spec/services/iri_template_service_spec.rb
775
811
  - spec/services/linked_data/authority_service_spec.rb
776
- - spec/services/linked_data/ldpath_service_spec.rb
812
+ - spec/services/linked_data/authority_url_service_spec.rb
813
+ - spec/services/linked_data/deep_sort_service_spec.rb
777
814
  - spec/services/linked_data/graph_service_spec.rb
815
+ - spec/services/linked_data/language_service_spec.rb
778
816
  - spec/services/linked_data/language_sort_service_spec.rb
817
+ - spec/services/linked_data/ldpath_service_spec.rb
818
+ - spec/services/linked_data/mapper/context_mapper_service_spec.rb
779
819
  - spec/services/linked_data/mapper/graph_ldpath_mapper_service_spec.rb
780
- - spec/services/linked_data/mapper/term_results_mapper_service_spec.rb
781
- - spec/services/linked_data/mapper/search_results_mapper_service_spec.rb
782
820
  - spec/services/linked_data/mapper/graph_mapper_service_spec.rb
783
- - spec/services/linked_data/mapper/context_mapper_service_spec.rb
784
821
  - spec/services/linked_data/mapper/graph_predicate_mapper_service_spec.rb
785
- - spec/services/linked_data/deep_sort_service_spec.rb
822
+ - spec/services/linked_data/mapper/search_results_mapper_service_spec.rb
823
+ - spec/services/linked_data/mapper/term_results_mapper_service_spec.rb
786
824
  - spec/services/linked_data/performance_data_service_spec.rb
787
- - spec/services/linked_data/language_service_spec.rb
788
- - spec/services/linked_data/authority_url_service_spec.rb
825
+ - spec/services/linked_data/request_header_service_spec.rb
789
826
  - spec/services/linked_data/response_header_service_spec.rb
790
827
  - spec/services/pagination_service_spec.rb
791
- - spec/services/iri_template_service_spec.rb
828
+ - spec/spec_helper.rb
829
+ - spec/support/matchers/include_hash.rb
830
+ - spec/test_app_templates/Gemfile.extra
831
+ - spec/test_app_templates/lib/generators/test_app_generator.rb