public_suffix 4.0.7 → 5.0.1

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: 4ea7129dc0659a87fad96459afefddaafdb4280eac62895e036ce1e2bcf14d91
4
- data.tar.gz: a335705e6ba76d959f52b3e4acea7be1f97c472af3b05a34cd15bae9a3301582
3
+ metadata.gz: e2d5eae634d5527c967fb66edc14fda9861075c30ba6101cbf8b315228b1dbea
4
+ data.tar.gz: a88c678e28311664491be49296d5a349e89a1beb9039bf16ebca48b5c62ff8f1
5
5
  SHA512:
6
- metadata.gz: 1d1a8d2f55e733e6f2ed7f7ed233cda997e55b0838b2926488c15e86586a72329ee2392af7ccc94dd3a5b04c60f3bbd0358fe38c0f4e82e0c13ae513a0dafdf4
7
- data.tar.gz: aced9afff807ed3c71457871d68b56f7288cff8e5379da534f9deccea735ca1911074b7f300795f021e7b17a1ccf4ced27630efd3d1dd667c10a998b611fb71c
6
+ metadata.gz: 2463aad10f4e27ecd886e0bbe566557a8048b325ea8d6f175467954dd8d0d808c5857847d4e9665ec2771eaef562220336686dc73c0b37f49caf2a15f1b121cc
7
+ data.tar.gz: f5c5717c0cf2ff90a88899d6c026e61bb5b802350c9dcbab1e26db2abbb3a0b073b86ec0f1b9411acd742ccd2fdd69366fd0154839850f15203e0c2a1575b039
@@ -1,8 +1,19 @@
1
1
  version: 2
2
2
  updates:
3
- - package-ecosystem: bundler
4
- directory: "/"
5
- schedule:
6
- interval: daily
7
- time: "04:00"
8
- open-pull-requests-limit: 10
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "04:00"
8
+ open-pull-requests-limit: 10
9
+ labels:
10
+ - dependencies
11
+
12
+ - package-ecosystem: "github-actions"
13
+ directory: "/"
14
+ schedule:
15
+ interval: "daily"
16
+ time: "04:00"
17
+ open-pull-requests-limit: 10
18
+ labels:
19
+ - dependencies
@@ -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 }}"
@@ -1,16 +1,18 @@
1
- name: release
1
+ name: Release
2
2
 
3
3
  on:
4
4
  push:
5
5
  tags:
6
6
  - v*.*.*
7
+
7
8
  jobs:
8
9
  release:
9
10
  runs-on: ubuntu-latest
10
11
  steps:
11
- - uses: actions/checkout@v2
12
+ - name: Checkout
13
+ uses: actions/checkout@v3
12
14
  - name: Release Gem
13
- uses: cadwallion/publish-rubygems-action@8f9e0538302643309e4e43bf48cd34173ca48cfc
15
+ uses: cadwallion/publish-rubygems-action@d9474d9633f4674e59afb0c343f2dafe25181328
14
16
  env:
15
17
  RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
16
18
  RELEASE_COMMAND: rake release
@@ -6,7 +6,7 @@ on:
6
6
  workflow_dispatch:
7
7
 
8
8
  jobs:
9
- build:
9
+ test:
10
10
  strategy:
11
11
  matrix:
12
12
  ruby-version:
@@ -14,15 +14,16 @@ jobs:
14
14
  - "2.7"
15
15
  - "3.0"
16
16
  - "3.1"
17
- platform: [ubuntu-latest]
18
- runs-on: ${{ matrix.platform }}
17
+ runs-on: ubuntu-latest
19
18
  steps:
20
- - uses: actions/checkout@v2
19
+ - name: Checkout
20
+ uses: actions/checkout@v3
21
21
  - name: Set up Ruby
22
22
  uses: ruby/setup-ruby@v1
23
23
  with:
24
24
  ruby-version: ${{ matrix.ruby-version }}
