public_suffix 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rubocop.yml +36 -0
  4. data/.rubocop_defaults.yml +179 -0
  5. data/.ruby-gemset +1 -0
  6. data/.travis.yml +31 -0
  7. data/.yardopts +1 -0
  8. data/2.0-Upgrade.md +52 -0
  9. data/CHANGELOG.md +353 -0
  10. data/Gemfile +12 -0
  11. data/LICENSE.txt +22 -0
  12. data/README.md +202 -0
  13. data/Rakefile +51 -0
  14. data/bin/console +15 -0
  15. data/data/list.txt +12966 -0
  16. data/lib/public_suffix.rb +179 -0
  17. data/lib/public_suffix/domain.rb +235 -0
  18. data/lib/public_suffix/errors.rb +41 -0
  19. data/lib/public_suffix/list.rb +247 -0
  20. data/lib/public_suffix/rule.rb +350 -0
  21. data/lib/public_suffix/version.rb +13 -0
  22. data/public_suffix.gemspec +25 -0
  23. data/test/.empty +2 -0
  24. data/test/acceptance_test.rb +129 -0
  25. data/test/benchmarks/bm_find.rb +66 -0
  26. data/test/benchmarks/bm_find_all.rb +102 -0
  27. data/test/benchmarks/bm_names.rb +91 -0
  28. data/test/benchmarks/bm_select.rb +26 -0
  29. data/test/benchmarks/bm_select_incremental.rb +25 -0
  30. data/test/benchmarks/bm_valid.rb +101 -0
  31. data/test/profilers/domain_profiler.rb +12 -0
  32. data/test/profilers/find_profiler.rb +12 -0
  33. data/test/profilers/find_profiler_jp.rb +12 -0
  34. data/test/profilers/initialization_profiler.rb +11 -0
  35. data/test/profilers/list_profsize.rb +11 -0
  36. data/test/profilers/object_binsize.rb +57 -0
  37. data/test/psl_test.rb +52 -0
  38. data/test/test_helper.rb +18 -0
  39. data/test/tests.txt +98 -0
  40. data/test/unit/domain_test.rb +106 -0
  41. data/test/unit/errors_test.rb +25 -0
  42. data/test/unit/list_test.rb +241 -0
  43. data/test/unit/public_suffix_test.rb +188 -0
  44. data/test/unit/rule_test.rb +222 -0
  45. metadata +151 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c55510fd81cb1ec900d6aaa3728880850148b57f81621ce5a0c1e93f3811a163
