probatio 1.5.0 → 1.6.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/CHANGELOG.md +5 -0
- data/README.md +3 -0
- data/exe/proba +8 -7
- data/lib/probatio.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: 9481891447948b8269009e11ab88cb3bd6539d1e9c2802422cdd6b670facc1f6
|
|
4
|
+
data.tar.gz: 9ac1c4feff5be0e70ac290276ab6706b78bd0e4ea4ae8a494b9f5725b809bb6a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 709f5a0aadc0f298e658547cbc9e2ae3e2d6fba6e0f66a13532c5c9d46dd81f1b22770f967b5aeb6e219cbe844a86d13503656b1f3feb3b84097cc6b91ef349d
|
|
7
|
+
data.tar.gz: 9ce524a16df98dffbfd1aa09331a74fb020488e8f6939e1f43c4e87292db7e2f604e14a65d8fd81faf33ba8d6d0293082b7b41b5d5db626fe21e19c2dcbbeeb8
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -150,6 +150,9 @@ group 'core' do
|
|
|
150
150
|
# checks that it receives a regex and one or more strings
|
|
151
151
|
# and that all those strings match the regex
|
|
152
152
|
|
|
153
|
+
assert_not_match 'one', /^two$/
|
|
154
|
+
# assert( ! 'one'.match(/^two$/))
|
|
155
|
+
|
|
153
156
|
assert_start_with 'one', 'one two or three'
|
|
154
157
|
# checks that the shortest string is the start of the remaining string
|
|
155
158
|
# arguments
|
data/exe/proba
CHANGED
|
@@ -203,6 +203,11 @@ def read_list(a, item)
|
|
|
203
203
|
a
|
|
204
204
|
end
|
|
205
205
|
|
|
206
|
+
test_dir =
|
|
207
|
+
is_directory_with_tests?('test') ? 'test' :
|
|
208
|
+
is_directory_with_tests?('spec') ? 'spec' :
|
|
209
|
+
'test'
|
|
210
|
+
|
|
206
211
|
prev = Kernel.eval(File.read(Probatio.opath)) rescue { failures: [] }
|
|
207
212
|
fails = prev[:failures].collect { |f| "#{f[:p]}:#{f[:l]}" }
|
|
208
213
|
#print 'fails:'; pp fails
|
|
@@ -217,7 +222,7 @@ strings.each do |s|
|
|
|
217
222
|
when '1st', 'first' then fails[0]
|
|
218
223
|
when 'last' then fails[-1]
|
|
219
224
|
when /^:\d+$/ then fails.find { |f| f.end_with?(s) }
|
|
220
|
-
else
|
|
225
|
+
else Dir[File.join(test_dir, '**', s)]; end
|
|
221
226
|
end
|
|
222
227
|
integers.each do |i|
|
|
223
228
|
opts[:files] << fails[i]
|
|
@@ -228,14 +233,10 @@ lists.each do |li|
|
|
|
228
233
|
read_list([], File.readlines(li)))
|
|
229
234
|
end
|
|
230
235
|
#
|
|
231
|
-
opts[:files] = opts[:files].uniq.compact
|
|
236
|
+
opts[:files] = opts[:files].flatten.uniq.compact
|
|
232
237
|
opts[:files] = nil if opts[:files].empty? && strings.empty? && integers.empty?
|
|
233
238
|
|
|
234
|
-
opts[:dirs] = [
|
|
235
|
-
is_directory_with_tests?('test') ? 'test' :
|
|
236
|
-
is_directory_with_tests?('spec') ? 'spec' :
|
|
237
|
-
'test'
|
|
238
|
-
] unless opts[:dirs] || opts[:files]
|
|
239
|
+
opts[:dirs] = [ test_dir ] unless opts[:dirs] || opts[:files]
|
|
239
240
|
|
|
240
241
|
opts[:includes] = Probatio.to_rexes_and_strs(switches['--name'])
|
|
241
242
|
opts[:excludes] = Probatio.to_rexes_and_strs(switches['--exclude'])
|
data/lib/probatio.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: probatio
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Mettraux
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-02-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: stringio
|