domain_name 0.5.20160826 → 0.5.20161021
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -2
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/data/public_suffix_list.dat +103 -6
- data/domain_name.gemspec +0 -9
- data/lib/domain_name/etld_data.rb +65 -4
- data/lib/domain_name/version.rb +1 -1
- data/test/helper.rb +0 -1
- data/test/test_domain_name-punycode.rb +1 -1
- data/test/test_domain_name.rb +9 -9
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 578e983a7d2bfce1e2ba8d1239fb1c5a3b048ab7
|
4
|
+
data.tar.gz: 053c2ed1c2dba0effe83e184b10df96d6c8e9bae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bfc806530e7ef41274f0c447f7ba87cdf03ffb73c8a8c9290ea9a41d57a9f21496cd8e19796dadfb80da5890b7ffb422eea75d11c1dd623aec6fd282a98b5f2
|
7
|
+
data.tar.gz: 46f9e29879d77c57a91835e3529c66b1ee7ac43c9dff235f57450f3f41c726b6e7c78a71d829eb3270aa96518530a4f0c1e84512c65d6d97b3df8b7ce89792fd
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v0.5.20160826](https://github.com/knu/ruby-domain_name/tree/v0.5.20160826) (2016-09-01)
|
4
|
+
[Full Changelog](https://github.com/knu/ruby-domain_name/compare/v0.5.20160615...v0.5.20160826)
|
5
|
+
|
6
|
+
- Update the license for the eTLD database
|
7
|
+
- Update the eTLD database to 2016-08-26T16:52:03Z
|
8
|
+
|
3
9
|
## [v0.5.20160615](https://github.com/knu/ruby-domain_name/tree/v0.5.20160615) (2016-06-16)
|
4
10
|
[Full Changelog](https://github.com/knu/ruby-domain_name/compare/v0.5.20160310...v0.5.20160615)
|
5
11
|
|
data/README.md
CHANGED
@@ -63,5 +63,5 @@ Copyright (c) 2011-2016 Akinori MUSHA
|
|
63
63
|
Licensed under the 2-clause BSD license.
|
64
64
|
|
65
65
|
Some portion of this library is copyrighted by third parties and
|
66
|
-
licensed under MPL
|
66
|
+
licensed under MPL 2.0 or 3-clause BSD license,
|
67
67
|
See `LICENSE.txt` for details.
|
data/data/public_suffix_list.dat
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
3
3
|
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
4
4
|
|
5
|
-
// Please pull this list from, and only from https://publicsuffix.org/list/public_suffix_list.dat
|
5
|
+
// Please pull this list from, and only from https://publicsuffix.org/list/public_suffix_list.dat,
|
6
6
|
// rather than any other VCS sites. Pulling from any other URL is not guaranteed to be supported.
|
7
7
|
|
8
|
-
// Instructions on pulling and using this list can be found at https://publicsuffix.org/list
|
8
|
+
// Instructions on pulling and using this list can be found at https://publicsuffix.org/list/.
|
9
9
|
|
10
10
|
// ===BEGIN ICANN DOMAINS===
|
11
11
|
|
@@ -704,7 +704,9 @@ org.cw
|
|
704
704
|
cx
|
705
705
|
gov.cx
|
706
706
|
|
707
|
-
// cy :
|
707
|
+
// cy : http://www.nic.cy/
|
708
|
+
// Submitted by registry Panayiotou Fotia <cydns@ucy.ac.cy>
|
709
|
+
cy
|
708
710
|
ac.cy
|
709
711
|
biz.cy
|
710
712
|
com.cy
|
@@ -4367,9 +4369,17 @@ edu.my
|
|
4367
4369
|
mil.my
|
4368
4370
|
name.my
|
4369
4371
|
|
4370
|
-
// mz : http://www.
|
4371
|
-
|
4372
|
-
|
4372
|
+
// mz : http://www.uem.mz/
|
4373
|
+
// Submitted by registry <antonio@uem.mz>
|
4374
|
+
mz
|
4375
|
+
ac.mz
|
4376
|
+
adv.mz
|
4377
|
+
co.mz
|
4378
|
+
edu.mz
|
4379
|
+
gov.mz
|
4380
|
+
mil.mz
|
4381
|
+
net.mz
|
4382
|
+
org.mz
|
4373
4383
|
|
4374
4384
|
// na : http://www.na-nic.com.na/
|
4375
4385
|
// http://www.info.na/domain/
|
@@ -10644,6 +10654,10 @@ beep.pl
|
|
10644
10654
|
*.compute.estate
|
10645
10655
|
*.alces.network
|
10646
10656
|
|
10657
|
+
// alwaysdata : https://www.alwaysdata.com
|
10658
|
+
// Submitted by Cyril <admin@alwaysdata.com>
|
10659
|
+
*.alwaysdata.net
|
10660
|
+
|
10647
10661
|
// Amazon CloudFront : https://aws.amazon.com/cloudfront/
|
10648
10662
|
// Submitted by Donavan Miller <donavanm@amazon.com>
|
10649
10663
|
cloudfront.net
|
@@ -10825,6 +10839,20 @@ r.cdn77.net
|
|
10825
10839
|
rsc.cdn77.org
|
10826
10840
|
ssl.origin.cdn77-secure.org
|
10827
10841
|
|
10842
|
+
// Cloud DNS Ltd : http://www.cloudns.net
|
10843
|
+
// Submitted by Aleksander Hristov <noc@cloudns.net>
|
10844
|
+
cloudns.asia
|
10845
|
+
cloudns.biz
|
10846
|
+
cloudns.club
|
10847
|
+
cloudns.cc
|
10848
|
+
cloudns.eu
|
10849
|
+
cloudns.in
|
10850
|
+
cloudns.info
|
10851
|
+
cloudns.org
|
10852
|
+
cloudns.pro
|
10853
|
+
cloudns.pw
|
10854
|
+
cloudns.us
|
10855
|
+
|
10828
10856
|
// CoDNS B.V.
|
10829
10857
|
co.nl
|
10830
10858
|
co.no
|
@@ -11280,6 +11308,16 @@ fbxos.fr
|
|
11280
11308
|
freebox-os.fr
|
11281
11309
|
freeboxos.fr
|
11282
11310
|
|
11311
|
+
// Fusion Intranet : https://www.fusion-intranet.com
|
11312
|
+
// Submitted by Matthias Burtscher <matthias.burtscher@fusonic.net>
|
11313
|
+
myfusion.cloud
|
11314
|
+
|
11315
|
+
// Futureweb OG : http://www.futureweb.at
|
11316
|
+
// Submitted by Andreas Schnederle-Wagner <schnederle@futureweb.at>
|
11317
|
+
futuremailing.at
|
11318
|
+
*.ex.ortsinfo.at
|
11319
|
+
*.kunden.ortsinfo.at
|
11320
|
+
|
11283
11321
|
// GDS : https://www.gov.uk/service-manual/operations/operating-servicegovuk-subdomains
|
11284
11322
|
// Submitted by David Illsley <david.illsley@digital.cabinet-office.gov.uk>
|
11285
11323
|
service.gov.uk
|
@@ -11391,6 +11429,7 @@ codespot.com
|
|
11391
11429
|
googleapis.com
|
11392
11430
|
googlecode.com
|
11393
11431
|
pagespeedmobilizer.com
|
11432
|
+
publishproxy.com
|
11394
11433
|
withgoogle.com
|
11395
11434
|
withyoutube.com
|
11396
11435
|
|
@@ -11418,6 +11457,36 @@ iki.fi
|
|
11418
11457
|
biz.at
|
11419
11458
|
info.at
|
11420
11459
|
|
11460
|
+
// Interlegis : http://www.interlegis.leg.br
|
11461
|
+
// Submitted by Gabriel Ferreira <registrobr@interlegis.leg.br>
|
11462
|
+
ac.leg.br
|
11463
|
+
al.leg.br
|
11464
|
+
am.leg.br
|
11465
|
+
ap.leg.br
|
11466
|
+
ba.leg.br
|
11467
|
+
ce.leg.br
|
11468
|
+
df.leg.br
|
11469
|
+
es.leg.br
|
11470
|
+
go.leg.br
|
11471
|
+
ma.leg.br
|
11472
|
+
mg.leg.br
|
11473
|
+
ms.leg.br
|
11474
|
+
mt.leg.br
|
11475
|
+
pa.leg.br
|
11476
|
+
pb.leg.br
|
11477
|
+
pe.leg.br
|
11478
|
+
pi.leg.br
|
11479
|
+
pr.leg.br
|
11480
|
+
rj.leg.br
|
11481
|
+
rn.leg.br
|
11482
|
+
ro.leg.br
|
11483
|
+
rr.leg.br
|
11484
|
+
rs.leg.br
|
11485
|
+
sc.leg.br
|
11486
|
+
se.leg.br
|
11487
|
+
sp.leg.br
|
11488
|
+
to.leg.br
|
11489
|
+
|
11421
11490
|
// Joyent : https://www.joyent.com/
|
11422
11491
|
// Submitted by Brian Bennett <brian.bennett@joyent.com>
|
11423
11492
|
*.triton.zone
|
@@ -11427,6 +11496,14 @@ info.at
|
|
11427
11496
|
// Submitted by Stefan Keim <admin@js.org>
|
11428
11497
|
js.org
|
11429
11498
|
|
11499
|
+
// Keyweb AG : https://www.keyweb.de
|
11500
|
+
// Submitted by Martin Dannehl <postmaster@keymachine.de>
|
11501
|
+
keymachine.de
|
11502
|
+
|
11503
|
+
// KnightPoint Systems, LLC : http://www.knightpoint.com/
|
11504
|
+
// Submitted by Roy Keene <rkeene@knightpoint.com>
|
11505
|
+
knightpoint.systems
|
11506
|
+
|
11430
11507
|
// .KRD : http://nic.krd/data/krd/Registration%20Policy.pdf
|
11431
11508
|
co.krd
|
11432
11509
|
edu.krd
|
@@ -11566,6 +11643,10 @@ nyc.mn
|
|
11566
11643
|
// Submitted by Eddie Jones <eddie@onefoldmedia.com>
|
11567
11644
|
nid.io
|
11568
11645
|
|
11646
|
+
// OpenCraft GmbH : http://opencraft.com/
|
11647
|
+
// Submitted by Sven Marnach <sven@opencraft.com>
|
11648
|
+
opencraft.hosting
|
11649
|
+
|
11569
11650
|
// Opera Software, A.S.A.
|
11570
11651
|
// Submitted by Yngve Pettersen <yngve@opera.com>
|
11571
11652
|
operaunite.com
|
@@ -11646,6 +11727,12 @@ rhcloud.com
|
|
11646
11727
|
// Submitted by Chris Kastorff <info@rethinkdb.com>
|
11647
11728
|
hzc.io
|
11648
11729
|
|
11730
|
+
// Revitalised Limited : http://www.revitalised.co.uk
|
11731
|
+
// Submitted by Jack Price <jack@revitalised.co.uk>
|
11732
|
+
wellbeingzone.eu
|
11733
|
+
ptplus.fit
|
11734
|
+
wellbeingzone.co.uk
|
11735
|
+
|
11649
11736
|
// Sandstorm Development Group, Inc. : https://sandcats.io/
|
11650
11737
|
// Submitted by Asheesh Laroia <asheesh@sandstorm.io>
|
11651
11738
|
sandcats.io
|
@@ -11707,6 +11794,10 @@ i234.me
|
|
11707
11794
|
myds.me
|
11708
11795
|
synology.me
|
11709
11796
|
|
11797
|
+
// TAIFUN Software AG : http://taifun-software.de
|
11798
|
+
// Submitted by Bjoern Henke <dev-server@taifun-software.de>
|
11799
|
+
taifun-dns.de
|
11800
|
+
|
11710
11801
|
// TASK geographical domains (www.task.gda.pl/uslugi/dns)
|
11711
11802
|
gda.pl
|
11712
11803
|
gdansk.pl
|
@@ -11719,6 +11810,12 @@ sopot.pl
|
|
11719
11810
|
bloxcms.com
|
11720
11811
|
townnews-staging.com
|
11721
11812
|
|
11813
|
+
// TransIP : htts://www.transip.nl
|
11814
|
+
// Submitted by Rory Breuk <rbreuk@transip.nl>
|
11815
|
+
*.transurl.be
|
11816
|
+
*.transurl.eu
|
11817
|
+
*.transurl.nl
|
11818
|
+
|
11722
11819
|
// TuxFamily : http://tuxfamily.org
|
11723
11820
|
// Submitted by TuxFamily administrators <adm@staff.tuxfamily.org>
|
11724
11821
|
tuxfamily.org
|
data/domain_name.gemspec
CHANGED
@@ -30,15 +30,6 @@ Suffix List.
|
|
30
30
|
|
31
31
|
gem.add_runtime_dependency("unf", ["< 1.0.0", ">= 0.0.5"])
|
32
32
|
gem.add_development_dependency("test-unit", "~> 2.5.5")
|
33
|
-
if RUBY_VERSION >= "2.0"
|
34
|
-
gem.add_development_dependency("shoulda", ">= 0")
|
35
|
-
else
|
36
|
-
# Cap dependency on activesupport with < 4.0 on behalf of
|
37
|
-
# shoulda-matchers to satisfy bundler.
|
38
|
-
gem.add_development_dependency("activesupport", "< 4.0")
|
39
|
-
gem.add_development_dependency("i18n", "< 0.7.0")
|
40
|
-
gem.add_development_dependency("shoulda", "< 3.5.0")
|
41
|
-
end
|
42
33
|
gem.add_development_dependency("bundler", [">= 1.2.0"])
|
43
34
|
gem.add_development_dependency("rake", [">= 0.9.2.2", *("< 11" if RUBY_VERSION < "1.9")])
|
44
35
|
gem.add_development_dependency("rdoc", [">= 2.4.2"])
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class DomainName
|
2
|
-
ETLD_DATA_DATE = '2016-
|
2
|
+
ETLD_DATA_DATE = '2016-10-21T20:52:10Z'
|
3
3
|
|
4
4
|
ETLD_DATA = {
|
5
5
|
"ac" => 0,
|
@@ -540,7 +540,7 @@ class DomainName
|
|
540
540
|
"org.cw" => 0,
|
541
541
|
"cx" => 0,
|
542
542
|
"gov.cx" => 0,
|
543
|
-
"cy" =>
|
543
|
+
"cy" => 0,
|
544
544
|
"ac.cy" => 0,
|
545
545
|
"biz.cy" => 0,
|
546
546
|
"com.cy" => 0,
|
@@ -3914,8 +3914,15 @@ class DomainName
|
|
3914
3914
|
"edu.my" => 0,
|
3915
3915
|
"mil.my" => 0,
|
3916
3916
|
"name.my" => 0,
|
3917
|
-
"mz" =>
|
3918
|
-
"
|
3917
|
+
"mz" => 0,
|
3918
|
+
"ac.mz" => 0,
|
3919
|
+
"adv.mz" => 0,
|
3920
|
+
"co.mz" => 0,
|
3921
|
+
"edu.mz" => 0,
|
3922
|
+
"gov.mz" => 0,
|
3923
|
+
"mil.mz" => 0,
|
3924
|
+
"net.mz" => 0,
|
3925
|
+
"org.mz" => 0,
|
3919
3926
|
"na" => 0,
|
3920
3927
|
"info.na" => 0,
|
3921
3928
|
"pro.na" => 0,
|
@@ -7286,6 +7293,7 @@ class DomainName
|
|
7286
7293
|
"beep.pl" => 0,
|
7287
7294
|
"compute.estate" => -1,
|
7288
7295
|
"alces.network" => -1,
|
7296
|
+
"alwaysdata.net" => -1,
|
7289
7297
|
"cloudfront.net" => 0,
|
7290
7298
|
"compute.amazonaws.com" => 0,
|
7291
7299
|
"ap-northeast-1.compute.amazonaws.com" => 0,
|
@@ -7382,6 +7390,17 @@ class DomainName
|
|
7382
7390
|
"r.cdn77.net" => 0,
|
7383
7391
|
"rsc.cdn77.org" => 0,
|
7384
7392
|
"ssl.origin.cdn77-secure.org" => 0,
|
7393
|
+
"cloudns.asia" => 0,
|
7394
|
+
"cloudns.biz" => 0,
|
7395
|
+
"cloudns.club" => 0,
|
7396
|
+
"cloudns.cc" => 0,
|
7397
|
+
"cloudns.eu" => 0,
|
7398
|
+
"cloudns.in" => 0,
|
7399
|
+
"cloudns.info" => 0,
|
7400
|
+
"cloudns.org" => 0,
|
7401
|
+
"cloudns.pro" => 0,
|
7402
|
+
"cloudns.pw" => 0,
|
7403
|
+
"cloudns.us" => 0,
|
7385
7404
|
"co.nl" => 0,
|
7386
7405
|
"co.no" => 0,
|
7387
7406
|
"platform.sh" => -1,
|
@@ -7761,6 +7780,10 @@ class DomainName
|
|
7761
7780
|
"fbxos.fr" => 0,
|
7762
7781
|
"freebox-os.fr" => 0,
|
7763
7782
|
"freeboxos.fr" => 0,
|
7783
|
+
"myfusion.cloud" => 0,
|
7784
|
+
"futuremailing.at" => 0,
|
7785
|
+
"ex.ortsinfo.at" => -1,
|
7786
|
+
"kunden.ortsinfo.at" => -1,
|
7764
7787
|
"service.gov.uk" => 0,
|
7765
7788
|
"github.io" => 0,
|
7766
7789
|
"githubusercontent.com" => 0,
|
@@ -7855,6 +7878,7 @@ class DomainName
|
|
7855
7878
|
"googleapis.com" => 0,
|
7856
7879
|
"googlecode.com" => 0,
|
7857
7880
|
"pagespeedmobilizer.com" => 0,
|
7881
|
+
"publishproxy.com" => 0,
|
7858
7882
|
"withgoogle.com" => 0,
|
7859
7883
|
"withyoutube.com" => 0,
|
7860
7884
|
"hashbang.sh" => 0,
|
@@ -7865,9 +7889,38 @@ class DomainName
|
|
7865
7889
|
"iki.fi" => 0,
|
7866
7890
|
"biz.at" => 0,
|
7867
7891
|
"info.at" => 0,
|
7892
|
+
"ac.leg.br" => 0,
|
7893
|
+
"al.leg.br" => 0,
|
7894
|
+
"am.leg.br" => 0,
|
7895
|
+
"ap.leg.br" => 0,
|
7896
|
+
"ba.leg.br" => 0,
|
7897
|
+
"ce.leg.br" => 0,
|
7898
|
+
"df.leg.br" => 0,
|
7899
|
+
"es.leg.br" => 0,
|
7900
|
+
"go.leg.br" => 0,
|
7901
|
+
"ma.leg.br" => 0,
|
7902
|
+
"mg.leg.br" => 0,
|
7903
|
+
"ms.leg.br" => 0,
|
7904
|
+
"mt.leg.br" => 0,
|
7905
|
+
"pa.leg.br" => 0,
|
7906
|
+
"pb.leg.br" => 0,
|
7907
|
+
"pe.leg.br" => 0,
|
7908
|
+
"pi.leg.br" => 0,
|
7909
|
+
"pr.leg.br" => 0,
|
7910
|
+
"rj.leg.br" => 0,
|
7911
|
+
"rn.leg.br" => 0,
|
7912
|
+
"ro.leg.br" => 0,
|
7913
|
+
"rr.leg.br" => 0,
|
7914
|
+
"rs.leg.br" => 0,
|
7915
|
+
"sc.leg.br" => 0,
|
7916
|
+
"se.leg.br" => 0,
|
7917
|
+
"sp.leg.br" => 0,
|
7918
|
+
"to.leg.br" => 0,
|
7868
7919
|
"triton.zone" => -1,
|
7869
7920
|
"cns.joyent.com" => -1,
|
7870
7921
|
"js.org" => 0,
|
7922
|
+
"keymachine.de" => 0,
|
7923
|
+
"knightpoint.systems" => 0,
|
7871
7924
|
"co.krd" => 0,
|
7872
7925
|
"edu.krd" => 0,
|
7873
7926
|
"magentosite.cloud" => -1,
|
@@ -7970,6 +8023,7 @@ class DomainName
|
|
7970
8023
|
"zapto.org" => 0,
|
7971
8024
|
"nyc.mn" => 0,
|
7972
8025
|
"nid.io" => 0,
|
8026
|
+
"opencraft.hosting" => 0,
|
7973
8027
|
"operaunite.com" => 0,
|
7974
8028
|
"outsystemscloud.com" => 0,
|
7975
8029
|
"ownprovider.com" => 0,
|
@@ -7997,6 +8051,9 @@ class DomainName
|
|
7997
8051
|
"rackmaze.net" => 0,
|
7998
8052
|
"rhcloud.com" => 0,
|
7999
8053
|
"hzc.io" => 0,
|
8054
|
+
"wellbeingzone.eu" => 0,
|
8055
|
+
"ptplus.fit" => 0,
|
8056
|
+
"wellbeingzone.co.uk" => 0,
|
8000
8057
|
"sandcats.io" => 0,
|
8001
8058
|
"logoip.de" => 0,
|
8002
8059
|
"logoip.com" => 0,
|
@@ -8028,6 +8085,7 @@ class DomainName
|
|
8028
8085
|
"i234.me" => 0,
|
8029
8086
|
"myds.me" => 0,
|
8030
8087
|
"synology.me" => 0,
|
8088
|
+
"taifun-dns.de" => 0,
|
8031
8089
|
"gda.pl" => 0,
|
8032
8090
|
"gdansk.pl" => 0,
|
8033
8091
|
"gdynia.pl" => 0,
|
@@ -8035,6 +8093,9 @@ class DomainName
|
|
8035
8093
|
"sopot.pl" => 0,
|
8036
8094
|
"bloxcms.com" => 0,
|
8037
8095
|
"townnews-staging.com" => 0,
|
8096
|
+
"transurl.be" => -1,
|
8097
|
+
"transurl.eu" => -1,
|
8098
|
+
"transurl.nl" => -1,
|
8038
8099
|
"tuxfamily.org" => 0,
|
8039
8100
|
"hk.com" => 0,
|
8040
8101
|
"hk.org" => 0,
|
data/lib/domain_name/version.rb
CHANGED
data/test/helper.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'helper'
|
2
2
|
|
3
3
|
class TestDomainName < Test::Unit::TestCase
|
4
|
-
|
4
|
+
test "encode labels just as listed in RFC 3492 #7.1 (slightly modified)" do
|
5
5
|
[
|
6
6
|
['(A) Arabic (Egyptian)',
|
7
7
|
[0x0644, 0x064A, 0x0647, 0x0645, 0x0627, 0x0628, 0x062A, 0x0643, 0x0644,
|
data/test/test_domain_name.rb
CHANGED
@@ -3,7 +3,7 @@ require 'helper'
|
|
3
3
|
require 'ipaddr'
|
4
4
|
|
5
5
|
class TestDomainName < Test::Unit::TestCase
|
6
|
-
|
6
|
+
test "raise ArgumentError if hostname starts with a dot" do
|
7
7
|
[
|
8
8
|
# Leading dot.
|
9
9
|
'.com',
|
@@ -15,7 +15,7 @@ class TestDomainName < Test::Unit::TestCase
|
|
15
15
|
}
|
16
16
|
end
|
17
17
|
|
18
|
-
|
18
|
+
test "accept a String-alike for initialization" do
|
19
19
|
Object.new.tap { |obj|
|
20
20
|
def obj.to_str
|
21
21
|
"Example.org"
|
@@ -35,7 +35,7 @@ class TestDomainName < Test::Unit::TestCase
|
|
35
35
|
}
|
36
36
|
end
|
37
37
|
|
38
|
-
|
38
|
+
test "parse canonical domain names correctly" do
|
39
39
|
[
|
40
40
|
# Mixed case.
|
41
41
|
['COM', nil, false, 'com', true],
|
@@ -134,7 +134,7 @@ class TestDomainName < Test::Unit::TestCase
|
|
134
134
|
}
|
135
135
|
end
|
136
136
|
|
137
|
-
|
137
|
+
test "compare hostnames correctly" do
|
138
138
|
[
|
139
139
|
["foo.com", "abc.foo.com", 1],
|
140
140
|
["COM", "abc.foo.com", 1],
|
@@ -180,7 +180,7 @@ class TestDomainName < Test::Unit::TestCase
|
|
180
180
|
}
|
181
181
|
end
|
182
182
|
|
183
|
-
|
183
|
+
test "check cookie domain correctly" do
|
184
184
|
{
|
185
185
|
'com' => [
|
186
186
|
['com', false],
|
@@ -255,7 +255,7 @@ class TestDomainName < Test::Unit::TestCase
|
|
255
255
|
}
|
256
256
|
end
|
257
257
|
|
258
|
-
|
258
|
+
test "parse IPv4 addresseses" do
|
259
259
|
a = '192.168.10.20'
|
260
260
|
dn = DomainName(a)
|
261
261
|
assert_equal(a, dn.hostname)
|
@@ -270,7 +270,7 @@ class TestDomainName < Test::Unit::TestCase
|
|
270
270
|
assert_equal(nil, dn.superdomain)
|
271
271
|
end
|
272
272
|
|
273
|
-
|
273
|
+
test "parse IPv6 addresseses" do
|
274
274
|
a = '2001:200:dff:fff1:216:3eff:feb1:44d7'
|
275
275
|
b = '2001:0200:0dff:fff1:0216:3eff:feb1:44d7'
|
276
276
|
[b, b.upcase, "[#{b}]", "[#{b.upcase}]"].each { |host|
|
@@ -289,7 +289,7 @@ class TestDomainName < Test::Unit::TestCase
|
|
289
289
|
}
|
290
290
|
end
|
291
291
|
|
292
|
-
|
292
|
+
test "get superdomain" do
|
293
293
|
[
|
294
294
|
%w[www.sub.example.local sub.example.local example.local local],
|
295
295
|
%w[www.sub.example.com sub.example.com example.com com],
|
@@ -304,7 +304,7 @@ class TestDomainName < Test::Unit::TestCase
|
|
304
304
|
}
|
305
305
|
end
|
306
306
|
|
307
|
-
|
307
|
+
test "have idn methods" do
|
308
308
|
dn = DomainName("金八先生.B組.3年.日本語ドメイン名Example.日本")
|
309
309
|
|
310
310
|
assert_equal "xn--44q1cv48kq8x.xn--b-gf6c.xn--3-pj3b.xn--example-6q4fyliikhk162btq3b2zd4y2o.xn--wgv71a", dn.hostname
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: domain_name
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.20161021
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akinori MUSHA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unf
|
@@ -44,20 +44,6 @@ dependencies:
|
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 2.5.5
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: shoulda
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - ">="
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '0'
|
61
47
|
- !ruby/object:Gem::Dependency
|
62
48
|
name: bundler
|
63
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
140
|
version: '0'
|
155
141
|
requirements: []
|
156
142
|
rubyforge_project:
|
157
|
-
rubygems_version: 2.
|
143
|
+
rubygems_version: 2.6.6
|
158
144
|
signing_key:
|
159
145
|
specification_version: 4
|
160
146
|
summary: Domain Name manipulation library for Ruby
|