public_suffix 4.0.1 → 4.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/tests.yml +36 -0
- data/.gitignore +5 -8
- data/.rubocop.yml +2 -2
- data/{.rubocop_defaults.yml → .rubocop_opinionated.yml} +29 -34
- data/.travis.yml +0 -2
- data/CHANGELOG.md +90 -56
- data/Gemfile +6 -3
- data/LICENSE.txt +1 -1
- data/README.md +8 -3
- data/SECURITY.md +104 -0
- data/codecov.yml +14 -0
- data/data/list.txt +265 -120
- data/lib/public_suffix.rb +1 -1
- data/lib/public_suffix/domain.rb +1 -1
- data/lib/public_suffix/errors.rb +1 -1
- data/lib/public_suffix/list.rb +3 -3
- data/lib/public_suffix/rule.rb +2 -2
- data/lib/public_suffix/version.rb +2 -2
- data/public_suffix.gemspec +8 -4
- data/test/acceptance_test.rb +29 -29
- data/test/test_helper.rb +1 -1
- data/test/unit/public_suffix_test.rb +11 -11
- data/test/unit/rule_test.rb +30 -30
- metadata +14 -49
- data/.ruby-gemset +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4132a5678be0b5d33da16c17d81cec1fbf4d5dd2245db891090c1a2003107054
|
4
|
+
data.tar.gz: 5472179ce34f865fb174c242f6f93fe906eb4af98f0092d611277e7ced607e1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfa1fb2ecb2f768569bcf851c696fb9e922f878f8f5c91f7b7811e323fc4226f02d6a51eae3c410e452eca71a7db51f9df809c6c686c63c843021d0e9e010b01
|
7
|
+
data.tar.gz: 4feff3090d60d3019a7d3d51517f6dc64aa4b45f8aee3721b32b4d0d4a4083a3b06bc648edbbb5b8df5d677c53f05dcaf8a69bb5aa9c6244daf4ea76414f5ba1
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: Tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
|
11
|
+
build:
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby-version:
|
15
|
+
- "2.3"
|
16
|
+
- "2.4"
|
17
|
+
- "2.5"
|
18
|
+
- "2.6"
|
19
|
+
- "2.7"
|
20
|
+
platform: [ubuntu-latest]
|
21
|
+
|
22
|
+
runs-on: ${{ matrix.platform }}
|
23
|
+
steps:
|
24
|
+
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
|
27
|
+
- name: Set up Ruby
|
28
|
+
uses: ruby/setup-ruby@v1
|
29
|
+
with:
|
30
|
+
ruby-version: ${{ matrix.ruby-version }}
|
31
|
+
|
32
|
+
- name: Install dependencies
|
33
|
+
run: bundle install
|
34
|
+
|
35
|
+
- name: Run tests
|
36
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
inherit_from:
|
2
|
-
- .
|
2
|
+
- .rubocop_opinionated.yml
|
3
3
|
|
4
4
|
AllCops:
|
5
5
|
Exclude:
|
@@ -24,7 +24,7 @@ Style/ClassAndModuleChildren:
|
|
24
24
|
- 'test/**/*_test.rb'
|
25
25
|
|
26
26
|
# Dear Rubocop, I don't want to use String#strip_heredoc
|
27
|
-
Layout/
|
27
|
+
Layout/HeredocIndentation:
|
28
28
|
Enabled: false
|
29
29
|
|
30
30
|
Style/WordArray:
|
@@ -6,6 +6,14 @@ AllCops:
|
|
6
6
|
- 'tmp/**/*'
|
7
7
|
- 'vendor/**/*'
|
8
8
|
|
9
|
+
# [codesmell]
|
10
|
+
Layout/LineLength:
|
11
|
+
Enabled: false
|
12
|
+
Exclude:
|
13
|
+
- 'spec/**/*_spec.rb'
|
14
|
+
- 'test/**/*_test.rb'
|
15
|
+
Max: 100
|
16
|
+
|
9
17
|
# [codesmell]
|
10
18
|
Metrics/AbcSize:
|
11
19
|
Enabled: false
|
@@ -31,14 +39,6 @@ Metrics/ClassLength:
|
|
31
39
|
- 'spec/**/*_spec.rb'
|
32
40
|
- 'test/**/*_test.rb'
|
33
41
|
|
34
|
-
# [codesmell]
|
35
|
-
Metrics/LineLength:
|
36
|
-
Enabled: false
|
37
|
-
Exclude:
|
38
|
-
- 'spec/**/*_spec.rb'
|
39
|
-
- 'test/**/*_test.rb'
|
40
|
-
Max: 100
|
41
|
-
|
42
42
|
# [codesmell]
|
43
43
|
Metrics/MethodLength:
|
44
44
|
Enabled: false
|
@@ -105,32 +105,6 @@ Style/FormatString:
|
|
105
105
|
Style/FormatStringToken:
|
106
106
|
Enabled: false
|
107
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
108
|
# unless is not always cool.
|
135
109
|
Style/NegatedIf:
|
136
110
|
Enabled: false
|
@@ -145,6 +119,9 @@ Style/PercentLiteralDelimiters:
|
|
145
119
|
Style/RescueModifier:
|
146
120
|
Enabled: false
|
147
121
|
|
122
|
+
Style/SymbolArray:
|
123
|
+
EnforcedStyle: brackets
|
124
|
+
|
148
125
|
# Sorry, but using trailing spaces helps readability.
|
149
126
|
#
|
150
127
|
# %w( foo bar )
|
@@ -177,3 +154,21 @@ Style/TrivialAccessors:
|
|
177
154
|
# end
|
178
155
|
#
|
179
156
|
IgnoreClassMethods: true
|
157
|
+
|
158
|
+
# New cops
|
159
|
+
# See https://docs.rubocop.org/en/latest/versioning/
|
160
|
+
|
161
|
+
Lint/RaiseException:
|
162
|
+
Enabled: true
|
163
|
+
|
164
|
+
Lint/StructNewOverride:
|
165
|
+
Enabled: true
|
166
|
+
|
167
|
+
Style/HashEachMethods:
|
168
|
+
Enabled: true
|
169
|
+
|
170
|
+
Style/HashTransformKeys:
|
171
|
+
Enabled: true
|
172
|
+
|
173
|
+
Style/HashTransformValues:
|
174
|
+
Enabled: true
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,17 +1,51 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
This project uses [Semantic Versioning 2.0.0](https://semver.org/).
|
3
4
|
|
4
|
-
#### Release 4.0.1
|
5
5
|
|
6
|
-
|
6
|
+
## 4.0.5
|
7
7
|
|
8
|
+
### Changed
|
8
9
|
|
9
|
-
|
10
|
+
- Updated definitions.
|
10
11
|
|
11
|
-
|
12
|
+
|
13
|
+
## 4.0.4
|
14
|
+
|
15
|
+
### Changed
|
16
|
+
|
17
|
+
- Updated definitions.
|
18
|
+
|
19
|
+
|
20
|
+
## 4.0.3
|
21
|
+
|
22
|
+
### Fixed
|
23
|
+
|
24
|
+
- Fixed 2.7 deprecations and warnings (GH-167). [Thanks @BrianHawley]
|
25
|
+
|
26
|
+
|
27
|
+
## 4.0.2
|
28
|
+
|
29
|
+
### Changed
|
30
|
+
|
31
|
+
- Updated definitions.
|
32
|
+
|
33
|
+
|
34
|
+
## 4.0.1
|
35
|
+
|
36
|
+
### Changed
|
37
|
+
|
38
|
+
- Updated definitions.
|
39
|
+
|
40
|
+
|
41
|
+
## 4.0.0
|
42
|
+
|
43
|
+
### Changed
|
44
|
+
|
45
|
+
- Minimum Ruby version is 2.3
|
12
46
|
|
13
47
|
|
14
|
-
|
48
|
+
## Release 3.1.1
|
15
49
|
|
16
50
|
- CHANGED: Updated definitions.
|
17
51
|
- CHANGED: Rolled back support for Ruby 2.3 (GH-161, GH-162)
|
@@ -19,30 +53,30 @@
|
|
19
53
|
IMPORTANT: 3.x is the latest version compatible with Ruby 2.1 and Ruby 2.2.
|
20
54
|
|
21
55
|
|
22
|
-
|
56
|
+
## Release 3.1.0
|
23
57
|
|
24
58
|
- CHANGED: Updated definitions.
|
25
59
|
- CHANGED: Minimum Ruby version is 2.3
|
26
60
|
- CHANGED: Upgraded to Bundler 2.x
|
27
61
|
|
28
62
|
|
29
|
-
|
63
|
+
## Release 3.0.3
|
30
64
|
|
31
65
|
- CHANGED: Updated definitions.
|
32
66
|
|
33
67
|
|
34
|
-
|
68
|
+
## Release 3.0.2
|
35
69
|
|
36
70
|
- CHANGED: Updated definitions.
|
37
71
|
|
38
72
|
|
39
|
-
|
73
|
+
## Release 3.0.1
|
40
74
|
|
41
75
|
- CHANGED: Updated definitions.
|
42
76
|
- CHANGED: Improve performance and avoid allocation (GH-146). [Thanks @robholland]
|
43
77
|
|
44
78
|
|
45
|
-
|
79
|
+
## Release 3.0.0
|
46
80
|
|
47
81
|
This new version includes a major redesign of the library internals, with the goal to drastically
|
48
82
|
improve the lookup time while reducing storage space.
|
@@ -59,35 +93,35 @@ and/or removed. You can find more information at GH-133.
|
|
59
93
|
- CHANGED: Redesigned internal list storage and lookup algorithm to achieve O(1) lookup time (see GH-133).
|
60
94
|
|
61
95
|
|
62
|
-
|
96
|
+
## Release 2.0.5
|
63
97
|
|
64
98
|
- CHANGED: Updated definitions.
|
65
99
|
- CHANGED: Initialization performance improvements (GH-128). [Thanks @casperisfine]
|
66
100
|
|
67
101
|
|
68
|
-
|
102
|
+
## Release 2.0.4
|
69
103
|
|
70
104
|
- FIXED: Fix a bug that caused the GEM to be published with the wrong version number in the gemspec (GH-121).
|
71
105
|
|
72
106
|
- CHANGED: Updated definitions.
|
73
107
|
|
74
108
|
|
75
|
-
|
109
|
+
## Release 2.0.3
|
76
110
|
|
77
111
|
- CHANGED: Updated definitions.
|
78
112
|
|
79
113
|
|
80
|
-
|
114
|
+
## Release 2.0.2
|
81
115
|
|
82
116
|
- CHANGED: Updated definitions.
|
83
117
|
|
84
118
|
|
85
|
-
|
119
|
+
## Release 2.0.1
|
86
120
|
|
87
121
|
- FIXED: Fix bug that prevented .valid? to reset the default rule
|
88
122
|
|
89
123
|
|
90
|
-
|
124
|
+
## Release 2.0.0
|
91
125
|
|
92
126
|
- NEW: Added PublicSuffix.domain # => sld.tld
|
93
127
|
- 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.
|
@@ -104,97 +138,97 @@ and/or removed. You can find more information at GH-133.
|
|
104
138
|
- 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)`.
|
105
139
|
|
106
140
|
|
107
|
-
|
141
|
+
## Release 1.5.3
|
108
142
|
|
109
143
|
- FIXED: Don't duplicate rule indices when creating index (GH-77). [Thanks @ags]
|
110
144
|
|
111
145
|
- CHANGED: Updated definitions.
|
112
146
|
|
113
147
|
|
114
|
-
|
148
|
+
## Release 1.5.2
|
115
149
|
|
116
150
|
- CHANGED: Updated definitions.
|
117
151
|
|
118
152
|
|
119
|
-
|
153
|
+
## Release 1.5.1
|
120
154
|
|
121
155
|
- FIXED: Ignore case for parsing and validating (GH-62)
|
122
156
|
|
123
157
|
- CHANGED: Updated definitions.
|
124
158
|
|
125
159
|
|
126
|
-
|
160
|
+
## Release 1.5.0
|
127
161
|
|
128
162
|
- CHANGED: Dropped support for Ruby < 2.0
|
129
163
|
|
130
164
|
- CHANGED: Updated definitions.
|
131
165
|
|
132
166
|
|
133
|
-
|
167
|
+
## Release 1.4.6
|
134
168
|
|
135
169
|
- CHANGED: Updated definitions.
|
136
170
|
|
137
171
|
|
138
|
-
|
172
|
+
## Release 1.4.5
|
139
173
|
|
140
174
|
- CHANGED: Updated definitions.
|
141
175
|
|
142
176
|
|
143
|
-
|
177
|
+
## Release 1.4.4
|
144
178
|
|
145
179
|
- CHANGED: Updated definitions.
|
146
180
|
|
147
181
|
|
148
|
-
|
182
|
+
## Release 1.4.3
|
149
183
|
|
150
184
|
- CHANGED: Updated definitions.
|
151
185
|
|
152
186
|
|
153
|
-
|
187
|
+
## Release 1.4.2
|
154
188
|
|
155
189
|
- CHANGED: Updated definitions.
|
156
190
|
|
157
191
|
|
158
|
-
|
192
|
+
## Release 1.4.1
|
159
193
|
|
160
194
|
- CHANGED: Updated definitions.
|
161
195
|
|
162
196
|
|
163
|
-
|
197
|
+
## Release 1.4.0
|
164
198
|
|
165
199
|
- CHANGED: Moved the definitions in the lib folder.
|
166
200
|
|
167
201
|
- CHANGED: Updated definitions.
|
168
202
|
|
169
203
|
|
170
|
-
|
204
|
+
## Release 1.3.3
|
171
205
|
|
172
206
|
- CHANGED: Updated definitions.
|
173
207
|
|
174
208
|
|
175
|
-
|
209
|
+
## Release 1.3.2
|
176
210
|
|
177
211
|
- CHANGED: Updated definitions.
|
178
212
|
|
179
213
|
|
180
|
-
|
214
|
+
## Release 1.3.1
|
181
215
|
|
182
216
|
- CHANGED: Updated definitions.
|
183
217
|
|
184
218
|
|
185
|
-
|
219
|
+
## Release 1.3.0
|
186
220
|
|
187
221
|
- NEW: Ability to skip Private Domains (GH-28). [Thanks @rb2k]
|
188
222
|
|
189
223
|
- CHANGED: Updated definitions.
|
190
224
|
|
191
225
|
|
192
|
-
|
226
|
+
## Release 1.2.1
|
193
227
|
|
194
228
|
- CHANGED: Updated definitions.
|
195
229
|
|
196
230
|
|
197
|
-
|
231
|
+
## Release 1.2.0
|
198
232
|
|
199
233
|
- NEW: Allow a custom List on `PublicSuffix.parse` (GH-26). [Thanks @itspriddle]
|
200
234
|
|
@@ -203,22 +237,22 @@ and/or removed. You can find more information at GH-133.
|
|
203
237
|
- CHANGED: Updated definitions.
|
204
238
|
|
205
239
|
|
206
|
-
|
240
|
+
## Release 1.1.3
|
207
241
|
|
208
242
|
- CHANGED: Updated definitions.
|
209
243
|
|
210
244
|
|
211
|
-
|
245
|
+
## Release 1.1.2
|
212
246
|
|
213
247
|
- CHANGED: Updated definitions.
|
214
248
|
|
215
249
|
|
216
|
-
|
250
|
+
## Release 1.1.1
|
217
251
|
|
218
252
|
- CHANGED: Updated definitions.
|
219
253
|
|
220
254
|
|
221
|
-
|
255
|
+
## Release 1.1.0
|
222
256
|
|
223
257
|
- FIXED: #valid? and #parse consider URIs as valid domains (GH-15)
|
224
258
|
|
@@ -227,17 +261,17 @@ and/or removed. You can find more information at GH-133.
|
|
227
261
|
- CHANGED: Removed deprecatd PublicSuffixService::RuleList.
|
228
262
|
|
229
263
|
|
230
|
-
|
264
|
+
## Release 1.0.0
|
231
265
|
|
232
266
|
- CHANGED: Updated definitions.
|
233
267
|
|
234
268
|
|
235
|
-
|
269
|
+
## Release 1.0.0.rc1
|
236
270
|
|
237
271
|
The library is now known as PublicSuffix.
|
238
272
|
|
239
273
|
|
240
|
-
|
274
|
+
## Release 0.9.1
|
241
275
|
|
242
276
|
- CHANGED: Renamed PublicSuffixService::RuleList to PublicSuffixService::List.
|
243
277
|
|
@@ -248,20 +282,20 @@ The library is now known as PublicSuffix.
|
|
248
282
|
- CHANGED: Updated definitions.
|
249
283
|
|
250
284
|
|
251
|
-
|
285
|
+
## Release 0.9.0
|
252
286
|
|
253
287
|
- CHANGED: Minimum Ruby version increased to Ruby 1.8.7.
|
254
288
|
|
255
289
|
- CHANGED: rake/gempackagetask is deprecated. Use rubygems/package_task instead.
|
256
290
|
|
257
291
|
|
258
|
-
|
292
|
+
## Release 0.8.4
|
259
293
|
|
260
294
|
- FIXED: Reverted bugfix for issue #12 for Ruby 1.8.6.
|
261
295
|
This is the latest version compatible with Ruby 1.8.6.
|
262
296
|
|
263
297
|
|
264
|
-
|
298
|
+
## Release 0.8.3
|
265
299
|
|
266
300
|
- FIXED: Fixed ArgumentError: invalid byte sequence in US-ASCII with Ruby 1.9.2 (#12).
|
267
301
|
|
@@ -270,7 +304,7 @@ The library is now known as PublicSuffix.
|
|
270
304
|
- CHANGED: Renamed definitions.txt to definitions.dat.
|
271
305
|
|
272
306
|
|
273
|
-
|
307
|
+
## Release 0.8.2
|
274
308
|
|
275
309
|
- NEW: Added support for rubygems-test.
|
276
310
|
|
@@ -279,19 +313,19 @@ The library is now known as PublicSuffix.
|
|
279
313
|
- CHANGED: Updated definitions.
|
280
314
|
|
281
315
|
|
282
|
-
|
316
|
+
## Release 0.8.1
|
283
317
|
|
284
318
|
- FIXED: The files in the release 0.8.0 have wrong permission 600 and can't be loaded (#10).
|
285
319
|
|
286
320
|
|
287
|
-
|
321
|
+
## Release 0.8.0
|
288
322
|
|
289
323
|
- CHANGED: Update public suffix list to d1a5599b49fa 2010-10-25 15:10 +0100 (#9)
|
290
324
|
|
291
325
|
- NEW: Add support for Fully Qualified Domain Names (#7)
|
292
326
|
|
293
327
|
|
294
|
-
|
328
|
+
## Release 0.7.0
|
295
329
|
|
296
330
|
- CHANGED: Using YARD to document the code instead of RDoc.
|
297
331
|
|
@@ -300,7 +334,7 @@ The library is now known as PublicSuffix.
|
|
300
334
|
- FIXED: PublicSuffixService.valid? should return false if the domain is not defined or not allowed (#4, #5)
|
301
335
|
|
302
336
|
|
303
|
-
|
337
|
+
## Release 0.6.0
|
304
338
|
|
305
339
|
- NEW: PublicSuffixService.parse raises DomainNotAllowed when trying to parse a domain name
|
306
340
|
which exists, but is not allowed by the current definition list (#3)
|
@@ -311,34 +345,34 @@ The library is now known as PublicSuffix.
|
|
311
345
|
- CHANGED: Renamed PublicSuffixService::InvalidDomain to PublicSuffixService::DomainInvalid
|
312
346
|
|
313
347
|
|
314
|
-
|
348
|
+
## Release 0.5.2
|
315
349
|
|
316
350
|
- CHANGED: Update public suffix list to 248ea690d671 2010-09-16 18:02 +0100
|
317
351
|
|
318
352
|
|
319
|
-
|
353
|
+
## Release 0.5.1
|
320
354
|
|
321
355
|
- CHANGED: Update public suffix list to 14dc66dd53c1 2010-09-15 17:09 +0100
|
322
356
|
|
323
357
|
|
324
|
-
|
358
|
+
## Release 0.5.0
|
325
359
|
|
326
360
|
- CHANGED: Improve documentation for Domain#domain and Domain#subdomain (#1).
|
327
361
|
|
328
362
|
- CHANGED: Performance improvements (#2).
|
329
363
|
|
330
364
|
|
331
|
-
|
365
|
+
## Release 0.4.0
|
332
366
|
|
333
367
|
- CHANGED: Rename library from DomainName to PublicSuffixService to reduce the probability of name conflicts.
|
334
368
|
|
335
369
|
|
336
|
-
|
370
|
+
## Release 0.3.1
|
337
371
|
|
338
372
|
- Deprecated DomainName library.
|
339
373
|
|
340
374
|
|
341
|
-
|
375
|
+
## Release 0.3.0
|
342
376
|
|
343
377
|
- CHANGED: DomainName#domain and DomainName#subdomain are no longer alias of Domain#sld and Domain#tld.
|
344
378
|
|
@@ -349,7 +383,7 @@ The library is now known as PublicSuffix.
|
|
349
383
|
- 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.
|
350
384
|
|
351
385
|
|
352
|
-
|
386
|
+
## Release 0.2.0
|
353
387
|
|
354
388
|
- NEW: DomainName#valid?
|
355
389
|
|
@@ -360,6 +394,6 @@ The library is now known as PublicSuffix.
|
|
360
394
|
- CHANGED: Make sure RuleList lookup is only performed once.
|
361
395
|
|
362
396
|
|
363
|
-
|
397
|
+
## Release 0.1.0
|
364
398
|
|
365
399
|
- Initial version
|