maid 0.10.0.pre.alpha.3 → 0.11.0
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.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +14 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/.github/workflows/coverage.yml +3 -3
- data/.github/workflows/lint.yml +9 -1
- data/.github/workflows/merge-gatekeeper.yml +20 -0
- data/.github/workflows/release.yml +13 -20
- data/.github/workflows/stale.yml +25 -0
- data/.github/workflows/test.yml +8 -7
- data/.gitignore +1 -1
- data/.release-please-manifest.json +1 -1
- data/.rubocop.yml +3 -1
- data/.rubocop_todo.yml +105 -107
- data/.ruby-version +1 -1
- data/CHANGELOG.md +23 -0
- data/Dockerfile +13 -0
- data/Gemfile.lock +226 -0
- data/Guardfile +2 -0
- data/README.md +82 -49
- data/Rakefile +9 -0
- data/SECURITY.md +29 -0
- data/fixtures/files/test_rules.rb +3 -0
- data/fixtures/vcr_cassettes/Dependency_expectations/Geocoder/translates_latitude_and_longitude_into_street_addresses.yml +42 -0
- data/fixtures/vcr_cassettes/Maid_Tools/_location_city/given_a_JPEG_image/reports_the_known_location.yml +42 -0
- data/lib/maid/logger/logger.rb +63 -0
- data/lib/maid/maid.rb +6 -22
- data/lib/maid/repeat.rb +2 -2
- data/lib/maid/rule.rb +2 -2
- data/lib/maid/rule_container.rb +2 -2
- data/lib/maid/tools.rb +3 -3
- data/lib/maid/trash_migration.rb +2 -0
- data/lib/maid/version.rb +1 -1
- data/lib/maid/watch.rb +2 -2
- data/lib/maid.rb +3 -2
- data/maid.gemspec +14 -9
- data/release-please-config.json +18 -0
- data/script/docker-test +7 -0
- data/spec/dependency_spec.rb +1 -1
- data/spec/fakefs_helper.rb +13 -0
- data/spec/lib/maid/logger/logger_spec.rb +64 -0
- data/spec/lib/maid/maid_spec.rb +113 -103
- data/spec/lib/maid/rake/single_rule_spec.rb +1 -1
- data/spec/lib/maid/tools_spec.rb +384 -225
- data/spec/lib/maid/trash_migration_spec.rb +7 -5
- data/spec/spec_helper.rb +17 -1
- metadata +124 -44
- data/Vagrantfile +0 -14
- data/script/vagrant-provision +0 -43
- data/script/vagrant-test +0 -7
- data/script/vagrant-test-all +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c4204200ab04dcec0fad2cc364c70f9901b777f489ee2d3d1779e05d41e836a
|
4
|
+
data.tar.gz: 0bdd56e20b4439cd36df8beacf632a6d9432d66173c0202e2b3d772395ee8035
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1e07b28f9f173f2954f53f343779298c51cabd3e3a3dae491a27d5dd0fccf17adb6a9edb7ef93556b225f68515f88af7d05d6db8ec81690dec8252b6a44b0a5
|
7
|
+
data.tar.gz: 1654a1358b0653902168abfe5113e45bafbfa44b9dcbfebb64d73daf79a2a3b7fdde2225ecfa54e0c39f762e4a1e0f0b42f60ee2f53afa77f1dd464928901ee8
|
data/.github/FUNDING.yml
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# # These are supported funding model platforms
|
2
|
+
#
|
3
|
+
# github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
4
|
+
# patreon: # Replace with a single Patreon username
|
5
|
+
# open_collective: # Replace with a single Open Collective username
|
6
|
+
# ko_fi: # Replace with a single Ko-fi username
|
7
|
+
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
8
|
+
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
9
|
+
# liberapay: # Replace with a single Liberapay username
|
10
|
+
# issuehunt: # Replace with a single IssueHunt username
|
11
|
+
# lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
12
|
+
# polar: # Replace with a single Polar username
|
13
|
+
buy_me_a_coffee: "benjaminoakes"
|
14
|
+
# custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a report to help us improve
|
4
|
+
title: "<Short description of the issue>"
|
5
|
+
labels: bug
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**👋 Before reporting a bug, please make sure you're running the latest available version of maid (`gem install maid`).**
|
11
|
+
|
12
|
+
**👋 If you're using Ruby 2.7+, please make sure you're running maid v0.10.0+ (`gem install maid --pre`)**
|
13
|
+
|
14
|
+
**Describe the bug**
|
15
|
+
A clear and concise description of what the bug is.
|
16
|
+
|
17
|
+
**To Reproduce**
|
18
|
+
Steps to trigger the issue.
|
19
|
+
|
20
|
+
**Expected behavior**
|
21
|
+
A clear and concise description of what you expected to happen.
|
22
|
+
|
23
|
+
**Logs**
|
24
|
+
If applicable, add logs to help explain your problem. You can find the logs at `~/.maid/maid.log`.
|
25
|
+
|
26
|
+
**Environment (please complete the information):**
|
27
|
+
- Maid version (`maid --version`): `<enter the command's output here>`
|
28
|
+
- OS, distribution (Linux), and version: <examples: OSX 12.0.0/Linux Mint 20.3>
|
29
|
+
- Ruby version (`ruby --version`): `<enter the command's output here>`
|
30
|
+
|
31
|
+
**Minimal `rules.rb` to reproduce the issue:**
|
32
|
+
```ruby
|
33
|
+
# Rule(s)
|
34
|
+
```
|
35
|
+
|
36
|
+
**Additional context**
|
37
|
+
Add any other context about the problem here.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
name: Feature request
|
3
|
+
about: Suggest an idea for this project
|
4
|
+
title: ''
|
5
|
+
labels: feature
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
12
|
+
|
13
|
+
**Describe the solution you'd like**
|
14
|
+
A clear and concise description of what you want to happen.
|
15
|
+
|
16
|
+
**Describe alternatives you've considered**
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
18
|
+
|
19
|
+
**Additional context**
|
20
|
+
Add any other context or screenshots about the feature request here.
|
@@ -3,7 +3,7 @@ name: Code coverage
|
|
3
3
|
on:
|
4
4
|
push:
|
5
5
|
branches:
|
6
|
-
master
|
6
|
+
- master
|
7
7
|
pull_request:
|
8
8
|
branches:
|
9
9
|
- master
|
@@ -12,7 +12,7 @@ jobs:
|
|
12
12
|
code-climate:
|
13
13
|
runs-on: ubuntu-latest
|
14
14
|
steps:
|
15
|
-
- uses: actions/checkout@
|
15
|
+
- uses: actions/checkout@v4
|
16
16
|
- name: Set up Ruby
|
17
17
|
uses: ruby/setup-ruby@v1
|
18
18
|
with:
|
@@ -26,4 +26,4 @@ jobs:
|
|
26
26
|
env:
|
27
27
|
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_KEY }}
|
28
28
|
COVERAGE: true
|
29
|
-
|
29
|
+
ISOLATED: true
|
data/.github/workflows/lint.yml
CHANGED
@@ -12,7 +12,7 @@ jobs:
|
|
12
12
|
rubocop:
|
13
13
|
runs-on: ubuntu-latest
|
14
14
|
steps:
|
15
|
-
- uses: actions/checkout@
|
15
|
+
- uses: actions/checkout@v4
|
16
16
|
- name: Set up Ruby
|
17
17
|
uses: ruby/setup-ruby@v1
|
18
18
|
with:
|
@@ -22,3 +22,11 @@ jobs:
|
|
22
22
|
run: bundle install
|
23
23
|
- name: Run lint
|
24
24
|
run: bundle exec rubocop
|
25
|
+
shellcheck:
|
26
|
+
runs-on: ubuntu-latest
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v4
|
29
|
+
- name: Install Shellcheck
|
30
|
+
run: sudo apt install shellcheck -y
|
31
|
+
- name: Run shellcheck
|
32
|
+
run: shellcheck -x script/*
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
name: Merge Gatekeeper
|
3
|
+
|
4
|
+
on:
|
5
|
+
pull_request:
|
6
|
+
branches:
|
7
|
+
- main
|
8
|
+
- master
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
merge-gatekeeper:
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
permissions:
|
14
|
+
checks: read
|
15
|
+
statuses: read
|
16
|
+
steps:
|
17
|
+
- name: Run Merge Gatekeeper
|
18
|
+
uses: upsidr/merge-gatekeeper@v1
|
19
|
+
with:
|
20
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
@@ -13,42 +13,35 @@ jobs:
|
|
13
13
|
release-please:
|
14
14
|
runs-on: ubuntu-latest
|
15
15
|
steps:
|
16
|
-
- uses: actions/checkout@
|
16
|
+
- uses: actions/checkout@v4
|
17
17
|
- name: Prepare release
|
18
18
|
id: release
|
19
|
-
uses:
|
19
|
+
uses: googleapis/release-please-action@v4
|
20
20
|
with:
|
21
|
-
release-type: ruby
|
22
|
-
package-name: maid
|
23
|
-
# Major bump is minor instead pre-1.0.0
|
24
|
-
bump-minor-pre-major: true
|
25
|
-
# Minor bump is patch instead pre-1.0.0
|
26
|
-
bump-patch-for-minor-pre-major: true
|
27
|
-
# Don't parse commits before this one as they don't follow the
|
28
|
-
# conventional commit format AND don't have `release-please`
|
29
|
-
# COMMIT_MESSAGE_OVERRIDE data.
|
30
|
-
# (https://www.conventionalcommits.org/en/v1.0.0/#summary)
|
31
|
-
bootstrap-sha: 0a6ff8abc6db00aca181d6bfed9751e332900ac9
|
32
|
-
# This is the last release before starting to use release-please
|
33
|
-
last-release-sha: 0a6ff8abc6db00aca181d6bfed9751e332900ac9
|
34
|
-
version-file: lib/maid/version.rb
|
35
21
|
# Don't use GITHUB_TOKEN because this doesn't allow workflows to
|
36
22
|
# trigger workflows; it leave the `release-please`-generated PR with
|
37
23
|
# pending checks as they're never started.
|
38
24
|
token: ${{ secrets.BOT_GH_TOKEN }}
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
release-as: v0.10.0-alpha.3
|
25
|
+
config-file: release-please-config.json
|
26
|
+
manifest-file: .release-please-manifest.json
|
27
|
+
|
43
28
|
- name: Set up Ruby
|
44
29
|
uses: ruby/setup-ruby@v1
|
45
30
|
with:
|
46
31
|
# ruby-version derived from .ruby-version file
|
47
32
|
bundler-cache: true
|
33
|
+
if: ${{ steps.release.outputs.release_created }}
|
34
|
+
|
48
35
|
- name: Install dependencies
|
49
36
|
run: bundle install
|
37
|
+
if: ${{ steps.release.outputs.release_created }}
|
38
|
+
|
50
39
|
- name: Run tests
|
51
40
|
run: bundle exec rake
|
41
|
+
env:
|
42
|
+
ISOLATED: true
|
43
|
+
if: ${{ steps.release.outputs.release_created }}
|
44
|
+
|
52
45
|
- name: Publish gem
|
53
46
|
run: |
|
54
47
|
mkdir -p $HOME/.gem
|
@@ -0,0 +1,25 @@
|
|
1
|
+
name: 'Close stale issues and PRs'
|
2
|
+
on:
|
3
|
+
schedule:
|
4
|
+
- cron: '30 1 * * *'
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
stale:
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
steps:
|
10
|
+
- uses: actions/stale@v8
|
11
|
+
with:
|
12
|
+
days-before-stale: 30
|
13
|
+
days-before-close: 7
|
14
|
+
stale-issue-message: >-
|
15
|
+
This issue has been open for 30 days without any activity. Remove
|
16
|
+
`no-issue-activity` label or comment to avoid automatic closure in
|
17
|
+
7 days.
|
18
|
+
stale-pr-message: >-
|
19
|
+
This PR has been open for 30 days without any activity. Remove
|
20
|
+
`no-pr-activity` label or comment to avoid automatic closure in 7
|
21
|
+
days.
|
22
|
+
stale-issue-label: 'no-issue-activity'
|
23
|
+
any-of-labels: 'needs-info'
|
24
|
+
stale-pr-label: 'no-pr-activity'
|
25
|
+
exempt-pr-labels: 'awaiting-approval,work-in-progress'
|
data/.github/workflows/test.yml
CHANGED
@@ -15,16 +15,15 @@ jobs:
|
|
15
15
|
os:
|
16
16
|
- ubuntu-20.04
|
17
17
|
- ubuntu-22.04
|
18
|
-
- macos-
|
19
|
-
- macos-
|
18
|
+
- macos-14
|
19
|
+
- macos-15
|
20
20
|
ruby-version:
|
21
|
-
- 2
|
22
|
-
- 3.
|
23
|
-
- 3.
|
24
|
-
- 3.2
|
21
|
+
- "3.2"
|
22
|
+
- "3.3"
|
23
|
+
- "3.4"
|
25
24
|
runs-on: ${{ matrix.os }}
|
26
25
|
steps:
|
27
|
-
- uses: actions/checkout@
|
26
|
+
- uses: actions/checkout@v4
|
28
27
|
- name: Set up Ruby
|
29
28
|
uses: ruby/setup-ruby@v1
|
30
29
|
with:
|
@@ -34,3 +33,5 @@ jobs:
|
|
34
33
|
run: bundle install
|
35
34
|
- name: Run tests
|
36
35
|
run: bundle exec rake
|
36
|
+
env:
|
37
|
+
ISOLATED: true
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -3,6 +3,7 @@ inherit_from: .rubocop_todo.yml
|
|
3
3
|
|
4
4
|
require:
|
5
5
|
- rubocop-rake
|
6
|
+
plugins:
|
6
7
|
- rubocop-rspec
|
7
8
|
|
8
9
|
AllCops:
|
@@ -10,8 +11,9 @@ AllCops:
|
|
10
11
|
Exclude:
|
11
12
|
- "bin/*"
|
12
13
|
- "vendor/bundle/**/*" # when running on GH Actions
|
14
|
+
- ".vagrant/**/*"
|
13
15
|
NewCops: enable
|
14
|
-
TargetRubyVersion: 2
|
16
|
+
TargetRubyVersion: "3.2"
|
15
17
|
|
16
18
|
Metrics/BlockLength:
|
17
19
|
Exclude:
|