qa 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/app/controllers/qa/terms_controller.rb +31 -24
- data/config/routes.rb +2 -0
- data/lib/qa/authorities.rb +3 -1
- data/lib/qa/authorities/base.rb +5 -32
- data/lib/qa/authorities/lcsh.rb +21 -26
- data/lib/qa/authorities/loc.rb +124 -164
- data/lib/qa/authorities/local.rb +22 -57
- data/lib/qa/authorities/local/subauthority.rb +61 -0
- data/lib/qa/authorities/mesh.rb +13 -6
- data/lib/qa/authorities/oclcts.rb +18 -29
- data/lib/qa/authorities/tgnlang.rb +38 -23
- data/lib/qa/authorities/web_service_base.rb +20 -0
- data/lib/qa/version.rb +1 -1
- data/spec/controllers/terms_controller_spec.rb +6 -2
- data/spec/fixtures/authorities/authority_B.yml +7 -7
- data/spec/fixtures/authorities/authority_D.yml +4 -0
- data/spec/internal/Gemfile +2 -2
- data/spec/internal/Gemfile.lock +42 -39
- data/spec/internal/config/initializers/secret_token.rb +1 -1
- data/spec/internal/config/routes.rb +1 -1
- data/spec/internal/db/development.sqlite3 +0 -0
- data/spec/internal/db/migrate/{20130930151844_create_qa_subject_mesh_terms.qa.rb → 20131106203101_create_qa_subject_mesh_terms.qa.rb} +0 -0
- data/spec/internal/db/migrate/{20130930151845_create_qa_mesh_tree.qa.rb → 20131106203102_create_qa_mesh_tree.qa.rb} +0 -0
- data/spec/internal/db/migrate/{20130930151846_add_term_lower_to_qa_subject_mesh_terms.qa.rb → 20131106203103_add_term_lower_to_qa_subject_mesh_terms.qa.rb} +0 -0
- data/spec/internal/db/schema.rb +1 -1
- data/spec/internal/db/test.sqlite3 +0 -0
- data/spec/internal/log/development.log +6436 -79
- data/spec/lib/authorities_lcsh_spec.rb +30 -41
- data/spec/lib/authorities_loc_spec.rb +4 -3
- data/spec/lib/authorities_local_spec.rb +63 -27
- data/spec/lib/authorities_mesh_spec.rb +8 -2
- data/spec/lib/authorities_oclcts_spec.rb +6 -5
- data/spec/lib/authorities_tgnlang_spec.rb +6 -9
- data/spec/spec_helper.rb +7 -0
- metadata +49 -55
@@ -5,57 +5,46 @@ describe Qa::Authorities::Lcsh do
|
|
5
5
|
before :all do
|
6
6
|
stub_request(:get, "http://id.loc.gov/authorities/suggest/?q=ABBA").
|
7
7
|
to_return(:body => webmock_fixture("lcsh-response.txt"), :status => 200)
|
8
|
-
@terms = Qa::Authorities::Lcsh.new
|
8
|
+
@terms = Qa::Authorities::Lcsh.new
|
9
|
+
@terms.search("ABBA")
|
9
10
|
end
|
10
11
|
|
11
|
-
describe "response from LOC" do
|
12
|
-
it "should have the query term for its first element" do
|
13
|
-
@terms.raw_response[0].should be_kind_of String
|
14
|
-
@terms.raw_response[0].should == "ABBA"
|
15
|
-
end
|
16
|
-
|
17
|
-
it "should have an array of results that match the query" do
|
18
|
-
@terms.raw_response[1].should be_kind_of Array
|
19
|
-
@terms.raw_response[1].should include "ABBA (Musical group)"
|
20
|
-
@terms.raw_response[1].length.should == 10
|
21
|
-
end
|
22
|
-
|
23
|
-
it "should have an array of strings that appear to have no use" do
|
24
|
-
@terms.raw_response[2].should be_kind_of Array
|
25
|
-
@terms.raw_response[2].collect { |v| v.should == "1 result" }
|
26
|
-
@terms.raw_response[2].length.should == 10
|
27
|
-
end
|
28
|
-
|
29
|
-
it "should have an array of the urls for each term" do
|
30
|
-
@terms.raw_response[3].should be_kind_of Array
|
31
|
-
@terms.raw_response[3].should include "http://id.loc.gov/authorities/names/n98029154"
|
32
|
-
@terms.raw_response[3].length.should == 10
|
33
|
-
end
|
34
|
-
end
|
35
12
|
|
36
13
|
describe "presenting the results from LOC" do
|
37
|
-
it "should give us the query term" do
|
38
|
-
@terms.query.should == "ABBA"
|
39
|
-
end
|
40
|
-
|
41
|
-
it "should give us an array of suggestions" do
|
42
|
-
@terms.suggestions.should be_kind_of Array
|
43
|
-
@terms.suggestions.should include "ABBA (Musical group)"
|
44
|
-
end
|
45
14
|
|
46
|
-
it "
|
47
|
-
@terms.
|
48
|
-
@terms.
|
15
|
+
it "has a list of responses" do
|
16
|
+
@terms.response.should be_kind_of Array
|
17
|
+
@terms.response.each do |item|
|
18
|
+
item.should be_kind_of Hash
|
19
|
+
item.keys.should == ["id", "label"]
|
20
|
+
end
|
21
|
+
@terms.response.map { |item| item["label"] }.should include "ABBA (Musical group)"
|
22
|
+
@terms.response.map { |item| item["id"] }.should include "n78090836"
|
49
23
|
end
|
50
24
|
end
|
51
25
|
|
52
|
-
describe "#
|
26
|
+
describe "#build_response" do
|
53
27
|
it "should set .response to be an array of hashes in the id/label structure" do
|
54
28
|
sample = { "id"=>"n92117993", "label"=>"Abba (Nigeria)" }
|
55
|
-
|
56
|
-
@terms.
|
57
|
-
|
29
|
+
# use #send since build_response is private
|
30
|
+
r = @terms.send(:build_response,
|
31
|
+
["ABBA",
|
32
|
+
["ABBA (Musical group)",
|
33
|
+
"ABBA (Musical group). Gold",
|
34
|
+
"ABBA (Organization)",
|
35
|
+
"Abba (Nigeria)"],
|
36
|
+
["1 result",
|
37
|
+
"1 result",
|
38
|
+
"1 result",
|
39
|
+
"1 result" ],
|
40
|
+
["http://id.loc.gov/authorities/names/n78090836",
|
41
|
+
"http://id.loc.gov/authorities/names/n2003148504",
|
42
|
+
"http://id.loc.gov/authorities/names/no2012083395",
|
43
|
+
"http://id.loc.gov/authorities/names/n92117993"]]
|
44
|
+
)
|
45
|
+
r.should be_kind_of Array
|
46
|
+
r.should include sample
|
58
47
|
end
|
59
48
|
end
|
60
49
|
|
61
|
-
|
50
|
+
end
|
@@ -6,7 +6,8 @@ describe Qa::Authorities::Loc do
|
|
6
6
|
stub_request(:get, "http://id.loc.gov/search/?format=json&q=haw*&q=cs:http://id.loc.gov/vocabulary/geographicAreas").
|
7
7
|
with(:headers => {'Accept'=>'application/json'}).
|
8
8
|
to_return(:body => webmock_fixture("loc-response.txt"), :status => 200)
|
9
|
-
@authority = Qa::Authorities::Loc.new
|
9
|
+
@authority = Qa::Authorities::Loc.new
|
10
|
+
@authority.search("haw*", "geographicAreas")
|
10
11
|
end
|
11
12
|
|
12
13
|
it "should instantiate with a query and return data" do
|
@@ -28,8 +29,8 @@ describe Qa::Authorities::Loc do
|
|
28
29
|
|
29
30
|
it "should return JSON" do
|
30
31
|
@authority.should_not be_nil
|
31
|
-
json = @authority.parse_authority_response
|
32
|
+
json = @authority.parse_authority_response(@authority.raw_response)
|
32
33
|
expect(json).not_to be_empty
|
33
34
|
end
|
34
35
|
|
35
|
-
end
|
36
|
+
end
|
@@ -5,85 +5,121 @@ describe Qa::Authorities::Local do
|
|
5
5
|
before do
|
6
6
|
AUTHORITIES_CONFIG[:local_path] = local_authorities_path
|
7
7
|
end
|
8
|
-
|
8
|
+
|
9
9
|
context "valid local sub_authorities" do
|
10
10
|
it "should validate the sub_authority" do
|
11
11
|
Qa::Authorities::Local.sub_authorities.should include "authority_A"
|
12
12
|
Qa::Authorities::Local.sub_authorities.should include "authority_B"
|
13
13
|
end
|
14
|
+
|
15
|
+
it "should return a sub_authority" do
|
16
|
+
expect { Qa::Authorities::Local.sub_authority('authority_Z')}.to raise_error ArgumentError, "Invalid sub-authority 'authority_Z'"
|
17
|
+
expect(Qa::Authorities::Local.sub_authority('authority_A')).to be_kind_of Qa::Authorities::Subauthority
|
18
|
+
end
|
14
19
|
end
|
15
20
|
|
16
21
|
context "retrieve all entries for a local sub_authority" do
|
17
|
-
let(:expected) { [ {
|
22
|
+
let(:expected) { [ { 'id'=> "A1", 'label' => "Abc Term A1" },
|
23
|
+
{ 'id' => "A2", 'label'=> "Term A2" },
|
24
|
+
{ 'id' => "A3", 'label' => "Abc Term A3" } ] }
|
18
25
|
it "should return all the entries" do
|
19
|
-
authorities = Qa::Authorities::Local.new
|
20
|
-
expect(authorities.
|
26
|
+
authorities = Qa::Authorities::Local.new
|
27
|
+
expect(authorities.search("", "authority_A")).to eq(expected)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
context "a malformed authority file " do
|
32
|
+
it "should raise an error" do
|
33
|
+
authorities = Qa::Authorities::Local.new
|
34
|
+
expect{ authorities.search("", "authority_D") }.to raise_error Psych::SyntaxError
|
21
35
|
end
|
22
36
|
end
|
23
37
|
|
24
38
|
context "retrieve a subset of entries for a local sub_authority" do
|
25
39
|
|
26
40
|
context "at least one matching entry" do
|
27
|
-
let(:expected) { [ {
|
41
|
+
let(:expected) { [ { 'id' => "A1", 'label' => "Abc Term A1" },
|
42
|
+
{ 'id' => "A3", 'label' => "Abc Term A3" } ] }
|
28
43
|
it "should return only entries matching the query term" do
|
29
|
-
authorities = Qa::Authorities::Local.new
|
30
|
-
expect(authorities.
|
44
|
+
authorities = Qa::Authorities::Local.new
|
45
|
+
expect(authorities.search("Abc", "authority_A")).to eq(expected)
|
46
|
+
end
|
47
|
+
|
48
|
+
it "should match parts of words in the middle of the term" do
|
49
|
+
authorities = Qa::Authorities::Local.new
|
50
|
+
expect(authorities.search("Term A1", "authority_A")).to eq([{"id"=>"A1", "label"=>"Abc Term A1"}])
|
31
51
|
end
|
32
52
|
end
|
33
53
|
|
34
54
|
context "no matching entries" do
|
35
55
|
let(:expected) { [] }
|
36
56
|
it "should return an empty array" do
|
37
|
-
authorities = Qa::Authorities::Local.new
|
38
|
-
expect(authorities.
|
39
|
-
end
|
57
|
+
authorities = Qa::Authorities::Local.new
|
58
|
+
expect(authorities.search("def", "authority_A")).to eq(expected)
|
59
|
+
end
|
40
60
|
end
|
41
61
|
|
42
62
|
context "search not case-sensitive" do
|
43
|
-
let(:expected) { [ {
|
63
|
+
let(:expected) { [ { 'id' => "A1", 'label' => "Abc Term A1" },
|
64
|
+
{ 'id' => "A3", 'label' => "Abc Term A3" } ] }
|
44
65
|
it "should return entries matching the query term without regard to case" do
|
45
|
-
authorities = Qa::Authorities::Local.new
|
46
|
-
expect(authorities.
|
47
|
-
end
|
66
|
+
authorities = Qa::Authorities::Local.new
|
67
|
+
expect(authorities.search("aBc", "authority_A")).to eq(expected)
|
68
|
+
end
|
48
69
|
end
|
49
70
|
|
50
71
|
end
|
51
72
|
|
52
73
|
context "retrieve full record for term" do
|
53
74
|
|
54
|
-
let(:authorities) { Qa::Authorities::Local.new
|
75
|
+
let(:authorities) { Qa::Authorities::Local.new }
|
55
76
|
|
56
|
-
context "
|
77
|
+
context "source is a hash" do
|
57
78
|
let(:id) { "A2" }
|
58
|
-
let(:expected) { {
|
79
|
+
let(:expected) { { 'id' => "A2", 'term' => "Term A2", 'active' => false } }
|
59
80
|
it "should return the full term record" do
|
60
|
-
|
81
|
+
record = authorities.get_full_record(id, "authority_A")
|
82
|
+
expect(record).to be_a HashWithIndifferentAccess
|
83
|
+
expect(record).to eq(expected)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
context "source is a list" do
|
87
|
+
it "should be indifferent access" do
|
88
|
+
record = authorities.get_full_record('Term C1', "authority_C")
|
89
|
+
expect(record).to be_a HashWithIndifferentAccess
|
61
90
|
end
|
62
91
|
end
|
63
92
|
|
64
93
|
context "term does not exist" do
|
65
94
|
let(:id) { "NonID" }
|
66
|
-
let(:expected) { {}
|
95
|
+
let(:expected) { {} }
|
67
96
|
it "should return an empty hash" do
|
68
|
-
expect(authorities.get_full_record(id)).to eq(expected)
|
97
|
+
expect(authorities.get_full_record(id, "authority_A")).to eq(expected)
|
69
98
|
end
|
70
99
|
end
|
100
|
+
|
71
101
|
end
|
72
102
|
|
73
103
|
context "term does not an id" do
|
74
|
-
let(:authorities) { Qa::Authorities::Local.new
|
75
|
-
let(:expected) { [ {
|
104
|
+
let(:authorities) { Qa::Authorities::Local.new }
|
105
|
+
let(:expected) { [ { 'id' => "Term B1", 'label' => "Term B1" },
|
106
|
+
{ 'id' => "Term B2", 'label' => "Term B2" },
|
107
|
+
{ 'id' => "Term B3", 'label' => "Term B3" } ] }
|
76
108
|
it "should set the id to be same as the label" do
|
77
|
-
expect(authorities.
|
109
|
+
expect(authorities.search("", "authority_B")).to eq(expected)
|
78
110
|
end
|
79
111
|
end
|
80
112
|
|
81
113
|
context "authority YAML is a list of terms" do
|
82
|
-
let(:authorities) { Qa::Authorities::Local.new
|
83
|
-
let(:expected) { [ {
|
114
|
+
let(:authorities) { Qa::Authorities::Local.new }
|
115
|
+
let(:expected) { [ { 'id' => "Term C1", 'label' => "Term C1" },
|
116
|
+
{ 'id' => "Term C2", 'label' => "Term C2" },
|
117
|
+
{ 'id' => "Term C3", 'label' => "Term C3" } ] }
|
118
|
+
|
84
119
|
it "should use the terms as labels" do
|
85
|
-
expect(authorities.
|
120
|
+
expect(authorities.search("", "authority_C")).to eq(expected)
|
86
121
|
end
|
122
|
+
|
87
123
|
end
|
88
124
|
|
89
|
-
end
|
125
|
+
end
|
@@ -28,11 +28,17 @@ describe Qa::Authorities::Mesh do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
it "handles queries" do
|
31
|
-
|
32
|
-
m
|
31
|
+
m = Qa::Authorities::Mesh.new
|
32
|
+
m.search('mr')
|
33
33
|
results = m.results
|
34
34
|
results.should include( {id: '1', label: 'Mr Plow'} )
|
35
35
|
results.length.should == 3
|
36
36
|
end
|
37
|
+
|
38
|
+
it "gets full records" do
|
39
|
+
m = Qa::Authorities::Mesh.new
|
40
|
+
result = m.get_full_record('2')
|
41
|
+
result.should == {id: '2', label: 'Mr Snow', synonyms: []}
|
42
|
+
end
|
37
43
|
end
|
38
44
|
end
|
@@ -10,10 +10,11 @@ describe Qa::Authorities::Oclcts do
|
|
10
10
|
stub_request(:get, "http://tspilot.oclc.org/mesh/?maximumRecords=10&operation=searchRetrieve&query=dc.identifier%20exact%20%22D031329Q000821%22&recordPacking=xml&recordSchema=http://zthes.z3950.org/xml/1.0/&recordXPath=&resultSetTTL=300&sortKeys=&startRecord=1&version=1.1").
|
11
11
|
to_return(:body => webmock_fixture("oclcts-response-mesh-3.txt"), :status => 200)
|
12
12
|
|
13
|
-
@first_query = Qa::Authorities::Oclcts.new
|
14
|
-
@terms = @first_query.
|
15
|
-
@term_record = @first_query.get_full_record
|
16
|
-
@second_query = Qa::Authorities::Oclcts.new
|
13
|
+
@first_query = Qa::Authorities::Oclcts.new
|
14
|
+
@terms = @first_query.search("ball", "mesh")
|
15
|
+
@term_record = @first_query.get_full_record(@terms.first["id"], "mesh")
|
16
|
+
@second_query = Qa::Authorities::Oclcts.new
|
17
|
+
@second_query.search("alph", "mesh")
|
17
18
|
end
|
18
19
|
|
19
20
|
describe "a query for terms" do
|
@@ -40,7 +41,7 @@ describe Qa::Authorities::Oclcts do
|
|
40
41
|
end
|
41
42
|
|
42
43
|
it "should succeed for valid ids, even if the id is not in the initial list of responses" do
|
43
|
-
record = @second_query.get_full_record
|
44
|
+
record = @second_query.get_full_record(@terms.first["id"], "mesh")
|
44
45
|
record.values.should include @terms.first["id"]
|
45
46
|
record.values.should include @terms.first["label"]
|
46
47
|
end
|
@@ -3,20 +3,17 @@ require 'spec_helper'
|
|
3
3
|
describe Qa::Authorities::Tgnlang do
|
4
4
|
|
5
5
|
before :all do
|
6
|
-
@terms = Qa::Authorities::Tgnlang.new
|
6
|
+
@terms = Qa::Authorities::Tgnlang.new
|
7
|
+
@terms.search("Tibetan")
|
7
8
|
end
|
8
9
|
|
9
10
|
describe "response from dataset" do
|
10
|
-
it "should return
|
11
|
-
@terms.results.
|
11
|
+
it "should return unique record with query of Tibetan" do
|
12
|
+
@terms.results.should == [{"id"=>"75446", "label"=>"Tibetan"}]
|
12
13
|
end
|
13
|
-
it "should return type
|
14
|
-
@terms.results.class.
|
14
|
+
it "should return type Array" do
|
15
|
+
@terms.results.class.should == Array
|
15
16
|
end
|
16
|
-
it "should return a string it contains" do
|
17
|
-
@terms.results["Tibetan"].should == "Tibetan"
|
18
|
-
end
|
19
|
-
|
20
17
|
end
|
21
18
|
|
22
19
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -58,3 +58,10 @@ end
|
|
58
58
|
def local_authorities_path
|
59
59
|
File.expand_path(File.join("../fixtures/authorities"), __FILE__)
|
60
60
|
end
|
61
|
+
|
62
|
+
# returns the file contents
|
63
|
+
def load_fixture_file(fname)
|
64
|
+
File.open(Rails.root.join("spec/fixtures", fname)) do |f|
|
65
|
+
return f.read
|
66
|
+
end
|
67
|
+
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Stephen Anderson
|
@@ -16,12 +15,11 @@ authors:
|
|
16
15
|
autorequire:
|
17
16
|
bindir: bin
|
18
17
|
cert_chain: []
|
19
|
-
date: 2013-
|
18
|
+
date: 2013-11-07 00:00:00.000000000 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: rails
|
23
22
|
requirement: !ruby/object:Gem::Requirement
|
24
|
-
none: false
|
25
23
|
requirements:
|
26
24
|
- - ~>
|
27
25
|
- !ruby/object:Gem::Version
|
@@ -29,7 +27,6 @@ dependencies:
|
|
29
27
|
type: :runtime
|
30
28
|
prerelease: false
|
31
29
|
version_requirements: !ruby/object:Gem::Requirement
|
32
|
-
none: false
|
33
30
|
requirements:
|
34
31
|
- - ~>
|
35
32
|
- !ruby/object:Gem::Version
|
@@ -37,23 +34,34 @@ dependencies:
|
|
37
34
|
- !ruby/object:Gem::Dependency
|
38
35
|
name: curb
|
39
36
|
requirement: !ruby/object:Gem::Requirement
|
40
|
-
none: false
|
41
37
|
requirements:
|
42
|
-
- -
|
38
|
+
- - '>='
|
43
39
|
- !ruby/object:Gem::Version
|
44
40
|
version: '0'
|
45
41
|
type: :runtime
|
46
42
|
prerelease: false
|
47
43
|
version_requirements: !ruby/object:Gem::Requirement
|
48
|
-
none: false
|
49
44
|
requirements:
|
50
|
-
- -
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: rest-client
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
51
60
|
- !ruby/object:Gem::Version
|
52
61
|
version: '0'
|
53
62
|
- !ruby/object:Gem::Dependency
|
54
63
|
name: nokogiri
|
55
64
|
requirement: !ruby/object:Gem::Requirement
|
56
|
-
none: false
|
57
65
|
requirements:
|
58
66
|
- - ~>
|
59
67
|
- !ruby/object:Gem::Version
|
@@ -61,7 +69,6 @@ dependencies:
|
|
61
69
|
type: :runtime
|
62
70
|
prerelease: false
|
63
71
|
version_requirements: !ruby/object:Gem::Requirement
|
64
|
-
none: false
|
65
72
|
requirements:
|
66
73
|
- - ~>
|
67
74
|
- !ruby/object:Gem::Version
|
@@ -69,129 +76,113 @@ dependencies:
|
|
69
76
|
- !ruby/object:Gem::Dependency
|
70
77
|
name: activerecord-import
|
71
78
|
requirement: !ruby/object:Gem::Requirement
|
72
|
-
none: false
|
73
79
|
requirements:
|
74
|
-
- -
|
80
|
+
- - '>='
|
75
81
|
- !ruby/object:Gem::Version
|
76
82
|
version: 0.4.0
|
77
83
|
type: :runtime
|
78
84
|
prerelease: false
|
79
85
|
version_requirements: !ruby/object:Gem::Requirement
|
80
|
-
none: false
|
81
86
|
requirements:
|
82
|
-
- -
|
87
|
+
- - '>='
|
83
88
|
- !ruby/object:Gem::Version
|
84
89
|
version: 0.4.0
|
85
90
|
- !ruby/object:Gem::Dependency
|
86
91
|
name: sqlite3
|
87
92
|
requirement: !ruby/object:Gem::Requirement
|
88
|
-
none: false
|
89
93
|
requirements:
|
90
|
-
- -
|
94
|
+
- - '>='
|
91
95
|
- !ruby/object:Gem::Version
|
92
96
|
version: '0'
|
93
97
|
type: :development
|
94
98
|
prerelease: false
|
95
99
|
version_requirements: !ruby/object:Gem::Requirement
|
96
|
-
none: false
|
97
100
|
requirements:
|
98
|
-
- -
|
101
|
+
- - '>='
|
99
102
|
- !ruby/object:Gem::Version
|
100
103
|
version: '0'
|
101
104
|
- !ruby/object:Gem::Dependency
|
102
105
|
name: rspec
|
103
106
|
requirement: !ruby/object:Gem::Requirement
|
104
|
-
none: false
|
105
107
|
requirements:
|
106
|
-
- -
|
108
|
+
- - '>='
|
107
109
|
- !ruby/object:Gem::Version
|
108
110
|
version: '0'
|
109
111
|
type: :development
|
110
112
|
prerelease: false
|
111
113
|
version_requirements: !ruby/object:Gem::Requirement
|
112
|
-
none: false
|
113
114
|
requirements:
|
114
|
-
- -
|
115
|
+
- - '>='
|
115
116
|
- !ruby/object:Gem::Version
|
116
117
|
version: '0'
|
117
118
|
- !ruby/object:Gem::Dependency
|
118
119
|
name: rspec-rails
|
119
120
|
requirement: !ruby/object:Gem::Requirement
|
120
|
-
none: false
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - '>='
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
type: :development
|
126
126
|
prerelease: false
|
127
127
|
version_requirements: !ruby/object:Gem::Requirement
|
128
|
-
none: false
|
129
128
|
requirements:
|
130
|
-
- -
|
129
|
+
- - '>='
|
131
130
|
- !ruby/object:Gem::Version
|
132
131
|
version: '0'
|
133
132
|
- !ruby/object:Gem::Dependency
|
134
133
|
name: webmock
|
135
134
|
requirement: !ruby/object:Gem::Requirement
|
136
|
-
none: false
|
137
135
|
requirements:
|
138
|
-
- -
|
136
|
+
- - '>='
|
139
137
|
- !ruby/object:Gem::Version
|
140
138
|
version: '0'
|
141
139
|
type: :development
|
142
140
|
prerelease: false
|
143
141
|
version_requirements: !ruby/object:Gem::Requirement
|
144
|
-
none: false
|
145
142
|
requirements:
|
146
|
-
- -
|
143
|
+
- - '>='
|
147
144
|
- !ruby/object:Gem::Version
|
148
145
|
version: '0'
|
149
146
|
- !ruby/object:Gem::Dependency
|
150
147
|
name: simplecov
|
151
148
|
requirement: !ruby/object:Gem::Requirement
|
152
|
-
none: false
|
153
149
|
requirements:
|
154
|
-
- -
|
150
|
+
- - '>='
|
155
151
|
- !ruby/object:Gem::Version
|
156
152
|
version: '0'
|
157
153
|
type: :development
|
158
154
|
prerelease: false
|
159
155
|
version_requirements: !ruby/object:Gem::Requirement
|
160
|
-
none: false
|
161
156
|
requirements:
|
162
|
-
- -
|
157
|
+
- - '>='
|
163
158
|
- !ruby/object:Gem::Version
|
164
159
|
version: '0'
|
165
160
|
- !ruby/object:Gem::Dependency
|
166
161
|
name: sqlite3
|
167
162
|
requirement: !ruby/object:Gem::Requirement
|
168
|
-
none: false
|
169
163
|
requirements:
|
170
|
-
- -
|
164
|
+
- - '>='
|
171
165
|
- !ruby/object:Gem::Version
|
172
166
|
version: '0'
|
173
167
|
type: :development
|
174
168
|
prerelease: false
|
175
169
|
version_requirements: !ruby/object:Gem::Requirement
|
176
|
-
none: false
|
177
170
|
requirements:
|
178
|
-
- -
|
171
|
+
- - '>='
|
179
172
|
- !ruby/object:Gem::Version
|
180
173
|
version: '0'
|
181
174
|
- !ruby/object:Gem::Dependency
|
182
175
|
name: debugger
|
183
176
|
requirement: !ruby/object:Gem::Requirement
|
184
|
-
none: false
|
185
177
|
requirements:
|
186
|
-
- -
|
178
|
+
- - '>='
|
187
179
|
- !ruby/object:Gem::Version
|
188
180
|
version: '0'
|
189
181
|
type: :development
|
190
182
|
prerelease: false
|
191
183
|
version_requirements: !ruby/object:Gem::Requirement
|
192
|
-
none: false
|
193
184
|
requirements:
|
194
|
-
- -
|
185
|
+
- - '>='
|
195
186
|
- !ruby/object:Gem::Version
|
196
187
|
version: '0'
|
197
188
|
description: Provides a set of uniform RESTful routes to query any controlled vocabulary
|
@@ -221,6 +212,7 @@ files:
|
|
221
212
|
- lib/qa/authorities/base.rb
|
222
213
|
- lib/qa/authorities/lcsh.rb
|
223
214
|
- lib/qa/authorities/loc.rb
|
215
|
+
- lib/qa/authorities/local/subauthority.rb
|
224
216
|
- lib/qa/authorities/local.rb
|
225
217
|
- lib/qa/authorities/mesh.rb
|
226
218
|
- lib/qa/authorities/mesh_tools/mesh_data_parser.rb
|
@@ -228,6 +220,7 @@ files:
|
|
228
220
|
- lib/qa/authorities/mesh_tools.rb
|
229
221
|
- lib/qa/authorities/oclcts.rb
|
230
222
|
- lib/qa/authorities/tgnlang.rb
|
223
|
+
- lib/qa/authorities/web_service_base.rb
|
231
224
|
- lib/qa/authorities.rb
|
232
225
|
- lib/qa/data/TGN_LANGUAGES.xml
|
233
226
|
- lib/qa/engine.rb
|
@@ -241,6 +234,7 @@ files:
|
|
241
234
|
- spec/fixtures/authorities/authority_A.yml
|
242
235
|
- spec/fixtures/authorities/authority_B.yml
|
243
236
|
- spec/fixtures/authorities/authority_C.yml
|
237
|
+
- spec/fixtures/authorities/authority_D.yml
|
244
238
|
- spec/fixtures/lcsh-response.txt
|
245
239
|
- spec/fixtures/loc-response.txt
|
246
240
|
- spec/fixtures/mesh.txt
|
@@ -274,9 +268,9 @@ files:
|
|
274
268
|
- spec/internal/config/routes.rb
|
275
269
|
- spec/internal/config.ru
|
276
270
|
- spec/internal/db/development.sqlite3
|
277
|
-
- spec/internal/db/migrate/
|
278
|
-
- spec/internal/db/migrate/
|
279
|
-
- spec/internal/db/migrate/
|
271
|
+
- spec/internal/db/migrate/20131106203101_create_qa_subject_mesh_terms.qa.rb
|
272
|
+
- spec/internal/db/migrate/20131106203102_create_qa_mesh_tree.qa.rb
|
273
|
+
- spec/internal/db/migrate/20131106203103_add_term_lower_to_qa_subject_mesh_terms.qa.rb
|
280
274
|
- spec/internal/db/schema.rb
|
281
275
|
- spec/internal/db/seeds.rb
|
282
276
|
- spec/internal/db/test.sqlite3
|
@@ -305,33 +299,33 @@ files:
|
|
305
299
|
homepage: https://github.com/projecthydra/questioning_authority
|
306
300
|
licenses:
|
307
301
|
- APACHE-2
|
302
|
+
metadata: {}
|
308
303
|
post_install_message:
|
309
304
|
rdoc_options: []
|
310
305
|
require_paths:
|
311
306
|
- lib
|
312
307
|
required_ruby_version: !ruby/object:Gem::Requirement
|
313
|
-
none: false
|
314
308
|
requirements:
|
315
|
-
- -
|
309
|
+
- - '>='
|
316
310
|
- !ruby/object:Gem::Version
|
317
311
|
version: '0'
|
318
312
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
319
|
-
none: false
|
320
313
|
requirements:
|
321
|
-
- -
|
314
|
+
- - '>='
|
322
315
|
- !ruby/object:Gem::Version
|
323
316
|
version: '0'
|
324
317
|
requirements: []
|
325
318
|
rubyforge_project:
|
326
|
-
rubygems_version:
|
319
|
+
rubygems_version: 2.0.3
|
327
320
|
signing_key:
|
328
|
-
specification_version:
|
321
|
+
specification_version: 4
|
329
322
|
summary: You should question your authorities.
|
330
323
|
test_files:
|
331
324
|
- spec/controllers/terms_controller_spec.rb
|
332
325
|
- spec/fixtures/authorities/authority_A.yml
|
333
326
|
- spec/fixtures/authorities/authority_B.yml
|
334
327
|
- spec/fixtures/authorities/authority_C.yml
|
328
|
+
- spec/fixtures/authorities/authority_D.yml
|
335
329
|
- spec/fixtures/lcsh-response.txt
|
336
330
|
- spec/fixtures/loc-response.txt
|
337
331
|
- spec/fixtures/mesh.txt
|
@@ -365,9 +359,9 @@ test_files:
|
|
365
359
|
- spec/internal/config/routes.rb
|
366
360
|
- spec/internal/config.ru
|
367
361
|
- spec/internal/db/development.sqlite3
|
368
|
-
- spec/internal/db/migrate/
|
369
|
-
- spec/internal/db/migrate/
|
370
|
-
- spec/internal/db/migrate/
|
362
|
+
- spec/internal/db/migrate/20131106203101_create_qa_subject_mesh_terms.qa.rb
|
363
|
+
- spec/internal/db/migrate/20131106203102_create_qa_mesh_tree.qa.rb
|
364
|
+
- spec/internal/db/migrate/20131106203103_add_term_lower_to_qa_subject_mesh_terms.qa.rb
|
371
365
|
- spec/internal/db/schema.rb
|
372
366
|
- spec/internal/db/seeds.rb
|
373
367
|
- spec/internal/db/test.sqlite3
|