public_suffix 4.0.3 → 4.0.7
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 +4 -4
- data/.github/dependabot.yml +8 -0
- data/.github/workflows/release.yml +16 -0
- data/.github/workflows/tests.yml +28 -0
- data/.gitignore +5 -8
- data/.rubocop.yml +1 -1
- data/{.rubocop_defaults.yml → .rubocop_opinionated.yml} +9 -25
- data/CHANGELOG.md +32 -0
- data/Gemfile +6 -4
- data/LICENSE.txt +1 -1
- data/README.md +13 -3
- data/Rakefile +1 -0
- data/SECURITY.md +4 -1
- data/data/list.txt +1412 -436
- data/lib/public_suffix/domain.rb +1 -1
- data/lib/public_suffix/errors.rb +1 -1
- data/lib/public_suffix/list.rb +4 -4
- data/lib/public_suffix/rule.rb +12 -12
- data/lib/public_suffix/version.rb +5 -3
- data/lib/public_suffix.rb +11 -13
- data/public_suffix.gemspec +8 -4
- data/test/acceptance_test.rb +31 -29
- data/test/psl_test.rb +1 -1
- data/test/test_helper.rb +0 -8
- data/test/unit/public_suffix_test.rb +11 -11
- data/test/unit/rule_test.rb +30 -30
- metadata +15 -71
- data/.travis.yml +0 -23
data/lib/public_suffix/domain.rb
CHANGED
data/lib/public_suffix/errors.rb
CHANGED
data/lib/public_suffix/list.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
#
|
5
5
|
# Domain name parser based on the Public Suffix List.
|
6
6
|
#
|
7
|
-
# Copyright (c) 2009-
|
7
|
+
# Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
|
8
8
|
|
9
9
|
module PublicSuffix
|
10
10
|
|
@@ -63,7 +63,7 @@ module PublicSuffix
|
|
63
63
|
#
|
64
64
|
# See http://publicsuffix.org/format/ for more details about input format.
|
65
65
|
#
|
66
|
-
# @param
|
66
|
+
# @param input [#each_line] the list to parse
|
67
67
|
# @param private_domains [Boolean] whether to ignore the private domains section
|
68
68
|
# @return [PublicSuffix::List]
|
69
69
|
def self.parse(input, private_domains: true)
|
@@ -173,7 +173,7 @@ module PublicSuffix
|
|
173
173
|
# @return [PublicSuffix::Rule::*]
|
174
174
|
def find(name, default: default_rule, **options)
|
175
175
|
rule = select(name, **options).inject do |l, r|
|
176
|
-
return r if r.
|
176
|
+
return r if r.instance_of?(Rule::Exception)
|
177
177
|
|
178
178
|
l.length > r.length ? l : r
|
179
179
|
end
|
@@ -216,7 +216,7 @@ module PublicSuffix
|
|
216
216
|
|
217
217
|
rules
|
218
218
|
end
|
219
|
-
private :select
|
219
|
+
private :select
|
220
220
|
|
221
221
|
# Gets the default rule.
|
222
222
|
#
|
data/lib/public_suffix/rule.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
#
|
5
5
|
# Domain name parser based on the Public Suffix List.
|
6
6
|
#
|
7
|
-
# Copyright (c) 2009-
|
7
|
+
# Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
|
8
8
|
|
9
9
|
module PublicSuffix
|
10
10
|
|
@@ -22,7 +22,7 @@ module PublicSuffix
|
|
22
22
|
module Rule
|
23
23
|
|
24
24
|
# @api internal
|
25
|
-
Entry = Struct.new(:type, :length, :private)
|
25
|
+
Entry = Struct.new(:type, :length, :private) # rubocop:disable Lint/StructNewOverride
|
26
26
|
|
27
27
|
# = Abstract rule class
|
28
28
|
#
|
@@ -131,10 +131,9 @@ module PublicSuffix
|
|
131
131
|
|
132
132
|
# Checks whether this rule is equal to <tt>other</tt>.
|
133
133
|
#
|
134
|
-
# @param [PublicSuffix::Rule::*]
|
135
|
-
# @return [Boolean]
|
136
|
-
#
|
137
|
-
# and has the same value, false otherwise.
|
134
|
+
# @param other [PublicSuffix::Rule::*] The rule to compare
|
135
|
+
# @return [Boolean] true if this rule and other are instances of the same class
|
136
|
+
# and has the same value, false otherwise.
|
138
137
|
def ==(other)
|
139
138
|
equal?(other) || (self.class == other.class && value == other.value)
|
140
139
|
end
|
@@ -176,7 +175,7 @@ module PublicSuffix
|
|
176
175
|
end
|
177
176
|
|
178
177
|
# @abstract
|
179
|
-
# @param [
|
178
|
+
# @param domain [#to_s] The domain name to decompose
|
180
179
|
# @return [Array<String, nil>]
|
181
180
|
def decompose(*)
|
182
181
|
raise NotImplementedError
|
@@ -196,7 +195,7 @@ module PublicSuffix
|
|
196
195
|
|
197
196
|
# Decomposes the domain name according to rule properties.
|
198
197
|
#
|
199
|
-
# @param [
|
198
|
+
# @param domain [#to_s] The domain name to decompose
|
200
199
|
# @return [Array<String>] The array with [trd + sld, tld].
|
201
200
|
def decompose(domain)
|
202
201
|
suffix = parts.join('\.')
|
@@ -228,6 +227,7 @@ module PublicSuffix
|
|
228
227
|
# Initializes a new rule.
|
229
228
|
#
|
230
229
|
# @param value [String]
|
230
|
+
# @param length [Integer]
|
231
231
|
# @param private [Boolean]
|
232
232
|
def initialize(value:, length: nil, private: false)
|
233
233
|
super(value: value, length: length, private: private)
|
@@ -243,7 +243,7 @@ module PublicSuffix
|
|
243
243
|
|
244
244
|
# Decomposes the domain name according to rule properties.
|
245
245
|
#
|
246
|
-
# @param [
|
246
|
+
# @param domain [#to_s] The domain name to decompose
|
247
247
|
# @return [Array<String>] The array with [trd + sld, tld].
|
248
248
|
def decompose(domain)
|
249
249
|
suffix = ([".*?"] + parts).join('\.')
|
@@ -266,7 +266,7 @@ module PublicSuffix
|
|
266
266
|
|
267
267
|
# Initializes a new rule from the content.
|
268
268
|
#
|
269
|
-
# @param content [
|
269
|
+
# @param content [#to_s] the content of the rule
|
270
270
|
# @param private [Boolean]
|
271
271
|
def self.build(content, private: false)
|
272
272
|
new(value: content.to_s[1..-1], private: private)
|
@@ -281,7 +281,7 @@ module PublicSuffix
|
|
281
281
|
|
282
282
|
# Decomposes the domain name according to rule properties.
|
283
283
|
#
|
284
|
-
# @param [
|
284
|
+
# @param domain [#to_s] The domain name to decompose
|
285
285
|
# @return [Array<String>] The array with [trd + sld, tld].
|
286
286
|
def decompose(domain)
|
287
287
|
suffix = parts.join('\.')
|
@@ -321,7 +321,7 @@ module PublicSuffix
|
|
321
321
|
# PublicSuffix::Rule.factory("!congresodelalengua3.ar")
|
322
322
|
# # => #<PublicSuffix::Rule::Exception>
|
323
323
|
#
|
324
|
-
# @param [
|
324
|
+
# @param content [#to_s] the content of the rule
|
325
325
|
# @return [PublicSuffix::Rule::*] A rule instance.
|
326
326
|
def self.factory(content, private: false)
|
327
327
|
case content.to_s[0, 1]
|
@@ -5,9 +5,11 @@
|
|
5
5
|
#
|
6
6
|
# Domain name parser based on the Public Suffix List.
|
7
7
|
#
|
8
|
-
# Copyright (c) 2009-
|
8
|
+
# Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
|
9
9
|
|
10
10
|
module PublicSuffix
|
11
|
-
|
12
|
-
|
11
|
+
|
12
|
+
# @return [String] The current library version.
|
13
|
+
VERSION = "4.0.7"
|
14
|
+
|
13
15
|
end
|
data/lib/public_suffix.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
#
|
5
5
|
# Domain name parser based on the Public Suffix List.
|
6
6
|
#
|
7
|
-
# Copyright (c) 2009-
|
7
|
+
# Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
|
8
8
|
|
9
9
|
require_relative "public_suffix/domain"
|
10
10
|
require_relative "public_suffix/version"
|
@@ -57,15 +57,13 @@ module PublicSuffix
|
|
57
57
|
# # => PublicSuffix::DomainInvalid: http://www.google.com is not expected to contain a scheme
|
58
58
|
#
|
59
59
|
#
|
60
|
-
# @param [
|
61
|
-
# @param [PublicSuffix::List]
|
62
|
-
# @param [Boolean]
|
60
|
+
# @param name [#to_s] The domain name or fully qualified domain name to parse.
|
61
|
+
# @param list [PublicSuffix::List] The rule list to search, defaults to the default {PublicSuffix::List}
|
62
|
+
# @param ignore_private [Boolean]
|
63
63
|
# @return [PublicSuffix::Domain]
|
64
64
|
#
|
65
|
-
# @raise [PublicSuffix::DomainInvalid]
|
66
|
-
#
|
67
|
-
# @raise [PublicSuffix::DomainNotAllowed]
|
68
|
-
# If a rule for +domain+ is found, but the rule doesn't allow +domain+.
|
65
|
+
# @raise [PublicSuffix::DomainInvalid] If domain is not a valid domain.
|
66
|
+
# @raise [PublicSuffix::DomainNotAllowed] If a rule for +domain+ is found, but the rule doesn't allow +domain+.
|
69
67
|
def self.parse(name, list: List.default, default_rule: list.default_rule, ignore_private: false)
|
70
68
|
what = normalize(name)
|
71
69
|
raise what if what.is_a?(DomainInvalid)
|
@@ -119,8 +117,8 @@ module PublicSuffix
|
|
119
117
|
# # => false
|
120
118
|
#
|
121
119
|
#
|
122
|
-
# @param [
|
123
|
-
# @param [Boolean]
|
120
|
+
# @param name [#to_s] The domain name or fully qualified domain name to validate.
|
121
|
+
# @param ignore_private [Boolean]
|
124
122
|
# @return [Boolean]
|
125
123
|
def self.valid?(name, list: List.default, default_rule: list.default_rule, ignore_private: false)
|
126
124
|
what = normalize(name)
|
@@ -135,9 +133,9 @@ module PublicSuffix
|
|
135
133
|
#
|
136
134
|
# This method doesn't raise. Instead, it returns nil if the domain is not valid for whatever reason.
|
137
135
|
#
|
138
|
-
# @param [
|
139
|
-
# @param [PublicSuffix::List]
|
140
|
-
# @param [Boolean]
|
136
|
+
# @param name [#to_s] The domain name or fully qualified domain name to parse.
|
137
|
+
# @param list [PublicSuffix::List] The rule list to search, defaults to the default {PublicSuffix::List}
|
138
|
+
# @param ignore_private [Boolean]
|
141
139
|
# @return [String]
|
142
140
|
def self.domain(name, **options)
|
143
141
|
parse(name, **options).domain
|
data/public_suffix.gemspec
CHANGED
@@ -12,14 +12,18 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.description = "PublicSuffix can parse and decompose a domain name into top level domain, domain and subdomains."
|
13
13
|
s.licenses = ["MIT"]
|
14
14
|
|
15
|
+
s.metadata = {
|
16
|
+
"bug_tracker_uri" => "https://github.com/weppos/publicsuffix-ruby/issues",
|
17
|
+
"changelog_uri" => "https://github.com/weppos/publicsuffix-ruby/blob/master/CHANGELOG.md",
|
18
|
+
"documentation_uri" => "https://rubydoc.info/gems/#{s.name}/#{s.version}",
|
19
|
+
"homepage_uri" => s.homepage,
|
20
|
+
"source_code_uri" => "https://github.com/weppos/publicsuffix-ruby/tree/v#{s.version}",
|
21
|
+
}
|
22
|
+
|
15
23
|
s.required_ruby_version = ">= 2.3"
|
16
24
|
|
17
25
|
s.require_paths = ["lib"]
|
18
26
|
s.files = `git ls-files`.split("\n")
|
19
27
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
20
28
|
s.extra_rdoc_files = %w( LICENSE.txt )
|
21
|
-
|
22
|
-
s.add_development_dependency "rake"
|
23
|
-
s.add_development_dependency "mocha"
|
24
|
-
s.add_development_dependency "yard"
|
25
29
|
end
|
data/test/acceptance_test.rb
CHANGED
@@ -5,14 +5,14 @@ require "test_helper"
|
|
5
5
|
class AcceptanceTest < Minitest::Test
|
6
6
|
|
7
7
|
VALID_CASES = [
|
8
|
-
|
9
|
-
|
8
|
+
["example.com", "example.com", [nil, "example", "com"]],
|
9
|
+
["foo.example.com", "example.com", ["foo", "example", "com"]],
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
["verybritish.co.uk", "verybritish.co.uk", [nil, "verybritish", "co.uk"]],
|
12
|
+
["foo.verybritish.co.uk", "verybritish.co.uk", ["foo", "verybritish", "co.uk"]],
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
["parliament.uk", "parliament.uk", [nil, "parliament", "uk"]],
|
15
|
+
["foo.parliament.uk", "parliament.uk", ["foo", "parliament", "uk"]],
|
16
16
|
].freeze
|
17
17
|
|
18
18
|
def test_valid
|
@@ -34,10 +34,10 @@ class AcceptanceTest < Minitest::Test
|
|
34
34
|
|
35
35
|
|
36
36
|
INVALID_CASES = [
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
37
|
+
["nic.bd", PublicSuffix::DomainNotAllowed],
|
38
|
+
[nil, PublicSuffix::DomainInvalid],
|
39
|
+
["", PublicSuffix::DomainInvalid],
|
40
|
+
[" ", PublicSuffix::DomainInvalid],
|
41
41
|
].freeze
|
42
42
|
|
43
43
|
def test_invalid
|
@@ -49,16 +49,16 @@ class AcceptanceTest < Minitest::Test
|
|
49
49
|
|
50
50
|
|
51
51
|
REJECTED_CASES = [
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
52
|
+
["www. .com", true],
|
53
|
+
["foo.co..uk", true],
|
54
|
+
["goo,gle.com", true],
|
55
|
+
["-google.com", true],
|
56
|
+
["google-.com", true],
|
57
|
+
|
58
|
+
# This case was covered in GH-15.
|
59
|
+
# I decided to cover this case because it's not easily reproducible with URI.parse
|
60
|
+
# and can lead to several false positives.
|
61
|
+
["http://google.com", false],
|
62
62
|
].freeze
|
63
63
|
|
64
64
|
def test_rejected
|
@@ -72,9 +72,9 @@ class AcceptanceTest < Minitest::Test
|
|
72
72
|
|
73
73
|
|
74
74
|
CASE_CASES = [
|
75
|
-
|
76
|
-
|
77
|
-
|
75
|
+
["Www.google.com", %w( www google com )],
|
76
|
+
["www.Google.com", %w( www google com )],
|
77
|
+
["www.google.Com", %w( www google com )],
|
78
78
|
].freeze
|
79
79
|
|
80
80
|
def test_ignore_case
|
@@ -90,12 +90,13 @@ class AcceptanceTest < Minitest::Test
|
|
90
90
|
|
91
91
|
|
92
92
|
INCLUDE_PRIVATE_CASES = [
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
93
|
+
["blogspot.com", true, "blogspot.com"],
|
94
|
+
["blogspot.com", false, nil],
|
95
|
+
["subdomain.blogspot.com", true, "blogspot.com"],
|
96
|
+
["subdomain.blogspot.com", false, "subdomain.blogspot.com"],
|
97
97
|
].freeze
|
98
98
|
|
99
|
+
# rubocop:disable Style/CombinableLoops
|
99
100
|
def test_ignore_private
|
100
101
|
# test domain and parse
|
101
102
|
INCLUDE_PRIVATE_CASES.each do |given, ignore_private, expected|
|
@@ -110,19 +111,20 @@ class AcceptanceTest < Minitest::Test
|
|
110
111
|
assert_equal !expected.nil?, PublicSuffix.valid?(given, ignore_private: ignore_private)
|
111
112
|
end
|
112
113
|
end
|
114
|
+
# rubocop:enable Style/CombinableLoops
|
113
115
|
|
114
116
|
|
115
117
|
def valid_uri?(name)
|
116
118
|
uri = URI.parse(name)
|
117
119
|
!uri.host.nil?
|
118
|
-
rescue
|
120
|
+
rescue StandardError
|
119
121
|
false
|
120
122
|
end
|
121
123
|
|
122
124
|
def valid_domain?(name)
|
123
125
|
uri = URI.parse(name)
|
124
126
|
!uri.host.nil? && uri.scheme.nil?
|
125
|
-
rescue
|
127
|
+
rescue StandardError
|
126
128
|
false
|
127
129
|
end
|
128
130
|
|
data/test/psl_test.rb
CHANGED
@@ -38,7 +38,7 @@ class PslTest < Minitest::Test
|
|
38
38
|
failures = []
|
39
39
|
self.class.tests.each do |input, output|
|
40
40
|
# Punycode domains are not supported ATM
|
41
|
-
next if input =~ /xn
|
41
|
+
next if input =~ /xn--/
|
42
42
|
|
43
43
|
domain = PublicSuffix.domain(input) rescue nil
|
44
44
|
failures << [input, output, domain] if output != domain
|
data/test/test_helper.rb
CHANGED
@@ -1,13 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
if ENV["COVERAGE"]
|
4
|
-
require "simplecov"
|
5
|
-
SimpleCov.start
|
6
|
-
|
7
|
-
require "codecov"
|
8
|
-
SimpleCov.formatter = SimpleCov::Formatter::Codecov
|
9
|
-
end
|
10
|
-
|
11
3
|
require "minitest/autorun"
|
12
4
|
require "minitest/reporters"
|
13
5
|
require "mocha/minitest"
|
@@ -141,13 +141,13 @@ class PublicSuffixTest < Minitest::Test
|
|
141
141
|
|
142
142
|
def test_self_normalize
|
143
143
|
[
|
144
|
-
|
145
|
-
|
146
|
-
|
144
|
+
["com", "com"],
|
145
|
+
["example.com", "example.com"],
|
146
|
+
["www.example.com", "www.example.com"],
|
147
147
|
|
148
|
-
|
149
|
-
|
150
|
-
|
148
|
+
["example.com.", "example.com"], # strip FQDN
|
149
|
+
[" example.com ", "example.com"], # strip spaces
|
150
|
+
["Example.COM", "example.com"], # downcase
|
151
151
|
].each do |input, output|
|
152
152
|
assert_equal output, PublicSuffix.normalize(input)
|
153
153
|
end
|
@@ -155,9 +155,9 @@ class PublicSuffixTest < Minitest::Test
|
|
155
155
|
|
156
156
|
def test_normalize_blank
|
157
157
|
[
|
158
|
-
|
159
|
-
|
160
|
-
|
158
|
+
nil,
|
159
|
+
"",
|
160
|
+
" ",
|
161
161
|
].each do |input|
|
162
162
|
error = PublicSuffix.normalize(input)
|
163
163
|
assert_instance_of PublicSuffix::DomainInvalid, error
|
@@ -167,7 +167,7 @@ class PublicSuffixTest < Minitest::Test
|
|
167
167
|
|
168
168
|
def test_normalize_scheme
|
169
169
|
[
|
170
|
-
|
170
|
+
"https://google.com",
|
171
171
|
].each do |input|
|
172
172
|
error = PublicSuffix.normalize(input)
|
173
173
|
assert_instance_of PublicSuffix::DomainInvalid, error
|
@@ -177,7 +177,7 @@ class PublicSuffixTest < Minitest::Test
|
|
177
177
|
|
178
178
|
def test_normalize_leading_dot
|
179
179
|
[
|
180
|
-
|
180
|
+
".google.com",
|
181
181
|
].each do |input|
|
182
182
|
error = PublicSuffix.normalize(input)
|
183
183
|
assert_instance_of PublicSuffix::DomainInvalid, error
|
data/test/unit/rule_test.rb
CHANGED
@@ -70,36 +70,36 @@ class PublicSuffix::RuleBaseTest < Minitest::Test
|
|
70
70
|
|
71
71
|
def test_match
|
72
72
|
[
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
73
|
+
# standard match
|
74
|
+
[PublicSuffix::Rule.factory("uk"), "uk", true],
|
75
|
+
[PublicSuffix::Rule.factory("uk"), "example.uk", true],
|
76
|
+
[PublicSuffix::Rule.factory("uk"), "example.co.uk", true],
|
77
|
+
[PublicSuffix::Rule.factory("co.uk"), "example.co.uk", true],
|
78
|
+
|
79
|
+
# FIXME
|
80
|
+
# [PublicSuffix::Rule.factory("*.com"), "com", false],
|
81
|
+
[PublicSuffix::Rule.factory("*.com"), "example.com", true],
|
82
|
+
[PublicSuffix::Rule.factory("*.com"), "foo.example.com", true],
|
83
|
+
[PublicSuffix::Rule.factory("!example.com"), "com", false],
|
84
|
+
[PublicSuffix::Rule.factory("!example.com"), "example.com", true],
|
85
|
+
[PublicSuffix::Rule.factory("!example.com"), "foo.example.com", true],
|
86
|
+
|
87
|
+
# TLD mismatch
|
88
|
+
[PublicSuffix::Rule.factory("gk"), "example.uk", false],
|
89
|
+
[PublicSuffix::Rule.factory("gk"), "example.co.uk", false],
|
90
|
+
[PublicSuffix::Rule.factory("co.uk"), "uk", false],
|
91
|
+
|
92
|
+
# general mismatch
|
93
|
+
[PublicSuffix::Rule.factory("uk.co"), "example.co.uk", false],
|
94
|
+
[PublicSuffix::Rule.factory("go.uk"), "example.co.uk", false],
|
95
|
+
[PublicSuffix::Rule.factory("co.uk"), "uk", false],
|
96
|
+
|
97
|
+
# partial matches/mismatches
|
98
|
+
[PublicSuffix::Rule.factory("co"), "example.co.uk", false],
|
99
|
+
[PublicSuffix::Rule.factory("example"), "example.uk", false],
|
100
|
+
[PublicSuffix::Rule.factory("le.it"), "example.it", false],
|
101
|
+
[PublicSuffix::Rule.factory("le.it"), "le.it", true],
|
102
|
+
[PublicSuffix::Rule.factory("le.it"), "foo.le.it", true],
|
103
103
|
|
104
104
|
].each do |rule, input, expected|
|
105
105
|
assert_equal expected, rule.match?(input)
|
metadata
CHANGED
@@ -1,57 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: public_suffix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simone Carletti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: rake
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: mocha
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: yard
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
11
|
+
date: 2022-04-12 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
55
13
|
description: PublicSuffix can parse and decompose a domain name into top level domain,
|
56
14
|
domain and subdomains.
|
57
15
|
email:
|
@@ -62,10 +20,12 @@ extra_rdoc_files:
|
|
62
20
|
- LICENSE.txt
|
63
21
|
files:
|
64
22
|
- ".github/FUNDING.yml"
|
23
|
+
- ".github/dependabot.yml"
|
24
|
+
- ".github/workflows/release.yml"
|
25
|
+
- ".github/workflows/tests.yml"
|
65
26
|
- ".gitignore"
|
66
27
|
- ".rubocop.yml"
|
67
|
-
- ".
|
68
|
-
- ".travis.yml"
|
28
|
+
- ".rubocop_opinionated.yml"
|
69
29
|
- ".yardopts"
|
70
30
|
- 2.0-Upgrade.md
|
71
31
|
- CHANGELOG.md
|
@@ -108,7 +68,12 @@ files:
|
|
108
68
|
homepage: https://simonecarletti.com/code/publicsuffix-ruby
|
109
69
|
licenses:
|
110
70
|
- MIT
|
111
|
-
metadata:
|
71
|
+
metadata:
|
72
|
+
bug_tracker_uri: https://github.com/weppos/publicsuffix-ruby/issues
|
73
|
+
changelog_uri: https://github.com/weppos/publicsuffix-ruby/blob/master/CHANGELOG.md
|
74
|
+
documentation_uri: https://rubydoc.info/gems/public_suffix/4.0.7
|
75
|
+
homepage_uri: https://simonecarletti.com/code/publicsuffix-ruby
|
76
|
+
source_code_uri: https://github.com/weppos/publicsuffix-ruby/tree/v4.0.7
|
112
77
|
post_install_message:
|
113
78
|
rdoc_options: []
|
114
79
|
require_paths:
|
@@ -124,29 +89,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
89
|
- !ruby/object:Gem::Version
|
125
90
|
version: '0'
|
126
91
|
requirements: []
|
127
|
-
rubygems_version: 3.
|
92
|
+
rubygems_version: 3.3.7
|
128
93
|
signing_key:
|
129
94
|
specification_version: 4
|
130
95
|
summary: Domain name parser based on the Public Suffix List.
|
131
|
-
test_files:
|
132
|
-
- test/acceptance_test.rb
|
133
|
-
- test/benchmarks/bm_find.rb
|
134
|
-
- test/benchmarks/bm_find_all.rb
|
135
|
-
- test/benchmarks/bm_names.rb
|
136
|
-
- test/benchmarks/bm_select.rb
|
137
|
-
- test/benchmarks/bm_select_incremental.rb
|
138
|
-
- test/benchmarks/bm_valid.rb
|
139
|
-
- test/profilers/domain_profiler.rb
|
140
|
-
- test/profilers/find_profiler.rb
|
141
|
-
- test/profilers/find_profiler_jp.rb
|
142
|
-
- test/profilers/initialization_profiler.rb
|
143
|
-
- test/profilers/list_profsize.rb
|
144
|
-
- test/profilers/object_binsize.rb
|
145
|
-
- test/psl_test.rb
|
146
|
-
- test/test_helper.rb
|
147
|
-
- test/tests.txt
|
148
|
-
- test/unit/domain_test.rb
|
149
|
-
- test/unit/errors_test.rb
|
150
|
-
- test/unit/list_test.rb
|
151
|
-
- test/unit/public_suffix_test.rb
|
152
|
-
- test/unit/rule_test.rb
|
96
|
+
test_files: []
|
data/.travis.yml
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
rvm:
|
4
|
-
- 2.3
|
5
|
-
- 2.4
|
6
|
-
- 2.5
|
7
|
-
- 2.6
|
8
|
-
- 2.7
|
9
|
-
- ruby-head
|
10
|
-
|
11
|
-
env:
|
12
|
-
- COVERAGE=1
|
13
|
-
|
14
|
-
cache:
|
15
|
-
- bundler
|
16
|
-
|
17
|
-
matrix:
|
18
|
-
allow_failures:
|
19
|
-
- rvm: ruby-head
|
20
|
-
|
21
|
-
before_install:
|
22
|
-
- gem update --system
|
23
|
-
- gem install bundler
|