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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa89818d98ad713bc6982f8f68b94afe80a09dc1677068dda42dbad1a2300c72
4
- data.tar.gz: 60206dca5d68cdf634c47424e8712c2b8e4884b543bd85bb55fc0429300b4265
3
+ metadata.gz: 21de32982072708c695512ab52031d4eccfd6efbd0d7f464b71723f42be7101d
4
+ data.tar.gz: 987a1e9b14fc4df355a68aae5f3234499ace34b2419a2fb7bc6607326f3c58f9
5
5
  SHA512:
6
- metadata.gz: 64777879959eed5656066cca23508738deb78566ee87144e67066c9e15e3d6da6dfcce1bd7bac9ff3f66c94cf66976f709663b1b4df3a5242cd9a6a0e6cb9491
7
- data.tar.gz: bd55fd227c159b11eb7b2389c319e38e931af90ca0b29b0bdc343b5a7ca3996086bebf6d4099fcc67e654da30022bd53797c437911defeda1f98b6196c988ec4
6
+ metadata.gz: 7efb10c87d677fe3fbe1a2922d5991aaa770269f4ad9f226d5087b96a0cb9486f43b6a53f70efd2a3149a6bc8467b9c7e5e28bd55d945a7dda7258ee6cd3c3e8
7
+ data.tar.gz: 5df599fad13aff034cec088012f760dc863e362f64cb8c0aa525885ffc80ef74ca547f823e354f397a7d52275a21627ccd59f0c221d00164f4e10f863c79c228
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- retest (1.6.2)
4
+ retest (1.7.0)
5
5
  listen (~> 3.2)
6
6
  string-similarity (~> 2.1)
7
7
  tty-option (~> 0.1)
@@ -26,7 +26,6 @@ module Retest
26
26
  end
27
27
 
28
28
  def command
29
- return default_command if auto?
30
29
  options_command || default_command
31
30
  end
32
31
 
@@ -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 'bundle exec rails test <test>'
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 'bundle exec rails test'
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> placeholder to tell retest where to put the matching spec.
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
@@ -1,3 +1,3 @@
1
1
  module Retest
2
- VERSION = "1.6.2"
2
+ VERSION = "1.7.0"
3
3
  end
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.6.2
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-06-26 00:00:00.000000000 Z
11
+ date: 2022-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: string-similarity