maid 0.12.0 → 0.12.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ebc7fa231d81d30b4717ace2c4f25cb8930415d48c22b16977629de78ad96748
4
- data.tar.gz: 427f6c1b56b859df231de5c4e211e6b1af3177b8e78929afaac40eacff80e15a
3
+ metadata.gz: f384d8defa6722da1fc3bb11fc1a08ede64ab96e8dcb7c6f15f132c6da4ccafc
4
+ data.tar.gz: 4aca864dc81d3fa4b49d3c76318b79addde512f10602d0a9c0c6fd871fb49b73
5
5
  SHA512:
6
- metadata.gz: 45bd46b25645e716a0bdc4e334d77e16ba491e935717332417fccbe6c7357decdee5dc5ce555baba9ac80756513802865017da27a5b036454632a2b27152f0fc
7
- data.tar.gz: 1116b96df0b3d0f17d8762f107c26609d881242224685682adfc8b42b0a0de7adee930edba494202d41b42f46f60fd1826cb9e5c35a5ba3e2b8a016612f33b69
6
+ metadata.gz: d9bdadee989a11e48bc1ef1e897b16c613b6805358a0f078c3b7d8221a9b2d481972e1f8e0c3b20d9a2f5e9f2ace5312a4d060bdacebbe08746d161282f8ff1d
7
+ data.tar.gz: 04002a51c8add98d982beba4248162b84c5603274a4ca0883c7efb5cf22993d2318f7135dff379af859c5271deb85bf770fecdc975caeea5fe3a0d6d2fcec8fc
@@ -9,9 +9,9 @@ on:
9
9
 
10
10
  jobs:
11
11
  upload-coverage:
12
- runs-on: ubuntu-latest
12
+ runs-on: blacksmith-2vcpu-ubuntu-2404
13
13
  steps:
14
- - uses: actions/checkout@v4
14
+ - uses: useblacksmith/checkout@v1
15
15
 
16
16
  - name: Set up Ruby
17
17
  uses: ruby/setup-ruby@v1
@@ -15,10 +15,10 @@ on:
15
15
 
16
16
  jobs:
17
17
  commitlint:
18
- runs-on: ubuntu-latest
18
+ runs-on: blacksmith-2vcpu-ubuntu-2404
19
19
  if: github.event_name == 'push'
20
20
  steps:
21
- - uses: actions/checkout@v4
21
+ - uses: useblacksmith/checkout@v1
22
22
  with:
23
23
  fetch-depth: 0
24
24
  - name: Setup Node.js
@@ -28,12 +28,14 @@ jobs:
28
28
  - name: Install commitlint
29
29
  run: npm install -g @commitlint/config-conventional @commitlint/cli
30
30
  - name: Validate current commit (push)
31
- run: echo "${{ github.event.head_commit.message }}" | commitlint
31
+ env:
32
+ COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
33
+ run: printf '%s\n' "$COMMIT_MESSAGE" | commitlint
32
34
 
33
35
  rubocop:
34
- runs-on: ubuntu-latest
36
+ runs-on: blacksmith-2vcpu-ubuntu-2404
35
37
  steps:
36
- - uses: actions/checkout@v4
38
+ - uses: useblacksmith/checkout@v1
37
39
  - name: Set up Ruby
38
40
  uses: ruby/setup-ruby@v1
39
41
  with:
@@ -44,19 +46,19 @@ jobs:
44
46
  - name: Run lint
45
47
  run: bundle exec rubocop
46
48
  shellcheck:
47
- runs-on: ubuntu-latest
49
+ runs-on: blacksmith-2vcpu-ubuntu-2404
48
50
  steps:
49
- - uses: actions/checkout@v4
51
+ - uses: useblacksmith/checkout@v1
50
52
  - name: Install Shellcheck
51
53
  run: sudo apt install shellcheck -y
52
54
  - name: Run shellcheck
