toys 0.23.0 → 0.24.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/.yardopts +0 -1
- data/CHANGELOG.md +5 -0
- data/builtins/do.rb +41 -37
- data/core-docs/toys/core.rb +1 -1
- data/core-docs/toys/dsl/tool.rb +14 -32
- data/core-docs/toys/source_spec.rb +33 -1
- data/core-docs/toys/utils/gems.rb +14 -6
- data/docs/guide.md +24 -9
- data/lib/toys/templates/minitest.rb +1 -5
- data/lib/toys/templates/rspec.rb +1 -5
- data/lib/toys/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1a607f5cce147c21bdd90781026767b310054e69bbbff8c9a1103fdbd3d77b6b
|
|
4
|
+
data.tar.gz: ab0b2ff711816c75e2a50206e93ae19673c21f88618a3332e0642387b7baa6f3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a99af47c6944f33da01db83f1aeb9d77021424cf2ef3b739c7f34caeaffac8dfbcfa25fff7e6ce73d742c4d4d44cabd1ab2b6521d3b64aeaf7d9adb5aeff0ffa
|
|
7
|
+
data.tar.gz: 3d853bf3958d6894a5388830c5f4c2595f3631a13280741d93cc70410d43374c690273a23314bd1758b558a523b0d3d4372446f3054a2d616cf9b78db0d526bd
|
data/.yardopts
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
### v0.24.0 / 2026-09-11
|
|
4
|
+
|
|
5
|
+
* Feature: The `toys do` builtin provides an `--on-missing-gem` flag that governs how the `--gem` flag handles gems that are not installed.
|
|
6
|
+
* BREAKING CHANGE: Removed deprecated `gem_version:` argument from `:rspec` and `:minitest` templates.
|
|
7
|
+
|
|
3
8
|
### v0.23.0 / 2026-09-09
|
|
4
9
|
|
|
5
10
|
This is a major release, with several new features. It also includes a significant refactor of some of the underlying layers, which should be mostly invisible. It is a release candidate for the upcoming version 1.0.
|
data/builtins/do.rb
CHANGED
|
@@ -17,16 +17,10 @@ long_desc \
|
|
|
17
17
|
"The --delim flag must appear first before the tools to run. Any flags that appear later in" \
|
|
18
18
|
" the command line will be passed to the tools themselves.",
|
|
19
19
|
"",
|
|
20
|
-
"You may also
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
" flags to its right. For example:",
|
|
25
|
-
[" toys do --gem=my-tools --git=https://github.com/dazuma/example deploy --migrate"],
|
|
26
|
-
"Here, a tool defined by both sources is taken from the gem. See the descriptions of the" \
|
|
27
|
-
" individual flags below for the syntax of their values. Note that the commas within those" \
|
|
28
|
-
" values are part of the flag value, and are unrelated to the delimiter that separates the" \
|
|
29
|
-
" tools to run."
|
|
20
|
+
"You may also load tools from additional sources, by passing the --gem, --git, and --path" \
|
|
21
|
+
" flags. Any number of these flags can be added; each adds a source of tools, with earlier" \
|
|
22
|
+
" flags taking priority over later. For example:",
|
|
23
|
+
[" toys do --gem=my-tools --git=https://github.com/dazuma/example deploy --migrate"]
|
|
30
24
|
|
|
31
25
|
flag :delim do
|
|
32
26
|
flags "-d", "--delim=VALUE"
|
|
@@ -49,7 +43,9 @@ flag :sources do
|
|
|
49
43
|
default []
|
|
50
44
|
desc "Make the tools from the given gem available"
|
|
51
45
|
long_desc \
|
|
52
|
-
"Adds the tools from the given gem
|
|
46
|
+
"Adds the tools from the given gem. If the specified gem is not currently installed," \
|
|
47
|
+
" follows the policy set by the --on-missing-gem flag, which is normally to prompt" \
|
|
48
|
+
" whether to install.",
|
|
53
49
|
"",
|
|
54
50
|
"The value is the gem name, optionally followed by any number of version requirements," \
|
|
55
51
|
" all separated by commas. Whitespace surrounding each element is ignored. The version" \
|
|
@@ -67,21 +63,18 @@ flag :sources do
|
|
|
67
63
|
" if it is not already there.",
|
|
68
64
|
"",
|
|
69
65
|
"The value is the git remote (i.e. the repository URL or path), optionally followed by any" \
|
|
70
|
-
" number of \"key=value\" elements, all separated by commas.
|
|
71
|
-
"
|
|
66
|
+
" number of \"key=value\" elements, all separated by commas. There is no way to escape" \
|
|
67
|
+
" a comma appearing within the value. Whitespace surrounding each element, and surrounding" \
|
|
68
|
+
" each equals sign, is ignored. For example:",
|
|
72
69
|
[" --git=\"https://github.com/dazuma/example, path=toys, commit=main\""],
|
|
73
|
-
"The recognized keys are:",
|
|
74
|
-
[" path The file or directory within the repository to load. By default, the"],
|
|
75
|
-
[" entire repository is loaded."],
|
|
76
|
-
[" commit The SHA, tag, or branch to load. By default, the repository head is used."],
|
|
77
|
-
[" update Whether to refresh a previously cached repository. Pass \"true\" or \"false\","],
|
|
78
|
-
[" or a number of seconds, to refresh only if the cache is at least that old."],
|
|
79
|
-
[" The default is \"false\"."],
|
|
80
|
-
"Unlike --gem, which takes its elements positionally, the elements here are named, because" \
|
|
81
|
-
" a git source has three independent optional fields and a positional syntax could not" \
|
|
82
|
-
" express, for example, a path with no commit.",
|
|
83
70
|
"",
|
|
84
|
-
"
|
|
71
|
+
"The recognized keys are:",
|
|
72
|
+
"* \"path\" : The file or directory within the repository to load. By default, the entire" \
|
|
73
|
+
" repository is loaded.",
|
|
74
|
+
"* \"commit\" : The SHA, tag, or branch to load. By default, the repository head is used.",
|
|
75
|
+
"* \"update\" : Whether to refresh a previously cached repository. Pass \"true\" or" \
|
|
76
|
+
" \"false\", or a number of seconds, to refresh only if the cache is at least that old." \
|
|
77
|
+
" The default is \"false\"."
|
|
85
78
|
end
|
|
86
79
|
|
|
87
80
|
flag :sources do
|
|
@@ -96,6 +89,22 @@ flag :sources do
|
|
|
96
89
|
[" --path=/path/to/my-tools"]
|
|
97
90
|
end
|
|
98
91
|
|
|
92
|
+
flag :on_missing_gem do
|
|
93
|
+
flags "--on-missing-gem=WHAT"
|
|
94
|
+
accept [:confirm, :install, :error]
|
|
95
|
+
complete_values ["confirm", "install", "error"]
|
|
96
|
+
desc "Specify what to do if a gem is not installed"
|
|
97
|
+
long_desc \
|
|
98
|
+
"Specifies what to do if a gem referenced by the --gem flag is not installed." \
|
|
99
|
+
" Possible values are:",
|
|
100
|
+
"* \"confirm\" : Prompt for what to do.",
|
|
101
|
+
"* \"install\" : Do not prompt, but just install the needed gem.",
|
|
102
|
+
"* \"error\" : Display an error and abort.",
|
|
103
|
+
"",
|
|
104
|
+
"Defaults to the existing CLI configuration, normally \"confirm\". Note this does not affect" \
|
|
105
|
+
" any other gem references such as via the \"gem\" or \"load_gem\" directives."
|
|
106
|
+
end
|
|
107
|
+
|
|
99
108
|
remaining_args :commands do
|
|
100
109
|
complete do |context|
|
|
101
110
|
commands = context.arg_parser.data[:commands]
|
|
@@ -119,24 +128,19 @@ def run
|
|
|
119
128
|
end
|
|
120
129
|
|
|
121
130
|
# Returns the CLI used to run the requested tools. Normally this is simply the
|
|
122
|
-
# current CLI, but if any sources were requested, we need a new CLI
|
|
123
|
-
# sources
|
|
124
|
-
#
|
|
125
|
-
# them. The requested sources are added in reverse order so that the first flag
|
|
126
|
-
# on the command line ends up with the highest priority.
|
|
131
|
+
# current CLI, but if any sources were requested, we need a new CLI with those
|
|
132
|
+
# sources added. Any new sources are added in reverse order so that the first
|
|
133
|
+
# flag on the command line ends up with the highest priority.
|
|
127
134
|
#
|
|
128
135
|
# All the flag values are parsed up front, in command line order, so that a
|
|
129
136
|
# malformed value is reported before any source is added, and is reported
|
|
130
|
-
# against the first offending flag rather than the last.
|
|
131
|
-
#
|
|
132
|
-
# All added sources are then proactively resolved and failures reported.
|
|
137
|
+
# against the first offending flag rather than the last. All added sources are
|
|
138
|
+
# then proactively resolved and failures reported.
|
|
133
139
|
def build_cli
|
|
134
140
|
specs = sources.map { |kind, value| parse_source_request(kind, value) }
|
|
135
141
|
return cli if specs.empty?
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
specs.reverse_each { |spec| child_cli.add_source(spec, high_priority: true) }
|
|
139
|
-
end
|
|
142
|
+
tool_cli = cli.child(copy_sources: true)
|
|
143
|
+
specs.reverse_each { |spec| tool_cli.add_source(spec, high_priority: true) }
|
|
140
144
|
begin
|
|
141
145
|
tool_cli.loader.resolve_sources
|
|
142
146
|
rescue ::Toys::ToolSourceError => e
|
|
@@ -174,7 +178,7 @@ def parse_gem_request(gem_request)
|
|
|
174
178
|
logger.fatal("Invalid version requirement for gem #{gem_name.inspect}: #{e.message}")
|
|
175
179
|
exit(1)
|
|
176
180
|
end
|
|
177
|
-
::Toys::SourceSpec.gem(gem_name, version: gem_version)
|
|
181
|
+
::Toys::SourceSpec.gem(gem_name, version: gem_version, on_missing: on_missing_gem)
|
|
178
182
|
end
|
|
179
183
|
|
|
180
184
|
# Splits a --git flag value into the git remote and the options that follow it,
|
data/core-docs/toys/core.rb
CHANGED
data/core-docs/toys/dsl/tool.rb
CHANGED
|
@@ -308,38 +308,6 @@ module Toys
|
|
|
308
308
|
# Source available in the toys-core gem
|
|
309
309
|
end
|
|
310
310
|
|
|
311
|
-
##
|
|
312
|
-
# Create an alias, representing an "alternate name" for a tool.
|
|
313
|
-
#
|
|
314
|
-
# Note: This is functionally equivalent to creating a tool with the
|
|
315
|
-
# `:delegate_relative` option. As such, `alias_tool` is considered
|
|
316
|
-
# deprecated.
|
|
317
|
-
#
|
|
318
|
-
# ### Example
|
|
319
|
-
#
|
|
320
|
-
# This example defines a tool and an alias pointing to it. Both the tool
|
|
321
|
-
# name `test` and the alias `t` will then refer to the same tool.
|
|
322
|
-
#
|
|
323
|
-
# tool "test" do
|
|
324
|
-
# def run
|
|
325
|
-
# puts "Running tests..."
|
|
326
|
-
# end
|
|
327
|
-
# end
|
|
328
|
-
# alias_tool "t", "test"
|
|
329
|
-
# # Note: the following is preferred over alias_tool:
|
|
330
|
-
# # tool "t", delegate_relative: "test"
|
|
331
|
-
#
|
|
332
|
-
# @param word [String] The name of the alias
|
|
333
|
-
# @param target [String,Array<String>] Relative path to the target of the
|
|
334
|
-
# alias. This path may be given as an array of strings, or a single
|
|
335
|
-
# string possibly delimited by path separators.
|
|
336
|
-
# @return [self]
|
|
337
|
-
# @deprecated Use {#tool} and pass `:delegate_relative` instead
|
|
338
|
-
#
|
|
339
|
-
def alias_tool(word, target)
|
|
340
|
-
# Source available in the toys-core gem
|
|
341
|
-
end
|
|
342
|
-
|
|
343
311
|
##
|
|
344
312
|
# Causes the current tool to delegate to another tool, specified by the
|
|
345
313
|
# full tool name. When run, it simply invokes the target tool with the
|
|
@@ -458,6 +426,18 @@ module Toys
|
|
|
458
426
|
# Context directory paths should generally be absolute. Relative
|
|
459
427
|
# paths will be converted to absolute, using the current working
|
|
460
428
|
# directory at the time of loading.
|
|
429
|
+
# @param on_missing [:confirm,:error,:install] What to do if the
|
|
430
|
+
# requested gem is not installed. Possible values:
|
|
431
|
+
#
|
|
432
|
+
# * `:confirm` - prompt the user on whether to install
|
|
433
|
+
# * `:error` - raise an exception
|
|
434
|
+
# * `:install` - just install the gem
|
|
435
|
+
#
|
|
436
|
+
# Defaults to the setting in the {Toys::Utils::Gems} utility used to
|
|
437
|
+
# activate the gem (usually `:confirm`).
|
|
438
|
+
# @param default_confirm [boolean] The default confirmation result, if
|
|
439
|
+
# `on_missing` is set to `:confirm`. Defaults to the setting in the
|
|
440
|
+
# {Toys::Utils::Gems} utility used to activate the gem (usually true).
|
|
461
441
|
# @param as [String] Load into the given tool/namespace, relative to the
|
|
462
442
|
# current namespace. If omitted, tools will be loaded into the
|
|
463
443
|
# current namespace.
|
|
@@ -469,6 +449,8 @@ module Toys
|
|
|
469
449
|
path: nil,
|
|
470
450
|
toys_dir: nil,
|
|
471
451
|
context_directory: nil,
|
|
452
|
+
on_missing: nil,
|
|
453
|
+
default_confirm: nil,
|
|
472
454
|
as: nil)
|
|
473
455
|
# Source available in the toys-core gem
|
|
474
456
|
end
|
|
@@ -105,10 +105,24 @@ module Toys
|
|
|
105
105
|
# @param source_name [String,nil] The source name that will be shown in
|
|
106
106
|
# documentation for tools loaded from this source. If omitted, a
|
|
107
107
|
# default is generated at resolution time.
|
|
108
|
+
# @param on_missing [:confirm,:error,:install] What to do if the
|
|
109
|
+
# requested gem is not installed. Possible values:
|
|
110
|
+
#
|
|
111
|
+
# * `:confirm` - prompt the user on whether to install
|
|
112
|
+
# * `:error` - raise an exception
|
|
113
|
+
# * `:install` - just install the gem
|
|
114
|
+
#
|
|
115
|
+
# Defaults to the setting in the {Toys::Utils::Gems} utility used to
|
|
116
|
+
# activate the gem (usually `:confirm`).
|
|
117
|
+
# @param default_confirm [boolean] The default confirmation result, if
|
|
118
|
+
# `on_missing` is set to `:confirm`. Defaults to the setting in the
|
|
119
|
+
# {Toys::Utils::Gems} utility used to activate the gem (usually true).
|
|
120
|
+
#
|
|
108
121
|
# @return [Toys::SourceSpec::Gem]
|
|
109
122
|
# @raise [ArgumentError] if an argument is not a legal value.
|
|
110
123
|
#
|
|
111
|
-
def gem(name, version: nil, path: nil, toys_dir: nil, context_directory: nil, source_name: nil
|
|
124
|
+
def gem(name, version: nil, path: nil, toys_dir: nil, context_directory: nil, source_name: nil,
|
|
125
|
+
on_missing: nil, default_confirm: nil)
|
|
112
126
|
# Source available in the toys-core gem
|
|
113
127
|
end
|
|
114
128
|
|
|
@@ -285,6 +299,24 @@ module Toys
|
|
|
285
299
|
#
|
|
286
300
|
attr_reader :toys_dir
|
|
287
301
|
|
|
302
|
+
##
|
|
303
|
+
# What to do if the gem is not installed.
|
|
304
|
+
#
|
|
305
|
+
# @return [nil] to use the default behavior for the Gems util
|
|
306
|
+
# @return [:error] if an error should be raised
|
|
307
|
+
# @return [:confirm] if a confirmation prompt should be presented
|
|
308
|
+
# @return [:install] if the gem should be installed without confirmation
|
|
309
|
+
#
|
|
310
|
+
attr_reader :on_missing
|
|
311
|
+
|
|
312
|
+
##
|
|
313
|
+
# The default response for a confirmation prompt
|
|
314
|
+
#
|
|
315
|
+
# @return [nil] to use the default behavior for the Gems util
|
|
316
|
+
# @return [boolean] to provide an override
|
|
317
|
+
#
|
|
318
|
+
attr_reader :default_confirm
|
|
319
|
+
|
|
288
320
|
protected
|
|
289
321
|
end
|
|
290
322
|
|
|
@@ -126,7 +126,6 @@ module Toys
|
|
|
126
126
|
# * `:install` - just install the gem
|
|
127
127
|
#
|
|
128
128
|
# The default is `:confirm`.
|
|
129
|
-
#
|
|
130
129
|
# @param on_conflict [:error,:warn,:ignore] What to do if bundler has
|
|
131
130
|
# already been run with a different Gemfile. Possible values:
|
|
132
131
|
#
|
|
@@ -135,21 +134,30 @@ module Toys
|
|
|
135
134
|
# * `:warn` - print a warning and proceed without bundling again
|
|
136
135
|
#
|
|
137
136
|
# The default is `:error`.
|
|
138
|
-
#
|
|
139
137
|
# @param default_confirm [boolean] The default confirmation result, if
|
|
140
138
|
# `on_missing` is set to `:confirm`. Defaults to true.
|
|
141
139
|
# @param terminal [Toys::Utils::Terminal] Terminal to use (optional)
|
|
142
140
|
# @param input [IO] Input IO (optional, defaults to STDIN)
|
|
143
141
|
# @param output [IO] Output IO (optional, defaults to STDOUT)
|
|
144
|
-
# @param suppress_confirm [boolean] Deprecated. Use `on_missing` instead.
|
|
145
142
|
#
|
|
146
143
|
def initialize(on_missing: nil,
|
|
147
144
|
on_conflict: nil,
|
|
145
|
+
default_confirm: nil,
|
|
148
146
|
terminal: nil,
|
|
149
147
|
input: nil,
|
|
150
|
-
output: nil
|
|
151
|
-
|
|
152
|
-
|
|
148
|
+
output: nil)
|
|
149
|
+
# Source available in the toys-core gem
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
##
|
|
153
|
+
# Return a gem activator with the same settings as this one, except for
|
|
154
|
+
# the provided overrides. See the constructor for argument docs. If no
|
|
155
|
+
# non-nil overrides are provided, self is returned.
|
|
156
|
+
#
|
|
157
|
+
# @param overrides [Hash] Overrides. See the constructor for details.
|
|
158
|
+
# @return [Toys::Utils::Gems]
|
|
159
|
+
#
|
|
160
|
+
def with(**overrides)
|
|
153
161
|
# Source available in the toys-core gem
|
|
154
162
|
end
|
|
155
163
|
|
data/docs/guide.md
CHANGED
|
@@ -1955,7 +1955,7 @@ below.
|
|
|
1955
1955
|
|
|
1956
1956
|
Finally, you can define and distribute tools in a Ruby gem, and load them from
|
|
1957
1957
|
the gem. This can be more involved as it requires creating and publishing a
|
|
1958
|
-
gem, but it is useful for versioning and
|
|
1958
|
+
gem, but it is useful for versioning and distribution of tools.
|
|
1959
1959
|
|
|
1960
1960
|
A Ruby gem is basically just a zip file with some metadata. By convention, it
|
|
1961
1961
|
contains Ruby classes (usually in a top level `lib` directory), and sometimes
|
|
@@ -2012,6 +2012,14 @@ directive. This can be useful if a gem has multiple toys directories:
|
|
|
2012
2012
|
load_gem "my-tools", toys_dir: "uncommon-tools"
|
|
2013
2013
|
```
|
|
2014
2014
|
|
|
2015
|
+
By default, if the specified gem is not currently installed, Toys will
|
|
2016
|
+
interactively ask whether it should install the gem for you. If you need to
|
|
2017
|
+
suppress this prompt, for example if you need to run in a non-interactive
|
|
2018
|
+
shell environment, set the `:on_missing` keyword argument. You can set
|
|
2019
|
+
`on_missing: :install` to attempt to install without asking, or
|
|
2020
|
+
`on_missing: :error` to abort with an error without asking. (The default value
|
|
2021
|
+
is `on_missing: :confirm` which displays the interactive prompt.)
|
|
2022
|
+
|
|
2015
2023
|
#### Loading sources from the command line
|
|
2016
2024
|
|
|
2017
2025
|
If you want to run a tool from an additional source without referencing that
|
|
@@ -2037,11 +2045,13 @@ Gemfile:
|
|
|
2037
2045
|
$ toys do --gem="my-tools, ~> 1.5, >= 1.5.2" greet
|
|
2038
2046
|
```
|
|
2039
2047
|
|
|
2040
|
-
|
|
2041
|
-
|
|
2048
|
+
You can also suppress the interactive prompt when the gem is not installed, by
|
|
2049
|
+
providing the `--on-missing-gem=` flag. Set `--on-missing-gem=install` to
|
|
2050
|
+
attempt to install the gem without asking, or `--on-missing-gem=error` to abort
|
|
2051
|
+
with an error. For example:
|
|
2042
2052
|
|
|
2043
2053
|
```
|
|
2044
|
-
$ toys do --
|
|
2054
|
+
$ toys do --gem=my-tools --on-missing-gem=install greet
|
|
2045
2055
|
```
|
|
2046
2056
|
|
|
2047
2057
|
The `--git` value begins with the git remote, optionally followed by any number
|
|
@@ -2050,15 +2060,19 @@ of `key=value` elements, again separated by commas. The recognized keys are
|
|
|
2050
2060
|
`load_git` directive:
|
|
2051
2061
|
|
|
2052
2062
|
```
|
|
2053
|
-
$ toys do --git="https://github.com/dazuma/example, path=greet.rb, update=3600" greet
|
|
2063
|
+
$ toys do --git="https://github.com/dazuma/example, path=toys/greet.rb, update=3600" greet
|
|
2054
2064
|
```
|
|
2055
2065
|
|
|
2056
|
-
The elements of a `--git` value are named, rather than positional as in a
|
|
2057
|
-
`--gem` value, because a git source has three independent optional fields, and
|
|
2058
|
-
a positional syntax could not express, for example, a path with no commit.
|
|
2059
2066
|
Whitespace surrounding each element, and surrounding each equals sign, is
|
|
2060
2067
|
ignored. There is no way to escape a comma appearing within a value.
|
|
2061
2068
|
|
|
2069
|
+
The `--path` value is a file system path, naming either a directory of tools or
|
|
2070
|
+
a single Ruby file defining tools:
|
|
2071
|
+
|
|
2072
|
+
```
|
|
2073
|
+
$ toys do --path=/var/share/mytools greet
|
|
2074
|
+
```
|
|
2075
|
+
|
|
2062
2076
|
You can pass these flags multiple times, and interleave them, to make several
|
|
2063
2077
|
sources available at once. If two sources define the same tool, the source
|
|
2064
2078
|
whose flag appears earlier on the command line wins:
|
|
@@ -2067,7 +2081,8 @@ whose flag appears earlier on the command line wins:
|
|
|
2067
2081
|
$ toys do --path=./tools --gem=my-tools --git=https://github.com/dazuma/example greet
|
|
2068
2082
|
```
|
|
2069
2083
|
|
|
2070
|
-
Here, a `greet` tool defined by all three sources
|
|
2084
|
+
Here, if a `greet` tool is defined by all three sources, the one from `./tools`
|
|
2085
|
+
wins.
|
|
2071
2086
|
|
|
2072
2087
|
Remember to quote any value that includes commas or characters that are
|
|
2073
2088
|
meaningful to the shell. The commas inside these values are part of the flag
|
|
@@ -49,8 +49,6 @@ module Toys
|
|
|
49
49
|
# the "minitest" gem, used if bundler is not enabled.
|
|
50
50
|
# Optional. If not provided, defaults to the value given in
|
|
51
51
|
# {DEFAULT_GEM_VERSION_REQUIREMENTS}.
|
|
52
|
-
# @param gem_version [String,Array<String>] Deprecated alias for the
|
|
53
|
-
# `minitest` argument.
|
|
54
52
|
# @param minitest_mock [String,Array<String>,true] Include the
|
|
55
53
|
# "minitest-mock" gem with the given version requirements. Used if
|
|
56
54
|
# bundler is not enabled. If true is passed, the value in
|
|
@@ -99,7 +97,6 @@ module Toys
|
|
|
99
97
|
minitest_focus: nil,
|
|
100
98
|
minitest_rg: nil,
|
|
101
99
|
gems: nil,
|
|
102
|
-
gem_version: nil,
|
|
103
100
|
libs: nil,
|
|
104
101
|
files: nil,
|
|
105
102
|
seed: nil,
|
|
@@ -118,7 +115,7 @@ module Toys
|
|
|
118
115
|
@mt_compat = mt_compat
|
|
119
116
|
@context_directory = context_directory
|
|
120
117
|
@gem_dependencies = {}
|
|
121
|
-
update_version_spec("minitest", minitest
|
|
118
|
+
update_version_spec("minitest", minitest)
|
|
122
119
|
update_version_spec("minitest-mock", minitest_mock)
|
|
123
120
|
update_version_spec("minitest-focus", minitest_focus)
|
|
124
121
|
update_version_spec("minitest-rg", minitest_rg)
|
|
@@ -161,7 +158,6 @@ module Toys
|
|
|
161
158
|
def minitest=(value)
|
|
162
159
|
update_version_spec("minitest", value)
|
|
163
160
|
end
|
|
164
|
-
alias gem_version= minitest=
|
|
165
161
|
|
|
166
162
|
##
|
|
167
163
|
# Version requirements for the minitest-mock gem. Used if bundler is not
|
data/lib/toys/templates/rspec.rb
CHANGED
|
@@ -58,8 +58,6 @@ module Toys
|
|
|
58
58
|
# the "rspec" gem, used if bundler is not enabled.
|
|
59
59
|
# Optional. If not provided, defaults to the value given in
|
|
60
60
|
# {DEFAULT_GEM_VERSION_REQUIREMENTS}.
|
|
61
|
-
# @param gem_version [String,Array<String>] Deprecated alias for the
|
|
62
|
-
# `rspec` argument.
|
|
63
61
|
# @param gems [Hash{String=>String|Array<String>|true}] Include the given
|
|
64
62
|
# gems with the given version requirements. Used if bundler is not
|
|
65
63
|
# enabled. If the version requirement is set to `true`, then the
|
|
@@ -91,7 +89,6 @@ module Toys
|
|
|
91
89
|
#
|
|
92
90
|
def initialize(name: nil,
|
|
93
91
|
rspec: nil,
|
|
94
|
-
gem_version: nil,
|
|
95
92
|
gems: nil,
|
|
96
93
|
libs: nil,
|
|
97
94
|
options: nil,
|
|
@@ -115,7 +112,7 @@ module Toys
|
|
|
115
112
|
@bundler = bundler
|
|
116
113
|
@context_directory = context_directory
|
|
117
114
|
@gem_dependencies = {}
|
|
118
|
-
update_version_spec("rspec", rspec
|
|
115
|
+
update_version_spec("rspec", rspec)
|
|
119
116
|
update_gems(gems) if gems
|
|
120
117
|
end
|
|
121
118
|
|
|
@@ -155,7 +152,6 @@ module Toys
|
|
|
155
152
|
def rspec=(value)
|
|
156
153
|
update_version_spec("rspec", value)
|
|
157
154
|
end
|
|
158
|
-
alias gem_version= rspec=
|
|
159
155
|
|
|
160
156
|
##
|
|
161
157
|
# An array of directories to add to the Ruby require path.
|
data/lib/toys/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.24.0
|
|
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.
|
|
18
|
+
version: 0.24.0
|
|
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.
|
|
25
|
+
version: 0.24.0
|
|
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
|
|
@@ -130,10 +130,10 @@ homepage: https://github.com/dazuma/toys
|
|
|
130
130
|
licenses:
|
|
131
131
|
- MIT
|
|
132
132
|
metadata:
|
|
133
|
-
changelog_uri: https://dazuma.github.io/toys/gems/toys/v0.
|
|
134
|
-
source_code_uri: https://github.com/dazuma/toys/tree/toys/v0.
|
|
133
|
+
changelog_uri: https://dazuma.github.io/toys/gems/toys/v0.24.0/file.CHANGELOG.html
|
|
134
|
+
source_code_uri: https://github.com/dazuma/toys/tree/toys/v0.24.0/toys
|
|
135
135
|
bug_tracker_uri: https://github.com/dazuma/toys/issues
|
|
136
|
-
documentation_uri: https://dazuma.github.io/toys/gems/toys/v0.
|
|
136
|
+
documentation_uri: https://dazuma.github.io/toys/gems/toys/v0.24.0
|
|
137
137
|
rdoc_options: []
|
|
138
138
|
require_paths:
|
|
139
139
|
- lib
|