guard-minitest 2.4.6 → 3.0.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
- SHA1:
3
- metadata.gz: f9412f8986710c9d971b9a9fa7ad8a018e166df7
4
- data.tar.gz: ebbd7d98729ada3332ad928ef20bc17c181df786
2
+ SHA256:
3
+ metadata.gz: cd7612cd83522ab5596a1dfc14a9de95eaa1653b11bdcfc7299d15eb9bd37ba1
4
+ data.tar.gz: 2abc2f47cf61c2d4b4261ec53c3d151e0c74ffd3a30f928884864122a51976a5
5
5
  SHA512:
6
- metadata.gz: d85974d3af70a9f5140b5afda8467888dd80250248f3a8a35c659f916f841aa6e41c4242c1a62e87467e454d085f4e93b12af1806a5e9c9a4a54948b9c5bfb19
7
- data.tar.gz: b2ce5b6f90e0dac076ca42d523e0ebf4cd348d323d4e869b76c2f0ad38fdc23478e7a94006483bf55eed64564f1f5c0694bd56e00a5d529b2975703b92c31717
6
+ metadata.gz: a79e0035fb1e4ea258ef2b6b749d55020b1ebab6402638f1cf030b66e0b833e784bb809ac7beed2fed6c257eb1f739339031deecdf156f9f3a24a956991911db
7
+ data.tar.gz: b56623e3102675457f54c5f0a389ef43a951fe95f9a02211b399c74d1c35b2b2c4e1c9f46058dba32592159a7d4162f839d8989bc347368a81d2969a6fed23b2
data/README.md CHANGED
@@ -1,11 +1,14 @@
1
1
  # Guard::Minitest