25
- - name: Install dependencies
26
- run: bundle install
25
+ bundler-cache: true
26
+ - name: Rubocop
27
+ run: bundle exec rake rubocop
27
28
  - name: Run tests
28
- run: bundle exec rake
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:
@@ -15,12 +15,6 @@ Layout/LineLength:
15
15
  - 'test/**/*_test.rb'
16
16
  Max: 100
17
17
 
18
- Lint/ConstantDefinitionInBlock:
19
- Exclude:
20
- - 'Rakefile'
21
- - 'spec/**/*'
22
- - 'test/**/*'
23
-
24
18
  # [codesmell]
25
19
  Metrics/AbcSize:
26
20
  Enabled: false
@@ -101,12 +95,6 @@ Layout/EmptyLinesAroundModuleBody:
101
95
  Layout/EmptyLineBetweenDefs:
102
96
  Enabled: false
103
97
 
104
- # I personally don't care about the format style.
105
- # In most cases I like to use %, but not at the point I want to enforce it
106
- # as a convention in the entire code.
107
- Style/FormatString:
108
- Enabled: false
109
-
110
98
  # Annotated tokens (like %<foo>s) are a good thing, but in most cases we don't need them.
111
99
  # %s is a simpler and straightforward version that works in almost all cases. So don't complain.
112
100
  Style/FormatStringToken:
@@ -116,11 +104,6 @@ Style/FormatStringToken:
116
104
  Style/NegatedIf:
117
105
  Enabled: false
118
106
 
119
- # For years, %w() has been the de-facto standard. A lot of libraries are using ().
120
- # Switching to [] would be a nightmare.
121
- Style/PercentLiteralDelimiters:
122
- Enabled: false
123
-
124
107
  # There are cases were the inline rescue is ok. We can either downgrade the severity,
125
108
  # or rely on the developer judgement on a case-by-case basis.
126
109
  Style/RescueModifier:
@@ -129,17 +112,6 @@ Style/RescueModifier:
129
112
  Style/SymbolArray:
130
113
  EnforcedStyle: brackets
131
114
 
132
- # Sorry, but using trailing spaces helps readability.
133
- #
134
- # %w( foo bar )
135
- #
136
- # looks better to me than
137
- #
138
- # %w( foo bar )
139
- #
140
- Layout/SpaceInsidePercentLiteralDelimiters:
141
- Enabled: false
142
-
143
115
  # Hate It or Love It, I prefer double quotes as this is more consistent
144
116
  # with several other programming languages and the output of puts and inspect.
145
117
  Style/StringLiterals:
data/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  This project uses [Semantic Versioning 2.0.0](https://semver.org/).
4
4
 
5
+ ## 5.0.1
6
+
7
+ ### Changed
8
+
9
+ - Updated definitions.
10
+
11
+
12
+ ## 5.0.0
13
+
14
+ ### Changed
15
+
16
+ - Minimum Ruby version is 2.6
17
+
18
+ - Updated definitions.
19
+
5
20
 
6
21
  ## 4.0.7
7
22
 
data/Gemfile CHANGED
@@ -9,6 +9,6 @@ gem "rake"
9
9
  gem "memory_profiler", require: false
10
10
  gem "minitest"
11
11
  gem "minitest-reporters"
12
- gem "mocha"
13
- gem "rubocop", "~>0.90", require: false
12
+ gem "mocha", "~> 2.0.1"
13
+ gem "rubocop", require: false
14
14
  gem "yard"
data/README.md CHANGED
@@ -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
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?
@@ -42,10 +42,10 @@ desc "Downloads the Public Suffix List file from the repository and stores it lo
42
42
  task :"update-list" do
43
43
  require "net/http"
44
44
 
45
- 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"
46
46
 
47
47
  File.open("data/list.txt", "w+") do |f|
48
- response = Net::HTTP.get_response(URI.parse(DEFINITION_URL))
48
+ response = Net::HTTP.get_response(URI.parse(definition_url))
49
49
  response.body
50
50
  f.write(response.body)
51
51
  end