53
55
  run: shellcheck -x script/*
54
56
 
55
57
  pr-title-lint:
56
- runs-on: ubuntu-latest
58
+ runs-on: blacksmith-2vcpu-ubuntu-2404
57
59
  if: github.event_name == 'pull_request'
58
60
  steps:
59
- - uses: actions/checkout@v4
61
+ - uses: useblacksmith/checkout@v1
60
62
  - name: Setup Node.js
61
63
  uses: actions/setup-node@v3
62
64
  with:
@@ -64,4 +66,6 @@ jobs:
64
66
  - name: Install commitlint
65
67
  run: npm install -g @commitlint/config-conventional @commitlint/cli
66
68
  - name: Validate PR title
67
- run: echo "${{ github.event.pull_request.title }}" | commitlint
69
+ env:
70
+ PR_TITLE: ${{ github.event.pull_request.title }}
71
+ run: printf '%s\n' "$PR_TITLE" | commitlint
@@ -9,7 +9,7 @@ on:
9
9
 
10
10
  jobs:
11
11
  merge-gatekeeper:
12
- runs-on: ubuntu-latest
12
+ runs-on: blacksmith-2vcpu-ubuntu-2404
13
13
  permissions:
14
14
  checks: read
15
15
  statuses: read
@@ -12,10 +12,10 @@ permissions:
12
12
  jobs:
13
13
  release:
14
14
  name: Release
15
- runs-on: ubuntu-latest
15
+ runs-on: blacksmith-2vcpu-ubuntu-2404
16
16
  steps:
17
17
  - name: Checkout
18
- uses: actions/checkout@v4
18
+ uses: useblacksmith/checkout@v1
19
19
  with:
20
20
  fetch-depth: 0
21
21
  persist-credentials: false
@@ -8,7 +8,7 @@ jobs:
8
8
  permissions:
9
9
  issues: write
10
10
  pull-requests: write
11
- runs-on: ubuntu-latest
11
+ runs-on: blacksmith-2vcpu-ubuntu-2404
12
12
  steps:
13
13
  - uses: actions/stale@v8
14
14
  with:
@@ -15,10 +15,10 @@ jobs:
15
15
  strategy:
16
16
  matrix:
17
17
  os:
18
- - ubuntu-24.04
19
- - ubuntu-26.04
20
- - macos-15
21
- - macos-26
18
+ - blacksmith-4vcpu-ubuntu-2404
19
+ - blacksmith-4vcpu-ubuntu-2604
20
+ - blacksmith-6vcpu-macos-15
21
+ - blacksmith-6vcpu-macos-26
22
22
  ruby-version:
23
23
  - "3.3"
24
24
  - "3.4"
data/.releaserc.json CHANGED
@@ -4,22 +4,12 @@
4
4
  [
5
5
  "@semantic-release/commit-analyzer",
6
6
  {
7
- "parserOpts": {
8
- "breakingHeaderPattern": "^(\\w*)(?:\\((.*)\\))?!: (.*)$"
9
- },
10
7
  "releaseRules": [
11
8
  { "breaking": true, "release": "minor" }
12
9
  ]
13
10
  }
14
11
  ],
15
- [
16
- "@semantic-release/release-notes-generator",
17
- {
18
- "parserOpts": {
19
- "breakingHeaderPattern": "^(\\w*)(?:\\((.*)\\))?!: (.*)$"
20
- }
21
- }
22
- ],
12
+ "@semantic-release/release-notes-generator",
23
13
  [
24
14
  "@semantic-release/changelog",
25
15
  {
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.4.2
1
+ 3.4.12
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [0.12.1](https://github.com/maid/maid/compare/v0.12.0...v0.12.1) (2026-12-01)
2
+
3
+ ### Bug Fixes
4
+
5
+ * Upgrade rubyzip minimum to 3.4.0 (resolves CVE-2026-85396) ([#364](https://github.com/maid/maid/issues/364)) ([b937236](https://github.com/maid/maid/commit/b937236b0863797846db7e4ff694d4ac9755e647))
6
+
1
7
  # [0.12.0](https://github.com/maid/maid/compare/v0.11.3...v0.12.0) (2026-10-17)
2
8
 
3
9
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- maid (0.12.0)
4
+ maid (0.12.1)
5
5
  deprecated (~> 3.0.0)
6
6
  dimensions (>= 1.0.0, < 2.0)
7
7
  escape (>= 0.0.1, < 0.1.0)
@@ -9,7 +9,7 @@ PATH
9
9
  geocoder (~> 1.8.1)
10
10
  listen (~> 3.8.0)
11
11
  mime-types (~> 3.0, < 4.0)
12
- rubyzip (~> 2.3.2)
12
+ rubyzip (>= 3.4.0, < 4.0)
13
13
  rufus-scheduler (~> 3.8.2)
14
14
  thor (~> 1.4.0)
15
15
  xdg (~> 2.2.3)
@@ -166,7 +166,7 @@ GEM
166
166
  lint_roller (~> 1.1)
167
167
  rubocop (~> 1.72, >= 1.72.1)
168
168
  ruby-progressbar (1.13.0)
169
- rubyzip (2.3.2)
169
+ rubyzip (3.7.0)
170
170
  rufus-scheduler (3.8.2)
171
171
  fugit (~> 1.1, >= 1.1.6)
172
172
  semantic_release (1.0.1)
data/lib/maid/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Maid
4
- VERSION = '0.12.0'
4
+ VERSION = '0.12.1'
5
5
  SUMMARY = 'Be lazy. Let Maid clean up after you, based on rules you define. ' \
6
6
  'Think of it as "Hazel for hackers".'
7
7
  end
data/maid.gemspec CHANGED
@@ -1,5 +1,4 @@
1
- $:.push File.expand_path('lib', __dir__)
2
- require 'maid/version'
1
+ require_relative 'lib/maid/version'
3
2
 
4
3
  Gem::Specification.new do |s|
5
4
  s.name = 'maid'
@@ -32,7 +31,7 @@ Gem::Specification.new do |s|
32
31
  s.add_dependency('geocoder', '~> 1.8.1')
33
32
  s.add_dependency('listen', '~> 3.8.0')
34
33
  s.add_dependency('mime-types', '~> 3.0', '< 4.0')
35
- s.add_dependency('rubyzip', '~> 2.3.2')
34
+ s.add_dependency('rubyzip', '>= 3.4.0', '< 4.0')
36
35
  s.add_dependency('rufus-scheduler', '~> 3.8.2')
37
36
  s.add_dependency('thor', '~> 1.4.0')
38
37
  s.add_dependency('xdg', '~> 2.2.3') # previous versions had bugs
@@ -1,10 +1,13 @@
1
1
  require 'dimensions'
2
2
  require 'exifr/jpeg'
3
+ require 'fileutils'
3
4
  require 'logger'
4
5
  require 'geocoder'
5
6
  require 'mime/types'
7
+ require 'open3'
6
8
  require 'rbconfig'
7
9
  require 'stringio'
10
+ require 'tmpdir'
8
11
  require 'xdg'
9
12
  require 'zip'
10
13
 
@@ -19,6 +22,49 @@ describe 'Dependency expectations' do
19
22
  @file_fixtures_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/files/')
20
23
  end
21
24
 
25
+ # Dependabot evaluates the gemspec in an isolated copy of the repo. Its
26
+ # sanitizer wraps every `require`/`require_relative` in
27
+ # `begin ... rescue LoadError ... end`, and it only fetches files that are
28
+ # referenced with `require_relative` (plain `require`s are not fetched). So a
29
+ # constant defined in a plain-`require`d local file (such as `Maid::SUMMARY`
30
+ # in `lib/maid/version.rb`) ends up undefined, and the security update fails
31
+ # with `uninitialized constant Maid`.
32
+ describe 'maid.gemspec' do
33
+ let(:repo_root) { File.expand_path('..', __dir__) }
34
+
35
+ def dependabot_sanitized_gemspec(dir)
36
+ gemspec = File.read(File.join(repo_root, 'maid.gemspec'))
37
+
38
+ gemspec.scan(/require_relative\s+['"]([^'"]+)['"]/).flatten.each do |path|
39
+ destination = File.join(dir, "#{path}.rb")
40
+ FileUtils.mkdir_p(File.dirname(destination))
41
+ FileUtils.cp(File.join(repo_root, "#{path}.rb"), destination)
42
+ end
43
+
44
+ gemspec.gsub(/^(\s*)(require_relative|require)\b.*$/) do
45
+ "begin\n#{Regexp.last_match(0)}\nrescue LoadError\nend"
46
+ end
47
+ end
48
+
49
+ def load_gemspec_without_bundler(dir)
50
+ command = [
51
+ RbConfig.ruby, '-e',
52
+ 'abort("gemspec failed to load") unless Gem::Specification.load("maid.gemspec")',
53
+ ]
54
+ Bundler.with_unbundled_env { Open3.capture2e(*command, chdir: dir) }
55
+ end
56
+
57
+ it 'loads when evaluated the way Dependabot does' do
58
+ Dir.mktmpdir do |dir|
59
+ File.write(File.join(dir, 'maid.gemspec'), dependabot_sanitized_gemspec(dir))
60
+
61
+ output, status = load_gemspec_without_bundler(dir)
62
+
63
+ expect(status).to be_success, output
64
+ end
65
+ end
66
+ end
67
+
22
68
  describe Logger do
23
69
  # Depending on the situation, `Logger` might have been overwritten to have
24
70
  # a different interface. (I'm looking at you, Rails.)
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Redirect HOME (and XDG_DATA_HOME, which `xdg` uses for the Linux default
4
+ # trash) before loading Maid so that any production code resolving `~/...`,
5
+ # `Dir.home`, or XDG paths points inside /tmp/maid-specs during tests. Must
6
+ # happen before `require 'maid'` because Maid::Maid::DEFAULTS freezes paths
7
+ # derived from HOME at class-load time.
8
+ ENV['HOME'] = '/tmp/maid-specs'
9
+ ENV['XDG_DATA_HOME'] = '/tmp/maid-specs/.local/share'
10
+
3
11
  if ENV['COVERAGE']
4
12
  require 'simplecov'
5
13
  SimpleCov.start do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Oakes
8
8
  - Coaxial
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-17 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deprecated
@@ -130,16 +130,22 @@ dependencies:
130
130
  name: rubyzip
131
131
  requirement: !ruby/object:Gem::Requirement
132
132
  requirements:
133
- - - "~>"
133
+ - - ">="
134
134
  - !ruby/object:Gem::Version
135
- version: 2.3.2
135
+ version: 3.4.0
136
+ - - "<"
137
+ - !ruby/object:Gem::Version
138
+ version: '4.0'
136
139
  type: :runtime
137
140
  prerelease: false
138
141
  version_requirements: !ruby/object:Gem::Requirement
139
142
  requirements:
140
- - - "~>"
143
+ - - ">="
141
144
  - !ruby/object:Gem::Version
142
- version: 2.3.2
145
+ version: 3.4.0
146
+ - - "<"
147
+ - !ruby/object:Gem::Version
148
+ version: '4.0'
143
149
  - !ruby/object:Gem::Dependency
144
150
  name: rufus-scheduler
145
151
  requirement: !ruby/object:Gem::Requirement
@@ -666,7 +672,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
666
672
  - !ruby/object:Gem::Version
667
673
  version: '0'
668
674
  requirements: []
669
- rubygems_version: 3.6.2
675
+ rubygems_version: 3.6.9
670
676
  specification_version: 4
671
677
  summary: Keep your filesystem clean by running custom rules periodically
672
678
  test_files: []