toys 0.19.0 → 0.19.1

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: 5866812d1c711bf0870e0608fa2f8758de52f659bcda167d13590f5d6ad9d5c1
4
- data.tar.gz: b68fc387ce5a624101b384e1c62b1f1229936a8dd2474bc61b15e58fb578917f
3
+ metadata.gz: a74557d30e1049351aadf228ff90e2d81bc95c3eceb12058994f4344b7166d6a
4
+ data.tar.gz: 127e2bee0af281200cb10af3d3185e928d805f39c3650f2564bd4d626b499a63
5
5
  SHA512:
6
- metadata.gz: a0637d7bad711309be05fbc443127fb5e6545db4e20ca4d60eb466fba971ed7c5490d2c81d5d07e0b4c059305e0bcaeb5cd03c68048487298756c2bbdfe5173e
7
- data.tar.gz: d0f8a09727f39aeec544e78334db551bf8c94ed0b681eb2201de8445e12341fd2249e5be7748ba4e905c0ade5a3f497c468c5b1487cd3429d8b89502d5941f71
6
+ metadata.gz: 0d0002be9a833ec73cb6b4d6051f71f6652855b8e4ea9de80c707a0e215f2de88755c625bf4d3759abb0e9a26c9ef5719ee8cd3a4f65309800f471413bdf24d3
7
+ data.tar.gz: 7de57d4dd7c143da7dce7316d530639859817a81cfb29b08d886380a23be9fb0fe6994bb24647c79ecdbb0d9924785665c9fb8b968a83a0fa653fb76d67889ce
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History
2
2
 
3
+ ### v0.19.1 / 2026-01-06
4
+
5
+ * FIXED: The minitest template and the "system test" builtin now support minitest 6
6
+
3
7
  ### v0.19.0 / 2025-12-22
4
8
 
5
9
  Compatibility update for Ruby 4.0, including:
@@ -17,10 +17,12 @@ flag :recursive, "--[no-]recursive", default: true,
17
17
  desc: "Recursively test subtools (default is true)"
18
18
  flag :tool, "-t TOOL", "--tool TOOL", default: "",
19
19
  desc: "Run tests only for tools under the given path"
20
- flag :minitest_version, "--minitest-version=VERSION", default: "~> 5.0",
21
- desc: "Set the minitest version requirement (default is ~>5.0)"
20
+ flag :minitest_version, "--minitest-version=VERSION", default: ">=5.0,<7",
21
+ desc: "Set the minitest version requirement (default is >=5.0,<7)"
22
22
  flag :minitest_focus, "--minitest-focus[=VERSION]",
23
23
  desc: "Make minitest-focus available during the run"
24
+ flag :minitest_mock, "--minitest-mock[=VERSION]",
25
+ desc: "Make minitest-mock available during the run"
24
26
  flag :minitest_rg, "--minitest-rg[=VERSION]",
25
27
  desc: "Make minitest-rg available during the run"
26
28
  flag :minitest_compat, "--[no-]minitest-compat",
@@ -42,18 +44,31 @@ def run
42
44
  end
43
45
 
44
46
  def load_minitest_gems
45
- gem "minitest", minitest_version
46
- require "minitest"
47
47
  if minitest_focus
48
- set :minitest_focus, "~> 1.0" if minitest_focus == true
49
- gem "minitest-focus", minitest_focus
48
+ set :minitest_focus, "~>1.4,>=1.4.1" if minitest_focus == true
49
+ gem "minitest-focus", *minitest_focus.split(",")
50
50
  require "minitest/focus"
51
51
  end
52
+ if minitest_mock
53
+ set :minitest_mock, "~>5.27" if minitest_mock == true
54
+ gem "minitest-mock", *minitest_mock.split(",")
55
+ require "minitest/mock"
56
+ end
52
57
  if minitest_rg
53
- set :minitest_rg, "~> 5.0" if minitest_rg == true
54
- gem "minitest-rg", minitest_rg
58
+ set :minitest_rg, "~>5.4" if minitest_rg == true
59
+ gem "minitest-rg", *minitest_rg.split(",")
55
60
  require "minitest/rg"
56
61
  end