4
+ data.tar.gz: 9f76520d1a8a28ef3ffeda93ebaac0368113c02208093a57621443195629ef98
5
+ SHA512:
6
+ metadata.gz: 41bafee63060875aa1456f916947e50cd12ff5895dedfc781a444edb86db4d3e1877f20a6b5baae6277838b48ae3a40e6e634f0c71566fc5cf1673ca401cdb0c
7
+ data.tar.gz: 6e7e87dbdc0fcc12606e5696965e0e0cc50310721a03aaca88e90170cbd6876f510cea3b79f22c574de8efe626220d621be79f4da5ae4b3bf8a43c27fc56cc6f
@@ -0,0 +1,11 @@
1
+ # Bundler
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+
6
+ # Rubinius
7
+ *.rbc
8
+
9
+ # YARD
10
+ .yardoc
11
+ yardoc/
@@ -0,0 +1,36 @@
1
+ inherit_from:
2
+ - .rubocop_defaults.yml
3
+
4
+ AllCops:
5
+ Exclude:
6
+ # Exclude .gemspec files because they are generally auto-generated
7
+ - '*.gemspec'
8
+ # Exclude vendored folders
9
+ - 'tmp/**/*'
10
+ - 'vendor/**/*'
11
+ # Exclude artifacts
12
+ - 'pkg/**/*'
13
+ # Other
14
+ - 'test/benchmarks/**/*'
15
+ - 'test/profilers/**/*'
16
+
17
+ # I often use @_variable to avoid clashing.
18
+ Naming/MemoizedInstanceVariableName:
19
+ Enabled: false
20
+
21
+ Style/ClassAndModuleChildren:
22
+ Exclude:
23
+ - 'spec/**/*_spec.rb'
24
+ - 'test/**/*_test.rb'
25
+
26
+ # Dear Rubocop, I don't want to use String#strip_heredoc
27
+ Layout/IndentHeredoc:
28
+ Enabled: false
29
+
30
+ Style/WordArray:
31
+ Enabled: false
32
+ MinSize: 3
33
+
34
+ Style/SymbolArray:
35
+ Enabled: false
36
+ MinSize: 3
@@ -0,0 +1,179 @@
1
+ AllCops:
2
+ Exclude:
3
+ # Exclude .gemspec files because they are generally auto-generated
4
+ - '*.gemspec'
5
+ # Exclude vendored folders
6
+ - 'tmp/**/*'
7
+ - 'vendor/**/*'
8
+
9
+ # [codesmell]
10
+ Metrics/AbcSize:
11
+ Enabled: false
12
+ Exclude:
13
+ - 'spec/**/*_spec.rb'
14
+ - 'test/**/*_test.rb'
15
+
16
+ # [codesmell]
17
+ Metrics/BlockLength:
18
+ Enabled: false
19
+
20
+ # [codesmell]
21
+ Metrics/CyclomaticComplexity:
22
+ Enabled: false
23
+ Exclude:
24
+ - 'spec/**/*_spec.rb'
25
+ - 'test/**/*_test.rb'
26
+
27
+ # [codesmell]
28
+ Metrics/ClassLength:
29
+ Enabled: false
30
+ Exclude:
31
+ - 'spec/**/*_spec.rb'
32
+ - 'test/**/*_test.rb'
33
+
34
+ # [codesmell]
35
+ Metrics/LineLength:
36
+ Enabled: false
37
+ Exclude:
38
+ - 'spec/**/*_spec.rb'
39
+ - 'test/**/*_test.rb'
40
+ Max: 100
41
+
42
+ # [codesmell]
43
+ Metrics/MethodLength:
44
+ Enabled: false
45
+ Exclude:
46
+ - 'spec/**/*_spec.rb'
47
+ - 'test/**/*_test.rb'
48
+ Max: 10
49
+
50
+ # [codesmell]
51
+ Metrics/ModuleLength:
52
+ Enabled: false
53
+ Exclude:
54
+ - 'spec/**/*_spec.rb'
55
+ - 'test/**/*_test.rb'
56
+
57
+ # [codesmell]
58
+ Metrics/ParameterLists:
59
+ Enabled: false
60
+ Max: 5
61
+
62
+ # [codesmell]
63
+ Metrics/PerceivedComplexity:
64
+ Enabled: false
65
+
66
+ # Do not use "and" or "or" in conditionals, but for readability we can use it
67
+ # to chain executions. Just beware of operator order.
68
+ Style/AndOr:
69
+ EnforcedStyle: conditionals
70
+
71
+ Style/Documentation:
72
+ Exclude:
73
+ - 'spec/**/*'
74
+ - 'test/**/*'
75
+
76
+ # Double empty lines are useful to separate conceptually different methods
77
+ # in the same class or module.
78
+ Layout/EmptyLines:
79
+ Enabled: false
80
+
81
+ # In most cases, a space is nice. Sometimes, it's not.
82
+ # Just be consistent with the rest of the surrounding code.
83
+ Layout/EmptyLinesAroundClassBody:
84
+ Enabled: false
85
+
86
+ # In most cases, a space is nice. Sometimes, it's not.
87
+ # Just be consistent with the rest of the surrounding code.
88
+ Layout/EmptyLinesAroundModuleBody:
89
+ Enabled: false
90
+
91
+ # This is quite buggy, as it doesn't recognize double lines.
92
+ # Double empty lines are useful to separate conceptually different methods
93
+ # in the same class or module.
94
+ Layout/EmptyLineBetweenDefs:
95
+ Enabled: false
96
+
97
+ # I personally don't care about the format style.
98
+ # In most cases I like to use %, but not at the point I want to enforce it
99
+ # as a convention in the entire code.
100
+ Style/FormatString:
101
+ Enabled: false
102
+
103
+ # Annotated tokens (like %<foo>s) are a good thing, but in most cases we don't need them.
104
+ # %s is a simpler and straightforward version that works in almost all cases. So don't complain.
105
+ Style/FormatStringToken:
106
+ Enabled: false
107
+
108
+ # Prefer the latest Hash syntax
109
+ Style/HashSyntax:
110
+ Exclude:
111
+ # But Rakefiles generally have some definition like
112
+ # :default => :test
113
+ # that looks nicer with the old rocket syntax.
114
+ - 'Rakefile'
115
+
116
+ Style/RescueStandardError:
117
+ Enabled: false
118
+
119
+ # Array indentation should be considered like MultilineMethodCallIndentation indentation
120
+ # and use 4 spaces instead of 2.
121
+ Layout/IndentFirstArrayElement:
122
+ IndentationWidth: 4
123
+
124
+ # Hash indentation should be considered like MultilineMethodCallIndentation indentation
125
+ # and use 4 spaces instead of 2.
126
+ Layout/IndentFirstHashElement:
127
+ IndentationWidth: 4
128
+
129
+ # Multi-line differs from standard indentation, they are indented twice.
130
+ Layout/MultilineMethodCallIndentation:
131
+ EnforcedStyle: indented
132
+ IndentationWidth: 4
133
+
134
+ # unless is not always cool.
135
+ Style/NegatedIf:
136
+ Enabled: false
137
+
138
+ # For years, %w() has been the de-facto standard. A lot of libraries are using ().
139
+ # Switching to [] would be a nightmare.
140
+ Style/PercentLiteralDelimiters:
141
+ Enabled: false
142
+
143
+ # There are cases were the inline rescue is ok. We can either downgrade the severity,
144
+ # or rely on the developer judgement on a case-by-case basis.
145
+ Style/RescueModifier:
146
+ Enabled: false
147
+
148
+ # Sorry, but using trailing spaces helps readability.
149
+ #
150
+ # %w( foo bar )
151
+ #
152
+ # looks better to me than
153
+ #
154
+ # %w( foo bar )
155
+ #
156
+ Layout/SpaceInsidePercentLiteralDelimiters:
157
+ Enabled: false
158
+
159
+ # Hate It or Love It, I prefer double quotes as this is more consistent
160
+ # with several other programming languages and the output of puts and inspect.
161
+ Style/StringLiterals:
162
+ EnforcedStyle: double_quotes
163
+
164
+ # It's nice to be consistent. The trailing comma also allows easy reordering,
165
+ # and doesn't cause a diff in Git when you add a line to the bottom.
166
+ Style/TrailingCommaInArrayLiteral:
167
+ EnforcedStyleForMultiline: consistent_comma
168
+ Style/TrailingCommaInHashLiteral:
169
+ EnforcedStyleForMultiline: consistent_comma
170
+
171
+ Style/TrivialAccessors:
172
+ # IgnoreClassMethods because I want to be able to define class-level accessors
173
+ # that sets an instance variable on the metaclass, such as:
174
+ #
175
+ # def self.default=(value)
176
+ # @default = value
177
+ # end
178
+ #
179
+ IgnoreClassMethods: true
@@ -0,0 +1 @@
1
+ -global
@@ -0,0 +1,31 @@
1
+ language: ruby
2
+
3
+ rvm:
4
+ - 2.3
5
+ - 2.4
6
+ - 2.5
7
+ - 2.6
8
+ - jruby-9.1.5.0
9
+ - ruby-head
10
+
11
+ env:
12
+ - COVERAGE=1
13
+
14
+ cache:
15
+ - bundler
16
+
17
+ matrix:
18
+ include:
19
+ - rvm: 2.1
20
+ before_install:
21
+ - gem install bundler -v '< 2.0'
22
+ - rvm: 2.2
23
+ before_install:
24
+ - gem install bundler -v '< 2.0'
25
+ allow_failures:
26
+ - rvm: ruby-head
27
+ - rvm: jruby-9.1.5.0
28
+
29
+ before_install:
30
+ - gem update --system
31
+ - gem install bundler
@@ -0,0 +1 @@
1
+ --title 'Ruby Public Suffix API Documentation'
@@ -0,0 +1,52 @@
1
+ # Welcome to PublicSuffix 2.0!
2
+
3
+ PublicSuffix 2.0 contains a rewritten internal representation and comparison logic, that drastically increases the lookup performance. The new version also changes several internal and external API.
4
+
5
+ This document documents the most relevant changes to help you upgrading from PublicSuffix 1.0 to 2.0.
6
+
7
+ ## What's New
8
+
9
+ - The library is now 100% compliants with the official PublicSuffix tests. The major breaking change you may experience, is that if a domain passed as input doesn't match any rule, the rule `*` is assumed. You can override this behavior by passing a custom default rule with the `default_rule` option. The old behavior can be restored by passing `default_rule: nil`.
10
+ - `PublicSuffix.domain` is a new method that parses the input and returns the domain (combination of second level domain + suffix). This is a convenient helper to parse a domain name, for example when you need to determine the cookie or SSL scope.
11
+ - Added the ability to disable the use of private domains either at runtime, in addition to the ability to not load the private domains section when reading the list (`private_domains: false`). This feature also superseded the `private_domains` class-level attribute, that is no longer available.
12
+
13
+ ## Upgrade
14
+
15
+ When upgrading, here's the most relevant changes to keep an eye on:
16
+
17
+ - Several futile utility helpers were removed, such as `Domain#rule`, `Domain#is_a_domain?`, `Domain#is_a_subdomain?`, `Domain#valid?`. You can easily obtain the same result by having a custom method that reconstructs the logic, and/or calling `PublicSuffix.{domain|parse}(domain.to_s)`.
18
+ - `PublicSuffix::List.private_domains` is no longer available. Instead, you now have two ways to enable/disable the private domains:
19
+
20
+ 1. At runtime, by using the `ignore_private` option
21
+
22
+ ```ruby
23
+ PublicSuffix.domain("something.blogspot.com", ignore_private: true)
24
+ ```
25
+
26
+ 1. Loading a filtered list:
27
+
28
+ ```ruby
29
+ # Disable support for private TLDs
30
+ PublicSuffix::List.default = PublicSuffix::List.parse(File.read(PublicSuffix::List::DEFAULT_LIST_PATH), private_domains: false)
31
+ # => "blogspot.com"
32
+ PublicSuffix.domain("something.blogspot.com")
33
+ # => "blogspot.com"
34
+ ```
35
+ - Now that the library is 100% compliant with the official PublicSuffix algorithm, if a domain passed as input doesn't match any rule, the wildcard rule `*` is assumed. This means that unlisted TLDs will be considered valid by default, when they would have been invalid in 1.x. However, you can override this behavior to emulate the 1.x behavior if needed:
36
+
37
+ ```ruby
38
+ # 1.x:
39
+
40
+ PublicSuffix.valid?("google.commm")
41
+ # => false
42
+
43
+ # 2.x:
44
+
45
+ PublicSuffix.valid?("google.commm")
46
+ # => true
47
+
48
+ # Overriding 2.x behavior if needed:
49
+
50
+ PublicSuffix.valid?("google.commm", default_rule: nil)
51
+ # => false
52
+ ````
@@ -0,0 +1,353 @@
1
+ # Changelog
2
+
3
+
4
+ #### Release 3.1.1
5
+
6
+ - CHANGED: Updated definitions.
7
+ - CHANGED: Rolled back support for Ruby 2.3 (GH-161, GH-162)
8
+
9
+
10
+ #### Release 3.1.0
11
+
12
+ - CHANGED: Updated definitions.
13
+ - CHANGED: Minimum Ruby version is 2.3
14
+ - CHANGED: Upgraded to Bundler 2.x
15
+
16
+
17
+ #### Release 3.0.3
18
+
19
+ - CHANGED: Updated definitions.
20
+
21
+
22
+ #### Release 3.0.2
23
+
24
+ - CHANGED: Updated definitions.
25
+
26
+
27
+ #### Release 3.0.1
28
+
29
+ - CHANGED: Updated definitions.
30
+ - CHANGED: Improve performance and avoid allocation (GH-146). [Thanks @robholland]
31
+
32
+
33
+ #### Release 3.0.0
34
+
35
+ This new version includes a major redesign of the library internals, with the goal to drastically
36
+ improve the lookup time while reducing storage space.
37
+
38
+ For this reason, several public methods that are no longer applicable have been deprecated
39
+ and/or removed. You can find more information at GH-133.
40
+
41
+ - CHANGED: Updated definitions.
42
+ - CHANGED: Dropped support for Ruby < 2.1
43
+ - CHANGED: `PublicSuffix::List#rules` is now protected. You should not rely on it as the internal rule representation is subject to change to optimize performances.
44
+ - CHANGED: Removed `PublicSuffix::List.clear`, it was an unnecessary accessor method. Use `PublicSuffix::List.default = nil` if you **really** need to reset the default list. You shouldn't.
45
+ - CHANGED: `PublicSuffix::List#select` is now private. You should not use it, instead use `PublicSuffix::List#find`.
46
+ - CHANGED: `PublicSuffix::List` no longer implements Enumerable. Instead, use `#each` to loop over, or get an Enumerator.
47
+ - CHANGED: Redesigned internal list storage and lookup algorithm to achieve O(1) lookup time (see GH-133).
48
+
49
+
50
+ #### Release 2.0.5
51
+
52
+ - CHANGED: Updated definitions.
53
+ - CHANGED: Initialization performance improvements (GH-128). [Thanks @casperisfine]
54
+
55
+
56
+ #### Release 2.0.4
57
+
58
+ - FIXED: Fix a bug that caused the GEM to be published with the wrong version number in the gemspec (GH-121).
59
+
60
+ - CHANGED: Updated definitions.
61
+
62
+
63
+ #### Release 2.0.3
64
+
65
+ - CHANGED: Updated definitions.
66
+
67
+
68
+ #### Release 2.0.2
69
+
70
+ - CHANGED: Updated definitions.
71
+
72
+
73
+ #### Release 2.0.1
74
+
75
+ - FIXED: Fix bug that prevented .valid? to reset the default rule
76
+
77
+
78
+ #### Release 2.0.0
79
+
80
+ - NEW: Added PublicSuffix.domain # => sld.tld
81
+ - NEW: Added the ability to disable the use of private domains either at runtime, in addition to the ability to not load the private domains section when reading the list (`private_domains: false`). This feature also superseded the `private_domains` class-level attribute, that is no longer available.
82
+
83
+ - CHANGED: Considerable performance improvements (GH-92)
84
+ - CHANGED: Updated definitions.
85
+ - CHANGED: Removed deprecated PublicSuffix::InvalidDomain exception
86
+ - CHANGED: If the suffix is now listed, then the prevaling rule is "*" as defined by the PSL algorithm (GH-91)
87
+ - CHANGED: Input validation is performed only if you call `PublicSuffix.parse` or `PublicSuffix.list`
88
+ - CHANGED: Input with leading dot is invalid per PSL acceptance tests
89
+ - CHANGED: Removed `private_domains` class-level attribute. It is replaced by the `private_domains: false` option in the list parse method.
90
+ - CHANGED: The default list now assumes you use UTF-8 for reading the input (GH-94),
91
+
92
+ - REMOVED: Removed futile utility helpers such as `Domain#rule`, `Domain#is_a_domain?`, `Domain#is_a_subdomain?`, `Domain#valid?`. You can easily obtain the same result by having a custom method that reconstructs the logic, and/or calling `PublicSuffix.{domain|parse}(domain.to_s)`.
93
+
94
+
95
+ #### Release 1.5.3
96
+
97
+ - FIXED: Don't duplicate rule indices when creating index (GH-77). [Thanks @ags]
98
+
99
+ - CHANGED: Updated definitions.
100
+
101
+
102
+ #### Release 1.5.2
103
+
104
+ - CHANGED: Updated definitions.
105
+
106
+
107
+ #### Release 1.5.1
108
+
109
+ - FIXED: Ignore case for parsing and validating (GH-62)
110
+
111
+ - CHANGED: Updated definitions.
112
+
113
+
114
+ #### Release 1.5.0
115
+
116
+ - CHANGED: Dropped support for Ruby < 2.0
117
+
118
+ - CHANGED: Updated definitions.
119
+
120
+
121
+ #### Release 1.4.6
122
+
123
+ - CHANGED: Updated definitions.
124
+
125
+
126
+ #### Release 1.4.5
127
+
128
+ - CHANGED: Updated definitions.
129
+
130
+
131
+ #### Release 1.4.4
132
+
133
+ - CHANGED: Updated definitions.
134
+
135
+
136
+ #### Release 1.4.3
137
+
138
+ - CHANGED: Updated definitions.
139
+
140
+
141
+ #### Release 1.4.2
142
+
143
+ - CHANGED: Updated definitions.
144
+
145
+
146
+ #### Release 1.4.1
147
+
148
+ - CHANGED: Updated definitions.
149
+
150
+
151
+ #### Release 1.4.0
152
+
153
+ - CHANGED: Moved the definitions in the lib folder.
154
+
155
+ - CHANGED: Updated definitions.
156
+
157
+
158
+ #### Release 1.3.3
159
+
160
+ - CHANGED: Updated definitions.
161
+
162
+
163
+ #### Release 1.3.2
164
+
165
+ - CHANGED: Updated definitions.
166
+
167
+
168
+ #### Release 1.3.1
169
+
170
+ - CHANGED: Updated definitions.
171
+
172
+
173
+ #### Release 1.3.0
174
+
175
+ - NEW: Ability to skip Private Domains (GH-28). [Thanks @rb2k]
176
+
177
+ - CHANGED: Updated definitions.
178
+
179
+
180
+ #### Release 1.2.1
181
+
182
+ - CHANGED: Updated definitions.
183
+
184
+
185
+ #### Release 1.2.0
186
+
187
+ - NEW: Allow a custom List on `PublicSuffix.parse` (GH-26). [Thanks @itspriddle]
188
+
189
+ - FIXED: PublicSuffix.parse and PublicSuffix.valid? crashes when input is nil (GH-20).
190
+
191
+ - CHANGED: Updated definitions.
192
+
193
+
194
+ #### Release 1.1.3
195
+
196
+ - CHANGED: Updated definitions.
197
+
198
+
199
+ #### Release 1.1.2
200
+
201
+ - CHANGED: Updated definitions.
202
+
203
+
204
+ #### Release 1.1.1
205
+
206
+ - CHANGED: Updated definitions.
207
+
208
+
209
+ #### Release 1.1.0
210
+
211
+ - FIXED: #valid? and #parse consider URIs as valid domains (GH-15)
212
+
213
+ - CHANGED: Updated definitions.
214
+
215
+ - CHANGED: Removed deprecatd PublicSuffixService::RuleList.
216
+
217
+
218
+ #### Release 1.0.0
219
+
220
+ - CHANGED: Updated definitions.
221
+
222
+
223
+ #### Release 1.0.0.rc1
224
+
225
+ The library is now known as PublicSuffix.
226
+
227
+
228
+ #### Release 0.9.1
229
+
230
+ - CHANGED: Renamed PublicSuffixService::RuleList to PublicSuffixService::List.
231
+
232
+ - CHANGED: Renamed PublicSuffixService::List#list to PublicSuffixService::List#rules.
233
+
234
+ - CHANGED: Renamed PublicSuffixService to PublicSuffix.
235
+
236
+ - CHANGED: Updated definitions.
237
+
238
+
239
+ #### Release 0.9.0
240
+
241
+ - CHANGED: Minimum Ruby version increased to Ruby 1.8.7.
242
+
243
+ - CHANGED: rake/gempackagetask is deprecated. Use rubygems/package_task instead.
244
+
245
+
246
+ #### Release 0.8.4
247
+
248
+ - FIXED: Reverted bugfix for issue #12 for Ruby 1.8.6.
249
+ This is the latest version compatible with Ruby 1.8.6.
250
+
251
+
252
+ #### Release 0.8.3
253
+
254
+ - FIXED: Fixed ArgumentError: invalid byte sequence in US-ASCII with Ruby 1.9.2 (#12).
255
+
256
+ - CHANGED: Updated definitions (#11).
257
+
258
+ - CHANGED: Renamed definitions.txt to definitions.dat.
259
+
260
+
261
+ #### Release 0.8.2
262
+
263
+ - NEW: Added support for rubygems-test.
264
+
265
+ - CHANGED: Integrated Bundler.
266
+
267
+ - CHANGED: Updated definitions.
268
+
269
+
270
+ #### Release 0.8.1
271
+
272
+ - FIXED: The files in the release 0.8.0 have wrong permission 600 and can't be loaded (#10).
273
+
274
+
275
+ #### Release 0.8.0
276
+
277
+ - CHANGED: Update public suffix list to d1a5599b49fa 2010-10-25 15:10 +0100 (#9)
278
+
279
+ - NEW: Add support for Fully Qualified Domain Names (#7)
280
+
281
+
282
+ #### Release 0.7.0
283
+
284
+ - CHANGED: Using YARD to document the code instead of RDoc.
285
+
286
+ - FIXED: RuleList cache is not recreated when a new rule is appended to the list (#6)
287
+
288
+ - FIXED: PublicSuffixService.valid? should return false if the domain is not defined or not allowed (#4, #5)
289
+
290
+
291
+ #### Release 0.6.0
292
+
293
+ - NEW: PublicSuffixService.parse raises DomainNotAllowed when trying to parse a domain name
294
+ which exists, but is not allowed by the current definition list (#3)
295
+
296
+ PublicSuffixService.parse("nic.do")
297
+ # => PublicSuffixService::DomainNotAllowed
298
+
299
+ - CHANGED: Renamed PublicSuffixService::InvalidDomain to PublicSuffixService::DomainInvalid
300
+
301
+
302
+ #### Release 0.5.2
303
+
304
+ - CHANGED: Update public suffix list to 248ea690d671 2010-09-16 18:02 +0100
305
+
306
+
307
+ #### Release 0.5.1
308
+
309
+ - CHANGED: Update public suffix list to 14dc66dd53c1 2010-09-15 17:09 +0100
310
+
311
+
312
+ #### Release 0.5.0
313
+
314
+ - CHANGED: Improve documentation for Domain#domain and Domain#subdomain (#1).
315
+
316
+ - CHANGED: Performance improvements (#2).
317
+
318
+
319
+ #### Release 0.4.0
320
+
321
+ - CHANGED: Rename library from DomainName to PublicSuffixService to reduce the probability of name conflicts.
322
+
323
+
324
+ #### Release 0.3.1
325
+
326
+ - Deprecated DomainName library.
327
+
328
+
329
+ #### Release 0.3.0
330
+
331
+ - CHANGED: DomainName#domain and DomainName#subdomain are no longer alias of Domain#sld and Domain#tld.
332
+
333
+ - CHANGED: Removed DomainName#labels and decoupled Rule from DomainName.
334
+
335
+ - CHANGED: DomainName#valid? no longer instantiates new DomainName objects. This means less overhead.
336
+
337
+ - CHANGED: Refactoring the entire DomainName API. Removed the internal on-the-fly parsing. Added a bunch of new methods to check and validate the DomainName.
338
+
339
+
340
+ #### Release 0.2.0
341
+
342
+ - NEW: DomainName#valid?
343
+
344
+ - NEW: DomainName#parse and DomainName#parse!
345
+
346
+ - NEW: DomainName#valid_domain? and DomainName#valid_subdomain?
347
+
348
+ - CHANGED: Make sure RuleList lookup is only performed once.
349
+
350
+
351
+ #### Release 0.1.0
352
+
353
+ - Initial version