Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSL auto-update #3

Open
wants to merge 471 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
471 commits
Select commit Hold shift + click to select a range
1c4f0ca
Optimize space by removing duplicate rule value
weppos Jan 24, 2017
ac39e08
Allocation comparison with master is way lowe
weppos Jan 24, 2017
24ad179
Restructure Rule initialization
weppos Jan 24, 2017
d363dbe
Introduce Entry internal object
weppos Jan 24, 2017
b7fec8b
Simplify reference to list path
weppos Jan 28, 2017
582efe5
Change bm_find.rb benchmark to not run on private rules
weppos Feb 9, 2017
740d78c
Work around some limitations of ObjectSpace.memsize_of
weppos Feb 9, 2017
c3e05d5
Fix outdated namespace
weppos Feb 9, 2017
4d98521
Measure the list size
weppos Feb 9, 2017
fff9739
Cleanup docs
weppos Feb 9, 2017
498e19b
Merge branch 'master' into thesis-hash
weppos Feb 9, 2017
482f534
The Hash implementation has no longer indexes
weppos Feb 9, 2017
8f241cc
Add # of rules in the benchmark info
weppos Feb 9, 2017
dd82821
Make ObjectBinsize run the demo by default
weppos Feb 9, 2017
2a79a0f
Merge branch 'master' into thesis-hash
weppos Feb 9, 2017
c6560dc
Dropped support for Ruby < 2.1
weppos Feb 9, 2017
f1abbd3
Remove unnecessary string allocations
weppos Feb 9, 2017
c45dc94
Merge pull request #133 from weppos/thesis-hash
weppos Feb 10, 2017
7b600f3
[DOCS] corrects param name in List#parse
typeoneerror Mar 25, 2017
eae246a
Merge pull request #135 from typeoneerror/hotfix-docs-typo
weppos Mar 25, 2017
52b2343
Update list
weppos Apr 10, 2017
578737c
Rubocop 0.48.1 is buggy
weppos Apr 10, 2017
bb12e71
Improve and correct documentation
pjg Jun 9, 2017
66698da
Create README.md
weppos Jun 10, 2017
86721b2
Merge pull request #140 from pjg/improve-documentation-and-code-comments
weppos Jun 10, 2017
16a502f
Add PSL license info to the README (closes GH-137)
weppos Jun 28, 2017
6f175d6
Fix rubocop new preferences
weppos Aug 4, 2017
97ef80b
Update definitions
weppos Aug 4, 2017
995e9e5
Updated CHANGELOG information about GH-133
weppos Aug 4, 2017
3a8a8c5
Release 3.0.0
weppos Aug 4, 2017
a157c3d
Update Travis config
weppos Aug 4, 2017
dc7702d
2.0 is no longer supported
weppos Aug 4, 2017
03436a8
Fix wrong docs
weppos Oct 31, 2017
f1b3142
Fix Rubocop offenses
weppos Oct 31, 2017
ad6a326
Improve performance and avoid allocation.
Nov 8, 2017
1c6742f
Merge pull request #146 from clearbit/master
weppos Nov 8, 2017
8a2baf1
Updated definitions
weppos Nov 8, 2017
d63f20c
Changelog for GH-146
weppos Nov 8, 2017
0c0561d
Release 3.0.1
weppos Nov 8, 2017
844f898
Update Rubocop
weppos Feb 12, 2018
15d1739
Test against 2.5 (closes GH-148)
weppos Feb 12, 2018
da7b20b
Update definitions
weppos Feb 12, 2018
65ab7c9
Release 3.0.2
weppos Feb 12, 2018
8bbd236
Update docblock
weppos Jun 11, 2018
8841e49
Update .rubocop_defaults.yml (#153)
jonhue Jun 26, 2018
4556aa4
Fix Rubocop new warnings
weppos Jun 26, 2018
a9feb70
Update definitions (#154)
wcmonty Aug 15, 2018
93aad6a
Release 3.0.3
weppos Aug 15, 2018
65e7b5f
Update .travis.yml
weppos Oct 29, 2018
38b89a9
Switch to CodeCov
weppos Oct 29, 2018
f749c1a
Fix offenses
weppos Oct 29, 2018
916d013
Fix typo in comment (#159)
pcai Apr 25, 2019
f05f156
Make Travis happy
weppos Apr 25, 2019
1fb5578
Upgrade Bundler
weppos Apr 25, 2019
1f10154
Minimum Ruby version is 2.3
weppos Apr 25, 2019
2803479
Fix version mismatch
weppos Apr 25, 2019
d3ea96c
Upgrade to Rubocop 0.70
weppos May 27, 2019
245836e
Update definitions list (#160)
GQuirino May 27, 2019
22ce7d5
Release 3.1.0
weppos May 27, 2019
732a651
Fix version in README
weppos May 27, 2019
34046e3
Update PSL
weppos Jun 25, 2019
ae7cf82
Reinstate support to Ruby 2.1 and 2.2
weppos Jun 25, 2019
ed7c414
Release 3.1.1
weppos Jun 25, 2019
d6e4914
Remove support for Ruby < 2.3 in major version
weppos Jun 25, 2019
87343b8
Release 4.0.0
weppos Jun 25, 2019
27d9ff9
Test Ruby 2.7
weppos Jun 25, 2019
3648a1c
Create FUNDING.yml
weppos Jun 26, 2019
da7f5a8
Add Tidelift link
weppos Aug 9, 2019
76bb080
Updated definitions
weppos Aug 9, 2019
1a17386
Release 4.0.1
weppos Aug 9, 2019
e03a267
Update CHANGELOG.md
weppos Aug 23, 2019
894cceb
Create SECURITY.md
weppos Aug 23, 2019
3d6b74c
Update README.md
weppos Aug 23, 2019
626883d
Release 4.0.2
weppos Dec 27, 2019
af3244f
Update rubocop
weppos Dec 27, 2019
ec6bc1d
Experiment with https://keepachangelog.com/
weppos Dec 27, 2019
d076009
Update .travis.yml
weppos Jan 5, 2020
bac3a1d
Fix 2.7 deprecations and warnings (#168)
BrianHawley Jan 5, 2020
41f54ea
CHANGELOG for GH-167
weppos Jan 5, 2020
da650c8
Welcome 2020
weppos Jan 5, 2020
84fc0d1
Release 4.0.3
weppos Jan 5, 2020
c65e0e4
Move development dependencies from gemspec to Bundle
weppos Jan 31, 2020
c14c3ed
Sync up my Rubocop default file
weppos Jan 31, 2020
9947cca
Update definitions
weppos Jan 31, 2020
369b177
Update .gitignore
weppos Jan 31, 2020
b8f8145
Update README.md
weppos Feb 15, 2020
929532d
Update README.md
weppos Feb 15, 2020
16695da
Update SECURITY.md
weppos Feb 16, 2020
ee03cb4
Update rubocop requirement from 0.79.0 to 0.80.0 (#169)
dependabot-preview[bot] Feb 19, 2020
c6dcdf6
Update rubocop requirement from 0.80.0 to 0.80.1 (#170)
dependabot-preview[bot] Mar 3, 2020
da6e504
Update to Rubocop 0.81.0
weppos Apr 5, 2020
167552c
Update definitions
weppos Apr 5, 2020
a98db48
Release 4.0.3
weppos Apr 5, 2020
8d034e3
Update Travis badge link
weppos Apr 5, 2020
6f650da
Create codecov.yml
weppos Apr 7, 2020
6465387
Update definitions
weppos May 9, 2020
db463e5
Add project metadata to the gemspec (#172)
orien May 9, 2020
8eb07f7
Add CI workflow
weppos May 9, 2020
8ce9f8c
Update tests.yml
weppos May 9, 2020
4fc6126
Update tests.yml
weppos May 9, 2020
f0cc99e
Release 4.0.5
weppos May 9, 2020
c101bd5
Fix key duplication in codecov.yml (#175)
dduugg Aug 4, 2020
89c74b0
Updated definitions
weppos Sep 2, 2020
c61d25e
Update rubocop
weppos Sep 2, 2020
e3eedfd
Ignore rubocop cop
weppos Sep 2, 2020
a302119
Last release with 2.3
weppos Sep 2, 2020
2e0bee3
Release 4.0.6
weppos Sep 2, 2020
0898e5a
Add definitions section to README.md (#176)
cseeman Sep 2, 2020
ba72b15
Disable Lint/ConstantDefinitionInBlock in specs
weppos Sep 30, 2020
6fa9751
Disable Lint/ConstantDefinitionInBlock in Rakefile
weppos Sep 30, 2020
d6c251a
Create Dependabot config file (#178)
dependabot-preview[bot] Jan 6, 2021
c4c3012
Use instance_of? instead of comparing classes
Jan 6, 2021
db76aea
Disable Coverage
weppos Apr 30, 2021
f03cec8
Test with Ruby 3
weppos Apr 30, 2021
c50a052
CI: Remove EOL versions
Dec 3, 2021
47bee57
Format
Dec 3, 2021
450825e
Replace Travis with GitHub Actions
Dec 3, 2021
da31476
Delete .travis.yml
Dec 3, 2021
405c291
Add Ruby 3.1 to CI (#185)
petergoldstein Jan 10, 2022
434f0bd
Add release workflow
weppos Apr 12, 2022
b741b4f
Fixed YARD rake task
weppos Apr 12, 2022
f153a19
Update data list (#186)
wmontgomery-splunk Apr 12, 2022
0028a2f
Update definitions
weppos Apr 12, 2022
cfd3381
Update year
weppos Apr 12, 2022
071ba49
Release 4.0.7
weppos Apr 12, 2022
f5e7254
CI: use bundler-cache (#187)
olleolleolle Apr 12, 2022
2396b08
Update tests.yml
weppos Jul 14, 2022
fb74b44
Update tests.yml
weppos Jul 14, 2022
7e2008e
Setup autoupdate workflow
weppos Jul 24, 2022
a4a0f5a
Update release.yml
weppos Jul 24, 2022
ff46557
Update psl-update.yml
weppos Jul 24, 2022
b2e3932
Update psl-update.yml
weppos Jul 24, 2022
013e6d1
psl-update: Ensure pull request exclude vendor
weppos Jul 24, 2022
bf4d0f8
psl-update: Avoid changes being committed
weppos Jul 24, 2022
15d8497
psl-update: Avoid vendor changes being committed
weppos Jul 24, 2022
aa8ab9a
Updated list from source (#193)
github-actions[bot] Jul 24, 2022
5e3379b
Update rubocop
weppos Jul 24, 2022
0a0ad7d
Update workflowa
weppos Jul 24, 2022
4017771
Update tests.yml
weppos Jul 24, 2022
da5bbc7
Revert "Update rubocop"
weppos Jul 24, 2022
3696c1c
Restore Rubocop
weppos Jul 24, 2022
c36b40c
Upgrade Rubocop
weppos Jul 24, 2022
585e678
Upgrade Rubocop to 1.x
weppos Jul 24, 2022
3e32063
Release 5.0.0
weppos Jul 24, 2022
a9612d1
Updated list from source (#194)
github-actions[bot] Jul 29, 2022
94262be
Updated list from source (#195)
github-actions[bot] Aug 6, 2022
2d0c186
Updated list from source (#196)
github-actions[bot] Aug 16, 2022
d4077ae
Update dependabot.yml
weppos Aug 22, 2022
c62a0c8
Updated list from source (#198)
github-actions[bot] Sep 2, 2022
f86639f
Updated list from source (#199)
github-actions[bot] Sep 4, 2022
c101e0b
Updated list from source (#200)
github-actions[bot] Sep 16, 2022
4ebb6ea
Updated list from source (#201)
github-actions[bot] Sep 23, 2022
c495417
Updated list from source (#202)
github-actions[bot] Sep 28, 2022
c870183
Updated list from source (#203)
github-actions[bot] Oct 4, 2022
02b372a
Updated list from source (#204)
github-actions[bot] Oct 8, 2022
dae6552
Updated list from source (#205)
github-actions[bot] Oct 12, 2022
a3c6422
Updated list from source (#206)
github-actions[bot] Oct 13, 2022
3dc11d8
Updated list from source (#207)
github-actions[bot] Oct 14, 2022
2f606fd
Updated list from source (#208)
github-actions[bot] Oct 16, 2022
7fc5e5f
Updated list from source (#209)
github-actions[bot] Oct 21, 2022
aac50a4
Updated list from source (#210)
github-actions[bot] Oct 31, 2022
b88102c
Updated list from source (#211)
github-actions[bot] Nov 3, 2022
d002043
Lock mocha dependency
weppos Nov 3, 2022
dce8d77
Update mocha requirement from ~> 1.16.0 to ~> 2.0.1 (#212)
dependabot[bot] Nov 4, 2022
3e89be0
Updated list from source (#213)
github-actions[bot] Nov 5, 2022
b847179
Updated list from source (#214)
github-actions[bot] Nov 11, 2022
126f555
Bump cadwallion/publish-rubygems-action (#215)
dependabot[bot] Nov 15, 2022
5b8a29e
Updated list from source (#216)
github-actions[bot] Nov 16, 2022
0432e07
Updated list from source (#217)
github-actions[bot] Nov 23, 2022
e237cf5
Updated list from source (#219)
github-actions[bot] Nov 24, 2022
f4daa1a
Updated list from source (#220)
github-actions[bot] Nov 30, 2022
8985740
Release 5.0.1
weppos Dec 7, 2022
3fe4612
Updated list from source (#222)
github-actions[bot] Dec 9, 2022
bc53ab7
Add Ruby 3.2 to the CI matrix (#223)
petergoldstein Jan 26, 2023
668bda5
Updated list from source (#224)
github-actions[bot] Jan 31, 2023
3f811b3
Updated list from source (#225)
github-actions[bot] Feb 1, 2023
69a78ae
Updated list from source (#226)
github-actions[bot] Feb 9, 2023
d9d921e
Updated list from source (#227)
github-actions[bot] Feb 11, 2023
f0f0ac6
Updated list from source (#228)
github-actions[bot] Feb 20, 2023
bb3cbc4
Updated list from source (#229)
github-actions[bot] Feb 23, 2023
f332e64
Updated list from source (#231)
github-actions[bot] Feb 27, 2023
33daaef
Updated list from source (#232)
github-actions[bot] Feb 28, 2023
5af597a
Updated list from source (#233)
github-actions[bot] Mar 9, 2023
207e29b
Updated list from source (#235)
github-actions[bot] Mar 20, 2023
c3671ed
Updated list from source (#236)
github-actions[bot] Apr 12, 2023
5919f4b
Updated list from source (#238)
github-actions[bot] Apr 16, 2023
f8d9f8f
Updated list from source (#239)
github-actions[bot] Apr 27, 2023
907df69
Bump peter-evans/create-pull-request from 4 to 5 (#237)
dependabot[bot] Apr 28, 2023
cdb1cd2
Updated list from source (#240)
github-actions[bot] May 5, 2023
37dac97
README: Document how to add a custom domain to the list (#221)
andreynering May 12, 2023
3d5b07e
Updated list from source (#241)
github-actions[bot] Jun 8, 2023
baa3784
Updated list from source (#242)
github-actions[bot] Jun 12, 2023
1dc447d
Updated list from source (#243)
github-actions[bot] Jun 14, 2023
76e85e0
Updated list from source (#244)
github-actions[bot] Jun 15, 2023
3cc407c
Updated list from source (#245)
github-actions[bot] Jun 20, 2023
58a964e
Updated list from source (#247)
github-actions[bot] Jul 1, 2023
d673b2a
Updated list from source (#248)
github-actions[bot] Jul 3, 2023
2b46c08
Updated list from source (#249)
github-actions[bot] Jul 10, 2023
fe724c2
Update year
weppos Jul 11, 2023
d5739ad
Release 5.0.2
weppos Jul 11, 2023
0b06867
Fix Ruby release workflow
weppos Jul 11, 2023
1ac1ae4
Release 5.0.3
weppos Jul 11, 2023
6e1d94c
Update FUNDING.yml
weppos Jul 12, 2023
57e4d81
Updated list from source (#250)
github-actions[bot] Jul 18, 2023
00a8ec3
Fix spacing
weppos Jul 18, 2023
462b680
Update mocha requirement from ~> 2.0.1 to ~> 2.1.0 (#251)
dependabot[bot] Jul 28, 2023
66e252d
Updated list from source (#252)
github-actions[bot] Jul 30, 2023
650faae
Updated list from source (#253)
github-actions[bot] Aug 4, 2023
48d4759
Updated list from source (#254)
github-actions[bot] Aug 6, 2023
9e50afb
Updated list from source (#255)
github-actions[bot] Aug 11, 2023
251ae70
Updated list from source (#256)
github-actions[bot] Aug 25, 2023
3500941
Updated list from source (#257)
github-actions[bot] Aug 27, 2023
4883fbd
Reduce gem size (#258)
ybiquitous Aug 31, 2023
b0bde49
Update SECURITY.md
weppos Aug 31, 2023
e05b7a2
Update SECURITY.md
weppos Aug 31, 2023
2a84a64
Reorganize public_suffix.gemspec
weppos Aug 31, 2023
26e0fee
CHANGELOG for GH-259
weppos Aug 31, 2023
0616990
Bump actions/checkout from 3 to 4 (#260)
dependabot[bot] Sep 5, 2023
7729825
Updated list from source (#261)
github-actions[bot] Sep 18, 2023
892f94d
Updated list from source (#262)
github-actions[bot] Sep 20, 2023
8eda272
Updated list from source (#263)
github-actions[bot] Sep 26, 2023
df92b8c
Updated list from source (#264)
github-actions[bot] Oct 2, 2023
07ddcab
Updated list from source (#266)
github-actions[bot] Oct 19, 2023
df38193
Updated list from source (#267)
github-actions[bot] Nov 4, 2023
d8b853a
Updated list from source (#269)
github-actions[bot] Nov 9, 2023
a311826
Release 5.0.4
weppos Nov 17, 2023
a86b1e5
Update release.yml
weppos Nov 17, 2023
d500f07
Update release.yml
weppos Nov 17, 2023
30639a3
Updated list from source (#270)
github-actions[bot] Nov 20, 2023
b57b9e0
chore(changelog): fix wrong linked pull request (#271)
andreynering Nov 20, 2023
1a707b3
Updated list from source (#272)
github-actions[bot] Nov 21, 2023
0bdaf0f
Updated list from source (#273)
github-actions[bot] Nov 22, 2023
3a60e5e
Updated list from source (#274)
github-actions[bot] Dec 7, 2023
26d0eb9
Updated list from source (#275)
github-actions[bot] Dec 14, 2023
74189a3
Updated list from source (#276)
github-actions[bot] Jan 8, 2024
d7bd1be
Updated list from source (#277)
github-actions[bot] Jan 24, 2024
65c71b2
Updated list from source (#278)
github-actions[bot] Jan 25, 2024
629f05c
Updated list from source (#279)
github-actions[bot] Jan 29, 2024
94662e0
Updated list from source (#280)
github-actions[bot] Jan 31, 2024
ada7d78
Add Ruby 3.3 to CI matrix (#281)
m-nakamura145 Jan 31, 2024
30b3c88
Bump peter-evans/create-pull-request from 5 to 6 (#282)
dependabot[bot] Feb 1, 2024
6a3e271
Updated list from source (#283)
github-actions[bot] Feb 2, 2024
149a844
Updated list from source (#284)
github-actions[bot] Feb 5, 2024
4fc38de
Updated list from source (#285)
github-actions[bot] Feb 6, 2024
a245df3
Updated list from source (#286)
github-actions[bot] Feb 9, 2024
42cad0a
Updated list from source (#287)
github-actions[bot] Feb 19, 2024
f8555d3
Updated list from source (#288)
github-actions[bot] Mar 3, 2024
a82ae30
Updated list from source (#289)
github-actions[bot] Mar 27, 2024
185a93d
Merge branch 'moz' into master
abhishekk1903 Apr 2, 2024
b357766
Updated list from source
abhishekk1903 Apr 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed .gemtest
Empty file.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [weppos]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: "rubygems/public_suffix"
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with a single custom sponsorship URL
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
labels:
- dependencies

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "04:00"
open-pull-requests-limit: 10
labels:
- dependencies
38 changes: 38 additions & 0 deletions .github/workflows/psl-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: PSL Update

on:
workflow_dispatch:
schedule:
- cron: '40 6 * * *'

jobs:
update:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
bundler-cache: true

- name: Update PSL
run: bundle exec rake update-list

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: PSL auto-update
commit-message: Updated list from source
reviewers: weppos
add-paths: |
data/list.txt

- name: Check Pull Request
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release

on:
workflow_dispatch:
push:
tags:
- v*.*.*

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Release Gem
uses: cadwallion/publish-rubygems-action@94a6f4cd5350581749c569b5001eecc864e3ad0b
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
RELEASE_COMMAND: rake release
31 changes: 31 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Tests

on:
push:
pull_request:
workflow_dispatch:

jobs:
test:
strategy:
matrix:
ruby-version:
- "2.6"
- "2.7"
- "3.0"
- "3.1"
- "3.2"
- "3.3"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Rubocop
run: bundle exec rake rubocop
- name: Run tests
run: bundle exec rake test
13 changes: 5 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Bundler
.bundle
Gemfile.lock
pkg/*

# Rubinius
*.rbc
/.bundle
/Gemfile.lock
/pkg/*

# YARD
.yardoc
yardoc/
/.yardoc
/yardoc/
37 changes: 37 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
inherit_from:
- .rubocop_opinionated.yml

AllCops:
Exclude:
# Exclude .gemspec files because they are generally auto-generated
- '*.gemspec'
# Exclude vendored folders
- 'tmp/**/*'
- 'vendor/**/*'
# Exclude artifacts
- 'pkg/**/*'
# Other
- 'test/benchmarks/**/*'
- 'test/profilers/**/*'
TargetRubyVersion: 2.6

# I often use @_variable to avoid clashing.
Naming/MemoizedInstanceVariableName:
Enabled: false

Style/ClassAndModuleChildren:
Exclude:
- 'spec/**/*_spec.rb'
- 'test/**/*_test.rb'

# Dear Rubocop, I don't want to use String#strip_heredoc
Layout/HeredocIndentation:
Enabled: false

Style/WordArray:
Enabled: false
MinSize: 3

Style/SymbolArray:
Enabled: false
MinSize: 3
135 changes: 135 additions & 0 deletions .rubocop_opinionated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
AllCops:
Exclude:
# Exclude .gemspec files because they are generally auto-generated
- '*.gemspec'
# Exclude vendored folders
- 'tmp/**/*'
- 'vendor/**/*'
NewCops: enable

# [codesmell]
Layout/LineLength:
Enabled: false
Exclude:
- 'spec/**/*_spec.rb'
- 'test/**/*_test.rb'
Max: 100

# [codesmell]
Metrics/AbcSize:
Enabled: false
Exclude:
- 'spec/**/*_spec.rb'
- 'test/**/*_test.rb'

# [codesmell]
Metrics/BlockLength:
Enabled: false

# [codesmell]
Metrics/CyclomaticComplexity:
Enabled: false
Exclude:
- 'spec/**/*_spec.rb'
- 'test/**/*_test.rb'

# [codesmell]
Metrics/ClassLength:
Enabled: false
Exclude:
- 'spec/**/*_spec.rb'
- 'test/**/*_test.rb'

# [codesmell]
Metrics/MethodLength:
Enabled: false
Exclude:
- 'spec/**/*_spec.rb'
- 'test/**/*_test.rb'
Max: 10

# [codesmell]
Metrics/ModuleLength:
Enabled: false
Exclude:
- 'spec/**/*_spec.rb'
- 'test/**/*_test.rb'

# [codesmell]
Metrics/ParameterLists:
Enabled: false
Max: 5

# [codesmell]
Metrics/PerceivedComplexity:
Enabled: false

# Do not use "and" or "or" in conditionals, but for readability we can use it
# to chain executions. Just beware of operator order.
Style/AndOr:
EnforcedStyle: conditionals

Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'

# Double empty lines are useful to separate conceptually different methods
# in the same class or module.
Layout/EmptyLines:
Enabled: false

# In most cases, a space is nice. Sometimes, it's not.
# Just be consistent with the rest of the surrounding code.
Layout/EmptyLinesAroundClassBody:
Enabled: false

# In most cases, a space is nice. Sometimes, it's not.
# Just be consistent with the rest of the surrounding code.
Layout/EmptyLinesAroundModuleBody:
Enabled: false

# This is quite buggy, as it doesn't recognize double lines.
# Double empty lines are useful to separate conceptually different methods
# in the same class or module.
Layout/EmptyLineBetweenDefs:
Enabled: false

# Annotated tokens (like %<foo>s) are a good thing, but in most cases we don't need them.
# %s is a simpler and straightforward version that works in almost all cases. So don't complain.
Style/FormatStringToken:
Enabled: false

# unless is not always cool.
Style/NegatedIf:
Enabled: false

# There are cases were the inline rescue is ok. We can either downgrade the severity,
# or rely on the developer judgement on a case-by-case basis.
Style/RescueModifier:
Enabled: false

Style/SymbolArray:
EnforcedStyle: brackets

# Hate It or Love It, I prefer double quotes as this is more consistent
# with several other programming languages and the output of puts and inspect.
Style/StringLiterals:
EnforcedStyle: double_quotes

# It's nice to be consistent. The trailing comma also allows easy reordering,
# and doesn't cause a diff in Git when you add a line to the bottom.
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma

Style/TrivialAccessors:
# IgnoreClassMethods because I want to be able to define class-level accessors
# that sets an instance variable on the metaclass, such as:
#
# def self.default=(value)
# @default = value
# end
#
IgnoreClassMethods: true
1 change: 0 additions & 1 deletion .ruby-gemset

This file was deleted.

19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

52 changes: 52 additions & 0 deletions 2.0-Upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Welcome to PublicSuffix 2.0!

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.

This document documents the most relevant changes to help you upgrading from PublicSuffix 1.0 to 2.0.

## What's New

- 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`.
- `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.
- 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.

## Upgrade

When upgrading, here's the most relevant changes to keep an eye on:

- 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)`.
- `PublicSuffix::List.private_domains` is no longer available. Instead, you now have two ways to enable/disable the private domains:

1. At runtime, by using the `ignore_private` option

```ruby
PublicSuffix.domain("something.blogspot.com", ignore_private: true)
```

1. Loading a filtered list:

```ruby
# Disable support for private TLDs
PublicSuffix::List.default = PublicSuffix::List.parse(File.read(PublicSuffix::List::DEFAULT_LIST_PATH), private_domains: false)
# => "blogspot.com"
PublicSuffix.domain("something.blogspot.com")
# => "blogspot.com"
```
- 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:

```ruby
# 1.x:

PublicSuffix.valid?("google.commm")
# => false

# 2.x:

PublicSuffix.valid?("google.commm")
# => true

# Overriding 2.x behavior if needed:

PublicSuffix.valid?("google.commm", default_rule: nil)
# => false
````
Loading