gman 4.7.0 → 4.7.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
  SHA1:
3
- metadata.gz: aa3567bdec4d37d16df9b72595494dcff38d7d15
4
- data.tar.gz: 70d5557fcd5ff8c678cad3fd815eb1a8ca1b89c3
3
+ metadata.gz: 306dd45e78cb3e72bc3a68479eea6dbbadfee91c
4
+ data.tar.gz: dd3232370c8e0702b254b95a8989f3894ade8732
5
5
  SHA512:
6
- metadata.gz: 8b5cd0bdb7f2fb797257a782d530fc17d5a1fac3010aa20546be413265efa42ea43bfc0c12d958679ee66388394b92fec5e216faddcc5c883375e736cfe1a8f3
7
- data.tar.gz: e99c6d3b98695be6c2005c333a8a2a66b4db9e165ee0bb95e56b07b41ebcf9fa262c35c6de3ce3f6c3a4622a40dfbe3826de907992cff826652be07a495faf95
6
+ metadata.gz: ffea8362edfc9c8e7d0c955e205f3766065e02e82e82a332363f9c305ce2031085df67d2b82a77ec8863fb7570a74e459f2149ee4c62f1a0598d9d71b02195dd
7
+ data.tar.gz: ef38fcfb520b0268bb5c875627cac4913f33734b2fffaeb918bd374901d91651b9041bb1de0b5662bf860c0d02f58c7c5a9ad144c7b541e44e2b3cad4f7aeeec
data/gman.gemspec CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
2
2
  s.name = "gman"
3
3
  s.summary = "Check if a given domain or email address belong to a governemnt entity"
4
4
  s.description = "A ruby gem to check if the owner of a given email address is working for THE MAN."
5
- s.version = '4.7.0'
5
+ s.version = '4.7.1'
6
6
  s.authors = ["Ben Balter"]
7
7
  s.email = "ben.balter@github.com"
8
8
  s.homepage = "https://github.com/benbalter/gman"
@@ -37,5 +37,7 @@ class Gman < NaughtyOrNice
37
37
  # Gman.new("foo.gov").country.currency => "USD"
38
38
  def country
39
39
  @country ||= IsoCountryCodes.find(alpha2) if alpha2
40
+ rescue IsoCountryCodes::UnknownCodeError
41
+ nil
40
42
  end
41
43
  end
@@ -7,4 +7,8 @@ class TestGmanCountryCodes < Minitest::Test
7
7
  assert_equal "United Kingdom of Great Britain and Northern Ireland", Gman.new("foo.gov.uk").country.name
8
8
  assert_equal "Canada", Gman.new("foo.gc.ca").country.name
9
9
  end
10
+
11
+ should "not err out on an unknown country code" do
12
+ assert_equal nil, Gman.new("foo.eu").country
13
+ end
10
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gman
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.7.0
4
+ version: 4.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Balter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-15 00:00:00.000000000 Z
11
+ date: 2015-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: swot