whois 5.1.1 → 6.0.1

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 (52) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/codeql-analysis.yml +3 -3
  3. data/.github/workflows/release.yml +3 -1
  4. data/.github/workflows/tests.yml +2 -3
  5. data/.rubocop.yml +1 -1
  6. data/.rubocop_todo.yml +11 -87
  7. data/CHANGELOG.md +19 -0
  8. data/LICENSE.txt +1 -1
  9. data/README.md +2 -2
  10. data/SECURITY.md +24 -0
  11. data/bin/whoisrb +3 -3
  12. data/data/tld.json +8 -775
  13. data/lib/whois/client.rb +2 -2
  14. data/lib/whois/errors.rb +1 -1
  15. data/lib/whois/record/part.rb +1 -1
  16. data/lib/whois/record.rb +2 -2
  17. data/lib/whois/server/adapters/afilias.rb +1 -1
  18. data/lib/whois/server/adapters/arin.rb +1 -1
  19. data/lib/whois/server/adapters/arpa.rb +5 -7
  20. data/lib/whois/server/adapters/base.rb +4 -4
  21. data/lib/whois/server/adapters/formatted.rb +1 -1
  22. data/lib/whois/server/adapters/none.rb +2 -2
  23. data/lib/whois/server/adapters/not_implemented.rb +2 -2
  24. data/lib/whois/server/adapters/standard.rb +1 -1
  25. data/lib/whois/server/adapters/verisign.rb +1 -1
  26. data/lib/whois/server/adapters/web.rb +2 -2
  27. data/lib/whois/server/socket_handler.rb +4 -4
  28. data/lib/whois/server.rb +10 -10
  29. data/lib/whois/version.rb +2 -2
  30. data/lib/whois.rb +19 -19
  31. data/spec/integration/whois_spec.rb +2 -2
  32. data/spec/spec_helper.rb +3 -3
  33. data/spec/whois/client_spec.rb +1 -1
  34. data/spec/whois/record/part_spec.rb +1 -1
  35. data/spec/whois/record_spec.rb +26 -18
  36. data/spec/whois/server/adapters/afilias_spec.rb +1 -1
  37. data/spec/whois/server/adapters/arin_spec.rb +1 -1
  38. data/spec/whois/server/adapters/arpa_spec.rb +13 -4
  39. data/spec/whois/server/adapters/base_spec.rb +17 -12
  40. data/spec/whois/server/adapters/formatted_spec.rb +1 -1
  41. data/spec/whois/server/adapters/none_spec.rb +1 -1
  42. data/spec/whois/server/adapters/not_implemented_spec.rb +2 -2
  43. data/spec/whois/server/adapters/standard_spec.rb +1 -1
  44. data/spec/whois/server/adapters/verisign_spec.rb +1 -1
  45. data/spec/whois/server/adapters/web_spec.rb +1 -1
  46. data/spec/whois/server/socket_handler_spec.rb +2 -2
  47. data/spec/whois/server_spec.rb +51 -51
  48. data/spec/whois/web_interface_error_spec.rb +1 -1
  49. data/spec/whois/whois_spec.rb +1 -1
  50. data/utils/deftld.rb +0 -1
  51. data/whois.gemspec +1 -1
  52. metadata +6 -36
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ff6872ad8615b4343c701a4db1eedc42eaa11adbb8e208c57a27925529a1cc2
4
- data.tar.gz: fb06f748a5f3c51552ac2554dd09afd5dede8a1827c55a3c4466e9718a81ff20
3
+ metadata.gz: 9783dca8336df04d4554e54f30f71d58c5d5dbdb9a4857e513b37be4ca3aae09
4
+ data.tar.gz: cfecb0ebe734dcdc78825d09dccf208bc4f47dcc212fa1a4df97b7bef9f74ea1
5
5
  SHA512:
