qa 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -0
  3. data/app/controllers/qa/terms_controller.rb +1 -1
  4. data/lib/qa/authorities.rb +2 -0
  5. data/lib/qa/authorities/assign_fast.rb +17 -0
  6. data/lib/qa/authorities/assign_fast/generic_authority.rb +61 -0
  7. data/lib/qa/authorities/assign_fast_subauthority.rb +31 -0
  8. data/lib/qa/authorities/getty.rb +12 -3
  9. data/lib/qa/authorities/getty/aat.rb +3 -2
  10. data/lib/qa/authorities/getty/tgn.rb +80 -0
  11. data/lib/qa/authorities/getty/ulan.rb +71 -0
  12. data/lib/qa/authorities/web_service_base.rb +6 -4
  13. data/lib/qa/version.rb +1 -1
  14. data/spec/controllers/terms_controller_spec.rb +26 -12
  15. data/spec/fixtures/assign-fast-noheader.json +1 -0
  16. data/spec/fixtures/assign-fast-noresults.json +10 -0
  17. data/spec/fixtures/assign-fast-oneresult.json +16 -0
  18. data/spec/fixtures/assign-fast-topical-result.json +130 -0
  19. data/spec/fixtures/getty-tgn-find-response.json +1469 -0
  20. data/spec/fixtures/getty-ulan-find-response.json +11565 -0
  21. data/spec/fixtures/tgn-response.txt +87 -0
  22. data/spec/fixtures/ulan-response.txt +1854 -0
  23. data/spec/lib/authorities/assign_fast_spec.rb +115 -0
  24. data/spec/lib/authorities/getty/aat_spec.rb +1 -1
  25. data/spec/lib/authorities/getty/tgn_spec.rb +95 -0
  26. data/spec/lib/authorities/getty/ulan_spec.rb +97 -0
  27. data/spec/lib/authorities/loc_spec.rb +1 -1
  28. data/spec/lib/tasks/mesh.rake_spec.rb +1 -1
  29. data/spec/spec_helper.rb +4 -3
  30. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
  31. metadata +35 -116
  32. data/spec/internal/Gemfile +0 -44
  33. data/spec/internal/Gemfile.lock +0 -180
  34. data/spec/internal/README.rdoc +0 -28
  35. data/spec/internal/Rakefile +0 -6
  36. data/spec/internal/app/assets/javascripts/application.js +0 -16
  37. data/spec/internal/app/assets/stylesheets/application.css +0 -15
  38. data/spec/internal/app/controllers/application_controller.rb +0 -5
  39. data/spec/internal/app/helpers/application_helper.rb +0 -2
  40. data/spec/internal/app/views/layouts/application.html.erb +0 -14
  41. data/spec/internal/bin/bundle +0 -3
  42. data/spec/internal/bin/rails +0 -4
  43. data/spec/internal/bin/rake +0 -4
  44. data/spec/internal/bin/setup +0 -29
  45. data/spec/internal/config.ru +0 -4
  46. data/spec/internal/config/application.rb +0 -26
  47. data/spec/internal/config/authorities.yml +0 -1
  48. data/spec/internal/config/authorities/authority_A.yml +0 -10
  49. data/spec/internal/config/authorities/authority_B.yml +0 -7
  50. data/spec/internal/config/authorities/authority_C.yml +0 -4
  51. data/spec/internal/config/authorities/authority_D.yml +0 -4
  52. data/spec/internal/config/authorities/states.yml +0 -101
  53. data/spec/internal/config/boot.rb +0 -3
  54. data/spec/internal/config/database.yml +0 -25
  55. data/spec/internal/config/environment.rb +0 -5
  56. data/spec/internal/config/environments/development.rb +0 -41
  57. data/spec/internal/config/environments/production.rb +0 -79
  58. data/spec/internal/config/environments/test.rb +0 -42
  59. data/spec/internal/config/initializers/assets.rb +0 -11
  60. data/spec/internal/config/initializers/backtrace_silencers.rb +0 -7
  61. data/spec/internal/config/initializers/cookies_serializer.rb +0 -3
  62. data/spec/internal/config/initializers/filter_parameter_logging.rb +0 -4
  63. data/spec/internal/config/initializers/inflections.rb +0 -16
  64. data/spec/internal/config/initializers/mime_types.rb +0 -4
  65. data/spec/internal/config/initializers/session_store.rb +0 -3
  66. data/spec/internal/config/initializers/wrap_parameters.rb +0 -14
  67. data/spec/internal/config/locales/en.yml +0 -23
  68. data/spec/internal/config/oclcts-authorities.yml +0 -24
  69. data/spec/internal/config/routes.rb +0 -58
  70. data/spec/internal/config/secrets.yml +0 -22
  71. data/spec/internal/db/development.sqlite3 +0 -0
  72. data/spec/internal/db/migrate/20150311214117_create_qa_subject_mesh_terms.qa.rb +0 -12
  73. data/spec/internal/db/migrate/20150311214118_create_qa_mesh_tree.qa.rb +0 -11
  74. data/spec/internal/db/migrate/20150311214119_add_term_lower_to_qa_subject_mesh_terms.qa.rb +0 -8
  75. data/spec/internal/db/schema.rb +0 -34
  76. data/spec/internal/db/seeds.rb +0 -7
  77. data/spec/internal/db/test.sqlite3 +0 -0
  78. data/spec/internal/lib/generators/test_app_generator.rb +0 -29
  79. data/spec/internal/log/development.log +0 -21909
  80. data/spec/internal/public/404.html +0 -67
  81. data/spec/internal/public/422.html +0 -67
  82. data/spec/internal/public/500.html +0 -66
  83. data/spec/internal/public/favicon.ico +0 -0
  84. data/spec/internal/public/robots.txt +0 -5
  85. data/spec/internal/test/test_helper.rb +0 -10
