public_suffix 5.0.0 → 6.0.2

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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +73 -1
  3. data/LICENSE.txt +1 -1
  4. data/README.md +10 -5
  5. data/SECURITY.md +3 -83
  6. data/data/list.txt +5607 -3882
  7. data/lib/public_suffix/domain.rb +1 -1
  8. data/lib/public_suffix/errors.rb +1 -1
  9. data/lib/public_suffix/list.rb +1 -1
  10. data/lib/public_suffix/rule.rb +2 -2
  11. data/lib/public_suffix/version.rb +3 -4
  12. data/lib/public_suffix.rb +1 -1
  13. metadata +7 -44
  14. data/.github/FUNDING.yml +0 -12
  15. data/.github/dependabot.yml +0 -8
  16. data/.github/workflows/psl-update.yml +0 -38
  17. data/.github/workflows/release.yml +0 -18
  18. data/.github/workflows/tests.yml +0 -29
  19. data/.gitignore +0 -8
  20. data/.rubocop.yml +0 -37
  21. data/.rubocop_opinionated.yml +0 -135
  22. data/2.0-Upgrade.md +0 -52
  23. data/Gemfile +0 -14
  24. data/Rakefile +0 -52
  25. data/bin/console +0 -15
  26. data/public_suffix.gemspec +0 -29
  27. data/test/.empty +0 -2
  28. data/test/acceptance_test.rb +0 -131
  29. data/test/benchmarks/bm_find.rb +0 -66
  30. data/test/benchmarks/bm_find_all.rb +0 -102
  31. data/test/benchmarks/bm_names.rb +0 -91
  32. data/test/benchmarks/bm_select.rb +0 -26
  33. data/test/benchmarks/bm_select_incremental.rb +0 -25
  34. data/test/benchmarks/bm_valid.rb +0 -101
  35. data/test/profilers/domain_profiler.rb +0 -12
  36. data/test/profilers/find_profiler.rb +0 -12
  37. data/test/profilers/find_profiler_jp.rb +0 -12
  38. data/test/profilers/initialization_profiler.rb +0 -11
  39. data/test/profilers/list_profsize.rb +0 -11
  40. data/test/profilers/object_binsize.rb +0 -57
  41. data/test/psl_test.rb +0 -52
  42. data/test/test_helper.rb +0 -10
  43. data/test/tests.txt +0 -98
  44. data/test/unit/domain_test.rb +0 -106
  45. data/test/unit/errors_test.rb +0 -25
  46. data/test/unit/list_test.rb +0 -241
  47. data/test/unit/public_suffix_test.rb +0 -188
  48. data/test/unit/rule_test.rb +0 -222
@@ -4,7 +4,7 @@
4
4
  #
5
5
  # Domain name parser based on the Public Suffix List.
6
6
  #
7
- # Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
7
+ # Copyright (c) 2009-2025 Simone Carletti <weppos@weppos.net>
8
8
 
9
9
  module PublicSuffix
10
10
 
@@ -4,7 +4,7 @@
4
4
  #
5
5
  # Domain name parser based on the Public Suffix List.
6
6
  #
7
- # Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
7
+ # Copyright (c) 2009-2025 Simone Carletti <weppos@weppos.net>
8
8
 
9
9
  module PublicSuffix
10
10
 
@@ -4,7 +4,7 @@
4
4
  #
5
5
  # Domain name parser based on the Public Suffix List.
6
6
  #
7
- # Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
7
+ # Copyright (c) 2009-2025 Simone Carletti <weppos@weppos.net>
8
8
 
9
9
  module PublicSuffix
10
10
 
@@ -4,7 +4,7 @@
4
4
  #
5
5
  # Domain name parser based on the Public Suffix List.
6
6
  #
7
- # Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
7
+ # Copyright (c) 2009-2025 Simone Carletti <weppos@weppos.net>
8
8
 
9
9
  module PublicSuffix
10
10
 
@@ -230,7 +230,7 @@ module PublicSuffix
230
230
  # @param length [Integer]
231
231
  # @param private [Boolean]
232
232
  def initialize(value:, length: nil, private: false)
233
- super(value: value, length: length, private: private)
233
+ super
234
234
  length or @length += 1 # * counts as 1
235
235
  end
236
236
 
@@ -1,15 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- #
4
3
  # = Public Suffix
5
4
  #
6
5
  # Domain name parser based on the Public Suffix List.
7
6
  #
8
- # Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
7
+ # Copyright (c) 2009-2025 Simone Carletti <weppos@weppos.net>
9
8
 
10
9
  module PublicSuffix
11
10
 
12
- # @return [String] The current library version.
13
- VERSION = "5.0.0"
11
+ # @return [String] the current library version
12
+ VERSION = "6.0.2"
14
13
 
15
14
  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-2022 Simone Carletti <weppos@weppos.net>
7
+ # Copyright (c) 2009-2025 Simone Carletti <weppos@weppos.net>
8
8
 
9
9
  require_relative "public_suffix/domain"
10
10
  require_relative "public_suffix/version"
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: public_suffix
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 6.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simone Carletti
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2022-07-24 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: PublicSuffix can parse and decompose a domain name into top level domain,
14
13
  domain and subdomains.
@@ -19,23 +18,11 @@ extensions: []
19
18
  extra_rdoc_files:
20
19
  - LICENSE.txt
21
20
  files:
22
- - ".github/FUNDING.yml"
23
- - ".github/dependabot.yml"
24
- - ".github/workflows/psl-update.yml"
25
- - ".github/workflows/release.yml"
26
- - ".github/workflows/tests.yml"
27
- - ".gitignore"
28
- - ".rubocop.yml"
29
- - ".rubocop_opinionated.yml"
30
21
  - ".yardopts"
31
- - 2.0-Upgrade.md
32
22
  - CHANGELOG.md
33
- - Gemfile
34
23
  - LICENSE.txt
35
24
  - README.md
36
- - Rakefile
37
25
  - SECURITY.md
38
- - bin/console
39
26
  - data/list.txt
40
27
  - lib/public_suffix.rb
41
28
  - lib/public_suffix/domain.rb
@@ -43,39 +30,16 @@ files:
43
30
  - lib/public_suffix/list.rb
44
31
  - lib/public_suffix/rule.rb
45
32
  - lib/public_suffix/version.rb
46
- - public_suffix.gemspec
47
- - test/.empty
48
- - test/acceptance_test.rb
49
- - test/benchmarks/bm_find.rb
50
- - test/benchmarks/bm_find_all.rb
51
- - test/benchmarks/bm_names.rb
52
- - test/benchmarks/bm_select.rb
53
- - test/benchmarks/bm_select_incremental.rb
54
- - test/benchmarks/bm_valid.rb
55
- - test/profilers/domain_profiler.rb
56
- - test/profilers/find_profiler.rb
57
- - test/profilers/find_profiler_jp.rb
58
- - test/profilers/initialization_profiler.rb
59
- - test/profilers/list_profsize.rb
60
- - test/profilers/object_binsize.rb
61
- - test/psl_test.rb
62
- - test/test_helper.rb
63
- - test/tests.txt
64
- - test/unit/domain_test.rb
65
- - test/unit/errors_test.rb
66
- - test/unit/list_test.rb
67
- - test/unit/public_suffix_test.rb
68
- - test/unit/rule_test.rb
69
33
  homepage: https://simonecarletti.com/code/publicsuffix-ruby
70
34
  licenses:
71
35
  - MIT
72
36
  metadata:
73
37
  bug_tracker_uri: https://github.com/weppos/publicsuffix-ruby/issues
74
38
  changelog_uri: https://github.com/weppos/publicsuffix-ruby/blob/master/CHANGELOG.md
75
- documentation_uri: https://rubydoc.info/gems/public_suffix/5.0.0
39
+ documentation_uri: https://rubydoc.info/gems/public_suffix/6.0.2
76
40
  homepage_uri: https://simonecarletti.com/code/publicsuffix-ruby
77
- source_code_uri: https://github.com/weppos/publicsuffix-ruby/tree/v5.0.0
78
- post_install_message:
41
+ source_code_uri: https://github.com/weppos/publicsuffix-ruby/tree/v6.0.2
42
+ funding_uri: https://github.com/sponsors/weppos
79
43
  rdoc_options: []
