ncua 0.10.0 → 0.10.1
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 +4 -4
- data/README.md +19 -1
- data/lib/ncua/client.rb +4 -3
- data/lib/ncua/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f16ff8a9fd09e31fa5d893fd20a92f65c06ed8b6
|
4
|
+
data.tar.gz: d4e8ca756dbf9c035e6869d6faa32c66385ce1d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18d5c0a063224cf0680c07844c070b7fb0f677f9504c2f85a430306c4162d69bd611701185e8e203917c852e53f376231f611abd1689af0ae493a2b1b33e2930
|
7
|
+
data.tar.gz: 01f2619667d3545451b637c675a29934d774616e544234582a6d4e9624fc4db1ea9d1edefe338d6561314722a7534b8fb8d2bf95e843d663f5126762b5c3abc7
|
data/README.md
CHANGED
@@ -2,7 +2,10 @@
|
|
2
2
|
[](https://codeclimate.com/github/ContinuityControl/ncua/coverage)
|
3
3
|
[](https://travis-ci.org/ContinuityControl/ncua)
|
4
4
|
[](http://badge.fury.io/rb/ncua)
|
5
|
-
#
|
5
|
+
# NCUA
|
6
|
+
|
7
|
+
### Current API Status
|
8
|
+
[](http://cc-api-schema-validator.herokuapp.com/ncua/status)
|
6
9
|
|
7
10
|
The NCUA [lets you search for a credit union office](http://www.ncua.gov/NCUAMapping/Pages/NCUAGOVMapping.aspx) by name, address and charter number. Their site uses a JSON api behind their pages, to serve the data.
|
8
11
|
|
@@ -136,6 +139,21 @@ require 'ncua'
|
|
136
139
|
NCUA::NCUATasks.new.install_tasks
|
137
140
|
```
|
138
141
|
|
142
|
+
Because the schema may change more suddenly than developers can check for, we've created a [very small application](https://github.com/ContinuityControl/api_schema_validator) that validates the schema of this gem and its sister gem, [fdic](https://github.com/ContinuityControl/fdic).
|
143
|
+
|
144
|
+
The api_schema_validator application checks daily to see if the schema is invalid. It exposes a few handy endpoints, notably `/ncua/status`, which returns the follwing JSON:
|
145
|
+
```json
|
146
|
+
{
|
147
|
+
"schema_good" : true
|
148
|
+
}
|
149
|
+
// OR
|
150
|
+
{
|
151
|
+
"schema_good" : false
|
152
|
+
}
|
153
|
+
```
|
154
|
+
|
155
|
+
and `/ncua/badge` which returns an svg status badge. In fact, you saw that badge at the top of this readme!
|
156
|
+
|
139
157
|
## Contributing
|
140
158
|
|
141
159
|
Bug reports and pull requests are welcome on GitHub at https://github.com/ContinuityControl/ncua.
|
data/lib/ncua/client.rb
CHANGED
@@ -7,20 +7,21 @@ module NCUA
|
|
7
7
|
#debug_output $stderr
|
8
8
|
|
9
9
|
def find_credit_union_by_address(address, radius = 100)
|
10
|
-
self.class.
|
10
|
+
self.class.post(query_endpoint, query: {
|
11
11
|
address: address,
|
12
12
|
type: 'address',
|
13
13
|
radius: radius.to_s })
|
14
14
|
end
|
15
15
|
|
16
16
|
def find_credit_union_by_name(name)
|
17
|
-
self.class.
|
17
|
+
self.class.post(query_endpoint, query: {
|
18
18
|
address: name,
|
19
19
|
type: 'cuname' })
|
20
20
|
end
|
21
21
|
|
22
22
|
def find_credit_union_by_charter_number(charter_number)
|
23
|
-
self.class.
|
23
|
+
self.class.post(query_endpoint, query: {
|
24
|
+
radius: 100,
|
24
25
|
address: charter_number,
|
25
26
|
type: 'cunumber' })
|
26
27
|
end
|
data/lib/ncua/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ncua
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Reznick
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|