@@ -0,0 +1,115 @@
1
+ require 'spec_helper'
2
+
3
+ describe Qa::Authorities::AssignFast do
4
+
5
+ # subauthority infrastructure
6
+ describe "#new" do
7
+ context "without a sub-authority" do
8
+ it "should raise an exception" do
9
+ expect { Qa::Authorities::AssignFast.new }.to raise_error
10
+ end
11
+ end
12
+ end
13
+
14
+ describe "#subauthority_for" do
15
+ context "with an invalid sub-authority" do
16
+ it "should raise an exception" do
17
+ expect { Qa::Authorities::AssignFast.subauthority_for("foo") }.to raise_error
18
+ end
19
+ end
20
+ context "with a valid sub-authority" do
21
+ it "should create the authority" do
22
+ expect(Qa::Authorities::AssignFast.subauthority_for("all")).to be_kind_of Qa::Authorities::AssignFast::GenericAuthority
23
+ end
24
+ end
25
+ end
26
+
27
+ # api call
28
+ describe "query url" do
29
+ let :authority do
30
+ Qa::Authorities::AssignFast.subauthority_for("all")
31
+ end
32
+
33
+ it "is correctly formed" do
34
+ url = 'http://fast.oclc.org/searchfast/fastsuggest?&query=word%20ling&queryIndex=suggestall&queryReturn=suggestall%2Cidroot%2Cauth%2Ctype&suggest=autoSubject&rows=20'
35
+ expect(authority.build_query_url("word (ling")).to eq(url)
36
+ end
37
+ end
38
+
39
+ describe "search result" do
40
+ let :authority do
41
+ Qa::Authorities::AssignFast.subauthority_for("all")
42
+ end
43
+
44
+ context "when we sent a bad character" do
45
+ # server returns 200 with empty response; JSON throws a ParserError
46
+ before do
47
+ stub_request(:get, "http://fast.oclc.org/searchfast/fastsuggest?query=word%20ling&queryIndex=suggestall&queryReturn=suggestall,idroot,auth,type&rows=20&suggest=autoSubject").
48
+ with(:headers => {'Accept'=>'application/json'}).
49
+ to_return(:status => 200, :body => "", :headers => {})
50
+ end
51
+ it "logs an info and returns an empty array" do
52
+ expect(Rails.logger).to receive(:info).with("Could not parse response as JSON. Request url: http://fast.oclc.org/searchfast/fastsuggest?&query=word%20ling&queryIndex=suggestall&queryReturn=suggestall%2Cidroot%2Cauth%2Ctype&suggest=autoSubject&rows=20")
53
+ results = authority.search("word (ling")
54
+ expect(results).to eq([])
55
+ end
56
+ end
57
+
58
+ context "when query is blank" do
59
+ # server returns results but no results header
60
+ let :results do
61
+ stub_request(:get, "http://fast.oclc.org/searchfast/fastsuggest?&query=&queryIndex=suggestall&queryReturn=suggestall%2Cidroot%2Cauth%2Ctype&suggest=autoSubject&rows=20").
62
+ with(:headers => {'Accept'=>'application/json'}).
63
+ to_return(:body => webmock_fixture("assign-fast-noheader.json"), :status => 200, :headers => {})
64
+ authority.search("")
65
+ end
66
+ it "returns an empty array" do
67
+ expect(results).to eq([])
68
+ end
69
+ end
70
+
71
+ context "with no results" do
72
+ let :results do
73
+ stub_request(:get, "http://fast.oclc.org/searchfast/fastsuggest?query=word%20ling&queryIndex=suggestall&queryReturn=suggestall,idroot,auth,type&rows=20&suggest=autoSubject").
74
+ with(:headers => {'Accept'=>'application/json'}).
75
+ to_return(:body => webmock_fixture("assign-fast-noresults.json"), :status => 200, :headers => {})
76
+ authority.search("word (ling")
77
+ end
78
+ it "returns an empty array" do
79
+ expect(results).to eq([])
80
+ end
81
+ end
82
+
83
+ context "with suggestall results" do
84
+ let :results do
85
+ stub_request(:get, "http://fast.oclc.org/searchfast/fastsuggest?query=word%20ling&queryIndex=suggestall&queryReturn=suggestall,idroot,auth,type&rows=20&suggest=autoSubject").
86
+ with(:headers => {'Accept'=>'application/json'}).
87
+ to_return(:body => webmock_fixture("assign-fast-oneresult.json"), :status => 200, :headers => {})
88
+ authority.search("word (ling")
89
+ end
90
+ it "is correctly parsed" do
91
+ expect(results.count).to eq(1)
92
+ expect(results.first[:id]).to eq('fst01180101')
93
+ expect(results.first[:label]).to eq('Word (Linguistics)')
94
+ expect(results.first[:value]).to eq('Word (Linguistics)')
95
+ expect(results.first).to eq({:id=>"fst01180101", :label=>"Word (Linguistics)", :value=>"Word (Linguistics)"})
96
+ end
97
+ end
98
+
99
+ context "with topical results" do
100
+ let :results do
101
+ stub_request(:get, "http://fast.oclc.org/searchfast/fastsuggest?query=word&queryIndex=suggest50&queryReturn=suggest50,idroot,auth,type&rows=20&suggest=autoSubject").
102
+ with(:headers => {'Accept'=>'application/json'}).
103
+ to_return(:body => webmock_fixture("assign-fast-topical-result.json"), :status => 200, :headers => {})
104
+ Qa::Authorities::AssignFast.subauthority_for("topical").search("word")
105
+ end
106
+ it "is correctly parsed" do
107
+ expect(results.count).to eq(20)
108
+ expect(results.first[:id]).to eq('fst01168328')
109
+ expect(results.first[:label]).to eq('Word books USE Vocabulary')
110
+ expect(results.first[:value]).to eq('Vocabulary')
111
+ end
112
+ end
113
+ end
114
+
115
+ end
@@ -74,7 +74,7 @@ describe Qa::Authorities::Getty::AAT do
74
74
  skos:inScheme <http://vocab.getty.edu/aat/> ;
