public_suffix 3.0.3 → 4.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "test_helper"
2
4
 
3
5
  class PublicSuffix::RuleTest < Minitest::Test
@@ -68,36 +70,36 @@ class PublicSuffix::RuleBaseTest < Minitest::Test
68
70
 
69
71
  def test_match
70
72
  [
71
- # standard match
72
- [PublicSuffix::Rule.factory("uk"), "uk", true],
73
- [PublicSuffix::Rule.factory("uk"), "example.uk", true],
74
- [PublicSuffix::Rule.factory("uk"), "example.co.uk", true],
75
- [PublicSuffix::Rule.factory("co.uk"), "example.co.uk", true],
76
-
77
- # FIXME
78
- # [PublicSuffix::Rule.factory("*.com"), "com", false],
79
- [PublicSuffix::Rule.factory("*.com"), "example.com", true],
80
- [PublicSuffix::Rule.factory("*.com"), "foo.example.com", true],
81
- [PublicSuffix::Rule.factory("!example.com"), "com", false],
82
- [PublicSuffix::Rule.factory("!example.com"), "example.com", true],
83
- [PublicSuffix::Rule.factory("!example.com"), "foo.example.com", true],
84
-
85
- # TLD mismatch
86
- [PublicSuffix::Rule.factory("gk"), "example.uk", false],
87
- [PublicSuffix::Rule.factory("gk"), "example.co.uk", false],
88
- [PublicSuffix::Rule.factory("co.uk"), "uk", false],
89
-
90
- # general mismatch
91
- [PublicSuffix::Rule.factory("uk.co"), "example.co.uk", false],
92
- [PublicSuffix::Rule.factory("go.uk"), "example.co.uk", false],
93
- [PublicSuffix::Rule.factory("co.uk"), "uk", false],
94
-
95
- # partial matches/mismatches
96
- [PublicSuffix::Rule.factory("co"), "example.co.uk", false],
97
- [PublicSuffix::Rule.factory("example"), "example.uk", false],
98
- [PublicSuffix::Rule.factory("le.it"), "example.it", false],
99
- [PublicSuffix::Rule.factory("le.it"), "le.it", true],
100
- [PublicSuffix::Rule.factory("le.it"), "foo.le.it", true],
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],
101
103
 
102
104
  ].each do |rule, input, expected|
103
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: 3.0.3
4
+ version: 4.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simone Carletti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-15 00:00:00.000000000 Z
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: 2020-09-02 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:
@@ -61,10 +19,11 @@ extensions: []
61
19
  extra_rdoc_files:
62
20
  - LICENSE.txt
63
21
  files:
22
+ - ".github/FUNDING.yml"
23
+ - ".github/workflows/tests.yml"
64
24
  - ".gitignore"
65
25
  - ".rubocop.yml"
66
- - ".rubocop_defaults.yml"
67
- - ".ruby-gemset"
26
+ - ".rubocop_opinionated.yml"
68
27
  - ".travis.yml"
69
28
  - ".yardopts"
70
29
  - 2.0-Upgrade.md
@@ -73,7 +32,9 @@ files:
73
32
  - LICENSE.txt
74
33
  - README.md
75
34
  - Rakefile
35
+ - SECURITY.md
76
36
  - bin/console
37
+ - codecov.yml
77
38
  - data/list.txt
78
39
  - lib/public_suffix.rb
79
40
  - lib/public_suffix/domain.rb
@@ -107,7 +68,12 @@ files:
107
68
  homepage: https://simonecarletti.com/code/publicsuffix-ruby
108
69
  licenses:
109
70
  - MIT
110
- 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.6
75
+ homepage_uri: https://simonecarletti.com/code/publicsuffix-ruby
76
+ source_code_uri: https://github.com/weppos/publicsuffix-ruby/tree/v4.0.6
111
77
  post_install_message:
112
78
  rdoc_options: []
113
79
  require_paths:
@@ -116,15 +82,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
82
  requirements:
117
83
  - - ">="
118
84
  - !ruby/object:Gem::Version
119
- version: '2.1'
85
+ version: '2.3'
120
86
  required_rubygems_version: !ruby/object:Gem::Requirement
121
87
  requirements:
122
88
  - - ">="
123
89
  - !ruby/object:Gem::Version
124
90
  version: '0'
125
91
  requirements: []
126
- rubyforge_project:
127
- rubygems_version: 2.7.3
92
+ rubygems_version: 3.1.2
128
93
  signing_key:
129
94
  specification_version: 4
130
95
  summary: Domain name parser based on the Public Suffix List.
@@ -1 +0,0 @@
1
- publicsuffix