gman 5.0.9 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,10 @@
1
1
  require File.join(File.dirname(__FILE__), 'helper')
2
2
 
3
3
  class TestGmanLocality < Minitest::Test
4
- should "parse the alpha2" do
5
- assert_equal "us", Gman.new("whitehouse.gov").alpha2
6
- assert_equal "us", Gman.new("army.mil").alpha2
7
- assert_equal "gb", Gman.new("foo.gov.uk").alpha2
8
- assert_equal "ca", Gman.new("gov.ca").alpha2
4
+ should 'parse the alpha2' do
5
+ assert_equal 'us', Gman.new('whitehouse.gov').alpha2
6
+ assert_equal 'us', Gman.new('army.mil').alpha2
7
+ assert_equal 'gb', Gman.new('foo.gov.uk').alpha2
8
+ assert_equal 'ca', Gman.new('gov.ca').alpha2
9
9
  end
10
10
  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: 5.0.9
4
+ version: 6.0.0
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-12-14 00:00:00.000000000 Z
11
+ date: 2016-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: swot
@@ -192,8 +192,23 @@ dependencies:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0.15'
195
- description: A ruby gem to check if the owner of a given email address is working
196
- for THE MAN.
195
+ - !ruby/object:Gem::Dependency
196
+ name: rubocop
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '0.37'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: '0.37'
209
+ description: |2
210
+ A ruby gem to check if the owner of a given email address is working for
211
+ THE MAN.
197
212
  email: ben.balter@github.com
198
213
  executables:
199
214
  - gman
@@ -202,6 +217,7 @@ extensions: []
202
217
  extra_rdoc_files: []
203
218
  files:
204
219
  - ".gitignore"
220
+ - ".rubocop.yml"
205
221
  - ".ruby-version"
206
222
  - ".travis.yml"
207
223
  - CONTRIBUTING.md
@@ -220,7 +236,6 @@ files:
220
236
  - lib/gman/identifier.rb
221
237
  - lib/gman/importer.rb
222
238
  - lib/gman/locality.rb
223
- - lib/gman/sanctions.rb
224
239
  - lib/gman/version.rb
225
240
  - script/add
226
241
  - script/alphabetize
@@ -240,16 +255,17 @@ files:
240
255
  - script/vendor-public-suffix
241
256
  - script/vendor-se
242
257
  - script/vendor-us
258
+ - test/fixtures/domains.txt
259
+ - test/fixtures/obama.txt
243
260
  - test/helper.rb
244
- - test/obama.txt
245
261
  - test/test_gman.rb
246
262
  - test/test_gman_bin.rb
247
263
  - test/test_gman_country_codes.rb
248
264
  - test/test_gman_domains.rb
249
265
  - test/test_gman_filter.rb
250
266
  - test/test_gman_identifier.rb
267
+ - test/test_gman_importer.rb
251
268
  - test/test_gman_locality.rb
252
- - test/test_gman_sanctions.rb
253
269
  homepage: https://github.com/benbalter/gman
254
270
  licenses:
255
271
  - MIT
@@ -270,18 +286,20 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
286
  version: '0'
271
287
  requirements: []
272
288
  rubyforge_project:
273
- rubygems_version: 2.5.1
289
+ rubygems_version: 2.5.2
274
290
  signing_key:
275
291
  specification_version: 4
276
292
  summary: Check if a given domain or email address belong to a governemnt entity
277
293
  test_files:
294
+ - test/fixtures/domains.txt
295
+ - test/fixtures/obama.txt
278
296
  - test/helper.rb
279
- - test/obama.txt
280
297
  - test/test_gman.rb
281
298
  - test/test_gman_bin.rb
282
299
  - test/test_gman_country_codes.rb
283
300
  - test/test_gman_domains.rb
284
301
  - test/test_gman_filter.rb
285
302
  - test/test_gman_identifier.rb
303
+ - test/test_gman_importer.rb
286
304
  - test/test_gman_locality.rb
287
- - test/test_gman_sanctions.rb
305
+ has_rdoc:
@@ -1,29 +0,0 @@
1
- class Gman
2
-
3
- # http://www.treasury.gov/resource-center/sanctions/Programs/Pages/Programs.aspx
4
- SANCTIONED_COUNTRIES = %w[
5
- 112
6
- 384
7
- 192
8
- 180
9
- 364
10
- 368
11
- 422
12
- 434
13
- 408
14
- 706
15
- 728
16
- 729
17
- 760
18
- 804
19
- 887
20
- 716
21
- 430
22
- 694
23
- 716
24
- ]
25
-
26
- def sanctioned?
27
- SANCTIONED_COUNTRIES.include?(country.numeric) if country
28
- end
29
- end
@@ -1,20 +0,0 @@
1
- require_relative "helper"
2
-
3
- class TestGmanSanctions < Minitest::Test
4
-
5
- should "know when a country isn't sanctioned" do
6
- refute Gman.new("whitehouse.gov").sanctioned?
7
- end
8
-
9
- should "know when a country is sanctioned" do
10
- assert Gman.new("kim@pyongyang.gov.kp").sanctioned?
11
- end
12
-
13
- should "not err on invalid domains" do
14
- assert_equal nil, Gman.new("domain.invalid").sanctioned?
15
- end
16
-
17
- should "work with non-governemnt domains" do
18
- assert Gman.new("foo@bar.co.kp").sanctioned?
19
- end
20
- end