75
75
  gvp:prefLabelGVP [skosxl:literalForm ?name].
76
76
  FILTER regex(?name, "search_term", "i") .
77
- } LIMIT 10' }
77
+ } ORDER BY ?name' }
78
78
  end
79
79
 
80
80
  end
@@ -0,0 +1,95 @@
1
+ require 'spec_helper'
2
+
3
+ describe Qa::Authorities::Getty::TGN do
4
+
5
+ let(:authority) { described_class.new }
6
+
7
+ describe "#build_query_url" do
8
+ subject { authority.build_query_url("foo") }
9
+ it { is_expected.to match /^http:\/\/vocab\.getty\.edu\// }
10
+ end
11
+
12
+ describe "#find_url" do
13
+ subject { authority.find_url("1028772") }
14
+ it { is_expected.to eq "http://vocab.getty.edu/tgn/1028772.json" }
15
+ end
16
+
17
+ describe "#search" do
18
+ context "authorities" do
19
+ before do
20
+ stub_request(:get, /vocab\.getty\.edu.*/).
21
+ to_return(:body => webmock_fixture("tgn-response.txt"), :status => 200)
22
+ end
23
+
24
+ subject { authority.search('whatever') }
25
+
26
+ it "should have id and label keys" do
27
+ expect(subject.first).to eq("id" => 'http://vocab.getty.edu/tgn/2058300', "label" => "Cawood (Andrew, Missouri, United States)")
28
+ expect(subject.last).to eq("id" => 'http://vocab.getty.edu/tgn/7022503', "label" => "Cawood Branch (Kentucky, United States)")
29
+ expect(subject.size).to eq(6)
30
+ end
31
+ end
32
+ end
33
+
34
+ describe "#untaint" do
35
+ subject { authority.untaint(value) }
36
+
37
+ context "with a good string" do
38
+ let(:value) { 'Cawood' }
39
+ it { is_expected.to eq 'Cawood' }
40
+ end
41
+
42
+ context "bad stuff" do
43
+ let(:value) { './"' }
44
+ it { is_expected.to eq '' }
45
+ end
46
+ end
47
+
48
+ describe "#find" do
49
+ context "using a subject id" do
50
+ before do
51
+ stub_request(:get, "http://vocab.getty.edu/tgn/1028772.json").
52
+ to_return(status: 200, body: webmock_fixture("getty-tgn-find-response.json"))
53
+ end
54
+ subject { authority.find("1028772") }
55
+
56
+ it "returns the complete record for a given subject" do
57
+ expect(subject['results']['bindings'].size).to eq 103
58
+ expect(subject['results']['bindings']).to all(have_key('Subject'))
59
+ expect(subject['results']['bindings']).to all(have_key('Predicate'))
60
+ expect(subject['results']['bindings']).to all(have_key('Object'))
61
+ end
62
+ end
63
+ end
64
+
65
+ describe "#request_options" do
66
+ subject { authority.request_options }
67
+ it { is_expected.to eq(accept: "application/sparql-results+json") }
68
+ end
69
+
70
+ describe "#sparql" do
71
+ context "using a single subject term" do
72
+ subject { authority.sparql('search_term') }
73
+ it { is_expected.to eq 'SELECT DISTINCT ?s ?name ?par {
74
+ ?s a skos:Concept; luc:term "search_term";
75
+ skos:inScheme <http://vocab.getty.edu/tgn/> ;
76
+ gvp:prefLabelGVP [skosxl:literalForm ?name] ;
77
+ gvp:parentString ?par .
78
+ FILTER regex(?name, "search_term", "i") .
79
+ } ORDER BY ?name ASC(?par)' }
80
+ end
81
+ context "using a two subject terms" do
82
+ subject { authority.sparql('search term') }
83
+ it { is_expected.to eq "SELECT DISTINCT ?s ?name ?par {
84
+ ?s a skos:Concept; luc:term \"search term\";
85
+ skos:inScheme <http://vocab.getty.edu/tgn/> ;
86
+ gvp:prefLabelGVP [skosxl:literalForm ?name] ;
87
+ gvp:parentString ?par .
88
+ FILTER ((regex(CONCAT(?name, ', ', REPLACE(str(?par), \",[^,]+,[^,]+$\", \"\")), \"search\",\"i\" ) && regex(CONCAT(?name, ', ', REPLACE(str(?par), \",[^,]+,[^,]+$\", \"\")), \"term\",\"i\" ) ) && (regex(?name, \"search\",\"i\" ) || regex(?name, \"term\",\"i\" ) ) ) .
89
+ } ORDER BY ?name ASC(?par)" }
90
+ end
91
+ end
92
+
93
+ end
94
+
95
+
@@ -0,0 +1,97 @@
1
+ require 'spec_helper'
2
+
3
+ describe Qa::Authorities::Getty::Ulan do
4
+
5
+ let(:authority) { described_class.new }
6
+
7
+ describe "#build_query_url" do
8
+ subject { authority.build_query_url("foo") }
9
+ it { is_expected.to match /^http:\/\/vocab\.getty\.edu\// }
10
+ end
11
+
12
+ describe "#find_url" do
13
+ subject { authority.find_url("500026846") }
14
+ it { is_expected.to eq "http://vocab.getty.edu/ulan/500026846.json" }
15
+ end
16
+
17
+ describe "#search" do
18
+ context "authorities" do
19
+ before do
20
+ stub_request(:get, /vocab\.getty\.edu.*/).
21
+ to_return(:body => webmock_fixture("ulan-response.txt"), :status => 200)
22
+ end
23
+
24
+ subject { authority.search('whatever') }
25
+
26
+ it "should have id and label keys" do
27
+ expect(subject.first).to eq("id" => 'http://vocab.getty.edu/ulan/500233743', "label" => "Alan Turner and Associates (British architectural firm, contemporary)")
28
+ expect(subject.last).to eq("id" => 'http://vocab.getty.edu/ulan/500023812', "label" => "Warren, Charles Turner (English engraver, 1762-1823)")
29
+ expect(subject.size).to eq(142)
30
+ end
31
+ end
32
+ end
33
+
34
+ describe "#untaint" do
35
+ subject { authority.untaint(value) }
36
+
37
+ context "with a good string" do
38
+ let(:value) { 'Turner' }
39
+ it { is_expected.to eq 'Turner' }
40
+ end
41
+
42
+ context "bad stuff" do
43
+ let(:value) { './"' }
44
+ it { is_expected.to eq '' }
45
+ end
46
+ end
47
+
48
+ describe "#find" do
49
+ context "using a subject id" do
50
+ before do
51
+ stub_request(:get, "http://vocab.getty.edu/ulan/500026846.json").
52
+ to_return(status: 200, body: webmock_fixture("getty-ulan-find-response.json"))
53
+ end
54
+ subject { authority.find("500026846") }
55
+
56
+ it "returns the complete record for a given subject" do
57
+ expect(subject['results']['bindings'].size).to eq 880
58
+ expect(subject['results']['bindings']).to all(have_key('Subject'))
59
+ expect(subject['results']['bindings']).to all(have_key('Predicate'))
60
+ expect(subject['results']['bindings']).to all(have_key('Object'))
61
+ end
62
+ end
63
+ end
64
+
65
+ describe "#request_options" do
66
+ subject { authority.request_options }
67
+ it { is_expected.to eq(accept: "application/sparql-results+json") }
68
+ end
69
+
70
+ describe "#sparql" do
71
+ context "using a single subject term" do
72
+ subject { authority.sparql('search_term') }
73
+ it { is_expected.to eq 'SELECT DISTINCT ?s ?name ?bio {
74
+ ?s a skos:Concept; luc:term "search_term";
75
+ skos:inScheme <http://vocab.getty.edu/ulan/> ;
76
+ gvp:prefLabelGVP [skosxl:literalForm ?name] ;
77
+ foaf:focus/gvp:biographyPreferred [schema:description ?bio] ;
78
+ skos:altLabel ?alt .
79
+ FILTER regex(?name, "search_term", "i") .
80
+ } ORDER BY ?name' }
81
+ end
82
+ context "using a two subject terms" do
83
+ subject { authority.sparql('search term') }
84
+ it { is_expected.to eq "SELECT DISTINCT ?s ?name ?bio {
85
+ ?s a skos:Concept; luc:term \"search term\";
86
+ skos:inScheme <http://vocab.getty.edu/ulan/> ;
87
+ gvp:prefLabelGVP [skosxl:literalForm ?name] ;
88
+ foaf:focus/gvp:biographyPreferred [schema:description ?bio] ;
89
+ skos:altLabel ?alt .
90
+ FILTER (regex(CONCAT(?name, ' ', ?alt), \"search\",\"i\" ) && regex(CONCAT(?name, ' ', ?alt), \"term\",\"i\" ) ) .
91
+ } ORDER BY ?name" }
92
+ end
93
+ end
94
+
95
+ end
96
+
97
+
@@ -110,7 +110,7 @@ describe Qa::Authorities::Loc do
110
110
  context "using a subject id" do
111
111
  let :results do
112
112
  stub_request(:get, "http://id.loc.gov/authorities/subjects/sh2002003586.json").
113
- with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip, deflate', 'User-Agent'=>'Ruby'}).
113
+ with(:headers => {'Accept'=>'application/json'}).
114
114
  to_return(:status => 200, :body => webmock_fixture("loc-subject-find-response.txt"), :headers => {})
115
115
  Qa::Authorities::Loc.subauthority_for("subjects").find("sh2002003586")
116
116
  end
@@ -6,7 +6,7 @@ describe "mesh rake tasks" do
6
6
  before do
7
7
  @rake = Rake::Application.new
8
8
  Rake.application = @rake
9
- Rake.application.rake_require "mesh", ["#{Rails.root}/lib/tasks", "#{Rails.root}/../../lib/tasks"], []
9
+ Rake.application.rake_require "mesh", ["#{Rails.root}/lib/tasks", "#{Rails.root}/../lib/tasks"], []
10
10
  Rake::Task.define_task(:environment) # rspec has loaded rails
11
11
  end
12
12
 
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,4 @@
1
- require File.expand_path("../internal/config/environment.rb", __FILE__)
2
- require 'rspec/rails'
3
- require 'webmock/rspec'
1
+
4
2
  require 'engine_cart'
5
3
  require 'simplecov'
6
4
  require 'byebug' unless ENV['TRAVIS']
@@ -11,6 +9,9 @@ SimpleCov.start "rails"
11
9
  SimpleCov.command_name "spec"
12
10
  EngineCart.load_application!
13
11
 
12
+ require 'rspec/rails'
13
+ require 'webmock/rspec'
14
+
14
15
  # Requires supporting ruby files with custom matchers and macros, etc,
15
16
  # in spec/support/ and its subdirectories.
16
17
  Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
@@ -18,7 +18,7 @@ class TestAppGenerator < Rails::Generators::Base
18
18
  end
19
19
 
20
20
  def copy_local_authority_fixtures
21
- directory "../fixtures/authorities", "config/authorities"
21
+ directory "../spec/fixtures/authorities", "config/authorities"
22
22
  end
23
23
 
24
24
  def run_migrations
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: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Anderson
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2015-04-17 00:00:00.000000000 Z
18
+ date: 2016-03-29 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rails
@@ -38,7 +38,7 @@ dependencies:
38
38
  - !ruby/object:Gem::Version
39
39
  version: '5.0'
40
40
  - !ruby/object:Gem::Dependency
41
- name: rest-client
41
+ name: faraday
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - ">="
@@ -153,16 +153,16 @@ dependencies:
153
153
  name: engine_cart
154
154
  requirement: !ruby/object:Gem::Requirement
155
155
  requirements:
156
- - - ">="
156
+ - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: '0'
158
+ version: '0.8'
159
159
  type: :development
160
160
  prerelease: false
161
161
  version_requirements: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - ">="
163
+ - - "~>"
164
164
  - !ruby/object:Gem::Version
165
- version: '0'
165
+ version: '0.8'
166
166
  - !ruby/object:Gem::Dependency
167
167
  name: byebug
168
168
  requirement: !ruby/object:Gem::Requirement
@@ -213,10 +213,15 @@ files:
213
213
  - lib/generators/qa/local/templates/config/authorities/states.yml
214
214
  - lib/qa.rb
215
215
  - lib/qa/authorities.rb
216
+ - lib/qa/authorities/assign_fast.rb
217
+ - lib/qa/authorities/assign_fast/generic_authority.rb
218
+ - lib/qa/authorities/assign_fast_subauthority.rb
216
219
  - lib/qa/authorities/authority_with_sub_authority.rb
217
220
  - lib/qa/authorities/base.rb
218
221
  - lib/qa/authorities/getty.rb
219
222
  - lib/qa/authorities/getty/aat.rb
223
+ - lib/qa/authorities/getty/tgn.rb
224
+ - lib/qa/authorities/getty/ulan.rb
220
225
  - lib/qa/authorities/loc.rb
221
226
  - lib/qa/authorities/loc/generic_authority.rb
222
227
  - lib/qa/authorities/loc_subauthority.rb
@@ -238,11 +243,17 @@ files:
238
243
  - lib/tasks/qa_tasks.rake
239
244
  - spec/controllers/terms_controller_spec.rb
240
245
  - spec/fixtures/aat-response.txt
246
+ - spec/fixtures/assign-fast-noheader.json
247
+ - spec/fixtures/assign-fast-noresults.json
248
+ - spec/fixtures/assign-fast-oneresult.json
249
+ - spec/fixtures/assign-fast-topical-result.json
241
250
  - spec/fixtures/authorities/authority_A.yml
242
251
  - spec/fixtures/authorities/authority_B.yml
243
252
  - spec/fixtures/authorities/authority_C.yml
244
253
  - spec/fixtures/authorities/authority_D.yml
245
254
  - spec/fixtures/getty-aat-find-response.json
255
+ - spec/fixtures/getty-tgn-find-response.json
256
+ - spec/fixtures/getty-ulan-find-response.json
246
257
  - spec/fixtures/loc-names-response.txt
247
258
  - spec/fixtures/loc-response.txt
248
259
  - spec/fixtures/loc-subject-find-response.txt
@@ -251,62 +262,13 @@ files:
251
262
  - spec/fixtures/oclcts-response-mesh-1.txt
252
263
  - spec/fixtures/oclcts-response-mesh-2.txt
253
264
  - spec/fixtures/oclcts-response-mesh-3.txt
254
- - spec/internal/Gemfile
255
- - spec/internal/Gemfile.lock
256
- - spec/internal/README.rdoc
257
- - spec/internal/Rakefile
258
- - spec/internal/app/assets/javascripts/application.js
259
- - spec/internal/app/assets/stylesheets/application.css
260
- - spec/internal/app/controllers/application_controller.rb
261
- - spec/internal/app/helpers/application_helper.rb
262
- - spec/internal/app/views/layouts/application.html.erb
263
- - spec/internal/bin/bundle
264
- - spec/internal/bin/rails
265
- - spec/internal/bin/rake
266
- - spec/internal/bin/setup
267
- - spec/internal/config.ru
268
- - spec/internal/config/application.rb
269
- - spec/internal/config/authorities.yml
270
- - spec/internal/config/authorities/authority_A.yml
271
- - spec/internal/config/authorities/authority_B.yml
272
- - spec/internal/config/authorities/authority_C.yml
273
- - spec/internal/config/authorities/authority_D.yml
274
- - spec/internal/config/authorities/states.yml
275
- - spec/internal/config/boot.rb
276
- - spec/internal/config/database.yml
277
- - spec/internal/config/environment.rb
278
- - spec/internal/config/environments/development.rb
279
- - spec/internal/config/environments/production.rb
280
- - spec/internal/config/environments/test.rb
281
- - spec/internal/config/initializers/assets.rb
282
- - spec/internal/config/initializers/backtrace_silencers.rb
283
- - spec/internal/config/initializers/cookies_serializer.rb
284
- - spec/internal/config/initializers/filter_parameter_logging.rb
285
- - spec/internal/config/initializers/inflections.rb
286
- - spec/internal/config/initializers/mime_types.rb
287
- - spec/internal/config/initializers/session_store.rb
288
- - spec/internal/config/initializers/wrap_parameters.rb
289
- - spec/internal/config/locales/en.yml
290
- - spec/internal/config/oclcts-authorities.yml
291
- - spec/internal/config/routes.rb
292
- - spec/internal/config/secrets.yml
293
- - spec/internal/db/development.sqlite3
294
- - spec/internal/db/migrate/20150311214117_create_qa_subject_mesh_terms.qa.rb
295
- - spec/internal/db/migrate/20150311214118_create_qa_mesh_tree.qa.rb
296
- - spec/internal/db/migrate/20150311214119_add_term_lower_to_qa_subject_mesh_terms.qa.rb
297
- - spec/internal/db/schema.rb
298
- - spec/internal/db/seeds.rb
299
- - spec/internal/db/test.sqlite3
300
- - spec/internal/lib/generators/test_app_generator.rb
301
- - spec/internal/log/development.log
302
- - spec/internal/public/404.html
303
- - spec/internal/public/422.html
304
- - spec/internal/public/500.html
305
- - spec/internal/public/favicon.ico
306
- - spec/internal/public/robots.txt
307
- - spec/internal/test/test_helper.rb
265
+ - spec/fixtures/tgn-response.txt
266
+ - spec/fixtures/ulan-response.txt
267
+ - spec/lib/authorities/assign_fast_spec.rb
308
268
  - spec/lib/authorities/file_based_authority_spec.rb
309
269
  - spec/lib/authorities/getty/aat_spec.rb
270
+ - spec/lib/authorities/getty/tgn_spec.rb
271
+ - spec/lib/authorities/getty/ulan_spec.rb
310
272
  - spec/lib/authorities/getty_spec.rb
311
273
  - spec/lib/authorities/loc_spec.rb
312
274
  - spec/lib/authorities/local_spec.rb
@@ -341,18 +303,24 @@ required_rubygems_version: !ruby/object:Gem::Requirement
341
303
  version: '0'
342
304
  requirements: []
343
305
  rubyforge_project:
344
- rubygems_version: 2.4.5
306
+ rubygems_version: 2.4.5.1
345
307
  signing_key:
346
308
  specification_version: 4
347
309
  summary: You should question your authorities.
348
310
  test_files:
349
311
  - spec/controllers/terms_controller_spec.rb
350
312
  - spec/fixtures/aat-response.txt
313
+ - spec/fixtures/assign-fast-noheader.json
314
+ - spec/fixtures/assign-fast-noresults.json
315
+ - spec/fixtures/assign-fast-oneresult.json
316
+ - spec/fixtures/assign-fast-topical-result.json
351
317
  - spec/fixtures/authorities/authority_A.yml
352
318
  - spec/fixtures/authorities/authority_B.yml
353
319
  - spec/fixtures/authorities/authority_C.yml
354
320
  - spec/fixtures/authorities/authority_D.yml
355
321
  - spec/fixtures/getty-aat-find-response.json
322
+ - spec/fixtures/getty-tgn-find-response.json
323
+ - spec/fixtures/getty-ulan-find-response.json
356
324
  - spec/fixtures/loc-names-response.txt
357
325
  - spec/fixtures/loc-response.txt
358
326
  - spec/fixtures/loc-subject-find-response.txt
@@ -361,62 +329,13 @@ test_files:
361
329
  - spec/fixtures/oclcts-response-mesh-1.txt
362
330
  - spec/fixtures/oclcts-response-mesh-2.txt
363
331
  - spec/fixtures/oclcts-response-mesh-3.txt
364
- - spec/internal/app/assets/javascripts/application.js
365
- - spec/internal/app/assets/stylesheets/application.css
366
- - spec/internal/app/controllers/application_controller.rb
367
- - spec/internal/app/helpers/application_helper.rb
368
- - spec/internal/app/views/layouts/application.html.erb
369
- - spec/internal/bin/bundle
370
- - spec/internal/bin/rails
371
- - spec/internal/bin/rake
372
- - spec/internal/bin/setup
373
- - spec/internal/config/application.rb
374
- - spec/internal/config/authorities/authority_A.yml
375
- - spec/internal/config/authorities/authority_B.yml
376
- - spec/internal/config/authorities/authority_C.yml
377
- - spec/internal/config/authorities/authority_D.yml
378
- - spec/internal/config/authorities/states.yml
379
- - spec/internal/config/authorities.yml
380
- - spec/internal/config/boot.rb
381
- - spec/internal/config/database.yml
382
- - spec/internal/config/environment.rb
383
- - spec/internal/config/environments/development.rb
384
- - spec/internal/config/environments/production.rb
385
- - spec/internal/config/environments/test.rb
386
- - spec/internal/config/initializers/assets.rb
387
- - spec/internal/config/initializers/backtrace_silencers.rb
388
- - spec/internal/config/initializers/cookies_serializer.rb
389
- - spec/internal/config/initializers/filter_parameter_logging.rb
390
- - spec/internal/config/initializers/inflections.rb
391
- - spec/internal/config/initializers/mime_types.rb
392
- - spec/internal/config/initializers/session_store.rb
393
- - spec/internal/config/initializers/wrap_parameters.rb
394
- - spec/internal/config/locales/en.yml
395
- - spec/internal/config/oclcts-authorities.yml
396
- - spec/internal/config/routes.rb
397
- - spec/internal/config/secrets.yml
398
- - spec/internal/config.ru
399
- - spec/internal/db/development.sqlite3
400
- - spec/internal/db/migrate/20150311214117_create_qa_subject_mesh_terms.qa.rb
401
- - spec/internal/db/migrate/20150311214118_create_qa_mesh_tree.qa.rb
402
- - spec/internal/db/migrate/20150311214119_add_term_lower_to_qa_subject_mesh_terms.qa.rb
403
- - spec/internal/db/schema.rb
404
- - spec/internal/db/seeds.rb
405
- - spec/internal/db/test.sqlite3
406
- - spec/internal/Gemfile
407
- - spec/internal/Gemfile.lock
408
- - spec/internal/lib/generators/test_app_generator.rb
409
- - spec/internal/log/development.log
410
- - spec/internal/public/404.html
411
- - spec/internal/public/422.html
412
- - spec/internal/public/500.html
413
- - spec/internal/public/favicon.ico
414
- - spec/internal/public/robots.txt
415
- - spec/internal/Rakefile
416
- - spec/internal/README.rdoc
417
- - spec/internal/test/test_helper.rb
332
+ - spec/fixtures/tgn-response.txt
333
+ - spec/fixtures/ulan-response.txt
334
+ - spec/lib/authorities/assign_fast_spec.rb
418
335
  - spec/lib/authorities/file_based_authority_spec.rb
419
336
  - spec/lib/authorities/getty/aat_spec.rb
337
+ - spec/lib/authorities/getty/tgn_spec.rb
338
+ - spec/lib/authorities/getty/ulan_spec.rb
420
339
  - spec/lib/authorities/getty_spec.rb
421
340
  - spec/lib/authorities/loc_spec.rb
422
341
  - spec/lib/authorities/local_spec.rb