gman 5.0.2 → 5.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/domains.txt +0 -28
- data/lib/gman/importer.rb +26 -18
- data/lib/gman/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5f81c5dc5d03e961dc8830f91d8f17a04cc7eff
|
4
|
+
data.tar.gz: 1c4c914aca60114856034e3cfd1254c555552d49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e463cf1a41e87be42a1bae6b82e9b5961a210ea4374750ee9e111406589199adaf0e15be60b31dd65f4cee1e49b510a1e6eacc3f3a7c75c7e4c05fb70313bf8c
|
7
|
+
data.tar.gz: be4371cf714f72cf0b0d0bafdc3de1e26c8b549849f70cce3779bb334bbecad5668f4bc65b5356a5e163d8782b270e8cae3b219ffd0cbc58e8f0a83162809c8a
|
data/config/domains.txt
CHANGED
@@ -206,8 +206,6 @@ cochrane.ca
|
|
206
206
|
coldlake.com
|
207
207
|
colemantownship.ca
|
208
208
|
colwood.ca
|
209
|
-
communityofmillertown.ca
|
210
|
-
communityofoleary.com
|
211
209
|
comox.ca
|
212
210
|
conceptionbaysouth.ca
|
213
211
|
consort.ca
|
@@ -596,7 +594,6 @@ municipalite.saint-armand.qc.ca
|
|
596
594
|
municipalite.saint-isidore.qc.ca
|
597
595
|
municipalite.saint-philippe.qc.ca
|
598
596
|
municipalite.saint-valerien.qc.ca
|
599
|
-
municipalite.sainte-angele-de-monnoir.qc.ca
|
600
597
|
municipalite.sainte-martine.qc.ca
|
601
598
|
municipaliteboileau.ca
|
602
599
|
municipalitedeboltonouest.com
|
@@ -608,7 +605,6 @@ municipalityofmcdougall.com
|
|
608
605
|
municipalityofshelburne.ca
|
609
606
|
muniles.ca
|
610
607
|
munmilan.qc.ca
|
611
|
-
munpontiac.com
|
612
608
|
munstdenis.com
|
613
609
|
munstratford.qc.ca
|
614
610
|
mycallander.ca
|
@@ -883,7 +879,6 @@ snowlake.com
|
|
883
879
|
sooke.ca
|
884
880
|
sourismanitoba.com
|
885
881
|
sourispei.com
|
886
|
-
southbrook.tripod.com
|
887
882
|
southey.ca
|
888
883
|
southhuron.ca
|
889
884
|
southwestmiddlesex.ca
|
@@ -1092,7 +1087,6 @@ townofgrandbank.com
|
|
1092
1087
|
townofhague.com
|
1093
1088
|
townofhampton.ca
|
1094
1089
|
townofhighprairie.com
|
1095
|
-
townofhmcclv.com
|
1096
1090
|
townofhudsonbay.com
|
1097
1091
|
townofindianhead.com
|
1098
1092
|
townofkearney.com
|
@@ -1218,7 +1212,6 @@ villageofalliance.ca
|
|
1218
1212
|
villageofbitternlake.ca
|
1219
1213
|
villageofbriercrest.ca
|
1220
1214
|
villageofcentreville.ca
|
1221
|
-
villageofchauvin.ca
|
1222
1215
|
villageofconquest.ca
|
1223
1216
|
villageofdorintosh.sasktelwebsite.net
|
1224
1217
|
villageofduchess.com
|
@@ -3255,7 +3248,6 @@ vardanalys.se
|
|
3255
3248
|
vinnova.se
|
3256
3249
|
vr.se
|
3257
3250
|
vti.se
|
3258
|
-
y.lst.se
|
3259
3251
|
yhmyndigheten.se
|
3260
3252
|
|
3261
3253
|
// Swiss Cantons (Federal States)
|
@@ -4128,7 +4120,6 @@ jeffco.us
|
|
4128
4120
|
kitcarsoncounty.org
|
4129
4121
|
lakewood.org
|
4130
4122
|
littletongov.org
|
4131
|
-
metrodenvercfc.org
|
4132
4123
|
metromayors.org
|
4133
4124
|
minturn.org
|
4134
4125
|
mountain-village.co.us
|
@@ -4268,7 +4259,6 @@ waterfordct.org
|
|
4268
4259
|
watertownct.org
|
4269
4260
|
west-hartford.com
|
4270
4261
|
westbrookct.us
|
4271
|
-
weston-ct.com
|
4272
4262
|
wethersfieldct.com
|
4273
4263
|
willingtonct.org
|
4274
4264
|
wiltonct.org
|
@@ -4450,7 +4440,6 @@ pbgc.org
|
|
4450
4440
|
pcaobus.org
|
4451
4441
|
pepfar.net
|
4452
4442
|
predict.org
|
4453
|
-
project-open-data.github.io
|
4454
4443
|
psctool.us
|
4455
4444
|
r3coastal.com
|
4456
4445
|
radiosawa.com
|
@@ -4926,7 +4915,6 @@ odumgeorgia.com
|
|
4926
4915
|
oxfordgeorgia.org
|
4927
4916
|
peachcounty.net
|
4928
4917
|
peachtree-city.org
|
4929
|
-
pearson-ga.com
|
4930
4918
|
pembrokega.net
|
4931
4919
|
pinelakega.com
|
4932
4920
|
polkcountygeorgia.us
|
@@ -5555,7 +5543,6 @@ newhavenin.org
|
|
5555
5543
|
newtoncountyin.com
|
5556
5544
|
nirpc.org
|
5557
5545
|
nmanchester.org
|
5558
|
-
nobleco.squarespace.com
|
5559
5546
|
perrycountyil.org
|
5560
5547
|
porterco.org
|
5561
5548
|
portertownship.com
|
@@ -5937,7 +5924,6 @@ rppj.com
|
|
5937
5924
|
ruston.org
|
5938
5925
|
sbpg.net
|
5939
5926
|
sjbparish.com
|
5940
|
-
springhillla.com
|
5941
5927
|
state.lib.la.us
|
5942
5928
|
stfrancisville.net
|
5943
5929
|
stjamesla.com
|
@@ -7637,10 +7623,8 @@ shpnc.org
|
|
7637
7623
|
smithfield-nc.com
|
7638
7624
|
sosnc.com
|
7639
7625
|
southernpines.net
|
7640
|
-
southernshores.org
|
7641
7626
|
spindalenc.net
|
7642
7627
|
spring-lake.org
|
7643
|
-
sprucepineonline.com
|
7644
7628
|
startsquad.org
|
7645
7629
|
startwithyourheart.com
|
7646
7630
|
summerfieldgov.com
|
@@ -7742,7 +7726,6 @@ dvlnd.com
|
|
7742
7726
|
edgeley.com
|
7743
7727
|
edinburgnd.com
|
7744
7728
|
ellendalend.com
|
7745
|
-
emmonscounty.tripod.com
|
7746
7729
|
enderlinnd.com
|
7747
7730
|
fessendennd.com
|
7748
7731
|
finleynd.com
|
@@ -7843,7 +7826,6 @@ westfargo.org
|
|
7843
7826
|
williamsnd.com
|
7844
7827
|
willistonnd.com
|
7845
7828
|
wiltonnd.org
|
7846
|
-
wingnd.com
|
7847
7829
|
wishek-nd.com
|
7848
7830
|
wrtc.com
|
7849
7831
|
|
@@ -8688,7 +8670,6 @@ poncatribe-ne.org
|
|
8688
8670
|
portlions.net
|
8689
8671
|
potawatomi.org
|
8690
8672
|
powhatan.org
|
8691
|
-
prairieisland.org
|
8692
8673
|
pueblodecochiti.org
|
8693
8674
|
puyallup-tribe.com
|
8694
8675
|
redding-rancheria.com
|
@@ -8792,7 +8773,6 @@ attica.org
|
|
8792
8773
|
auroranewyork.us
|
8793
8774
|
austerlitzny.com
|
8794
8775
|
avon-ny.org
|
8795
|
-
b-ville.com
|
8796
8776
|
bainbridgeny.org
|
8797
8777
|
baldwinsville.org
|
8798
8778
|
batavianewyork.com
|
@@ -9328,7 +9308,6 @@ townofstonypoint.org
|
|
9328
9308
|
townofsweden.org
|
9329
9309
|
townofthompson.com
|
9330
9310
|
townofthurston.com
|
9331
|
-
townofticonderoga.com
|
9332
9311
|
townoftully.org
|
9333
9312
|
townofulster.org
|
9334
9313
|
townofunion.com
|
@@ -10151,7 +10130,6 @@ lehighcounty.org
|
|
10151
10130
|
lehmantownship.com
|
10152
10131
|
libertytwp-adamscounty.com
|
10153
10132
|
limerickpa.org
|
10154
|
-
lincolnboro.tripod.com
|
10155
10133
|
littlebritain.org
|
10156
10134
|
littlestownboro.org
|
10157
10135
|
liverpoolpa.us
|
@@ -10176,7 +10154,6 @@ manortwp.org
|
|
10176
10154
|
mantwp.com
|
10177
10155
|
marpletwp.com
|
10178
10156
|
marysvilleboro.com
|
10179
|
-
mckeesport.org
|
10180
10157
|
mckeesrocks.com
|
10181
10158
|
mechanicsburgborough.org
|
10182
10159
|
mediaborough.com
|
@@ -10384,7 +10361,6 @@ wesleyvilleborough.com
|
|
10384
10361
|
west-chester.com
|
10385
10362
|
westbradford.org
|
10386
10363
|
westcaln.org
|
10387
|
-
westconshohockenboro.com
|
10388
10364
|
westdeertownship.com
|
10389
10365
|
westeastonborough.org
|
10390
10366
|
westgroveborough.org
|
@@ -10542,7 +10518,6 @@ fortmillsc.org
|
|
10542
10518
|
fountaininn.org
|
10543
10519
|
gastonsc.org
|
10544
10520
|
georgetowncountysc.org
|
10545
|
-
greatfallssc.net
|
10546
10521
|
greenvillecounty.org
|
10547
10522
|
hamptoncountysc.org
|
10548
10523
|
hamptonsc.net
|
@@ -10561,7 +10536,6 @@ libertysc.com
|
|
10561
10536
|
lincolnvillesc.com
|
10562
10537
|
littlemountainsc.info
|
10563
10538
|
llronline.com
|
10564
|
-
mayesvillesc.com
|
10565
10539
|
midlandsareacfc.org
|
10566
10540
|
mtcroghan.com
|
10567
10541
|
mullinssc.us
|
@@ -11361,7 +11335,6 @@ vaao.org
|
|
11361
11335
|
vaboard.org
|
11362
11336
|
vadrs.org
|
11363
11337
|
vadsa.org
|
11364
|
-
vafamilyconnections.com
|
11365
11338
|
vafire.com
|
11366
11339
|
valottery.com
|
11367
11340
|
vaports.com
|
@@ -11513,7 +11486,6 @@ stjvt.com
|
|
11513
11486
|
swcrpc.org
|
11514
11487
|
thetfordvermont.us
|
11515
11488
|
tinmouthvt.org
|
11516
|
-
town-of-orwell.org
|
11517
11489
|
townofbrandon.com
|
11518
11490
|
townofcraftsbury.com
|
11519
11491
|
townofgeorgia.com
|
data/lib/gman/importer.rb
CHANGED
@@ -55,20 +55,23 @@ class Gman
|
|
55
55
|
|
56
56
|
def valid_domain?(domain, options={})
|
57
57
|
return false if domain.empty?
|
58
|
-
return reject(domain, "home. regex")
|
59
|
-
return reject(domain, "user. regex")
|
60
|
-
return reject(domain, "sites. regex")
|
61
|
-
return reject(domain, "weebly")
|
62
|
-
return reject(domain, "wordpress")
|
63
|
-
return reject(domain, "govoffice")
|
64
|
-
return reject(domain, "homestead")
|
65
|
-
return reject(domain, "wix.com")
|
66
|
-
return reject(domain, "blogspot.com")
|
67
|
-
return reject(domain, "
|
68
|
-
return reject(domain, "
|
69
|
-
return reject(domain, "
|
70
|
-
return reject(domain, "
|
71
|
-
return reject(domain, "
|
58
|
+
return reject(domain, "home. regex") if domain =~ /^home\./
|
59
|
+
return reject(domain, "user. regex") if domain =~ /^users?\./
|
60
|
+
return reject(domain, "sites. regex") if domain =~ /^sites?\./
|
61
|
+
return reject(domain, "weebly") if domain =~ /weebly\.com$/
|
62
|
+
return reject(domain, "wordpress") if domain =~ /wordpress\.com$/
|
63
|
+
return reject(domain, "govoffice") if domain =~ /govoffice\d?\.com$/
|
64
|
+
return reject(domain, "homestead") if domain =~ /homestead\.com$/
|
65
|
+
return reject(domain, "wix.com") if domain =~ /wix\.com$/
|
66
|
+
return reject(domain, "blogspot.com") if domain =~ /blogspot\.com$/
|
67
|
+
return reject(domain, "tripod.com") if domain =~ /tripod\.com$/
|
68
|
+
return reject(domain, "squarespace.com") if domain =~ /squarespace\.com$/
|
69
|
+
return reject(domain, "github.io") if domain =~ /github\.io$/
|
70
|
+
return reject(domain, "locality") if domain =~ Gman::LOCALITY_REGEX
|
71
|
+
return reject(domain, "blacklist") if BLACKLIST.include?(domain)
|
72
|
+
return reject(domain, "duplicate") if !options[:skip_dupe] && current.domains.include?(domain)
|
73
|
+
return reject(domain, "invalid") unless PublicSuffix.valid?(".#{domain}")
|
74
|
+
return reject(domain, "academic") if Swot::is_academic?(domain)
|
72
75
|
|
73
76
|
if !options[:skip_dupe] && subdomain = current.domains.find { |c| domain =~ /\.#{Regexp.escape(c)}$/}
|
74
77
|
return reject(domain, "subdomain of #{subdomain}")
|
@@ -122,13 +125,18 @@ class Gman
|
|
122
125
|
@resolver ||= Resolv::DNS.new(:nameserver => ["8.8.8.8","8.8.4.4"])
|
123
126
|
end
|
124
127
|
|
128
|
+
def resolve_without_errors
|
129
|
+
yield
|
130
|
+
rescue Resolv::ResolvError
|
131
|
+
false
|
132
|
+
end
|
133
|
+
|
125
134
|
# Verifies that the given domain has an MX record, and thus is valid
|
126
135
|
def domain_resolves?(domain)
|
127
136
|
domain = Addressable::URI.new(:host => domain).normalize.host
|
128
|
-
resolver.
|
129
|
-
resolver.getresource(domain, Resolv::DNS::Resource::IN::
|
130
|
-
|
131
|
-
false
|
137
|
+
resolve_without_errors { resolver.getaddress(domain) } ||
|
138
|
+
resolve_without_errors { resolver.getresource(domain, Resolv::DNS::Resource::IN::NS) } ||
|
139
|
+
resolve_without_errors { resolver.getresource(domain, Resolv::DNS::Resource::IN::MX) }
|
132
140
|
end
|
133
141
|
end
|
134
142
|
end
|
data/lib/gman/version.rb
CHANGED