gman 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/gman.gemspec +5 -2
- data/lib/gman.rb +2 -2
- data/lib/gman/version.rb +3 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dff2c1a944bccb0b0c89ee8a299ea3fbb4f63cc3
|
4
|
+
data.tar.gz: 154550ec160288b5b6e76f1dbc09ea48b780e7c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 085705b8215a122c01353188781d98736d500675ffd58669d6e9207dae17d8debaf1ea8f9514bb1302ee63528cb4fdb115e2998c2ead0aba9542a12bf1ba2766
|
7
|
+
data.tar.gz: 71b4bfd957ac88288e7d7fc7165d14d70a143a9ceb7fcf30b39a81dcd193bb95b2b969d825b45cc3cee613410c2e5b2a89cfefaf344893849f40ff70a6e978d8
|
data/gman.gemspec
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
+
require_relative "lib/gman/version"
|
2
|
+
|
1
3
|
Gem::Specification.new do |s|
|
2
4
|
s.name = "gman"
|
3
5
|
s.summary = "Check if a given domain or email address belong to a governemnt entity"
|
4
6
|
s.description = "A ruby gem to check if the owner of a given email address is working for THE MAN."
|
5
|
-
s.version =
|
7
|
+
s.version = Gman::VERSION
|
6
8
|
s.authors = ["Ben Balter"]
|
7
9
|
s.email = "ben.balter@github.com"
|
8
10
|
s.homepage = "https://github.com/benbalter/gman"
|
@@ -15,6 +17,7 @@ Gem::Specification.new do |s|
|
|
15
17
|
"LICENSE",
|
16
18
|
"lib/gman.rb",
|
17
19
|
"lib/domains.txt",
|
20
|
+
"lib/gman/version.rb",
|
18
21
|
"script/build",
|
19
22
|
"script/release",
|
20
23
|
"gman.gemspec",
|
@@ -25,7 +28,7 @@ Gem::Specification.new do |s|
|
|
25
28
|
]
|
26
29
|
s.require_paths = ["lib"]
|
27
30
|
s.add_dependency( "public_suffix", '~> 1.4')
|
28
|
-
s.add_dependency( "swot", '~> 0.3' )
|
31
|
+
s.add_dependency( "swot", '~> 0.3.1' )
|
29
32
|
s.add_dependency( "addressable", '~> 2.3' )
|
30
33
|
|
31
34
|
s.add_development_dependency( "rake" )
|
data/lib/gman.rb
CHANGED
@@ -2,6 +2,7 @@ require 'public_suffix'
|
|
2
2
|
require 'yaml'
|
3
3
|
require 'swot'
|
4
4
|
require "addressable/uri"
|
5
|
+
require_relative "gman/version"
|
5
6
|
|
6
7
|
module Gman
|
7
8
|
|
@@ -61,8 +62,7 @@ module Gman
|
|
61
62
|
return false unless PublicSuffix.valid?(domain)
|
62
63
|
|
63
64
|
# Ensure non-edu
|
64
|
-
return false if
|
65
|
-
Swot::BLACKLIST.none? { |d| domain =~ /(\A|\.)#{Regexp.escape(d)}\z/ }
|
65
|
+
return false if Swot::is_academic?(domain)
|
66
66
|
|
67
67
|
# check using public suffix's standard logic
|
68
68
|
rule = list.find domain
|
data/lib/gman/version.rb
ADDED
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: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Balter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: public_suffix
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.3.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.3.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: addressable
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -124,6 +124,7 @@ files:
|
|
124
124
|
- gman.gemspec
|
125
125
|
- lib/domains.txt
|
126
126
|
- lib/gman.rb
|
127
|
+
- lib/gman/version.rb
|
127
128
|
- script/build
|
128
129
|
- script/release
|
129
130
|
- test/helper.rb
|