qa 3.0.0 → 3.1.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: dae8921f84c2a220e53896baa6c74cac49b34f42
4
- data.tar.gz: cdc6ae7c464155b136c24b65196b6fac0fabc86b
2
+ SHA256:
3
+ metadata.gz: fb238fb83dfeddf175de6e3b39f7cbfd8bc8d665ef07bfbd68d540ca9d19541b
4
+ data.tar.gz: 5a3b16d8b57dff5b3ece7fbd5dfa99be1d87879675d5e6d6764782087b2b06f4
5
5
  SHA512:
6
- metadata.gz: c208553ae1a39d0c286a1846cecc0de6d5fe89c92274009f4a41b589923bf5ac28a0cea7fee2849385cf5ffed97edef9be3a292e0839b94b6402502ce4e63f12
7
- data.tar.gz: b3e31ec085757eb223f69338d2134f475a78668d2a640fdd77b8ada91ef54e431a55f053d0f4fc4760bc6bb096bff167a3ff0c864f4e538aa69dd08fd6ad29df
6
+ metadata.gz: 61d883f7a50e76e1aa0ea9d410d4251b294b81eb46355c8340af70e263ea9dddbd0f1f2407eff42dbb5ce1e04e4d04e8cb0f889a493c96885f70ea24b2a58c21
7
+ data.tar.gz: f0481a189b24f742f5d1c38f2c2e3c478c1cd06b427fe7cd86604b5378c64ec601f90b41af3f9ceb1c4d4d69b672cc9e957e4f08423b74664e4151663b8200f1
@@ -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 = "3.0.0".freeze
2
+ VERSION = "3.1.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: 3.0.0
4
+ version: 3.1.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-19 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
@@ -463,7 +463,7 @@ homepage: https://github.com/projecthydra/questioning_authority
463
463
  licenses:
464
464
  - APACHE-2
465
465
  metadata: {}
466
- post_install_message:
466
+ post_install_message:
467
467
  rdoc_options: []
468
468
  require_paths:
469
469
  - lib
@@ -478,9 +478,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
478
478
  - !ruby/object:Gem::Version
479
479
  version: '0'
480
480
  requirements: []
481
- rubyforge_project:
482
- rubygems_version: 2.6.14
483
- signing_key:
481
+ rubygems_version: 3.0.8
482
+ signing_key:
484
483
  specification_version: 4
485
484
  summary: You should question your authorities.
486
485
  test_files: