public_suffix 2.0.5 → 4.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +5 -5
  2. data/.github/FUNDING.yml +12 -0
  3. data/.github/dependabot.yml +8 -0
  4. data/.github/workflows/release.yml +16 -0
  5. data/.github/workflows/tests.yml +28 -0
  6. data/.gitignore +5 -8
  7. data/.rubocop.yml +19 -1
  8. data/{.rubocop_defaults.yml → .rubocop_opinionated.yml} +62 -34
  9. data/CHANGELOG.md +156 -54
  10. data/Gemfile +9 -5
  11. data/LICENSE.txt +1 -1
  12. data/README.md +44 -15
  13. data/Rakefile +9 -4
  14. data/SECURITY.md +104 -0
  15. data/bin/console +15 -0
  16. data/data/list.txt +3163 -973
  17. data/lib/public_suffix/domain.rb +4 -4
  18. data/lib/public_suffix/errors.rb +3 -1
  19. data/lib/public_suffix/list.rb +78 -117
  20. data/lib/public_suffix/rule.rb +54 -62
  21. data/lib/public_suffix/version.rb +8 -3
  22. data/lib/public_suffix.rb +38 -32
  23. data/public_suffix.gemspec +9 -5
  24. data/test/.empty +2 -0
  25. data/test/acceptance_test.rb +43 -31
  26. data/test/benchmarks/bm_find.rb +66 -0
  27. data/test/benchmarks/bm_find_all.rb +102 -0
  28. data/test/benchmarks/bm_names.rb +91 -0
  29. data/test/benchmarks/bm_select.rb +26 -0
  30. data/test/benchmarks/bm_select_incremental.rb +25 -0
  31. data/test/benchmarks/bm_valid.rb +101 -0
  32. data/test/profilers/domain_profiler.rb +12 -0
  33. data/test/profilers/find_profiler.rb +12 -0
  34. data/test/profilers/find_profiler_jp.rb +12 -0
  35. data/test/{initialization_profiler.rb → profilers/initialization_profiler.rb} +1 -1
  36. data/test/profilers/list_profsize.rb +11 -0
  37. data/test/profilers/object_binsize.rb +57 -0
  38. data/test/psl_test.rb +7 -4
  39. data/test/test_helper.rb +3 -14
  40. data/test/unit/domain_test.rb +17 -15
  41. data/test/unit/errors_test.rb +2 -0
  42. data/test/unit/list_test.rb +54 -72
  43. data/test/unit/public_suffix_test.rb +24 -22
  44. data/test/unit/rule_test.rb +77 -79
  45. metadata +32 -70
  46. data/.ruby-gemset +0 -1
  47. data/.travis.yml +0 -23
  48. data/test/benchmark_helper.rb +0 -4
  49. data/test/execution_profiler.rb +0 -14
  50. data/test/performance_benchmark.rb +0 -38
data/SECURITY.md ADDED
@@ -0,0 +1,104 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ Security updates are provided only for the current minor version.
6
+
7
+ If you are using a previous minor version, we recommend to upgrade to the current minor version.
8
+ This project uses [semantic versioning](https://semver.org/), therefore you can upgrade to a more recent minor version without incurring into breaking changes.
9
+
10
+ Exceptionally, we may support previous minor versions upon request if there are significant reasons preventing to immediately switch the latest minor version.
11
+
12
+ Older major versions are no longer supported.
13
+
14
+
15
+ ## Reporting a Vulnerability
16
+
17
+ To make a report, please email weppos@weppos.net.
18
+
19
+ Please consider encrypting your report with GPG using the key [0x420da82a989398df](https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x420da82a989398df).
20
+
21
+ ```
22
+ -----BEGIN PGP PUBLIC KEY BLOCK-----
23
+
24
+ xsBNBE/QiI0BCACtBbjJnJIzaLb4NfjaljzT/+dvodst+wyDRE8Vwc6ujwboZjr2
25
+ 0QwXScNzObPazyvkSZVh3g6PveneeSD0dSw2XDqKbbtLMg/Ss12yqXJfjavH/zjk
26
+ 6Xq+nnbSnxBPzwFAAEaEFIc6H6BygJ7zHPP5WEY5QIMqifEAX//aBqHi4GXHJiHE
27
+ 237Zqufdry23jBYjY7wGXAa11VsU9Iwqh6LPB9/hc1KtzjAuvvm5ufeT/iVjxGQX
28
+ te1OZZk6n8xSVYeLsn97PfgYs0yauhexwD9dG7FbRCB379JxPRn5akr391qXcVOG
29
+ ZA3yBXUSPOL6D1+TS1S0su5zbw2AEp4+z3SpABEBAAHNIlNpbW9uZSBDYXJsZXR0
30
+ aSA8d2VwcG9zQGdtYWlsLmNvbT7CwHcEEwEKACEFAlXH0UQCGy8FCwkIBwM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VAHI8zbMd6xdlX22yDgQei54dPXDw
93
+ UYsvGE4zmrD97he1EYcIOKMFHzlJNcWK+uR7lEq6mv7SFGnBr8qTYZRi1bySRgwd
94
+ UORuDV12GKTen9WectKtepW0fgYSz+udbDKQyyRef+7xGtCErWRL7f1qr8xm60da
95
+ +gSwyD/WkPTY8SP2mdq4u+6m4dWS26kKoENwuL7jUktl/C/EG7NmUKURbXG8lmeu
96
+ q59MIs/Fb3SgaO+zN2FZTYp6dyRJHbeEz55JdOu6F+6ihZYH
97
+ =j6Xr
98
+ -----END PGP PUBLIC KEY BLOCK-----
99
+ ```
100
+
101
+
102
+ ## Tracking Security Updates
103
+
104
+ Information about security vulnerabilities are published in the [Security Advisories](https://github.com/weppos/publicsuffix-ruby/security/advisories) page.
data/bin/console ADDED
@@ -0,0 +1,15 @@
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