6
- metadata.gz: a27c9e7c48268fb08698628dc59e89b39182726f76cb882962c4a7fee139afb7bbca24ee1f04852c317221b58598237b036ccbda2d645012816e391e527ec7bf
7
- data.tar.gz: 9cbb25f0c7ef46d0a39eb1699fae0d9e64943c8c5f9ae0c919524eb400eb228198046f5527f526d86a342a61746b6053576de9aa7a1967efccf2059ecc7a3e7c
6
+ metadata.gz: 6da4a414226e3f3b838f5a5df21d0598ccd90e133eb46174bef22e52bd8a8eff945cff85dcbb41644ca6a9fc03e77c580885b5dfbb755a0e8e68ad4a4255741b
7
+ data.tar.gz: 4aeadb9da22d6fb89b71e49fbe2986f33f45ee7917f7389f443af15ff44233cfc34db9d6bbc6359a55618ab9303d2b921a750d3b8edefe773bc89a137cedd653
@@ -36,7 +36,7 @@ jobs:
36
36
 
37
37
  # Initializes the CodeQL tools for scanning.
38
38
  - name: Initialize CodeQL
39
- uses: github/codeql-action/init@v2
39
+ uses: github/codeql-action/init@v3
40
40
  with:
41
41
  languages: ${{ matrix.language }}
42
42
  # If you wish to specify custom queries, you can do so here or in a config file.
@@ -47,7 +47,7 @@ jobs:
47
47
  # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
48
48
  # If this step fails, then you should remove it and run the build manually (see below)
49
49
  - name: Autobuild
50
- uses: github/codeql-action/autobuild@v2
50
+ uses: github/codeql-action/autobuild@v3
51
51
 
52
52
  # ℹ️ Command-line programs to run using the OS shell.
53
53
  # 📚 https://git.io/JvXDl
@@ -61,4 +61,4 @@ jobs:
61
61
  # make release
62
62
 
63
63
  - name: Perform CodeQL Analysis
64
- uses: github/codeql-action/analyze@v2
64
+ uses: github/codeql-action/analyze@v3
@@ -1,16 +1,18 @@
1
1
  name: release
2
2
 
3
3
  on:
4
+ workflow_dispatch:
4
5
  push:
5
6
  tags:
6
7
  - v*.*.*
8
+
7
9
  jobs:
8
10
  release:
9
11
  runs-on: ubuntu-latest
10
12
  steps:
11
13
  - uses: actions/checkout@v4
12
14
  - name: Release Gem
13
- uses: cadwallion/publish-rubygems-action@d9474d9633f4674e59afb0c343f2dafe25181328
15
+ uses: cadwallion/publish-rubygems-action@94a6f4cd5350581749c569b5001eecc864e3ad0b
14
16
  env:
15
17
  RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
16
18
  RELEASE_COMMAND: rake release
@@ -6,15 +6,14 @@ on:
6
6
  workflow_dispatch:
7
7
 
8
8
  jobs:
9
- build:
9
+ test:
10
10
  strategy:
11
11
  matrix:
12
12
  ruby-version:
13
- - "2.6"
14
- - "2.7"
15
13
  - "3.0"
16
14
  - "3.1"
17
15
  - "3.2"
16
+ - "3.3"
18
17
  platform: [ubuntu-latest]
19
18
  runs-on: ${{ matrix.platform }}
20
19
  steps:
data/.rubocop.yml CHANGED
@@ -6,7 +6,7 @@ require:
6
6
  - rubocop-rspec
7
7
 
8
8
  AllCops:
9
- TargetRubyVersion: 2.5
9
+ TargetRubyVersion: 3.0
10
10
  Exclude:
11
11
  # Exclude .gemspec files because they are generally auto-generated
12
12
  - '*.gemspec'
data/.rubocop_todo.yml CHANGED
@@ -1,49 +1,15 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2021-03-02 10:06:13 UTC using RuboCop version 1.11.0.
3
+ # on 2024-11-22 13:51:42 UTC using RuboCop version 1.68.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 5
10
- # Cop supports --auto-correct.
11
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
12
- Lint/UnusedMethodArgument:
13
- Exclude:
14
- - 'lib/whois.rb'
15
- - 'lib/whois/server.rb'
16
- - 'lib/whois/server/adapters/none.rb'
17
- - 'lib/whois/server/adapters/not_implemented.rb'
18
- - 'lib/whois/server/adapters/web.rb'
19
-
20
- # Offense count: 61
21
- # Cop supports --auto-correct.
22
- # Configuration parameters: SkipBlocks, EnforcedStyle.
23
- # SupportedStyles: described_class, explicit
24
- RSpec/DescribedClass:
25
- Exclude:
26
- - 'spec/integration/whois_spec.rb'
27
- - 'spec/whois/server/adapters/not_implemented_spec.rb'
28
- - 'spec/whois/server_spec.rb'
29
-
30
9
  # Offense count: 35
