maid 0.11.2 → 0.11.3
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/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/lib/maid/app.rb +5 -1
- data/lib/maid/version.rb +1 -1
- data/spec/lib/maid/app_spec.rb +31 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8f06b2e8a1e67b8d0551b23f60e57f2be5cf708f4697af73132d35b28deea335
|
|
4
|
+
data.tar.gz: 18a2f0976a81595f7c499f440d748aa755289c06b2ba07769524f3625f5ff401
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b6f0a162c7f37c351d0ab1386ee3acb736008015c5307e41ee1d7ea470f8b3cce68cff2f9a2579df3eed18cc4d9caafec721622d013f0276e1eb06a8bb91eea2
|
|
7
|
+
data.tar.gz: 32ee3e34ceabf430e3bfc17ae0bab8b5ae22ebcbf3b69050c0849d7d6b2a1fedeb95d0ca2041460c35a453173df991486ecfa57fa7bf195ee5d91926eb5f1291
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [0.11.3](https://github.com/maid/maid/compare/v0.11.2...v0.11.3) (2026-09-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **thor:** Return failure status for invalid switches ([#356](https://github.com/maid/maid/issues/356)) ([3443d42](https://github.com/maid/maid/commit/3443d424a4602284b0e499a0bf81db006578a3ba))
|
|
7
|
+
|
|
1
8
|
## [0.11.2](https://github.com/maid/maid/compare/v0.11.1...v0.11.2) (2025-11-29)
|
|
2
9
|
|
|
3
10
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Maid
|
|
2
2
|
|
|
3
|
+
[](https://cloudbreak.app/promotional_banner/visit?source=maid_readme)
|
|
4
|
+
|
|
3
5
|
[](https://badge.fury.io/rb/maid)
|
|
4
6
|

|
|
5
7
|
[](https://github.com/maid/maid/actions/workflows/test.yml)
|
data/lib/maid/app.rb
CHANGED
|
@@ -2,10 +2,14 @@ require 'fileutils'
|
|
|
2
2
|
|
|
3
3
|
require 'thor'
|
|
4
4
|
|
|
5
|
-
class Maid::App < Thor
|
|
5
|
+
class Maid::App < Thor # rubocop:disable Metrics/ClassLength
|
|
6
6
|
check_unknown_options!
|
|
7
7
|
default_task 'introduction'
|
|
8
8
|
|
|
9
|
+
def self.exit_on_failure?
|
|
10
|
+
true
|
|
11
|
+
end
|
|
12
|
+
|
|
9
13
|
desc 'introduction', 'Become aquainted with maid'
|
|
10
14
|
def introduction
|
|
11
15
|
say <<~EOF
|
data/lib/maid/version.rb
CHANGED
data/spec/lib/maid/app_spec.rb
CHANGED
|
@@ -27,6 +27,17 @@ ensure
|
|
|
27
27
|
$stderr = STDERR
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
def capture_stderr_and_exit_status
|
|
31
|
+
out = StringIO.new
|
|
32
|
+
$stderr = out
|
|
33
|
+
yield
|
|
34
|
+
[out.string, 0]
|
|
35
|
+
rescue SystemExit => e
|
|
36
|
+
[out.string, e.status]
|
|
37
|
+
ensure
|
|
38
|
+
$stderr = STDERR
|
|
39
|
+
end
|
|
40
|
+
|
|
30
41
|
module Maid
|
|
31
42
|
describe App, '#clean' do
|
|
32
43
|
before do
|
|
@@ -74,12 +85,22 @@ module Maid
|
|
|
74
85
|
end
|
|
75
86
|
|
|
76
87
|
it 'complains about a MISSPELLED option' do
|
|
77
|
-
|
|
78
|
-
|
|
88
|
+
[
|
|
89
|
+
['clean', '--slient'],
|
|
90
|
+
['clean', '--noop', '--slient'],
|
|
91
|
+
].each do |arguments|
|
|
92
|
+
message, exit_status = capture_stderr_and_exit_status { App.start(arguments) }
|
|
93
|
+
|
|
94
|
+
expect(message).to match(/Unknown/)
|
|
95
|
+
expect(exit_status).to eq(1)
|
|
96
|
+
end
|
|
79
97
|
end
|
|
80
98
|
|
|
81
99
|
it 'complains about an undefined task' do
|
|
82
|
-
|
|
100
|
+
message, exit_status = capture_stderr_and_exit_status { App.start(['rules.rb']) }
|
|
101
|
+
|
|
102
|
+
expect(message).to match(/Could not find/)
|
|
103
|
+
expect(exit_status).to eq(1)
|
|
83
104
|
end
|
|
84
105
|
end
|
|
85
106
|
|
|
@@ -97,6 +118,13 @@ module Maid
|
|
|
97
118
|
expect(App.start(['--version'])).to eq(@app.version)
|
|
98
119
|
end
|
|
99
120
|
|
|
121
|
+
it 'exits unsuccessfully for an invalid switch' do
|
|
122
|
+
message, exit_status = capture_stderr_and_exit_status { App.start(['-version']) }
|
|
123
|
+
|
|
124
|
+
expect(message).to match(/Unknown switches "-version"/)
|
|
125
|
+
expect(exit_status).to eq(1)
|
|
126
|
+
end
|
|
127
|
+
|
|
100
128
|
context 'with the "long" option' do
|
|
101
129
|
before do
|
|
102
130
|
# FIXME: This is ugly. Maybe use `Maid.start(%w(version --long))` instead.
|
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.11.
|
|
4
|
+
version: 0.11.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Benjamin Oakes
|
|
8
8
|
- Coaxial
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-09-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: deprecated
|