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 +4 -4
- data/Gemfile.lock +5 -9
- data/lib/propublica/nonprofits/version.rb +1 -1
- data/lib/propublica/nonprofits.rb +4 -2
- data/propublica-nonprofits.gemspec +0 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0a19befd3e19f50b9aece3f7a75d06ef204b05f9f8f6dfbe3bd086976329cb1
|
4
|
+
data.tar.gz: 267fee39254403c855b03559e365bc11c5789a2416f7793d424d6d539649f38b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
-
|
13
|
+
base64 (0.2.0)
|
14
14
|
crack (0.4.5)
|
15
15
|
rexml
|
16
|
-
faraday (2.7.
|
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.
|
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
|
@@ -21,8 +21,7 @@ end
|
|
21
21
|
|
22
22
|
module Propublica
|
23
23
|
module Nonprofits
|
24
|
-
|
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.
|
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-
|
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.
|
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
|