31
- # Configuration parameters: Max.
10
+ # Configuration parameters: CountAsOne.
32
11
  RSpec/ExampleLength:
33
- Exclude:
34
- - 'spec/integration/whois_spec.rb'
35
- - 'spec/whois/client_spec.rb'
36
- - 'spec/whois/record/part_spec.rb'
37
- - 'spec/whois/record_spec.rb'
38
- - 'spec/whois/server/adapters/afilias_spec.rb'
39
- - 'spec/whois/server/adapters/arin_spec.rb'
40
- - 'spec/whois/server/adapters/arpa_spec.rb'
41
- - 'spec/whois/server/adapters/formatted_spec.rb'
42
- - 'spec/whois/server/adapters/none_spec.rb'
43
- - 'spec/whois/server/adapters/standard_spec.rb'
44
- - 'spec/whois/server/adapters/verisign_spec.rb'
45
- - 'spec/whois/server/socket_handler_spec.rb'
46
- - 'spec/whois/server_spec.rb'
12
+ Max: 17
47
13
 
48
14
  # Offense count: 4
49
15
  # Configuration parameters: AssignmentOnly.
@@ -58,26 +24,18 @@ RSpec/InstanceVariable:
58
24
  RSpec/MessageSpies:
59
25
  EnforcedStyle: receive
60
26
 
61
- # Offense count: 70
27
+ # Offense count: 71
62
28
  RSpec/MultipleExpectations:
63
29
  Max: 5
64
30
 
65
31
  # Offense count: 8
66
- # Configuration parameters: IgnoreSharedExamples.
32
+ # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
33
+ # SupportedStyles: always, named_only
67
34
  RSpec/NamedSubject:
68
35
  Exclude:
69
36
  - 'spec/whois/record_spec.rb'
70
37
  - 'spec/whois/server/socket_handler_spec.rb'
71
38
 
72
- # Offense count: 15
73
- # Cop supports --auto-correct.
74
- # Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers.
75
- # SupportedStyles: inflected, explicit
76
- RSpec/PredicateMatcher:
77
- Exclude:
78
- - 'spec/whois/record_spec.rb'
79
- - 'spec/whois/server/adapters/base_spec.rb'
80
-
81
39
  # Offense count: 40
82
40
  RSpec/StubbedMock:
83
41
  Exclude:
@@ -98,17 +56,16 @@ RSpec/SubjectStub:
98
56
  Exclude:
99
57
  - 'spec/whois/server/socket_handler_spec.rb'
100
58
 
101
- # Offense count: 31
102
- # Cop supports --auto-correct.
103
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
59
+ # Offense count: 30
60
+ # This cop supports safe autocorrection (--autocorrect).
61
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
104
62
  # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
105
63
  # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
106
64
  # FunctionalMethods: let, let!, subject, watch
107
- # IgnoredMethods: lambda, proc, it
65
+ # AllowedMethods: lambda, proc, it
108
66
  Style/BlockDelimiters:
109
67
  Exclude:
110
68
  - 'spec/whois/client_spec.rb'
111
- - 'spec/whois/errors_spec.rb'
112
69
  - 'spec/whois/record/part_spec.rb'
113
70
  - 'spec/whois/record_spec.rb'
114
71
  - 'spec/whois/server/adapters/base_spec.rb'
@@ -120,6 +77,7 @@ Style/BlockDelimiters:
120
77
  - 'spec/whois/server_spec.rb'
121
78
 
122
79
  # Offense count: 6
80
+ # Configuration parameters: AllowedConstants.
123
81
  Style/Documentation:
124
82
  Exclude:
125
83
  - 'spec/**/*'
@@ -130,37 +88,3 @@ Style/Documentation:
130
88
  - 'lib/whois/server/adapters/arpa.rb'
