ncua 0.8.0 → 0.8.2

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
  SHA1:
3
- metadata.gz: 7239d68f260fe6848f3bb85f19e6f51815531635
4
- data.tar.gz: b690ef06d9dd96db0af6e6e1e47fd1035f0b506f
3
+ metadata.gz: 2f643f3ceb2bed834401998512f2465ce49d16c7
4
+ data.tar.gz: 07ea5308d68f41bfbce97f1619c5bcd5dcdd30db
5
5
  SHA512:
6
- metadata.gz: df38dffc69a867b8240e751452cfcbe75d55ca20dae4f5fb809dda1c28cc06d15eefe6f26bedd54d871f06ddf3dce6d33439cafd925669cb2bf7e7aa1fdfac9e
7
- data.tar.gz: b721282110eb5cd8a98a292c0900d850af75da2ad2a7b4f76445edc8bee671b9e67ff4bd60e42e934843bafe90cd1c91369baa596e71180bee9bc9d71e710989
6
+ metadata.gz: b9378ae257eb88fc99dae84e2ba412442fe7091178fb295ddc57c19c62c3f3c73f0cb03ba701247ec69d79719f93727f4bf5b25f2b67c1f12c2e435b12b15637
7
+ data.tar.gz: ae4c3d8ab604976630800fc453acf2edf6a024673df951b8eea672a6bfe6bbe9ee6949f18f2dbb2a459ffcd5a5c7a8e788cd8cc63a5ebfb6ab86f97b6a814bd2
@@ -6,8 +6,9 @@ module NCUA
6
6
 
7
7
  base_uri 'http://mapping.ncua.gov'
8
8
  def get_details(charter_number)
9
- if charter_number.nil?
10
- raise ArgumentError, "charter number cannot be nil"
9
+ charter_number = charter_number.to_s.strip
10
+ if charter_number.empty?
11
+ raise ArgumentError, "charter number cannot be nil or empty string"
11
12
  end
12
13
 
13
14
  response = execute_query(charter_number)
@@ -16,7 +17,9 @@ module NCUA
16
17
  when 200...300
17
18
  response
18
19
  when 500...600
19
- raise ServerError
20
+ raise ServerError, "the NCUA returned a #{response.code} error"
21
+ else
22
+ raise ServerError, "Unexpected Response: #{response.code}"
20
23
  end
21
24
  end
22
25
 
@@ -1,3 +1,3 @@
1
1
  module NCUA
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.2"
3
3
  end
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.8.0
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Reznick
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-19 00:00:00.000000000 Z
11
+ date: 2015-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty