public_suffix_service 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,7 +19,7 @@
19
19
  // the Initial Developer. All Rights Reserved.
20
20
  //
21
21
  // Contributor(s):
22
- // Ruben Arakelyan <ruben@wackomenace.co.uk>
22
+ // Ruben Arakelyan <ruben@rubenarakelyan.com>
23
23
  // Gervase Markham <gerv@gerv.net>
24
24
  // Pamela Greene <pamg.bugs@gmail.com>
25
25
  // David Triendl <david@triendl.name>
@@ -4907,3 +4907,284 @@ xxx
4907
4907
 
4908
4908
  // zw : http://en.wikipedia.org/wiki/.zw
4909
4909
  *.zw
4910
+
4911
+ // DynDNS.com Dynamic DNS zones : http://www.dyndns.com/services/dns/dyndns/
4912
+ dyndns-at-home.com
4913
+ dyndns-at-work.com
4914
+ dyndns-blog.com
4915
+ dyndns-free.com
4916
+ dyndns-home.com
4917
+ dyndns-ip.com
4918
+ dyndns-mail.com
4919
+ dyndns-office.com
4920
+ dyndns-pics.com
4921
+ dyndns-remote.com
4922
+ dyndns-server.com
4923
+ dyndns-web.com
4924
+ dyndns-wiki.com
4925
+ dyndns-work.com
4926
+ dyndns.biz
4927
+ dyndns.info
4928
+ dyndns.org
4929
+ dyndns.tv
4930
+ at-band-camp.net
4931
+ ath.cx
4932
+ barrel-of-knowledge.info
4933
+ barrell-of-knowledge.info
4934
+ better-than.tv
4935
+ blogdns.com
4936
+ blogdns.net
4937
+ blogdns.org
4938
+ blogsite.org
4939
+ boldlygoingnowhere.org
4940
+ broke-it.net
4941
+ buyshouses.net
4942
+ cechire.com
4943
+ dnsalias.com
4944
+ dnsalias.net
4945
+ dnsalias.org
4946
+ dnsdojo.com
4947
+ dnsdojo.net
4948
+ dnsdojo.org
4949
+ does-it.net
4950
+ doesntexist.com
4951
+ doesntexist.org
4952
+ dontexist.com
4953
+ dontexist.net
4954
+ dontexist.org
4955
+ doomdns.com
4956
+ doomdns.org
4957
+ dvrdns.org
4958
+ dyn-o-saur.com
4959
+ dynalias.com
4960
+ dynalias.net
4961
+ dynalias.org
4962
+ dynathome.net
4963
+ dyndns.ws
4964
+ endofinternet.net
4965
+ endofinternet.org
4966
+ endoftheinternet.org
4967
+ est-a-la-maison.com
4968
+ est-a-la-masion.com
4969
+ est-le-patron.com
4970
+ est-mon-blogueur.com
4971
+ for-better.biz
4972
+ for-more.biz
4973
+ for-our.info
4974
+ for-some.biz
4975
+ for-the.biz
4976
+ forgot.her.name
4977
+ forgot.his.name
4978
+ from-ak.com
4979
+ from-al.com
4980
+ from-ar.com
4981
+ from-az.net
4982
+ from-ca.com
4983
+ from-co.net
4984
+ from-ct.com
4985
+ from-dc.com
4986
+ from-de.com
4987
+ from-fl.com
4988
+ from-ga.com
4989
+ from-hi.com
4990
+ from-ia.com
4991
+ from-id.com
4992
+ from-il.com
4993
+ from-in.com
4994
+ from-ks.com
4995
+ from-ky.com
4996
+ from-la.net
4997
+ from-ma.com
4998
+ from-md.com
4999
+ from-me.org
5000
+ from-mi.com
5001
+ from-mn.com
5002
+ from-mo.com
5003
+ from-ms.com
5004
+ from-mt.com
5005
+ from-nc.com
5006
+ from-nd.com
5007
+ from-ne.com
5008
+ from-nh.com
5009
+ from-nj.com
5010
+ from-nm.com
5011
+ from-nv.com
5012
+ from-ny.net
5013
+ from-oh.com
5014
+ from-ok.com
5015
+ from-or.com
5016
+ from-pa.com
5017
+ from-pr.com
5018
+ from-ri.com
5019
+ from-sc.com
5020
+ from-sd.com
5021
+ from-tn.com
5022
+ from-tx.com
5023
+ from-ut.com
5024
+ from-va.com
5025
+ from-vt.com
5026
+ from-wa.com
5027
+ from-wi.com
5028
+ from-wv.com
5029
+ from-wy.com
5030
+ ftpaccess.cc
5031
+ fuettertdasnetz.de
5032
+ game-host.org
5033
+ game-server.cc
5034
+ getmyip.com
5035
+ gets-it.net
5036
+ go.dyndns.org
5037
+ gotdns.com
5038
+ gotdns.org
5039
+ groks-the.info
5040
+ groks-this.info
5041
+ ham-radio-op.net
5042
+ here-for-more.info
5043
+ hobby-site.com
5044
+ hobby-site.org
5045
+ home.dyndns.org
5046
+ homedns.org
5047
+ homeftp.net
5048
+ homeftp.org
5049
+ homeip.net
5050
+ homelinux.com
5051
+ homelinux.net
5052
+ homelinux.org
5053
+ homeunix.com
5054
+ homeunix.net
5055
+ homeunix.org
5056
+ iamallama.com
5057
+ in-the-band.net
5058
+ is-a-anarchist.com
5059
+ is-a-blogger.com
5060
+ is-a-bookkeeper.com
5061
+ is-a-bruinsfan.org
5062
+ is-a-bulls-fan.com
5063
+ is-a-candidate.org
5064
+ is-a-caterer.com
5065
+ is-a-celticsfan.org
5066
+ is-a-chef.com
5067
+ is-a-chef.net
5068
+ is-a-chef.org
5069
+ is-a-conservative.com
5070
+ is-a-cpa.com
5071
+ is-a-cubicle-slave.com
5072
+ is-a-democrat.com
5073
+ is-a-designer.com
5074
+ is-a-doctor.com
5075
+ is-a-financialadvisor.com
5076
+ is-a-geek.com
5077
+ is-a-geek.net
5078
+ is-a-geek.org
5079
+ is-a-green.com
5080
+ is-a-guru.com
5081
+ is-a-hard-worker.com
5082
+ is-a-hunter.com
5083
+ is-a-knight.org
5084
+ is-a-landscaper.com
5085
+ is-a-lawyer.com
5086
+ is-a-liberal.com
5087
+ is-a-libertarian.com
5088
+ is-a-linux-user.org
5089
+ is-a-llama.com
5090
+ is-a-musician.com
5091
+ is-a-nascarfan.com
5092
+ is-a-nurse.com
5093
+ is-a-painter.com
5094
+ is-a-patsfan.org
5095
+ is-a-personaltrainer.com
5096
+ is-a-photographer.com
5097
+ is-a-player.com
5098
+ is-a-republican.com
5099
+ is-a-rockstar.com
5100
+ is-a-socialist.com
5101
+ is-a-soxfan.org
5102
+ is-a-student.com
5103
+ is-a-teacher.com
5104
+ is-a-techie.com
5105
+ is-a-therapist.com
5106
+ is-an-accountant.com
5107
+ is-an-actor.com
5108
+ is-an-actress.com
5109
+ is-an-anarchist.com
5110
+ is-an-artist.com
5111
+ is-an-engineer.com
5112
+ is-an-entertainer.com
5113
+ is-by.us
5114
+ is-certified.com
5115
+ is-found.org
5116
+ is-gone.com
5117
+ is-into-anime.com
5118
+ is-into-cars.com
5119
+ is-into-cartoons.com
5120
+ is-into-games.com
5121
+ is-leet.com
5122
+ is-lost.org
5123
+ is-not-certified.com
5124
+ is-saved.org
5125
+ is-slick.com
5126
+ is-uberleet.com
5127
+ is-very-bad.org
5128
+ is-very-evil.org
5129
+ is-very-good.org
5130
+ is-very-nice.org
5131
+ is-very-sweet.org
5132
+ is-with-theband.com
5133
+ isa-geek.com
5134
+ isa-geek.net
5135
+ isa-geek.org
5136
+ isa-hockeynut.com
5137
+ issmarterthanyou.com
5138
+ isteingeek.de
5139
+ istmein.de
5140
+ kicks-ass.net
5141
+ kicks-ass.org
5142
+ knowsitall.info
5143
+ land-4-sale.us
5144
+ lebtimnetz.de
5145
+ leitungsen.de
5146
+ likes-pie.com
5147
+ likescandy.com
5148
+ merseine.nu
5149
+ mine.nu
5150
+ misconfused.org
5151
+ mypets.ws
5152
+ myphotos.cc
5153
+ neat-url.com
5154
+ office-on-the.net
5155
+ on-the-web.tv
5156
+ podzone.net
5157
+ podzone.org
5158
+ readmyblog.org
5159
+ saves-the-whales.com
5160
+ scrapper-site.net
5161
+ scrapping.cc
5162
+ selfip.biz
5163
+ selfip.com
5164
+ selfip.info
5165
+ selfip.net
5166
+ selfip.org
5167
+ sells-for-less.com
5168
+ sells-for-u.com
5169
+ sells-it.net
5170
+ sellsyourhome.org
5171
+ servebbs.com
5172
+ servebbs.net
5173
+ servebbs.org
5174
+ serveftp.net
5175
+ serveftp.org
5176
+ servegame.org
5177
+ shacknet.nu
5178
+ simple-url.com
5179
+ space-to-rent.com
5180
+ stuff-4-sale.org
5181
+ stuff-4-sale.us
5182
+ teaches-yoga.com
5183
+ thruhere.net
5184
+ traeumtgerade.de
5185
+ webhop.biz
5186
+ webhop.info
5187
+ webhop.net
5188
+ webhop.org
5189
+ worse-than.tv
5190
+ writesthisblog.com
@@ -1,13 +1,13 @@
1
1
  #--
2
- # Public Suffix Service
2
+ # Public Suffix
3
3
  #
4
- # Domain Name parser based on the Public Suffix List.
4
+ # Domain name parser based on the Public Suffix List.
5
5
  #
6
6
  # Copyright (c) 2009-2011 Simone Carletti <weppos@weppos.net>
7
7
  #++
8
8
 
9
9
 
10
- module PublicSuffixService
10
+ module PublicSuffix
11
11
 
12
12
  class Domain
13
13
 
@@ -33,7 +33,7 @@ module PublicSuffixService
33
33
  domain.to_s.split(".").reverse
34
34
  end
35
35
 
36
- # Creates and returns a new {PublicSuffixService::Domain} instance.
36
+ # Creates and returns a new {PublicSuffix::Domain} instance.
37
37
  #
38
38
  # @overload initialize(tld)
39
39
  # Initializes with a +tld+.
@@ -49,19 +49,19 @@ module PublicSuffixService
49
49
  # @param [String] tld The TRD (subdomain)
50
50
  #
51
51
  # @yield [self] Yields on self.
52
- # @yieldparam [PublicSuffixService::Domain] self The newly creates instance
52
+ # @yieldparam [PublicSuffix::Domain] self The newly creates instance
53
53
  #
54
54
  # @example Initialize with a TLD
55
- # PublicSuffixService::Domain.new("com")
56
- # # => #<PublicSuffixService::Domain @tld="com">
55
+ # PublicSuffix::Domain.new("com")
56
+ # # => #<PublicSuffix::Domain @tld="com">
57
57
  #
58
58
  # @example Initialize with a TLD and SLD
59
- # PublicSuffixService::Domain.new("com", "example")
60
- # # => #<PublicSuffixService::Domain @tld="com", @trd=nil>
59
+ # PublicSuffix::Domain.new("com", "example")
60
+ # # => #<PublicSuffix::Domain @tld="com", @trd=nil>
61
61
  #
62
62
  # @example Initialize with a TLD, SLD and TRD
63
- # PublicSuffixService::Domain.new("com", "example", "wwww")
64
- # # => #<PublicSuffixService::Domain @tld="com", @trd=nil, @sld="example">
63
+ # PublicSuffix::Domain.new("com", "example", "wwww")
64
+ # # => #<PublicSuffix::Domain @tld="com", @trd=nil, @sld="example">
65
65
  #
66
66
  def initialize(*args, &block)
67
67
  @tld, @sld, @trd = args
@@ -81,10 +81,10 @@ module PublicSuffixService
81
81
  #
82
82
  # @example
83
83
  #
84
- # PublicSuffixService::Domain.new("google.com").to_a
84
+ # PublicSuffix::Domain.new("google.com").to_a
85
85
  # # => [nil, "google", "com"]
86
86
  #
87
- # PublicSuffixService::Domain.new("www.google.com").to_a
87
+ # PublicSuffix::Domain.new("www.google.com").to_a
88
88
  # # => [nil, "google", "com"]
89
89
  #
90
90
  def to_a
@@ -119,11 +119,11 @@ module PublicSuffixService
119
119
  # @return [String]
120
120
  #
121
121
  # @example Gets the domain name of a domain
122
- # PublicSuffixService::Domain.new("com", "google").name
122
+ # PublicSuffix::Domain.new("com", "google").name
123
123
  # # => "google.com"
124
124
  #
125
125
  # @example Gets the domain name of a subdomain
126
- # PublicSuffixService::Domain.new("com", "google", "www").name
126
+ # PublicSuffix::Domain.new("com", "google", "www").name
127
127
  # # => "www.google.com"
128
128
  #
129
129
  def name
@@ -133,29 +133,29 @@ module PublicSuffixService
133
133
  # Returns a domain-like representation of this object
134
134
  # if the object is a {#domain?}, <tt>nil</tt> otherwise.
135
135
  #
136
- # PublicSuffixService::Domain.new("com").domain
136
+ # PublicSuffix::Domain.new("com").domain
137
137
  # # => nil
138
138
  #
139
- # PublicSuffixService::Domain.new("com", "google").domain
139
+ # PublicSuffix::Domain.new("com", "google").domain
140
140
  # # => "google.com"
141
141
  #
142
- # PublicSuffixService::Domain.new("com", "google", "www").domain
142
+ # PublicSuffix::Domain.new("com", "google", "www").domain
143
143
  # # => "www.google.com"
144
144
  #
145
145
  # This method doesn't validate the input. It handles the domain
146
146
  # as a valid domain name and simply applies the necessary transformations.
147
147
  #
148
148
  # # This is an invalid domain
149
- # PublicSuffixService::Domain.new("zip", "google").domain
149
+ # PublicSuffix::Domain.new("zip", "google").domain
150
150
  # # => "google.zip"
151
151
  #
152
152
  # This method returns a FQD, not just the domain part.
153
153
  # To get the domain part, use <tt>#sld</tt> (aka second level domain).
154
154
  #
155
- # PublicSuffixService::Domain.new("com", "google", "www").domain
155
+ # PublicSuffix::Domain.new("com", "google", "www").domain
156
156
  # # => "google.com"
157
157
  #
158
- # PublicSuffixService::Domain.new("com", "google", "www").sld
158
+ # PublicSuffix::Domain.new("com", "google", "www").sld
159
159
  # # => "google"
160
160
  #
161
161
  # @return [String]
@@ -171,29 +171,29 @@ module PublicSuffixService
171
171
  # Returns a domain-like representation of this object
172
172
  # if the object is a {#subdomain?}, <tt>nil</tt> otherwise.
173
173
  #
174
- # PublicSuffixService::Domain.new("com").subdomain
174
+ # PublicSuffix::Domain.new("com").subdomain
175
175
  # # => nil
176
176
  #
177
- # PublicSuffixService::Domain.new("com", "google").subdomain
177
+ # PublicSuffix::Domain.new("com", "google").subdomain
178
178
  # # => nil
179
179
  #
180
- # PublicSuffixService::Domain.new("com", "google", "www").subdomain
180
+ # PublicSuffix::Domain.new("com", "google", "www").subdomain
181
181
  # # => "www.google.com"
182
182
  #
183
183
  # This method doesn't validate the input. It handles the domain
184
184
  # as a valid domain name and simply applies the necessary transformations.
185
185
  #
186
186
  # # This is an invalid domain
187
- # PublicSuffixService::Domain.new("zip", "google", "www").subdomain
187
+ # PublicSuffix::Domain.new("zip", "google", "www").subdomain
188
188
  # # => "www.google.zip"
189
189
  #
190
190
  # This method returns a FQD, not just the domain part.
191
191
  # To get the domain part, use <tt>#tld</tt> (aka third level domain).
192
192
  #
193
- # PublicSuffixService::Domain.new("com", "google", "www").subdomain
193
+ # PublicSuffix::Domain.new("com", "google", "www").subdomain
194
194
  # # => "www.google.com"
195
195
  #
196
- # PublicSuffixService::Domain.new("com", "google", "www").trd
196
+ # PublicSuffix::Domain.new("com", "google", "www").trd
197
197
  # # => "www"
198
198
  #
199
199
  # @return [String]
@@ -207,13 +207,13 @@ module PublicSuffixService
207
207
  end
208
208
 
209
209
  # Returns the rule matching this domain
210
- # in the default {PublicSuffixService::RuleList}.
210
+ # in the default {PublicSuffix::List}.
211
211
  #
212
- # @return [PublicSuffixService::Rule::Base, nil]
212
+ # @return [PublicSuffix::Rule::Base, nil]
213
213
  # The rule instance a rule matches current domain,
214
214
  # nil if no rule is found.
215
215
  def rule
216
- RuleList.default.find(name)
216
+ List.default.find(name)
217
217
  end
218
218
 
219
219
 
@@ -229,18 +229,18 @@ module PublicSuffixService
229
229
  #
230
230
  # @example
231
231
  #
232
- # PublicSuffixService::Domain.new("com").domain?
232
+ # PublicSuffix::Domain.new("com").domain?
233
233
  # # => false
234
234
  #