62
+ gem "minitest", *minitest_version.split(",")
63
+ require "minitest"
64
+
65
+ @minitest_version = @minitest_focus_version = @minitest_mock_version = @minitest_rg_version = nil
66
+ Gem.loaded_specs.each_value do |spec|
67
+ @minitest_version = spec.version.to_s if spec.name == "minitest"
68
+ @minitest_focus_version = spec.version.to_s if spec.name == "minitest-focus"
69
+ @minitest_mock_version = spec.version.to_s if spec.name == "minitest-mock"
70
+ @minitest_rg_version = spec.version.to_s if spec.name == "minitest-rg"
71
+ end
57
72
  end
58
73
 
59
74
  def ruby_env
@@ -82,15 +97,18 @@ end
82
97
 
83
98
  def ruby_code
84
99
  code = []
85
- code << "gem 'minitest', #{minitest_version.inspect}"
100
+ code << "gem 'minitest', '= #{@minitest_version}'"
86
101
  code << "require 'minitest/autorun'"
87
- if minitest_focus
88
- code << "gem 'minitest-focus', '= #{::Minitest::Test::Focus::VERSION}'"
102
+ if @minitest_focus_version
103
+ code << "gem 'minitest-focus', '= #{@minitest_focus_version}'"
89
104
  code << "require 'minitest/focus'"
90
105
  end
91
- if minitest_rg
92
- version = defined?(::Minitest::RG::VERSION) ? ::Minitest::RG::VERSION : ::MiniTest::RG::VERSION
93
- code << "gem 'minitest-rg', '= #{version}'"
106
+ if @minitest_mock_version
107
+ code << "gem 'minitest-mock', '= #{@minitest_mock_version}'"
108
+ code << "require 'minitest/mock'"
109
+ end
110
+ if @minitest_rg_version
111
+ code << "gem 'minitest-rg', '= #{@minitest_rg_version}'"
94
112
  code << "require 'minitest/rg'"
95
113
  end
96
114
  code << "require 'toys'"
@@ -9,6 +9,6 @@ module Toys
9
9
  # Current version of Toys core.
10
10
  # @return [String]
11
11
  #
12
- VERSION = "0.19.0"
12
+ VERSION = "0.19.1"
13
13
  end
14
14
  end
@@ -12,7 +12,7 @@ module Toys
12
12
  # Default version requirements for the minitest gem.
13
13
  # @return [Array<String>]
14
14
  #
15
- DEFAULT_GEM_VERSION_REQUIREMENTS = ["~> 5.0"].freeze
15
+ DEFAULT_GEM_VERSION_REQUIREMENTS = [">= 5.0", "< 7"].freeze
16
16
 
17
17
  ##
18
18
  # Default tool name
data/lib/toys/version.rb CHANGED
@@ -5,5 +5,5 @@ module Toys
5
5
  # Current version of the Toys command line executable.
6
6
  # @return [String]
7
7
  #
8
- VERSION = "0.19.0"
8
+ VERSION = "0.19.1"
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 0.19.0
18
+ version: 0.19.1
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 0.19.0
25
+ version: 0.19.1
26
26
  description: Toys is a configurable command line tool. Write commands in Ruby using
27
27
  a simple DSL, and Toys will provide the command line executable and take care of
28
28
  all the details such as argument parsing, online help, and error reporting. Toys
@@ -120,10 +120,10 @@ homepage: https://github.com/dazuma/toys
120
120
  licenses:
121
121
  - MIT
122
122
  metadata:
123
- changelog_uri: https://dazuma.github.io/toys/gems/toys/v0.19.0/file.CHANGELOG.html
123
+ changelog_uri: https://dazuma.github.io/toys/gems/toys/v0.19.1/file.CHANGELOG.html
124
124
  source_code_uri: https://github.com/dazuma/toys/tree/main/toys
125
125
  bug_tracker_uri: https://github.com/dazuma/toys/issues
126
- documentation_uri: https://dazuma.github.io/toys/gems/toys/v0.19.0
126
+ documentation_uri: https://dazuma.github.io/toys/gems/toys/v0.19.1
127
127
  rdoc_options: []
128
128
  require_paths:
129
129
  - lib
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
- rubygems_version: 3.6.9
141
+ rubygems_version: 4.0.3
142
142
  specification_version: 4
143
143
  summary: A configurable command line tool
144
144
  test_files: []