public_suffix 4.0.1 → 4.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c833634f92938709935d0e9d84835711bca81f9d0686ad98d6906bf8d7b8df8
4
- data.tar.gz: 1ffe584402aeb2e8739e64a4d36819989677806767e894ad86f91fa4dc1094ab
3
+ metadata.gz: 4132a5678be0b5d33da16c17d81cec1fbf4d5dd2245db891090c1a2003107054
4
+ data.tar.gz: 5472179ce34f865fb174c242f6f93fe906eb4af98f0092d611277e7ced607e1c
5
5
  SHA512:
6
- metadata.gz: 1173525725822d8bcb3dc15fc94e3d6492063a7a04da5a0c3793cc6c00416643cdf27e4092157280999c133faa175c907c6ef00aa97503110a02f3ad7a4ec075
7
- data.tar.gz: 0a6ca9384dd752c617aa74a5e59aa13ca460207863df2067f37cf039a40c8efaea509f10948328a029d19952951085d8e33ece3bbb7ed3f1ec0bdc3b0d2dbaae
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
@@ -1,11 +1,8 @@
1
1
  # Bundler
2
- .bundle
3
- Gemfile.lock
4
- pkg/*
5
-
6
- # Rubinius
7
- *.rbc
2
+ /.bundle
3
+ /Gemfile.lock
4
+ /pkg/*
8
5
 
9
6
  # YARD
10
- .yardoc
11
- yardoc/
7
+ /.yardoc
8
+ /yardoc/
@@ -1,5 +1,5 @@
1
1
  inherit_from:
2
- - .rubocop_defaults.yml
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/IndentHeredoc:
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
@@ -6,7 +6,6 @@ rvm:
6
6
  - 2.5
7
7
  - 2.6
8
8
  - 2.7
9
- - jruby-9.1.5.0
10
9
  - ruby-head
11
10
 
12
11
  env:
@@ -18,7 +17,6 @@ cache:
18
17
  matrix:
19
18
  allow_failures:
20
19
  - rvm: ruby-head
21
- - rvm: jruby-9.1.5.0
22
20
 
23
21
  before_install:
24
22
  - gem update --system
@@ -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
- - CHANGED: Updated definitions.
6
+ ## 4.0.5
7
7
 
8
+ ### Changed
8
9
 
9
- #### Release 4.0.0
10
+ - Updated definitions.
10
11
 
11
- - CHANGED: Minimum Ruby version is 2.3
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
- #### Release 3.1.1
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
- #### Release 3.1.0
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
- #### Release 3.0.3
63
+ ## Release 3.0.3
30
64
 
31
65
  - CHANGED: Updated definitions.
32
66
 
33
67
 
34
- #### Release 3.0.2
68
+ ## Release 3.0.2
35
69
 
36
70
  - CHANGED: Updated definitions.
37
71
 
38
72
 
39
- #### Release 3.0.1
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
- #### Release 3.0.0
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
- #### Release 2.0.5
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
- #### Release 2.0.4
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
- #### Release 2.0.3
109
+ ## Release 2.0.3
76
110
 
77
111
  - CHANGED: Updated definitions.
78
112
 
79
113
 
80
- #### Release 2.0.2
114
+ ## Release 2.0.2
81
115
 
82
116
  - CHANGED: Updated definitions.
83
117
 
84
118
 
85
- #### Release 2.0.1
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
- #### Release 2.0.0
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
- #### Release 1.5.3
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
- #### Release 1.5.2
148
+ ## Release 1.5.2
115
149
 
116
150
  - CHANGED: Updated definitions.
117
151
 
118
152
 
119
- #### Release 1.5.1
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
- #### Release 1.5.0
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
- #### Release 1.4.6
167
+ ## Release 1.4.6
134
168
 
135
169
  - CHANGED: Updated definitions.
136
170
 
137
171
 
138
- #### Release 1.4.5
172
+ ## Release 1.4.5
139
173
 
140
174
  - CHANGED: Updated definitions.
141
175
 
142
176
 
143
- #### Release 1.4.4
177
+ ## Release 1.4.4
144
178
 
145
179
  - CHANGED: Updated definitions.
146
180
 
147
181
 
148
- #### Release 1.4.3
182
+ ## Release 1.4.3
149
183
 
150
184
  - CHANGED: Updated definitions.
151
185
 
152
186
 
153
- #### Release 1.4.2
187
+ ## Release 1.4.2
154
188
 
155
189
  - CHANGED: Updated definitions.
156
190
 
157
191
 
158
- #### Release 1.4.1
192
+ ## Release 1.4.1
159
193
 
160
194
  - CHANGED: Updated definitions.
161
195
 
162
196
 
163
- #### Release 1.4.0
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
- #### Release 1.3.3
204
+ ## Release 1.3.3
171
205
 
172
206
  - CHANGED: Updated definitions.
173
207
 
174
208
 
175
- #### Release 1.3.2
209
+ ## Release 1.3.2
176
210
 
177
211
  - CHANGED: Updated definitions.
178
212
 
179
213
 
180
- #### Release 1.3.1
214
+ ## Release 1.3.1
181
215
 
182
216
  - CHANGED: Updated definitions.
183
217
 
184
218
 
185
- #### Release 1.3.0
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
- #### Release 1.2.1
226
+ ## Release 1.2.1
193
227
 
194
228
  - CHANGED: Updated definitions.
195
229
 
196
230
 
197
- #### Release 1.2.0
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
- #### Release 1.1.3
240
+ ## Release 1.1.3
207
241
 
208
242
  - CHANGED: Updated definitions.
209
243
 
210
244
 
211
- #### Release 1.1.2
245
+ ## Release 1.1.2
212
246
 
213
247
  - CHANGED: Updated definitions.
214
248
 
215
249
 
216
- #### Release 1.1.1
250
+ ## Release 1.1.1
217
251
 
218
252
  - CHANGED: Updated definitions.
219
253
 
220
254
 
221
- #### Release 1.1.0
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
- #### Release 1.0.0
264
+ ## Release 1.0.0
231
265
 
232
266
  - CHANGED: Updated definitions.
233
267
 
234
268
 
235
- #### Release 1.0.0.rc1
269
+ ## Release 1.0.0.rc1
236
270
 
237
271
  The library is now known as PublicSuffix.
238
272
 
239
273
 
240
- #### Release 0.9.1
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
- #### Release 0.9.0
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
- #### Release 0.8.4
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
- #### Release 0.8.3
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
- #### Release 0.8.2
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
- #### Release 0.8.1
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
- #### Release 0.8.0
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
- #### Release 0.7.0
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
- #### Release 0.6.0
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
- #### Release 0.5.2
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
- #### Release 0.5.1
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
- #### Release 0.5.0
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
- #### Release 0.4.0
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
- #### Release 0.3.1
370
+ ## Release 0.3.1
337
371
 
338
372
  - Deprecated DomainName library.
339
373
 
340
374
 
341
- #### Release 0.3.0
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
- #### Release 0.2.0
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
- #### Release 0.1.0
397
+ ## Release 0.1.0
364
398
 
365
399
  - Initial version