131
89
  - 'lib/whois/server/adapters/base.rb'
132
90
  - 'lib/whois/server/adapters/not_implemented.rb'
133
-
134
- # Offense count: 8
135
- # Configuration parameters: MinBodyLength.
136
- Style/GuardClause:
137
- Exclude:
138
- - 'lib/whois.rb'
139
- - 'lib/whois/server.rb'
140
- - 'lib/whois/server/adapters/afilias.rb'
141
- - 'lib/whois/server/adapters/arin.rb'
142
- - 'lib/whois/server/adapters/arpa.rb'
143
- - 'lib/whois/server/adapters/verisign.rb'
144
- - 'spec/support/helpers/connectivity_helper.rb'
145
-
146
- # Offense count: 13
147
- # Cop supports --auto-correct.
148
- Style/ParallelAssignment:
149
- Exclude:
150
- - 'spec/whois/record_spec.rb'
151
- - 'spec/whois/server/adapters/base_spec.rb'
152
-
153
- # Offense count: 1
154
- # Cop supports --auto-correct.
155
- # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
156
- # AllowedMethods: present?, blank?, presence, try, try!
157
- Style/SafeNavigation:
158
- Exclude:
159
- - 'lib/whois/server/socket_handler.rb'
160
-
161
- # Offense count: 44
162
- # Cop supports --auto-correct.
163
- # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
164
- # SupportedStyles: single_quotes, double_quotes
165
- Style/StringLiterals:
166
- Enabled: false
data/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  This project uses [Semantic Versioning 2.0.0](http://semver.org/).
4
4
 
5
5
 
6
+ ## Release 6.0.1
7
+
8
+ ### Changed
9
+
10
+ - SERVER: Updated .TV (GH-662).
11
+
12
+
13
+ ## Release 6.0.0
14
+
15
+ ### Fixed
16
+
17
+ - Fixed badly anchored regular expression (GH-661)
18
+
19
+ ### Changed
20
+
21
+ - Minimum Ruby version 3.0
22
+ - SERVER: Updated .GOV.UK and .AC.UK (GH-554). The official whois servers are not responding correctly, I am reverting them to the .UK TLD.
23
+
24
+
6
25
  ## Release 5.1.1
7
26
 
8
27
  ### Changed
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2009-2022 Simone Carletti
3
+ Copyright (c) 2009-2024 Simone Carletti
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -33,7 +33,7 @@ This repository contains the core whois library, that includes the WHOIS client,
33
33
 
34
34
  ## Requirements
35
35
 
36
- - Ruby >= 2.4
36
+ - Ruby >= 3.0
37
37
 
38
38
  For older versions of Ruby, see the [CHANGELOG](CHANGELOG.md).
39
39
 
@@ -213,4 +213,4 @@ Report issues or feature requests to [GitHub Issues](https://github.com/weppos/w
213
213
 
214
214
  ## License
215
215
 
216
- Copyright (c) 2009-2022 [Simone Carletti](https://simonecarletti.com/). This is Free Software distributed under the MIT license.
216
+ Copyright (c) 2009-2024 [Simone Carletti](https://simonecarletti.com/). This is Free Software distributed under the MIT license.
data/SECURITY.md ADDED
@@ -0,0 +1,24 @@
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. This project uses [semantic versioning](https://semver.org/), therefore you can upgrade to a more recent minor version without incurring into breaking changes.
8
+
9
+ Exceptionally, we may support previous minor versions upon request if there are significant reasons preventing to immediately switch the latest minor version.
10
+
11
+ Older major versions are no longer supported.
12
+
13
+
14
+ ## Reporting a Vulnerability
15
+
16
+ To make a report, please email weppos@weppos.net.
17
+
18
+ > [!IMPORTANT]
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
+ ## Tracking Security Updates
23
+
24
+ Information about security vulnerabilities are published in the [Security Advisories](https://github.com/weppos/whois/security/advisories) page.
data/bin/whoisrb CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- $LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
4
+ $LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
5
5
 
6
- require 'optparse'
7
- require 'whois'
6
+ require "optparse"
7
+ require "whois"
8
8
 
9
9
 
10
10
  options = {}