80
44
  require_paths:
81
45
  - lib
@@ -83,15 +47,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
83
47
  requirements:
84
48
  - - ">="
85
49
  - !ruby/object:Gem::Version
86
- version: '2.6'
50
+ version: '3.0'
87
51
  required_rubygems_version: !ruby/object:Gem::Requirement
88
52
  requirements:
89
53
  - - ">="
90
54
  - !ruby/object:Gem::Version
91
55
  version: '0'
92
56
  requirements: []
93
- rubygems_version: 3.3.7
94
- signing_key:
57
+ rubygems_version: 3.6.7
95
58
  specification_version: 4
96
59
  summary: Domain name parser based on the Public Suffix List.
97
60
  test_files: []
data/.github/FUNDING.yml DELETED
@@ -1,12 +0,0 @@
1
- # These are supported funding model platforms
2
-
3
- github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
- patreon: # Replace with a single Patreon username
5
- open_collective: # Replace with a single Open Collective username
6
- ko_fi: # Replace with a single Ko-fi username
7
- tidelift: "rubygems/public_suffix"
8
- community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
- liberapay: # Replace with a single Liberapay username
10
- issuehunt: # Replace with a single IssueHunt username
11
- otechie: # Replace with a single Otechie username
12
- custom: # Replace with a single custom sponsorship URL
@@ -1,8 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: bundler
4
- directory: "/"
5
- schedule:
6
- interval: daily
7
- time: "04:00"
8
- open-pull-requests-limit: 10
@@ -1,38 +0,0 @@
1
- name: PSL Update
2
-
3
- on:
4
- workflow_dispatch:
5
- schedule:
6
- - cron: '40 6 * * *'
7
-
8
- jobs:
9
- update:
10
- runs-on: ubuntu-latest
11
- steps:
12
-
13
- - name: Checkout
14
- uses: actions/checkout@v3
15
-
16
- - name: Set up Ruby
17
- uses: ruby/setup-ruby@v1
18
- with:
19
- ruby-version: "3.1"
20
- bundler-cache: true
21
-
22
- - name: Update PSL
23
- run: bundle exec rake update-list
24
-
25
- - name: Create Pull Request
26
- uses: peter-evans/create-pull-request@v4
27
- with:
28
- title: PSL auto-update
29
- commit-message: Updated list from source
30
- reviewers: weppos
31
- add-paths: |
32
- data/list.txt
33
-
34
- - name: Check Pull Request
35
- if: ${{ steps.cpr.outputs.pull-request-number }}
36
- run: |
37
- echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
38
- echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
@@ -1,18 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- tags:
6
- - v*.*.*
7
-
8
- jobs:
9
- release:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - name: Checkout
13
- uses: actions/checkout@v3
14
- - name: Release Gem
15
- uses: cadwallion/publish-rubygems-action@8f9e0538302643309e4e43bf48cd34173ca48cfc
16
- env:
17
- RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
18
- RELEASE_COMMAND: rake release
@@ -1,29 +0,0 @@
1
- name: Tests
2
-
3
- on:
4
- push:
5
- pull_request:
6
- workflow_dispatch:
7
-
8
- jobs:
9
- test:
10
- strategy:
11
- matrix:
12
- ruby-version:
13
- - "2.6"
14
- - "2.7"
15
- - "3.0"
16
- - "3.1"
17
- runs-on: ubuntu-latest
18
- steps:
19
- - name: Checkout
20
- uses: actions/checkout@v3
21
- - name: Set up Ruby
22
- uses: ruby/setup-ruby@v1
23
- with:
24
- ruby-version: ${{ matrix.ruby-version }}
25
- bundler-cache: true
26
- - name: Rubocop
27
- run: bundle exec rake rubocop
28
- - name: Run tests
29
- run: bundle exec rake test
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- # Bundler
2
- /.bundle
3
- /Gemfile.lock
4
- /pkg/*
5
-
6
- # YARD
7
- /.yardoc
8
- /yardoc/
data/.rubocop.yml DELETED
@@ -1,37 +0,0 @@
1
- inherit_from:
2
- - .rubocop_opinionated.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
- TargetRubyVersion: 2.6
17
-
18
- # I often use @_variable to avoid clashing.
19
- Naming/MemoizedInstanceVariableName:
20
- Enabled: false
21
-
22
- Style/ClassAndModuleChildren:
23
- Exclude:
24
- - 'spec/**/*_spec.rb'
25
- - 'test/**/*_test.rb'
26
-
27
- # Dear Rubocop, I don't want to use String#strip_heredoc
28
- Layout/HeredocIndentation:
29
- Enabled: false
30
-
31
- Style/WordArray:
32
- Enabled: false
33
- MinSize: 3
34
-
35
- Style/SymbolArray:
36
- Enabled: false
37
- MinSize: 3
@@ -1,135 +0,0 @@
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
- NewCops: enable
9
-
10
- # [codesmell]
11
- Layout/LineLength:
12
- Enabled: false
13
- Exclude:
14
- - 'spec/**/*_spec.rb'
15
- - 'test/**/*_test.rb'
16
- Max: 100
17
-
18
- # [codesmell]
19
- Metrics/AbcSize:
20
- Enabled: false
21
- Exclude:
22
- - 'spec/**/*_spec.rb'
23
- - 'test/**/*_test.rb'
24
-
25
- # [codesmell]
26
- Metrics/BlockLength:
27
- Enabled: false
28
-
29
- # [codesmell]
30
- Metrics/CyclomaticComplexity:
31
- Enabled: false
32
- Exclude:
33
- - 'spec/**/*_spec.rb'
34
- - 'test/**/*_test.rb'
35
-
36
- # [codesmell]
37
- Metrics/ClassLength:
38
- Enabled: false
39
- Exclude:
40
- - 'spec/**/*_spec.rb'
41
- - 'test/**/*_test.rb'
42
-
43
- # [codesmell]
44
- Metrics/MethodLength:
45
- Enabled: false
46
- Exclude:
47
- - 'spec/**/*_spec.rb'
48
- - 'test/**/*_test.rb'
49
- Max: 10
50
-
51
- # [codesmell]
52
- Metrics/ModuleLength:
53
- Enabled: false
54
- Exclude:
55
- - 'spec/**/*_spec.rb'
56
- - 'test/**/*_test.rb'
57
-
58
- # [codesmell]
59
- Metrics/ParameterLists:
60
- Enabled: false
61
- Max: 5
62
-
63
- # [codesmell]
64
- Metrics/PerceivedComplexity:
65
- Enabled: false
66
-
67
- # Do not use "and" or "or" in conditionals, but for readability we can use it
68
- # to chain executions. Just beware of operator order.
69
- Style/AndOr:
70
- EnforcedStyle: conditionals
71
-
72
- Style/Documentation:
73
- Exclude:
74
- - 'spec/**/*'
75
- - 'test/**/*'
76
-
77
- # Double empty lines are useful to separate conceptually different methods
78
- # in the same class or module.
79
- Layout/EmptyLines:
80
- Enabled: false
81
-
82
- # In most cases, a space is nice. Sometimes, it's not.
83
- # Just be consistent with the rest of the surrounding code.
84
- Layout/EmptyLinesAroundClassBody:
85
- Enabled: false
86
-
87
- # In most cases, a space is nice. Sometimes, it's not.
88
- # Just be consistent with the rest of the surrounding code.
89
- Layout/EmptyLinesAroundModuleBody:
90
- Enabled: false
91
-
92
- # This is quite buggy, as it doesn't recognize double lines.
93
- # Double empty lines are useful to separate conceptually different methods
94
- # in the same class or module.
95
- Layout/EmptyLineBetweenDefs:
96
- Enabled: false
97
-
98
- # Annotated tokens (like %<foo>s) are a good thing, but in most cases we don't need them.
99
- # %s is a simpler and straightforward version that works in almost all cases. So don't complain.
100
- Style/FormatStringToken:
101
- Enabled: false
102
-
103
- # unless is not always cool.
104
- Style/NegatedIf:
105
- Enabled: false
106
-
107
- # There are cases were the inline rescue is ok. We can either downgrade the severity,
108
- # or rely on the developer judgement on a case-by-case basis.
109
- Style/RescueModifier:
110
- Enabled: false
111
-
112
- Style/SymbolArray:
113
- EnforcedStyle: brackets
114
-
115
- # Hate It or Love It, I prefer double quotes as this is more consistent
116
- # with several other programming languages and the output of puts and inspect.
117
- Style/StringLiterals:
118
- EnforcedStyle: double_quotes
119
-
120
- # It's nice to be consistent. The trailing comma also allows easy reordering,
121
- # and doesn't cause a diff in Git when you add a line to the bottom.
122
- Style/TrailingCommaInArrayLiteral:
123
- EnforcedStyleForMultiline: consistent_comma
124
- Style/TrailingCommaInHashLiteral:
125
- EnforcedStyleForMultiline: consistent_comma
126
-
127
- Style/TrivialAccessors:
128
- # IgnoreClassMethods because I want to be able to define class-level accessors
129
- # that sets an instance variable on the metaclass, such as:
130
- #
131
- # def self.default=(value)
132
- # @default = value
133
- # end
134
- #
135
- IgnoreClassMethods: true
data/2.0-Upgrade.md DELETED
@@ -1,52 +0,0 @@
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
- ````
data/Gemfile DELETED
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- gemspec
6
-
7
- gem "rake"
8
-
9
- gem "memory_profiler", require: false
10
- gem "minitest"
11
- gem "minitest-reporters"
12
- gem "mocha"
13
- gem "rubocop", require: false
14
- gem "yard"
data/Rakefile DELETED
@@ -1,52 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
-
5
- # By default, run tests and linter.
6
- task default: [:test, :rubocop]
7
-
8
-
9
- require "rake/testtask"
10
-
11
- Rake::TestTask.new do |t|
12
- t.libs = %w[lib test]
13
- t.pattern = "test/**/*_test.rb"
14
- t.verbose = !ENV["VERBOSE"].nil?
15
- t.warning = !ENV["WARNING"].nil?
16
- end
17
-
18
- require "rubocop/rake_task"
19
-
20
- RuboCop::RakeTask.new
21
-
22
-
23
- require "yard"
24
- require "yard/rake/yardoc_task"
25
-
26
- YARD::Rake::YardocTask.new(:yardoc) do |y|
27
- y.options = ["--output-dir", "yardoc"]
28
- end
29
-
30
- CLOBBER.include "yardoc"
31
-
32
-
33
- task :benchmarks do
34
- Dir["benchmarks/bm_*.rb"].each do |file|
35
- sh "ruby #{file}"
36
- end
37
- end
38
- task default: [:benchmarks] if ENV["BENCHMARKS"] == "1"
39
-
40
-
41
- desc "Downloads the Public Suffix List file from the repository and stores it locally."
42
- task :"update-list" do
43
- require "net/http"
44
-
45
- definition_url = "https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat"
46
-
47
- File.open("data/list.txt", "w+") do |f|
48
- response = Net::HTTP.get_response(URI.parse(definition_url))
49
- response.body
50
- f.write(response.body)
51
- end
52
- end
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- require "public_suffix"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require "irb"
15
- IRB.start
@@ -1,29 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $LOAD_PATH.push File.expand_path("../lib", __FILE__)
3
- require "public_suffix/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "public_suffix"
7
- s.version = PublicSuffix::VERSION
8
- s.authors = ["Simone Carletti"]
9
- s.email = ["weppos@weppos.net"]
10
- s.homepage = "https://simonecarletti.com/code/publicsuffix-ruby"
11
- s.summary = "Domain name parser based on the Public Suffix List."
12
- s.description = "PublicSuffix can parse and decompose a domain name into top level domain, domain and subdomains."
13
- s.licenses = ["MIT"]
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
-
23
- s.required_ruby_version = ">= 2.6"
24
-
25
- s.require_paths = ["lib"]
26
- s.files = `git ls-files`.split("\n")
27
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
28
- s.extra_rdoc_files = %w( LICENSE.txt )
29
- end
data/test/.empty DELETED
@@ -1,2 +0,0 @@
1
- # This is an empty file I use to force a non-empty commit when I only need to store notes
2
- ..