235
- # PublicSuffixService::Domain.new("com", "google").domain?
235
+ # PublicSuffix::Domain.new("com", "google").domain?
236
236
  # # => true
237
237
  #
238
- # PublicSuffixService::Domain.new("com", "google", "www").domain?
238
+ # PublicSuffix::Domain.new("com", "google", "www").domain?
239
239
  # # => true
240
240
  #
241
241
  # # This is an invalid domain, but returns true
242
242
  # # because this method doesn't validate the content.
243
- # PublicSuffixService::Domain.new("zip", "google").domain?
243
+ # PublicSuffix::Domain.new("zip", "google").domain?
244
244
  # # => true
245
245
  #
246
246
  # @see #subdomain?
@@ -261,18 +261,18 @@ module PublicSuffixService
261
261
  #
262
262
  # @example
263
263
  #
264
- # PublicSuffixService::Domain.new("com").subdomain?
264
+ # PublicSuffix::Domain.new("com").subdomain?
265
265
  # # => false
266
266
  #
267
- # PublicSuffixService::Domain.new("com", "google").subdomain?
267
+ # PublicSuffix::Domain.new("com", "google").subdomain?
268
268
  # # => false
269
269
  #
270
- # PublicSuffixService::Domain.new("com", "google", "www").subdomain?
270
+ # PublicSuffix::Domain.new("com", "google", "www").subdomain?
271
271
  # # => true
272
272
  #
273
273
  # # This is an invalid domain, but returns true
274
274
  # # because this method doesn't validate the content.
275
- # PublicSuffixService::Domain.new("zip", "google", "www").subdomain?
275
+ # PublicSuffix::Domain.new("zip", "google", "www").subdomain?
276
276
  # # => true
277
277
  #
278
278
  # @see #domain?
@@ -297,9 +297,9 @@ module PublicSuffixService
297
297
  end
298
298
 
299
299
  # Checks whether <tt>self</tt> is assigned and allowed
300
- # according to default {RuleList}.
300
+ # according to default {List}.
301
301
  #
302
- # This method triggers a new rule lookup in the default {RuleList},
302
+ # This method triggers a new rule lookup in the default {List},
303
303
  # which is a quite intensive task.
304
304
  #
305
305
  # @return [Boolean]
@@ -329,23 +329,23 @@ module PublicSuffixService
329
329
 
330
330
 
331
331
  # Checks whether <tt>self</tt> looks like a domain and validates
332
- # according to default {RuleList}.
332
+ # according to default {List}.
333
333
  #
334
334
  # @return [Boolean]
335
335
  #
336
336
  # @example
337
337
  #
338
- # PublicSuffixService::Domain.new("com").domain?
338
+ # PublicSuffix::Domain.new("com").domain?
339
339
  # # => false
340
340
  #
341
- # PublicSuffixService::Domain.new("com", "google").domain?
341
+ # PublicSuffix::Domain.new("com", "google").domain?
342
342
  # # => true
343
343
  #
344
- # PublicSuffixService::Domain.new("com", "google", "www").domain?
344
+ # PublicSuffix::Domain.new("com", "google", "www").domain?
345
345
  # # => true
346
346
  #
347
347
  # # This is an invalid domain
348
- # PublicSuffixService::Domain.new("zip", "google").false?
348
+ # PublicSuffix::Domain.new("zip", "google").false?
349
349
  # # => true
350
350
  #
351
351
  # @see #domain?
@@ -356,23 +356,23 @@ module PublicSuffixService
356
356
  end
357
357
 
358
358
  # Checks whether <tt>self</tt> looks like a subdomain and validates
359
- # according to default {RuleList}.
359
+ # according to default {List}.
360
360
  #
361
361
  # @return [Boolean]
362
362
  #
363
363
  # @example
364
364
  #
365
- # PublicSuffixService::Domain.new("com").subdomain?
365
+ # PublicSuffix::Domain.new("com").subdomain?
366
366
  # # => false
367
367
  #
368
- # PublicSuffixService::Domain.new("com", "google").subdomain?
368
+ # PublicSuffix::Domain.new("com", "google").subdomain?
369
369
  # # => false
370
370
  #
371
- # PublicSuffixService::Domain.new("com", "google", "www").subdomain?
371
+ # PublicSuffix::Domain.new("com", "google", "www").subdomain?
372
372
  # # => true
373
373
  #
374
374
  # # This is an invalid domain
375
- # PublicSuffixService::Domain.new("zip", "google", "www").subdomain?
375
+ # PublicSuffix::Domain.new("zip", "google", "www").subdomain?
376
376
  # # => false
377
377
  #
378
378
  # @see #subdomain?