public_suffix 4.0.5 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4132a5678be0b5d33da16c17d81cec1fbf4d5dd2245db891090c1a2003107054
4
- data.tar.gz: 5472179ce34f865fb174c242f6f93fe906eb4af98f0092d611277e7ced607e1c
3
+ metadata.gz: 5b1625010ec369824aa7c3dd4e4b8aa63cf7f87566d7bcfc2a9784f0ff5fca09
4
+ data.tar.gz: 4bbc75c106415e2d8500d208d347bb0ccdd05c1f5d3a45f2f0f46a8e8793540c
5
5
  SHA512:
6
- metadata.gz: cfa1fb2ecb2f768569bcf851c696fb9e922f878f8f5c91f7b7811e323fc4226f02d6a51eae3c410e452eca71a7db51f9df809c6c686c63c843021d0e9e010b01
7
- data.tar.gz: 4feff3090d60d3019a7d3d51517f6dc64aa4b45f8aee3721b32b4d0d4a4083a3b06bc648edbbb5b8df5d677c53f05dcaf8a69bb5aa9c6244daf4ea76414f5ba1
6
+ metadata.gz: f55456d5f1c4e679b99339578d4da0c3f5462dfdf9969fcabca658748d3d72acf6036ae79db13d6db6a3b04b78be94ee079d1f28d065c2b416ec7bf21fb6ba7d
7
+ data.tar.gz: 0b2705ab2b6e8d743d54b6bb4cf22d306d215dcac11a4b49d1dd0ac1c04332ae80dcb87f305c2a2ebf7a554b24ad31dd31525f5be6fb7858e67e5ebfcc53d8ff
@@ -0,0 +1,8 @@
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
@@ -0,0 +1,38 @@
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 }}"
@@ -0,0 +1,18 @@
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
@@ -2,35 +2,28 @@ name: Tests
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ master ]
6
5
  pull_request:
7
- branches: [ master ]
6
+ workflow_dispatch:
8
7
 
9
8
  jobs:
10
-
11
- build:
9
+ test:
12
10
  strategy:
13
11
  matrix:
14
12
  ruby-version:
15
- - "2.3"
16
- - "2.4"
17
- - "2.5"
18
13
  - "2.6"
19
14
  - "2.7"
20
- platform: [ubuntu-latest]
21
-
22
- runs-on: ${{ matrix.platform }}
15
+ - "3.0"
16
+ - "3.1"
17
+ runs-on: ubuntu-latest
23
18
  steps:
24
-
25
- - uses: actions/checkout@v2
26
-
27
- - name: Set up Ruby
28
- uses: ruby/setup-ruby@v1
29
- with:
30
- ruby-version: ${{ matrix.ruby-version }}
31
-
32
- - name: Install dependencies
33
- run: bundle install
34
-
35
- - name: Run tests
36
- run: bundle exec rake
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/.rubocop.yml CHANGED
@@ -13,6 +13,7 @@ AllCops:
13
13
  # Other
14
14
  - 'test/benchmarks/**/*'
15
15
  - 'test/profilers/**/*'
16
+ TargetRubyVersion: 2.6
16
17
 
17
18
  # I often use @_variable to avoid clashing.
18
19
  Naming/MemoizedInstanceVariableName:
@@ -5,6 +5,7 @@ AllCops:
5
5
  # Exclude vendored folders
6
6
  - 'tmp/**/*'
7
7
  - 'vendor/**/*'
8
+ NewCops: enable
8
9
 
9
10
  # [codesmell]
10
11
  Layout/LineLength:
@@ -94,12 +95,6 @@ Layout/EmptyLinesAroundModuleBody:
94
95
  Layout/EmptyLineBetweenDefs:
95
96
  Enabled: false
96
97
 
97
- # I personally don't care about the format style.
98
- # In most cases I like to use %, but not at the point I want to enforce it
99
- # as a convention in the entire code.
100
- Style/FormatString:
101
- Enabled: false
102
-
103
98
  # Annotated tokens (like %<foo>s) are a good thing, but in most cases we don't need them.
104
99
  # %s is a simpler and straightforward version that works in almost all cases. So don't complain.
105
100
  Style/FormatStringToken:
@@ -109,11 +104,6 @@ Style/FormatStringToken:
109
104
  Style/NegatedIf:
110
105
  Enabled: false
111
106
 
112
- # For years, %w() has been the de-facto standard. A lot of libraries are using ().
113
- # Switching to [] would be a nightmare.
114
- Style/PercentLiteralDelimiters:
115
- Enabled: false
116
-
117
107
  # There are cases were the inline rescue is ok. We can either downgrade the severity,
118
108
  # or rely on the developer judgement on a case-by-case basis.
119
109
  Style/RescueModifier:
@@ -122,17 +112,6 @@ Style/RescueModifier:
122
112
  Style/SymbolArray:
123
113
  EnforcedStyle: brackets
124
114
 
125
- # Sorry, but using trailing spaces helps readability.
126
- #
127
- # %w( foo bar )
128
- #
129
- # looks better to me than
130
- #
131
- # %w( foo bar )
132
- #
133
- Layout/SpaceInsidePercentLiteralDelimiters:
134
- Enabled: false
135
-
136
115
  # Hate It or Love It, I prefer double quotes as this is more consistent
137
116
  # with several other programming languages and the output of puts and inspect.
138
117
  Style/StringLiterals:
@@ -154,21 +133,3 @@ Style/TrivialAccessors:
154
133
  # end
155
134
  #
156
135
  IgnoreClassMethods: true
157
-
158
- # New cops
159
- # See https://docs.rubocop.org/en/latest/versioning/
160
-
161
- Lint/RaiseException:
162
- Enabled: true
163
-
164
- Lint/StructNewOverride:
165
- Enabled: true
166
-
167
- Style/HashEachMethods:
168
- Enabled: true
169
-
170
- Style/HashTransformKeys:
171
- Enabled: true
172
-
173
- Style/HashTransformValues:
174
- Enabled: true
data/CHANGELOG.md CHANGED
@@ -3,6 +3,33 @@
3
3
  This project uses [Semantic Versioning 2.0.0](https://semver.org/).
4
4
 
5
5
 
6
+ ## 5.0.0
7
+
8
+ ### Changed
9
+
10
+ - Minimum Ruby version is 2.6
11
+
12
+ - Updated definitions.
13
+
14
+
15
+ ## 4.0.7
16
+
17
+ ### Fixes
18
+
19
+ - Fixed YARD rake task (GH-179)
20
+
21
+ ### Changed
22
+
23
+ - Updated definitions.
24
+
25
+
26
+ ## 4.0.6
27
+
28
+ ### Changed
29
+
30
+ - Updated definitions.
31
+
32
+
6
33
  ## 4.0.5
7
34
 
8
35
  ### Changed
data/Gemfile CHANGED
@@ -6,10 +6,9 @@ gemspec
6
6
 
7
7
  gem "rake"
8
8
 
9
- gem "codecov", require: false
10
9
  gem "memory_profiler", require: false
11
10
  gem "minitest"
12
11
  gem "minitest-reporters"
13
12
  gem "mocha"
14
- gem "rubocop", "0.81.0", require: false
13
+ gem "rubocop", require: false
15
14
  gem "yard"
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009-2020 Simone Carletti <weppos@weppos.net>
1
+ Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <tt>PublicSuffix</tt> is a Ruby domain name parser based on the [Public Suffix List](https://publicsuffix.org/).
4
4
 
5
- [![Build Status](https://travis-ci.com/weppos/publicsuffix-ruby.svg?branch=master)](https://travis-ci.com/weppos/publicsuffix-ruby)
5
+ [![Build Status](https://github.com/weppos/publicsuffix-ruby/actions/workflows/tests.yml/badge.svg)](https://github.com/weppos/publicsuffix-ruby/actions/workflows/tests.yml)
6
6
  [![Tidelift dependencies](https://tidelift.com/badges/package/rubygems/public_suffix)](https://tidelift.com/subscription/pkg/rubygems-public-suffix?utm_source=rubygems-public-suffix&utm_medium=referral&utm_campaign=enterprise)
7
7
 
8
8
 
@@ -16,7 +16,7 @@
16
16
 
17
17
  ## Requirements
18
18
 
19
- <tt>PublicSuffix</tt> requires **Ruby >= 2.3**. For an older versions of Ruby use a previous release.
19
+ <tt>PublicSuffix</tt> requires **Ruby >= 2.6**. For an older versions of Ruby use a previous release.
20
20
 
21
21
 
22
22
  ## Installation
@@ -202,6 +202,16 @@ See the [CHANGELOG.md](CHANGELOG.md) file for details.
202
202
 
203
203
  ## License
204
204
 
205
- Copyright (c) 2009-2020 Simone Carletti. This is Free Software distributed under the MIT license.
205
+ Copyright (c) 2009-2022 Simone Carletti. This is Free Software distributed under the MIT license.
206
206
 
207
207
  The [Public Suffix List source](https://publicsuffix.org/list/) is subject to the terms of the Mozilla Public License, v. 2.0.
208
+
209
+ ## Definitions
210
+
211
+ tld = Top level domain, this is in reference to the last segment of a domain, sometimes the part that is directly after the "dot" symbol. For example, `mozilla.org`, the `.org` portion is the tld.
212
+
213
+ sld = Second level domain, a domain that is directly below a top-level domain. For example, in `https://www.mozilla.org/en-US/`, `mozilla` is the second-level domain of the .org tld.
214
+
215
+ trd = Transit routing domain, or known as a subdomain. This is the part of the domain that is before the sld or root domain. For example, in `https://www.mozilla.org/en-US/`, `www` is the trd.
216
+
217
+ FQDN = Fully Qualified Domain Names, are domain names that are written with the hostname and the domain name, and include the top-level domain, the format looks like `[hostname].[domain].[tld].` for ex. `[www].[mozilla].[org]`.
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ task default: [:test, :rubocop]
9
9
  require "rake/testtask"
10
10
 
11
11
  Rake::TestTask.new do |t|
12
- t.libs = %w( lib test )
12
+ t.libs = %w[lib test]
13
13
  t.pattern = "test/**/*_test.rb"
14
14
  t.verbose = !ENV["VERBOSE"].nil?
15
15
  t.warning = !ENV["WARNING"].nil?
@@ -20,6 +20,7 @@ require "rubocop/rake_task"
20
20
  RuboCop::RakeTask.new
21
21
 
22
22
 
23
+ require "yard"
23
24
  require "yard/rake/yardoc_task"
24
25
 
25
26
  YARD::Rake::YardocTask.new(:yardoc) do |y|
@@ -41,10 +42,10 @@ desc "Downloads the Public Suffix List file from the repository and stores it lo
41
42
  task :"update-list" do
42
43
  require "net/http"
43
44
 
44
- DEFINITION_URL = "https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat"
45
+ definition_url = "https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat"
45
46
 
46
47
  File.open("data/list.txt", "w+") do |f|
47
- response = Net::HTTP.get_response(URI.parse(DEFINITION_URL))
48
+ response = Net::HTTP.get_response(URI.parse(definition_url))
48
49
  response.body
49
50
  f.write(response.body)
50
51
  end