propublica-nonprofits 1.1.0 → 1.1.1

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: baea7efcfc907f93a2765cfff5c3343fdf17e817a09ac15160f1025990ceee5a
4
- data.tar.gz: 1da616c76aa6cc85b49176018db027e75f5a7a39f9518abcc3a114190883fefe
3
+ metadata.gz: e0a19befd3e19f50b9aece3f7a75d06ef204b05f9f8f6dfbe3bd086976329cb1
4
+ data.tar.gz: 267fee39254403c855b03559e365bc11c5789a2416f7793d424d6d539649f38b
5
5
  SHA512:
6
- metadata.gz: bf924b498d17cbea10dcf305ae1099359ebba0971d7f09cb6542d7c958be3e5309babd862be78e45674d93ec5d0d2c060374799f7daf9961c89b8aa441fd03fc
7
- data.tar.gz: 93196885e1d02886c94e6b7e407b3ea552042dd348c3855fda889ad2a8c14992f681c115da932148934c731c9354844966f28c379c8f51a6135aad0d3811ed44
6
+ metadata.gz: 0362c9a826f7f929fa1295c1c262ea49874db544b0c547b4c6b97cd27c51bab3b8151303f0330ce4617915513bcb128ffe8dcec250926d977f972ce6b023a7f1
7
+ data.tar.gz: ada943260642735058447b391bba1ea961e9e425fc3796a07baddbd64c5a9e7aa402040f32d2aea2fc69afd8337ab402b8afe5577ed4f111bcfde480b085d4e2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- propublica-nonprofits (1.1.0)
4
+ propublica-nonprofits (1.1.1)
5
5
  faraday (> 1.0, < 3.0)
6
6
  json
7
7
 
@@ -10,22 +10,19 @@ GEM
10
10
  specs:
11
11
  addressable (2.8.1)
12
12
  public_suffix (>= 2.0.2, < 6.0)
13
- coderay (1.1.2)
13
+ base64 (0.2.0)
14
14
  crack (0.4.5)
15
15
  rexml
16
- faraday (2.7.2)
16
+ faraday (2.7.12)
17
+ base64
17
18
  faraday-net_http (>= 2.0, < 3.1)
18
19
  ruby2_keywords (>= 0.0.4)
19
20
  faraday-net_http (3.0.2)
20
21
  hashdiff (1.0.1)
21
- json (2.5.1)
22
- method_source (0.9.0)
22
+ json (2.7.1)
23
23
  minitest (5.11.3)
24
24
  minitest-line (0.6.5)
25
25
  minitest (~> 5.0)
26
- pry (0.11.3)
27
- coderay (~> 1.1.0)
28
- method_source (~> 0.9.0)
29
26
  public_suffix (5.0.1)
30
27
  rake (13.0.1)
31
28
  rexml (3.2.5)
@@ -44,7 +41,6 @@ DEPENDENCIES
44
41
  minitest (~> 5.0)
45
42
  minitest-line
46
43
  propublica-nonprofits!
47
- pry
48
44
  rake (~> 13.0)
49
45
  rexml
50
46
  vcr
@@ -1,5 +1,5 @@
1
1
  module Propublica
2
2
  module Nonprofits
3
- VERSION = "1.1.0"
3
+ VERSION = "1.1.1"
4
4
  end
5
5
  end
@@ -21,8 +21,7 @@ end
21
21
 
22
22
  module Propublica
23
23
  module Nonprofits
24
- class DataNotFetched < StandardError
25
- end
24
+ DataNotFetched = Class.new(StandardError)
26
25
 
27
26
  def self.search(term, state: nil, ntee: nil, page: nil, fetch_all: false)
28
27
  search_results(term, state: state, ntee: ntee, page: page, fetch_all: fetch_all)
@@ -78,6 +77,7 @@ module Propublica
78
77
  def self.connection
79
78
  Faraday
80
79
  .new(API_BASE_URL) do |f|
80
+ f.use Faraday::Response::RaiseError
81
81
  f.response :json
82
82
  end
83
83
  end
@@ -89,6 +89,8 @@ module Propublica
89
89
 
90
90
  rescue JSON::ParserError => e
91
91
  raise JSON::ParserError.new("Propublica API Parsing Error: #{e.message}")
92
+ rescue Faraday::ServerError, Faraday::ClientError => e
93
+ raise DataNotFetched.new("Propublica API Error: #{e.message}")
92
94
  end
93
95
  end
94
96
  end
@@ -25,7 +25,6 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "bundler", ">= 2.2.10"
26
26
  spec.add_development_dependency "minitest-line"
27
27
  spec.add_development_dependency "minitest", "~> 5.0"
28
- spec.add_development_dependency "pry"
29
28
  spec.add_development_dependency "rake", "~> 13.0"
30
29
  spec.add_development_dependency "vcr"
31
30
  spec.add_development_dependency "webmock"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: propublica-nonprofits
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricky Chilcott
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-03 00:00:00.000000000 Z
11
+ date: 2023-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
- - !ruby/object:Gem::Dependency
56
- name: pry
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: rake
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -203,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
189
  - !ruby/object:Gem::Version
204
190
  version: '0'
205
191
  requirements: []
206
- rubygems_version: 3.2.32
192
+ rubygems_version: 3.4.22
207
193
  signing_key:
208
194
  specification_version: 4
209
195
  summary: Ruby wrapper for the Propublica Nonprofits API https://projects.propublica.org/nonprofits/api/v2