qa 2.2.0 → 2.3.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
- SHA1:
3
- metadata.gz: df5c9bf343b632a9d00732c2ef08c7acafa4ae09
4
- data.tar.gz: 679ac0966d2ef5b3b2c3275b677d71dc712bc0b4
2
+ SHA256:
3
+ metadata.gz: '00029794cefd74912e6ae326330554bb59e3fa0733c5f0b62eae96aaedc397f1'
4
+ data.tar.gz: 325f45dd7d9e188f57da3c2667f677725a48a2b6e439b71839a15503d875fd0e
5
5
  SHA512:
6
- metadata.gz: b8bcd201ed589ef2f10a4b28740c0c5d16212c84a36d5f62df850973bb64351ffb694b9e12d065a3af3f8737de11aebd090e4a82ea8658e3f132a890e3a4a44d
7
- data.tar.gz: 7b8093c874df52c808cb3ed44a83bded631324e4b8d0d304921ad099cc61bf02120cc3b645514e1049909964427689bdb6ab6a4e58e053631e4220e5f3d9da23
6
+ metadata.gz: 9784b68a0c26d296de87e9eaa617437fee2daa11789ac70d2212a2c364613073b15fef1f941ba670a56aff1c5400cf45bd0e7e50aad41c736703030b4402a62c
7
+ data.tar.gz: 7b4016ed6d919e1cd1497a0de4465695954fb552916d6d01c0aa833f7eabde71b7dcaa7391e6b076221c0e80285ed308affb7d1e60c064f0f57951415ddf0125
@@ -26,7 +26,7 @@ module Qa::Authorities
26
26
  def build_query_url(q)
27
27
  escaped_query = URI.escape(q)
28
28
  authority_fragment = Loc.get_url_for_authority(subauthority) + URI.escape(subauthority)
29
- "http://id.loc.gov/search/?q=#{escaped_query}&q=#{authority_fragment}&format=json"
29
+ "https://id.loc.gov/search/?q=#{escaped_query}&q=#{authority_fragment}&format=json"
30
30
  end
31
31
 
32
32
  def find(id)
@@ -34,7 +34,7 @@ module Qa::Authorities
34
34
  end
35
35
 
36
36
  def find_url(id)
37
- "http://id.loc.gov/authorities/#{@subauthority}/#{id}.json"
37
+ "https://id.loc.gov/authorities/#{@subauthority}/#{id}.json"
38
38
  end
39
39
 
40
40
  private
@@ -1,3 +1,3 @@
1
1
  module Qa
2
- VERSION = "2.2.0".freeze
2
+ VERSION = "2.3.0".freeze
3
3
  end
@@ -78,7 +78,7 @@ describe Qa::TermsController, type: :controller do
78
78
 
79
79
  context "loc" do
80
80
  before do
81
- stub_request(:get, "http://id.loc.gov/search/?format=json&q=Berry&q=cs:http://id.loc.gov/authorities/names")
81
+ stub_request(:get, "https://id.loc.gov/search/?format=json&q=Berry&q=cs:http://id.loc.gov/authorities/names")
82
82
  .with(headers: { 'Accept' => 'application/json' })
83
83
  .to_return(body: webmock_fixture("loc-names-response.txt"), status: 200)
84
84
  end
@@ -184,7 +184,7 @@ describe Qa::TermsController, type: :controller do
184
184
  describe "#show" do
185
185
  context "with supported authorities" do
186
186
  before do
187
- stub_request(:get, "http://id.loc.gov/authorities/subjects/sh85077565.json")
187
+ stub_request(:get, "https://id.loc.gov/authorities/subjects/sh85077565.json")
188
188
  .with(headers: { 'Accept' => 'application/json' })
189
189
  .to_return(status: 200, body: webmock_fixture("loc-names-response.txt"), headers: {})
190
190
  end
@@ -28,14 +28,14 @@ describe Qa::Authorities::Loc do
28
28
  end
29
29
 
30
30
  context "for searching" do
31
- let(:url) { 'http://id.loc.gov/search/?q=foo&q=cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fauthorities%2Fsubjects&format=json' }
31
+ let(:url) { 'https://id.loc.gov/search/?q=foo&q=cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fauthorities%2Fsubjects&format=json' }
32
32
  it "returns a url" do
33
33
  expect(authority.build_query_url("foo")).to eq(url)
34
34
  end
35
35
  end
36
36
 
37
37
  context "for returning single terms" do
38
- let(:url) { "http://id.loc.gov/authorities/subjects/sh2002003586.json" }
38
+ let(:url) { "https://id.loc.gov/authorities/subjects/sh2002003586.json" }
39
39
  it "returns a url with an authority and id" do
40
40
  expect(authority.find_url("sh2002003586")).to eq(url)
41
41
  end
@@ -49,15 +49,15 @@ describe Qa::Authorities::Loc do
49
49
  end
50
50
 
51
51
  before do
