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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5afa6aef3d22540ead334ee7074be169452a44fedc2fe108f1bbad73ceed428e
4
- data.tar.gz: ee04395a9682d0a3565f3cc531caf78fbee33878b90ea7578cd3101fadda0803
3
+ metadata.gz: 9481891447948b8269009e11ab88cb3bd6539d1e9c2802422cdd6b670facc1f6
4
+ data.tar.gz: 9ac1c4feff5be0e70ac290276ab6706b78bd0e4ea4ae8a494b9f5725b809bb6a
5
5
  SHA512:
6
- metadata.gz: 94f56b66f3a4e464a4b89df1fcd621f24bf7e8c6b6934b1d5abb254cbd1aad5ddd2dde5d897b287f477b0544414a935604509c084b68810f08debfa09eb36abb
7
- data.tar.gz: 7fe7a7322ea1c881ed3dc04535054074c86ffc029e857e268ecee84bc730dfed6c4580a63ec2d30efe296f1d5bd8e089f8ae2038486ccb54bbd133ef2f3ad18c
6
+ metadata.gz: 709f5a0aadc0f298e658547cbc9e2ae3e2d6fba6e0f66a13532c5c9d46dd81f1b22770f967b5aeb6e219cbe844a86d13503656b1f3feb3b84097cc6b91ef349d
7
+ data.tar.gz: 9ce524a16df98dffbfd1aa09331a74fb020488e8f6939e1f43c4e87292db7e2f604e14a65d8fd81faf33ba8d6d0293082b7b41b5d5db626fe21e19c2dcbbeeb8
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
  # CHANGELOG.md
3
3
 
4
4
 
5
+ ## probatio 1.6.0 released 2026-02-04
6
+
7
+ * Let `proba` accept leaf globs directly
8
+
9
+
5
10
  ## probatio 1.5.0 released 2026-01-28
6
11
 
7
12
  * Introduce `assert_not_match`
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 nil; end
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
@@ -18,7 +18,7 @@ require 'probatio/more'
18
18
 
19
19
  module Probatio
20
20
 
21
- VERSION = '1.5.0'
21
+ VERSION = '1.6.0'
22
22
 
23
23
  class << self
24
24
 
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.5.0
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-01-28 00:00:00.000000000 Z
11
+ date: 2026-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: stringio