2
- [![Gem Version](https://badge.fury.io/rb/guard-minitest.svg)](http://badge.fury.io/rb/guard-minitest) [![Build Status](https://travis-ci.org/guard/guard-minitest.svg?branch=master)](https://travis-ci.org/guard/guard-minitest) [![Dependency Status](https://gemnasium.com/guard/guard-minitest.svg)](https://gemnasium.com/guard/guard-minitest) [![Code Climate](https://codeclimate.com/github/guard/guard-minitest.svg)](https://codeclimate.com/github/guard/guard-minitest) [![Coverage Status](https://coveralls.io/repos/guard/guard-minitest/badge.svg?branch=master)](https://coveralls.io/r/guard/guard-minitest)
2
+
3
+ [![Gem Version](http://img.shields.io/gem/v/guard-minitest.svg)](https://rubygems.org/gems/guard-minitest)
4
+ [![Build Status](https://github.com/guard/guard-minitest/workflows/CI/badge.svg)](https://github.com/guard/guard-minitest/actions/workflows/ci.yml)
5
+ [![Gem Downloads](https://img.shields.io/gem/dt/guard-minitest.svg)](https://rubygems.org/gems/guard-minitest)
3
6
 
4
7
  Guard::Minitest allows to automatically & intelligently launch tests with the
5
8
  [minitest framework](https://github.com/seattlerb/minitest) when files are modified.
6
9
 
7
- * Compatible with minitest >= 3.0 (optimal support for 5.x).
8
- * Tested against Ruby 1.9.3, 2.0.0, JRuby and Rubinius (1.9 mode).
10
+ * Compatible with minitest >= 5.0
11
+ * Tested against Ruby >= 3.2.0
9
12
 
10
13
  *IMPORTANT NOTE: `guard-minitest` does not depend on `guard` due to obscure issues - you must either install `guard` first or add it explicitly in your `Gemfile` (see: [#131](https://github.com/guard/guard-minitest/pull/131) for details)*
11
14
 
@@ -38,6 +41,20 @@ guard init minitest
38
41
 
39
42
  ## Ruby on Rails
40
43
 
44
+ ### Spring
45
+
46
+ Due to complexities in how arguments are handled and running tests for selected files, it's best to use the following spring command:
47
+
48
+ ```ruby
49
+ guard "minitest", spring: "bin/rails test" do
50
+ # ...
51
+ end
52
+ ```
53
+
54
+ (For details see issue [#130](https://github.com/guard/guard-minitest/issues/130)).
55
+
56
+ ### Rails gem dependencies
57
+
41
58
  Ruby on Rails lazy loads gems as needed in its test suite.
42
59
  As a result Guard::Minitest may not be able to run all tests until the gem dependencies are resolved.
43
60
 
@@ -43,7 +43,8 @@ module Guard
43
43
  end
44
44
 
45
45
  def _test_file?(path)
46
- _test_files_for_paths.include?(path)
46
+ _test_files_for_paths.map {|path| File.expand_path(path) }
47
+ .include?(File.expand_path(path))
47
48
  end
48
49
 
49
50
  def _join_for_glob(fragments)
@@ -166,7 +166,6 @@ module Guard
166
166
  def spring_command(paths)
167
167
  command = @options[:spring].is_a?(String) ? @options[:spring] : 'bin/rake test'
168
168
  cmd_parts = [command]
169
- cmd_parts << File.expand_path('../runners/old_runner.rb', __FILE__) unless Utils.minitest_version_gte_5? || command != 'spring testunit'
170
169
  if cli_options.length > 0
171
170
  cmd_parts + paths + ['--'] + cli_options
172
171
  else
@@ -182,10 +181,6 @@ module Guard
182
181
  cmd_parts << '-r minitest/autorun' if autorun?
183
182
  cmd_parts.concat(paths.map { |path| "-r ./#{path}" })
184
183
 
185
- unless Utils.minitest_version_gte_5?
186
- cmd_parts << "-r #{File.expand_path('../runners/old_runner.rb', __FILE__)}"
187
- end
188
-
189
184
  # All the work is done through minitest/autorun
190
185
  # and requiring the test files, so this is just
191
186
  # a placeholder so Ruby doesn't try to exceute
@@ -193,7 +188,6 @@ module Guard
193
188
  cmd_parts << '-e ""'
194
189
 
195
190
  cmd_parts << '--'
196
- cmd_parts << '--guard'
197
191
  cmd_parts += cli_options
198
192
  cmd_parts
199
193
  end
@@ -15,14 +15,6 @@ module Guard
15
15
  ::MiniTest::Unit::VERSION
16
16
  end
17
17
  end
18
-
19
- def self.minitest_version_gte_5?
20
- @@minitest_version_gte_5 ||= Gem::Requirement.new('>= 5').satisfied_by?(Gem::Version.new(minitest_version))
21
- end
22
-
23
- def self.minitest_version_gte_5_0_4?
24
- @@minitest_version_gte_5_0_4 ||= Gem::Requirement.new('>= 5.0.4').satisfied_by?(Gem::Version.new(minitest_version))
25
- end
26
18
  end
27
19
  end
28
20
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  class MinitestVersion
3
- VERSION = '2.4.6'
3
+ VERSION = '3.0.0'
4
4
  end
5
5
  end
@@ -13,11 +13,7 @@ module Minitest
13
13
  # Require guard unless we're using guard-minitest to test a guard plugin
14
14
  require 'guard' unless Dir['guard-*.gemspec'].any?
15
15
 
16
- if ::Guard::Minitest::Utils.minitest_version_gte_5_0_4?
17
- require 'guard/minitest/reporter'
18
- else
19
- require 'guard/minitest/reporters/old_reporter'
20
- end
16
+ require 'guard/minitest/reporter'
21
17
 
22
18
  reporter << ::Guard::Minitest::Reporter.new
23
19
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.6
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yann Lugrin
8
8
  - Rémy Coutable
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2016-07-29 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: guard-compat
@@ -31,16 +30,36 @@ dependencies:
31
30
  requirements:
32
31
  - - ">="
33
32
  - !ruby/object:Gem::Version
34
- version: '3.0'
33
+ version: 5.0.4
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '7.0'
35
37
  type: :runtime
36
38
  prerelease: false
37
39
  version_requirements: !ruby/object:Gem::Requirement
38
40
  requirements:
39
41
  - - ">="
40
42
  - !ruby/object:Gem::Version
41
- version: '3.0'
43
+ version: 5.0.4
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '7.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: coveralls
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
42
61
  - !ruby/object:Gem::Dependency
43
- name: bundler
62
+ name: guard-rubocop
44
63
  requirement: !ruby/object:Gem::Requirement
45
64
  requirements:
46
65
  - - ">="
@@ -53,6 +72,34 @@ dependencies:
53
72
  - - ">="
54
73
  - !ruby/object:Gem::Version
55
74
  version: '0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: rake
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: rspec
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '3.1'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '3.1'
56
103
  description: Guard::Minitest automatically run your tests with Minitest framework
57
104
  (much like autotest)
58
105
  email:
@@ -70,16 +117,17 @@ files:
70
117
  - lib/guard/minitest/reporter.rb
71
118
  - lib/guard/minitest/reporters/old_reporter.rb
72
119
  - lib/guard/minitest/runner.rb
73
- - lib/guard/minitest/runners/old_runner.rb
74
120
  - lib/guard/minitest/templates/Guardfile
75
121
  - lib/guard/minitest/utils.rb
76
122
  - lib/guard/minitest/version.rb
77
123
  - lib/minitest/guard_minitest_plugin.rb
78
- homepage: https://rubygems.org/gems/guard-minitest
124
+ homepage: https://github.com/guard/guard-minitest
79
125
  licenses:
80
126
  - MIT
81
- metadata: {}
82
- post_install_message:
127
+ metadata:
128
+ bug_tracker_uri: https://github.com/guard/guard-minitest/issues
129
+ changelog_uri: https://github.com/guard/guard-minitest/releases
130
+ source_code_uri: https://github.com/guard/guard-minitest
83
131
  rdoc_options: []
84
132
  require_paths:
85
133
  - lib
@@ -87,16 +135,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
87
135
  requirements:
88
136
  - - ">="
89
137
  - !ruby/object:Gem::Version
90
- version: 1.9.2
138
+ version: '3.2'
91
139
  required_rubygems_version: !ruby/object:Gem::Requirement
92
140
  requirements:
93
141
  - - ">="
94
142
  - !ruby/object:Gem::Version
95
143
  version: '0'
96
144
  requirements: []
97
- rubyforge_project:
98
- rubygems_version: 2.6.4
99
- signing_key:
145
+ rubygems_version: 4.0.4
100
146
  specification_version: 4
101
147
  summary: Guard plugin for the Minitest framework
102
148
  test_files: []
@@ -1,16 +0,0 @@
1
- require 'minitest/unit'
2
- require 'guard/minitest/notifier'
3
-
4
- module MiniTest
5
- class MiniTest::Unit
6
- begin
7
- alias_method :_run_anything_without_guard, :_run_anything
8
- def _run_anything(type)
9
- start = Time.now
10
- _run_anything_without_guard(type)
11
- duration = Time.now - start
12
- ::Guard::Minitest::Notifier.notify(test_count, assertion_count, failures, errors, skips, duration)
13
- end
14
- end
15
- end
16
- end