retest 1.6.2 → 1.7.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/Gemfile.lock +1 -1
- data/lib/retest/command.rb +0 -1
- data/lib/retest/options.rb +9 -22
- data/lib/retest/version.rb +1 -1
- 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: 21de32982072708c695512ab52031d4eccfd6efbd0d7f464b71723f42be7101d
|
4
|
+
data.tar.gz: 987a1e9b14fc4df355a68aae5f3234499ace34b2419a2fb7bc6607326f3c58f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7efb10c87d677fe3fbe1a2922d5991aaa770269f4ad9f226d5087b96a0cb9486f43b6a53f70efd2a3149a6bc8467b9c7e5e28bd55d945a7dda7258ee6cd3c3e8
|
7
|
+
data.tar.gz: 5df599fad13aff034cec088012f760dc863e362f64cb8c0aa525885ffc80ef74ca547f823e354f397a7d52275a21627ccd59f0c221d00164f4e10f863c79c228
|
data/Gemfile.lock
CHANGED
data/lib/retest/command.rb
CHANGED
data/lib/retest/options.rb
CHANGED
@@ -13,13 +13,18 @@ module Retest
|
|
13
13
|
|
14
14
|
example <<~EOS
|
15
15
|
Runs a matching rails test after a file change
|
16
|
-
$ retest '
|
16
|
+
$ retest 'bin/rails test <test>'
|
17
17
|
$ retest --rails
|
18
18
|
EOS
|
19
19
|
|
20
|
+
example <<~EOS
|
21
|
+
Runs rubocop and matching rails test after a file change
|
22
|
+
$ retest 'rubocop <changed> && bin/rails test <test>'
|
23
|
+
EOS
|
24
|
+
|
20
25
|
example <<~EOS
|
21
26
|
Runs all rails tests after a file change
|
22
|
-
$ retest '
|
27
|
+
$ retest 'bin/rails test'
|
23
28
|
$ retest --rails --all
|
24
29
|
EOS
|
25
30
|
|
@@ -31,19 +36,17 @@ module Retest
|
|
31
36
|
example <<~EOS
|
32
37
|
Let retest identify which command to run
|
33
38
|
$ retest
|
34
|
-
$ retest --auto
|
35
39
|
EOS
|
36
40
|
|
37
41
|
example <<~EOS
|
38
42
|
Let retest identify which command to run for all tests
|
39
43
|
$ retest --all
|
40
|
-
$ retest --auto --all
|
41
44
|
EOS
|
42
45
|
|
43
46
|
example <<~EOS
|
44
47
|
Run a sanity check on changed files from a branch
|
48
|
+
$ retest --diff main
|
45
49
|
$ retest --diff origin/main --rails
|
46
|
-
$ retest --diff main --auto
|
47
50
|
EOS
|
48
51
|
end
|
49
52
|
|
@@ -51,7 +54,7 @@ module Retest
|
|
51
54
|
optional
|
52
55
|
desc <<~EOS
|
53
56
|
The test command to rerun when a file changes.
|
54
|
-
Use <test>
|
57
|
+
Use <test> or <changed> placeholders to tell retest where to reference the matching spec or the changed file in the command.
|
55
58
|
EOS
|
56
59
|
end
|
57
60
|
|
@@ -71,11 +74,6 @@ module Retest
|
|
71
74
|
desc "Run all the specs of a specificied ruby setup"
|
72
75
|
end
|
73
76
|
|
74
|
-
flag :auto do
|
75
|
-
long "--auto"
|
76
|
-
desc "Indentify repository setup and runs appropriate command"
|
77
|
-
end
|
78
|
-
|
79
77
|
flag :notify do
|
80
78
|
long "--notify"
|
81
79
|
desc "Play a sound when specs pass or fail (macOS only)"
|
@@ -130,11 +128,6 @@ module Retest
|
|
130
128
|
params[:all]
|
131
129
|
end
|
132
130
|
|
133
|
-
def auto?
|
134
|
-
return true if no_options_passed?
|
135
|
-
params[:auto]
|
136
|
-
end
|
137
|
-
|
138
131
|
def notify?
|
139
132
|
params[:notify]
|
140
133
|
end
|
@@ -142,11 +135,5 @@ module Retest
|
|
142
135
|
def extension
|
143
136
|
Regexp.new(params[:ext])
|
144
137
|
end
|
145
|
-
|
146
|
-
private
|
147
|
-
|
148
|
-
def no_options_passed?
|
149
|
-
params.to_h.values.compact.uniq == ["\\.rb$", false]
|
150
|
-
end
|
151
138
|
end
|
152
139
|
end
|
data/lib/retest/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: retest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre Barret
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: string-similarity
|