52
- stub_request(:get, "http://id.loc.gov/search/?format=json&q=cs:http://id.loc.gov/authorities/subjects")
52
+ stub_request(:get, "https://id.loc.gov/search/?format=json&q=cs:http://id.loc.gov/authorities/subjects")
53
53
  .with(headers: { 'Accept' => 'application/json' })
54
54
  .to_return(status: 200, body: "")
55
55
  end
56
56
 
57
57
  context "with flat params encoded" do
58
- let(:url) { 'http://id.loc.gov/search/?q=foo&q=cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fauthorities%2Fsubjects&format=json' }
58
+ let(:url) { 'https://id.loc.gov/search/?q=foo&q=cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fauthorities%2Fsubjects&format=json' }
59
59
  it "returns a response" do
60
- flat_params_url = "http://id.loc.gov/search/?format=json&q=foo&q=cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fauthorities%2Fsubjects"
60
+ flat_params_url = "https://id.loc.gov/search/?format=json&q=foo&q=cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fauthorities%2Fsubjects"
61
61
  expect(subject.env.url.to_s).to eq(flat_params_url)
62
62
  end
63
63
  end
@@ -66,7 +66,7 @@ describe Qa::Authorities::Loc do
66
66
  describe "#search" do
67
67
  context "any LOC authorities" do
68
68
  let :authority do
69
- stub_request(:get, "http://id.loc.gov/search/?format=json&q=s&q=cs:http://id.loc.gov/vocabulary/geographicAreas")
69
+ stub_request(:get, "https://id.loc.gov/search/?format=json&q=s&q=cs:http://id.loc.gov/vocabulary/geographicAreas")
70
70
  .with(headers: { 'Accept' => 'application/json' })
71
71
  .to_return(body: webmock_fixture("loc-response.txt"), status: 200)
72
72
  described_class.subauthority_for("geographicAreas")
@@ -95,7 +95,7 @@ describe Qa::Authorities::Loc do
95
95
 
96
96
  context "subject terms" do
97
97
  let :results do
98
- stub_request(:get, "http://id.loc.gov/search/?format=json&q=History--&q=cs:http://id.loc.gov/authorities/subjects")
98
+ stub_request(:get, "https://id.loc.gov/search/?format=json&q=History--&q=cs:http://id.loc.gov/authorities/subjects")
99
99
  .with(headers: { 'Accept' => 'application/json' })
100
100
  .to_return(body: webmock_fixture("loc-subjects-response.txt"), status: 200)
101
101
  described_class.subauthority_for("subjects").search("History--")
@@ -111,7 +111,7 @@ describe Qa::Authorities::Loc do
111
111
 
112
112
  context "name terms" do
113
113
  let :results do
114
- stub_request(:get, "http://id.loc.gov/search/?format=json&q=Berry&q=cs:http://id.loc.gov/authorities/names")
114
+ stub_request(:get, "https://id.loc.gov/search/?format=json&q=Berry&q=cs:http://id.loc.gov/authorities/names")
115
115
  .with(headers: { 'Accept' => 'application/json' })
116
116
  .to_return(body: webmock_fixture("loc-names-response.txt"), status: 200)
117
117
  described_class.subauthority_for("names").search("Berry")
@@ -125,7 +125,7 @@ describe Qa::Authorities::Loc do
125
125
  describe "#find" do
126
126
  context "using a subject id" do
127
127
  let :results do
128
- stub_request(:get, "http://id.loc.gov/authorities/subjects/sh2002003586.json")
128
+ stub_request(:get, "https://id.loc.gov/authorities/subjects/sh2002003586.json")
129
129
  .with(headers: { 'Accept' => 'application/json' })
130
130
  .to_return(status: 200, body: webmock_fixture("loc-subject-find-response.txt"), headers: {})
131
131
  described_class.subauthority_for("subjects").find("sh2002003586")
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: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Anderson
@@ -13,10 +13,10 @@ authors:
13
13
  - Mike Stroming
14
14
  - Adam Wead
15
15
  - E. Lynette Rayle
16
- autorequire:
16
+ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
- date: 2018-11-16 00:00:00.000000000 Z
19
+ date: 2020-08-14 00:00:00.000000000 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: activerecord-import
@@ -467,7 +467,7 @@ homepage: https://github.com/projecthydra/questioning_authority
467
467
  licenses:
468
468
  - APACHE-2
469
469
  metadata: {}
470
- post_install_message:
470
+ post_install_message:
471
471
  rdoc_options: []
472
472
  require_paths:
473
473
  - lib
@@ -482,9 +482,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
482
482
  - !ruby/object:Gem::Version
483
483
  version: '0'
484
484
  requirements: []
485
- rubyforge_project:
486
- rubygems_version: 2.6.14
487
- signing_key:
485
+ rubygems_version: 3.0.8
486
+ signing_key:
488
487
  specification_version: 4
489
488
  summary: You should question your authorities.
490
489
  test_files: