toys 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -2
- data/README.md +9 -5
- data/docs/guide.md +116 -78
- data/lib/toys/standard_cli.rb +1 -1
- data/lib/toys/templates/rdoc.rb +7 -3
- data/lib/toys/templates/rspec.rb +3 -1
- data/lib/toys/templates/yardoc.rb +12 -4
- data/lib/toys/version.rb +1 -1
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67f890a1c29b380abb7785995fb2b691bb5eb98d47c8bb87ef930de0b5ab0bbe
|
4
|
+
data.tar.gz: 0b2992e95454d3ad9493922b74d54b55540f5c677cedfa63914c8e45857aa2a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 612b85d0dc1baeeda8593cd9a4a768fbe759785f253390c6c09067234abad17618a4c6821a4c0f9398a6c4ca53509ac453e87df959286511f59ee47f6e8025d9
|
7
|
+
data.tar.gz: bb2dce3675883c2d7f4527f66917d7cd1d7e33c5dc9acbf2838c09e6c7d169acc5828d7d1cb887124c2f77c7913cf222a03c11d6bdb9f02e7ad29e53582e2806
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
-
### 0.
|
3
|
+
### 0.9.0 / 2019-12-02
|
4
|
+
|
5
|
+
* ADDED: The `delegate_to` directive causes the tool to delegate execution to another tool. This means it takes the same arguments and has the same execution behavior.
|
6
|
+
* ADDED: The `delegate_to` argument to the `tool` directive causes the tool to delegate to another tool. (Note: the `alias_tool` directive is now just shorthand for creating a tool with a delegate, and as such is mildly deprecated.)
|
7
|
+
* ADDED: The `current_tool` function can be called from the DSL to get the current `Toys::Tool` object.
|
8
|
+
* ADDED: The `:e` option is now an alias for `:exit_on_nonzero_status`.
|
9
|
+
* IMPROVED: `alias_tool` is now just shorthand for delegating. This means, aliases can now point to namespaces and will resolve subtools of their targets, and they now support tab completion and online help.
|
10
|
+
* IMPROVED: This release of Toys is now compatible with Ruby 2.7.0-preview3. It fixes some Ruby 2.7 specific bugs, and sanitizes keyword argument usage to eliminate Ruby 2.7 warnings.
|
11
|
+
* IMPROVED: JRuby is now supported for most operations. However, JRuby is generally not recommended because of JVM boot latency, lack of Kernel#fork support, and other issues.
|
12
|
+
* FIXED: The the `tool` directive no longer crashes if not passed a block.
|
13
|
+
|
14
|
+
### 0.8.1 / 2019-11-19
|
15
|
+
|
16
|
+
* FIXED: Listing subtools would crash if a broken alias was present.
|
17
|
+
* DOCUMENTATION: Switched from redcarpet to kramdown, and tried to make some structural fixes.
|
4
18
|
|
5
19
|
### 0.8.0 / 2019-06-20
|
6
20
|
|
@@ -19,7 +33,7 @@ Highlights:
|
|
19
33
|
Details:
|
20
34
|
|
21
35
|
* CHANGED: Relicensed under the MIT License.
|
22
|
-
* CHANGED:
|
36
|
+
* CHANGED: Requires Ruby 2.3 or later.
|
23
37
|
* ADDED: Tab completion for bash. Args and flags can provide their own completion information.
|
24
38
|
* ADDED: The usage error screen displays alternative suggestions when an argument is misspelled. (Requires Ruby 2.4 or later.)
|
25
39
|
* ADDED: Tools can provide an interrupt handler.
|
data/README.md
CHANGED
@@ -13,7 +13,7 @@ Unlike most command line frameworks, Toys is *not primarily* designed to help
|
|
13
13
|
you build and ship a custom command line executable written in Ruby. However,
|
14
14
|
you *can* use it in that way with the "toys-core" API, available as a separate
|
15
15
|
gem. For more info on using toys-core, see
|
16
|
-
[its documentation](https://
|
16
|
+
[its documentation](https://dazuma.github.io/toys/gems/toys-core/latest).
|
17
17
|
|
18
18
|
## Introductory tutorial
|
19
19
|
|
@@ -21,8 +21,6 @@ Here's a tutorial to help you get a feel of what Toys can do.
|
|
21
21
|
|
22
22
|
### Install Toys
|
23
23
|
|
24
|
-
Toys requires Ruby 2.3 or later. (JRuby is not currently supported.)
|
25
|
-
|
26
24
|
Install the **toys** gem using:
|
27
25
|
|
28
26
|
$ gem install toys
|
@@ -52,6 +50,11 @@ Toys does not yet specially implement tab completion for zsh or other shells.
|
|
52
50
|
However, if you are using zsh, installing bash completion using `bashcompinit`
|
53
51
|
*mostly* works.
|
54
52
|
|
53
|
+
Toys requires Ruby 2.3 or later.
|
54
|
+
|
55
|
+
Most parts of Toys work on JRuby. However, JRuby is not recommended because of
|
56
|
+
JVM boot latency, lack of support for Kernel#fork, and other issues.
|
57
|
+
|
55
58
|
### Write your first tool
|
56
59
|
|
57
60
|
You can define tools by creating a *Toys file*. Go into any directory, and,
|
@@ -266,7 +269,7 @@ the remaining tasks that haven't been ported explicitly.
|
|
266
269
|
|
267
270
|
This introduction should be enough to get you started. However, Toys is a deep
|
268
271
|
tool with many more features, all explained in detail in the
|
269
|
-
[User Guide](https://
|
272
|
+
[User Guide](https://dazuma.github.io/toys/gems/toys/latest/file.guide.html).
|
270
273
|
|
271
274
|
For example, Toys lets you create tool namespaces and "subtools", and search
|
272
275
|
for tools by name and description. There are various ways to validate and
|
@@ -283,7 +286,8 @@ you build and ship a custom command line executable written in Ruby. However,
|
|
283
286
|
you *can* use it in that way with the "toys-core" API, available as a separate
|
284
287
|
gem. You would effectively write your command line executable using the same
|
285
288
|
Toys DSL that you use to write `.toys.rb` files. For more info on using
|
286
|
-
toys-core, see
|
289
|
+
toys-core, see
|
290
|
+
[its documentation](https://dazuma.github.io/toys/gems/toys-core/latest).
|
287
291
|
|
288
292
|
## Why Toys?
|
289
293
|
|
data/docs/guide.md
CHANGED
@@ -19,7 +19,7 @@ your own custom command line executable using the related **toys-core**
|
|
19
19
|
library.)
|
20
20
|
|
21
21
|
If this is your first time using Toys, we recommend starting with the
|
22
|
-
[README](https://
|
22
|
+
[README](https://dazuma.github.io/toys/gems/toys/latest), which includes a
|
23
23
|
tutorial that introduces how to install Toys, write and execute tools, and even
|
24
24
|
use Toys to replace Rake. The tutorial will likely give you enough information
|
25
25
|
to start using Toys effectively.
|
@@ -219,7 +219,7 @@ flag, but it has no additional effect.) Namespaces also support the following
|
|
219
219
|
additional flags:
|
220
220
|
|
221
221
|
* `--all` which displays all subtools, including
|
222
|
-
[hidden subtools](#
|
222
|
+
[hidden subtools](#hidden-tools) and namespaces.
|
223
223
|
* `--no-recursive` which displays only immediate subtools, instead of the
|
224
224
|
default behavior of showing all subtools recursively.
|
225
225
|
* `--search=TERM` which displays only subtools whose name or description
|
@@ -265,7 +265,7 @@ you could do this:
|
|
265
265
|
$ toys do build --staging , test --help
|
266
266
|
|
267
267
|
Each tool can choose which behavior it will support, whether or not to enforce
|
268
|
-
[flags before positional args](#
|
268
|
+
[flags before positional args](#enforcing-flags-before-args).
|
269
269
|
|
270
270
|
You can also, of course, stop recognizing flags on the command line by passing
|
271
271
|
`--` as an argument.
|
@@ -273,7 +273,7 @@ You can also, of course, stop recognizing flags on the command line by passing
|
|
273
273
|
### Tab completion
|
274
274
|
|
275
275
|
If you are using the Bash shell, Toys provides custom tab completion. See
|
276
|
-
[this section](#
|
276
|
+
[this section](#installing-tab-completion-for-bash) for instructions on
|
277
277
|
installing tab completion.
|
278
278
|
|
279
279
|
Toys will complete tool and subtool names, flags, values passed to flags, and
|
@@ -325,7 +325,7 @@ directory and its subdirectories.
|
|
325
325
|
|
326
326
|
The format of a Toys file is a Ruby DSL that includes directives, methods, and
|
327
327
|
nested blocks. The actual DSL is specified in the
|
328
|
-
[Toys::DSL::Tool class](https://
|
328
|
+
[Toys::DSL::Tool class](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/DSL/Tool).
|
329
329
|
|
330
330
|
To create a tool, write a `tool` block, giving the tool a name. Within the
|
331
331
|
block, use directives to set the properties of the tool, including descriptions
|
@@ -374,9 +374,9 @@ illustrates how to prevent a line from being word-wrapped. This is also a
|
|
374
374
|
useful technique for preserving spaces and indentation.
|
375
375
|
|
376
376
|
For more details, see the reference documentation for
|
377
|
-
[Toys::DSL::Tool#desc](https://
|
377
|
+
[Toys::DSL::Tool#desc](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/DSL/Tool#desc-instance_method)
|
378
378
|
and
|
379
|
-
[Toys::DSL::Tool#long_desc](https://
|
379
|
+
[Toys::DSL::Tool#long_desc](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/DSL/Tool#long_desc-instance_method).
|
380
380
|
|
381
381
|
### Positional arguments
|
382
382
|
|
@@ -386,7 +386,7 @@ value at execution time. Arguments may also have various properties controlling
|
|
386
386
|
how values are validated and expressed.
|
387
387
|
|
388
388
|
The above example uses the directive
|
389
|
-
[Toys::DSL::Tool#optional_arg](https://
|
389
|
+
[Toys::DSL::Tool#optional_arg](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/DSL/Tool#optional_arg-instance_method)
|
390
390
|
to declare an **optional argument** named `:whom`. If the argument is provided
|
391
391
|
on the command line e.g.
|
392
392
|
|
@@ -405,12 +405,12 @@ If the option name is a valid method name, Toys will provide a method that you
|
|
405
405
|
can use to retrieve the value. In the above example, we retrieve the value for
|
406
406
|
the option `:whom` by calling the method `whom`. If the option name cannot be
|
407
407
|
made into a method, you can retrieve the value by calling
|
408
|
-
[Toys::Context#get](https://
|
408
|
+
[Toys::Context#get](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context#get-instance_method).
|
409
409
|
|
410
410
|
An argument may also be **required**, which means it must be provided on the
|
411
411
|
command line; otherwise the tool will report a usage error. You may declare a
|
412
412
|
required argument using the directive
|
413
|
-
[Toys::DSL::Tool#required_arg](https://
|
413
|
+
[Toys::DSL::Tool#required_arg](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/DSL/Tool#required_arg-instance_method).
|
414
414
|
|
415
415
|
#### Parsing required and optional arguments
|
416
416
|
|
@@ -478,7 +478,7 @@ because it is not provided, will default to `"the-default"` instead of `nil`.
|
|
478
478
|
Normally, unmatched arguments will result in an error message. However, you can
|
479
479
|
provide an "argument" to match all **remaining** unmatched arguments at the
|
480
480
|
end, using the directive
|
481
|
-
[Toys::DSL::Tool#remaining_args](https://
|
481
|
+
[Toys::DSL::Tool#remaining_args](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/DSL/Tool#remaining_args-instance_method).
|
482
482
|
For example:
|
483
483
|
|
484
484
|
tool "args-demo" do
|
@@ -516,7 +516,7 @@ an example:
|
|
516
516
|
long_desc: ["Long descriptions may have multiple lines.",
|
517
517
|
"This is the second line."]
|
518
518
|
|
519
|
-
See the [above section on Descriptions](#
|
519
|
+
See the [above section on Descriptions](#tool-descriptions) for more
|
520
520
|
information on how descriptions are rendered and word wrapped.
|
521
521
|
|
522
522
|
Because long descriptions may be unwieldly to write as a hash argument in this
|
@@ -530,7 +530,7 @@ way, Toys provides an alternate syntax for defining arguments using a block.
|
|
530
530
|
end
|
531
531
|
|
532
532
|
For detailed info on configuring an argument using a block, see the
|
533
|
-
[Toys::DSL::PositionalArg class](https://
|
533
|
+
[Toys::DSL::PositionalArg class](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/DSL/PositionalArg).
|
534
534
|
|
535
535
|
#### Argument acceptors
|
536
536
|
|
@@ -561,7 +561,7 @@ and
|
|
561
561
|
[OptionParser::OctalInteger](http://ruby-doc.org/stdlib/libdoc/optparse/rdoc/OptionParser.html#OctalInteger).
|
562
562
|
|
563
563
|
You may also create **custom acceptors**. See the
|
564
|
-
[section below on Custom Acceptors](#
|
564
|
+
[section below on Custom Acceptors](#custom-acceptors) for more information.
|
565
565
|
|
566
566
|
#### Argument completions
|
567
567
|
|
@@ -604,7 +604,7 @@ As with arguments, Toys will provide a method that you can call to retrieve the
|
|
604
604
|
option value set by a flag. In this case, a method called `shout` will be
|
605
605
|
available, and will return either true or false. If the option name cannot be
|
606
606
|
made into a method, you can retrieve the value by calling
|
607
|
-
[Toys::Context#get](https://
|
607
|
+
[Toys::Context#get](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context#get-instance_method).
|
608
608
|
|
609
609
|
#### Flag types
|
610
610
|
|
@@ -772,7 +772,7 @@ and
|
|
772
772
|
[OptionParser::OctalInteger](http://ruby-doc.org/stdlib/libdoc/optparse/rdoc/OptionParser.html#OctalInteger).
|
773
773
|
|
774
774
|
You may also create **custom acceptors**. See the
|
775
|
-
[section below on Custom Acceptors](#
|
775
|
+
[section below on Custom Acceptors](#custom-acceptors) for more information.
|
776
776
|
|
777
777
|
#### Defaults and handlers
|
778
778
|
|
@@ -830,7 +830,7 @@ like this:
|
|
830
830
|
Note that both flags affect the same option name, `VERBOSITY`. The first
|
831
831
|
increments it each time it appears, and the second decrements it. A tool can
|
832
832
|
query this option and get an integer telling the requested verbosity level, as
|
833
|
-
you will see [below](#
|
833
|
+
you will see [below](#logging-and-verbosity).
|
834
834
|
|
835
835
|
Toys provides a few built-in handlers that can be specified by name. We already
|
836
836
|
discussed the default handler that can be specified by its name `:set` or by
|
@@ -858,7 +858,7 @@ directive. The `desc:` argument takes a single string description, while the
|
|
858
858
|
long_desc: ["Long descriptions may have multiple lines.",
|
859
859
|
"This is the second line."]
|
860
860
|
|
861
|
-
See the [above section on Descriptions](#
|
861
|
+
See the [above section on Descriptions](#tool-descriptions) for more information on
|
862
862
|
how descriptions are rendered and word wrapped.
|
863
863
|
|
864
864
|
Because long descriptions may be unwieldly to write as a hash argument in this
|
@@ -873,7 +873,7 @@ way, Toys provides an alternate syntax for defining flags using a block.
|
|
873
873
|
end
|
874
874
|
|
875
875
|
For detailed info on configuring an flag using a block, see the
|
876
|
-
[Toys::DSL::Flag class](https://
|
876
|
+
[Toys::DSL::Flag class](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/DSL/Flag).
|
877
877
|
|
878
878
|
#### Flag completions
|
879
879
|
|
@@ -981,7 +981,7 @@ your tools.
|
|
981
981
|
|
982
982
|
Note: If you do not define the `run` method for a tool, Toys provides a default
|
983
983
|
implementation that displays the tool's help screen. This is typically used for
|
984
|
-
namespaces, as we shall see [below](#
|
984
|
+
namespaces, as we shall see [below](#namespaces-and-subtools). Most tools,
|
985
985
|
however, should define `run`.
|
986
986
|
|
987
987
|
Let's revisit the "greet" example we covered earlier.
|
@@ -1008,7 +1008,7 @@ value. In the above example, `whom` and `shout` are such methods.
|
|
1008
1008
|
|
1009
1009
|
If you create a flag or argument whose option name is not a symbol *or* is not
|
1010
1010
|
a valid method name, you can still get the value by calling the
|
1011
|
-
[Toys::Context#get](https://
|
1011
|
+
[Toys::Context#get](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context#get-instance_method)
|
1012
1012
|
method. For example:
|
1013
1013
|
|
1014
1014
|
tool "greet" do
|
@@ -1027,7 +1027,7 @@ method. For example:
|
|
1027
1027
|
If a tool's `run` method finishes normally, Toys will exit with a result code
|
1028
1028
|
of 0, indicating success. You may exit immediately and/or provide a nonzero
|
1029
1029
|
result by calling the
|
1030
|
-
[Toys::Context#exit](https://
|
1030
|
+
[Toys::Context#exit](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context#exit-instance_method)
|
1031
1031
|
method:
|
1032
1032
|
|
1033
1033
|
def run
|
@@ -1149,7 +1149,7 @@ than two or three levels of hierarchy can be confusing to use.
|
|
1149
1149
|
## Understanding Toys files
|
1150
1150
|
|
1151
1151
|
Toys commands are defined in Toys files. We covered the basic syntax for these
|
1152
|
-
files in the [above section on defining tools](#
|
1152
|
+
files in the [above section on defining tools](#defining-tools). In this
|
1153
1153
|
section, we will take a deeper look at what you can do with Toys files.
|
1154
1154
|
|
1155
1155
|
### Toys directories
|
@@ -1254,7 +1254,7 @@ in the separate file `.toys/test/unit.rb`.
|
|
1254
1254
|
Toys also loads index files first before other files in the directory. This
|
1255
1255
|
means they are convenient places to define shared code that can be used by all
|
1256
1256
|
the subtools defined in that directory, as we shall see later in the
|
1257
|
-
[section on sharing code](#
|
1257
|
+
[section on sharing code](#sharing-code).
|
1258
1258
|
|
1259
1259
|
### The Toys search path
|
1260
1260
|
|
@@ -1308,12 +1308,12 @@ This section describes the context and resources available to your tool when it
|
|
1308
1308
|
is running; that is, what you can call from your tool's `run` method.
|
1309
1309
|
|
1310
1310
|
Each tool is defined as a class that subclasses
|
1311
|
-
[Toys::Context](https://
|
1311
|
+
[Toys::Context](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context). The base
|
1312
1312
|
class defines a number of methods, and provides access to a variety of data and
|
1313
1313
|
objects relevant to your tool. We have already seen earlier how to use the
|
1314
|
-
[Toys::Context#get](https://
|
1314
|
+
[Toys::Context#get](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context#get-instance_method)
|
1315
1315
|
method to retrieve option values, and how to use the
|
1316
|
-
[Toys::Context#exit](https://
|
1316
|
+
[Toys::Context#exit](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context#exit-instance_method)
|
1317
1317
|
method to exit immediately and return an exit code. Now we will cover other
|
1318
1318
|
resources available to your tool.
|
1319
1319
|
|
@@ -1321,7 +1321,7 @@ resources available to your tool.
|
|
1321
1321
|
|
1322
1322
|
In addition to the options set by your tool's flags and command line arguments,
|
1323
1323
|
a variety of other data and objects are also accessible using the
|
1324
|
-
[Toys::Context#get method](https://
|
1324
|
+
[Toys::Context#get method](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context#get-instance_method)
|
1325
1325
|
For example, you can get the full name of the tool being executed like this:
|
1326
1326
|
|
1327
1327
|
def run
|
@@ -1331,7 +1331,7 @@ For example, you can get the full name of the tool being executed like this:
|
|
1331
1331
|
The `TOOL_NAME` constant above is a well-known key that corresponds to the full
|
1332
1332
|
name (as an array of strings) of the running tool. A variety of well-known keys
|
1333
1333
|
are defined in the
|
1334
|
-
[Toys::Context::Key module](https://
|
1334
|
+
[Toys::Context::Key module](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context/Key).
|
1335
1335
|
They include information about the current execution, such as the tool name and
|
1336
1336
|
the original command line arguments passed to it (before they were parsed).
|
1337
1337
|
They also include some internal Toys objects, which can be used to do things
|
@@ -1339,7 +1339,7 @@ like write to the logger or look up and call other tools.
|
|
1339
1339
|
|
1340
1340
|
Most of the important context also can be accessed from convenience methods.
|
1341
1341
|
For example, the `TOOL_NAME` is also available from the
|
1342
|
-
[Toys::Context#tool_name method](https://
|
1342
|
+
[Toys::Context#tool_name method](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context#tool_name-instance_method):
|
1343
1343
|
|
1344
1344
|
def run
|
1345
1345
|
puts "Current tool is #{tool_name}"
|
@@ -1353,7 +1353,7 @@ access from built-in context.
|
|
1353
1353
|
Toys provides a Logger (a simple instance of the Ruby standard library logger
|
1354
1354
|
that writes to standard error) for your tool to use to report status
|
1355
1355
|
information. You can access this logger via the `LOGGER` context key, or the
|
1356
|
-
[Toys::Context#logger method](https://
|
1356
|
+
[Toys::Context#logger method](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context#logger-instance_method).
|
1357
1357
|
For example:
|
1358
1358
|
|
1359
1359
|
def run
|
@@ -1363,10 +1363,10 @@ For example:
|
|
1363
1363
|
The current logger level is controlled by the verbosity. Verbosity is an
|
1364
1364
|
integer context value that you can retrieve using the `VERBOSITY` context key
|
1365
1365
|
or the
|
1366
|
-
[Toys::Context#verbosity method](https://
|
1366
|
+
[Toys::Context#verbosity method](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context#verbosity-instance_method).
|
1367
1367
|
The verbosity is set to 0 by default. This corresponds to a logger level of
|
1368
1368
|
`WARN`. That is, warnings, errors, and fatals are displayed, while infos and
|
1369
|
-
debugs are not. However, [as we saw earlier](#
|
1369
|
+
debugs are not. However, [as we saw earlier](#standard-flags), most tools
|
1370
1370
|
automatically respond to the `--verbose` and `--quiet` flags, (or `-v` and
|
1371
1371
|
`-q`), which increment and decrement the verbosity value, respectively. If you
|
1372
1372
|
run a tool with `-v`, the verbosity is incremented to 1, and the logger level
|
@@ -1378,11 +1378,11 @@ easily provide command line based control of the output verbosity.
|
|
1378
1378
|
|
1379
1379
|
A common operation a tool might want to do is "call" another tool. This can be
|
1380
1380
|
done via the CLI object, which you can retrieve using the `CLI` key or the
|
1381
|
-
[Toys::Context#cli method](https://
|
1381
|
+
[Toys::Context#cli method](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context#cli-instance_method).
|
1382
1382
|
These return the current instance of
|
1383
|
-
[Toys::CLI](https://
|
1383
|
+
[Toys::CLI](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/CLI) which is the
|
1384
1384
|
"main" interface to Toys. In particular, it provides the
|
1385
|
-
[Toys::CLI#run method](https://
|
1385
|
+
[Toys::CLI#run method](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/CLI#run-instance_method)
|
1386
1386
|
which can be used to call another tool:
|
1387
1387
|
|
1388
1388
|
def run
|
@@ -1395,15 +1395,15 @@ execute, and return a process status code (i.e. 0 for success, and nonzero for
|
|
1395
1395
|
error). Make sure you handle the exit status. For example, in most cases, you
|
1396
1396
|
should probably exit if the tool you are calling returns a nonzero code.
|
1397
1397
|
|
1398
|
-
You may also use the `exec` mixin [described below](#
|
1398
|
+
You may also use the `exec` mixin [described below](#executing-subprocesses) to
|
1399
1399
|
run a tool in a separate process. This is particularly useful if you need to
|
1400
1400
|
capture or manipulate that tool's input or output stream.
|
1401
1401
|
|
1402
1402
|
### Helper methods and mixins
|
1403
1403
|
|
1404
|
-
The methods of [Toys::Context](https://
|
1404
|
+
The methods of [Toys::Context](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context)
|
1405
1405
|
are not the only methods available for your tool to call. We
|
1406
|
-
[saw earlier](#
|
1406
|
+
[saw earlier](#tool-execution-basics) that a tool can define additional methods
|
1407
1407
|
that you can use as helpers.
|
1408
1408
|
|
1409
1409
|
You can also include **mixins**, which are modules that bring in a whole set of
|
@@ -1423,12 +1423,12 @@ special `puts` method that lets you include style information such as `:bold`,
|
|
1423
1423
|
which affects the display on ANSI-capable terminals.
|
1424
1424
|
|
1425
1425
|
For details on the built-in mixins provided by Toys, see the modules under
|
1426
|
-
[Toys::StandardMixins](https://
|
1426
|
+
[Toys::StandardMixins](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/StandardMixins).
|
1427
1427
|
We will look at a few examples of the use of these mixins below. Built-in
|
1428
1428
|
mixins have names that are symbols.
|
1429
1429
|
|
1430
1430
|
You can also define your own mixins, as we will see in the
|
1431
|
-
[upcoming section on defining mixins](#
|
1431
|
+
[upcoming section on defining mixins](#defining-mixins).
|
1432
1432
|
|
1433
1433
|
### Executing subprocesses
|
1434
1434
|
|
@@ -1461,9 +1461,9 @@ subprocesses:
|
|
1461
1461
|
* A block run in a separate (forked) process.
|
1462
1462
|
|
1463
1463
|
For more information, see the
|
1464
|
-
[Toys::StandardMixins::Exec mixin module](https://
|
1464
|
+
[Toys::StandardMixins::Exec mixin module](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/StandardMixins/Exec)
|
1465
1465
|
and the underyling library
|
1466
|
-
[Toys::Utils::Exec](https://
|
1466
|
+
[Toys::Utils::Exec](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Utils/Exec).
|
1467
1467
|
|
1468
1468
|
### Formatting output
|
1469
1469
|
|
@@ -1474,19 +1474,19 @@ can help create nicer interfaces.
|
|
1474
1474
|
|
1475
1475
|
First, there is `:terminal`, which provides some basic terminal features such
|
1476
1476
|
as styled output and simple spinners. For information, see the
|
1477
|
-
[Toys::StandardMixins::Terminal mixin module](https://
|
1477
|
+
[Toys::StandardMixins::Terminal mixin module](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/StandardMixins/Terminal)
|
1478
1478
|
and the underyling library
|
1479
|
-
[Toys::Terminal](https://
|
1479
|
+
[Toys::Terminal](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Terminal).
|
1480
1480
|
|
1481
1481
|
If you prefer the venerable Highline library interface, Toys provides a mixin
|
1482
1482
|
called `:highline` that automatically installs the highline gem (version 2.x)
|
1483
1483
|
if it is not available, and makes a highline object available to the tool. For
|
1484
1484
|
more information, see the
|
1485
|
-
[Toys::StandardMixins::Highline mixin module](https://
|
1485
|
+
[Toys::StandardMixins::Highline mixin module](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/StandardMixins/Highline).
|
1486
1486
|
|
1487
1487
|
You may also use other third-party gems such as
|
1488
1488
|
[tty](https://github.com/piotrmurach/tty). The section below on
|
1489
|
-
[useful gems](#
|
1489
|
+
[useful gems](#useful-gems) provides some examples.
|
1490
1490
|
|
1491
1491
|
## Sharing code
|
1492
1492
|
|
@@ -1499,7 +1499,7 @@ classes, and constants, that you might define in your tools.
|
|
1499
1499
|
|
1500
1500
|
### Defining mixins
|
1501
1501
|
|
1502
|
-
We [saw earlier](#
|
1502
|
+
We [saw earlier](#helper-methods-and-mixins) that you can mix a module (with
|
1503
1503
|
all its methods) into your tool using the `include` directive. You can specify
|
1504
1504
|
a module itself, or the name of a built-in mixin such as `:exec` or
|
1505
1505
|
`:terminal`. But you can also define your own mixin using the `mixin`
|
@@ -1514,7 +1514,7 @@ includes the mixin, in the same way that you can include a Ruby module.
|
|
1514
1514
|
|
1515
1515
|
(Note that, unlike full modules, mixins allow only methods to be shared. Mixins
|
1516
1516
|
do not support constants. See the next section on
|
1517
|
-
[using constants](#
|
1517
|
+
[using constants](#using-constants) to learn how Toys handles constants.)
|
1518
1518
|
|
1519
1519
|
Here's an example. Suppose you had common setup code that you wanted to share
|
1520
1520
|
among your testing tools.
|
@@ -1553,7 +1553,7 @@ descendant tools defined in that same directory, but not in a different `.toys`
|
|
1553
1553
|
directory.
|
1554
1554
|
|
1555
1555
|
A common technique, for example, would be to define a mixin in the
|
1556
|
-
[index file](#
|
1556
|
+
[index file](#index-files) in a Toys directory. You can then include it from
|
1557
1557
|
any subtools defined in other files in that same directory.
|
1558
1558
|
|
1559
1559
|
#### Mixin initializers
|
@@ -1561,8 +1561,8 @@ any subtools defined in other files in that same directory.
|
|
1561
1561
|
Sometimes a mixin will want to initialize some state before the tool executes.
|
1562
1562
|
For example, the `:highline` mixin creates an instance of Highline during tool
|
1563
1563
|
initialization. To do so, provide an `on_initialize` block in the mixin block.
|
1564
|
-
The initializer block is called within the context of the tool
|
1565
|
-
|
1564
|
+
The initializer block is called within the context of the tool after arguments
|
1565
|
+
are parsed, so it has access to the tool's built-in context and options.
|
1566
1566
|
|
1567
1567
|
If you provide extra arguments when you `include` a mixin, those are passed to
|
1568
1568
|
the initializer block.
|
@@ -1604,6 +1604,16 @@ pass a value to the mixin's initializer:
|
|
1604
1604
|
end
|
1605
1605
|
end
|
1606
1606
|
|
1607
|
+
#### Mixin inclusion hooks
|
1608
|
+
|
1609
|
+
A mixin can also optionally provide directives to run when the mixin is
|
1610
|
+
included, by defining an `on_include` block. (This is functionally similar to
|
1611
|
+
defining an `included` method on a Ruby module.) The `on_include` block is
|
1612
|
+
called within the context of the tool DSL, so it can invoke any DSL directives.
|
1613
|
+
|
1614
|
+
If you provide extra arguments when you `include` a mixin, those are passed to
|
1615
|
+
the inclusion block.
|
1616
|
+
|
1607
1617
|
### Using constants
|
1608
1618
|
|
1609
1619
|
You can define and use Ruby constants, i.e. names beginning with a capital
|
@@ -1723,7 +1733,7 @@ development, including templates that generate build, test, and documentation
|
|
1723
1733
|
tools. The `:minitest` template illustrated above is one of these built-in
|
1724
1734
|
templates. Like built-in mixins, built-in template names are always symbols.
|
1725
1735
|
You can read more about them in the next section on using
|
1726
|
-
[Toys as a Rake replacement](#
|
1736
|
+
[Toys as a Rake replacement](#toys-as-a-rake-replacement).
|
1727
1737
|
|
1728
1738
|
You may also write your own templates. Here's how...
|
1729
1739
|
|
@@ -1789,7 +1799,7 @@ directive by setting properties on the template object.
|
|
1789
1799
|
|
1790
1800
|
Finally, templates are classes, and you can create a template directly as a
|
1791
1801
|
class by including the
|
1792
|
-
[Toys::Template](https://
|
1802
|
+
[Toys::Template](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Template) module
|
1793
1803
|
in your class definition.
|
1794
1804
|
|
1795
1805
|
class GreetTemplate
|
@@ -1842,7 +1852,7 @@ tools are defined. You can use such files to define Ruby classes, modules, and
|
|
1842
1852
|
other code that may be used and shared by your tools.
|
1843
1853
|
|
1844
1854
|
To use preloaded files, you must define your tools inside a
|
1845
|
-
[Toys directory](#
|
1855
|
+
[Toys directory](#toys-directories). Before any tools inside a directory are
|
1846
1856
|
loaded, any file named `.preload.rb` in the directory is automatically
|
1847
1857
|
required. Additionally, any Ruby files inside a subdirectory called `.preload`
|
1848
1858
|
are also automatically required.
|
@@ -1939,7 +1949,7 @@ defined.
|
|
1939
1949
|
|
1940
1950
|
Here's an example tool that just runs `rake`. Because it requires rake to be
|
1941
1951
|
installed in order to *run* the tool, we call the
|
1942
|
-
[Toys::StandardMixins::Gems#gem](https://
|
1952
|
+
[Toys::StandardMixins::Gems#gem](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/StandardMixins/Gems#gem-instance_method)
|
1943
1953
|
method provided by the `:gems` mixin when running.
|
1944
1954
|
|
1945
1955
|
tool "rake" do
|
@@ -1957,10 +1967,10 @@ exception is raised.
|
|
1957
1967
|
|
1958
1968
|
If you are not in the Toys DSL context—for example from a class-based
|
1959
1969
|
mixin—you should use
|
1960
|
-
[Toys::Utils::Gems.activate](https://
|
1970
|
+
[Toys::Utils::Gems.activate](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Utils/Gems#activate-class_method)
|
1961
1971
|
instead. (Note that you must `require "toys/utils/gems"` explicitly before
|
1962
1972
|
invoking the
|
1963
|
-
[Toys::Utils::Gems](https://
|
1973
|
+
[Toys::Utils::Gems](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Utils/Gems)
|
1964
1974
|
class because, like all classes under `Toys::Utils`, Toys does not load it
|
1965
1975
|
automatically.) For example:
|
1966
1976
|
|
@@ -2354,32 +2364,60 @@ these features is very useful for certain types of tools, and it is good at
|
|
2354
2364
|
least to know that you *can* do these things, even if you don't use them
|
2355
2365
|
regularly.
|
2356
2366
|
|
2357
|
-
###
|
2367
|
+
### Delegating tools
|
2358
2368
|
|
2359
|
-
|
2360
|
-
|
2361
|
-
|
2369
|
+
A tool may **delegate** to another tool, which means it uses the other tool's
|
2370
|
+
flags, arguments, and execution. Effectively, it becomes an "alias"---that is,
|
2371
|
+
an alternate name---for the target tool.
|
2362
2372
|
|
2363
|
-
|
2373
|
+
For example, suppose you have a tool called `test` that can be invoked with
|
2374
|
+
`toys test`. You could define a tool `t` that delegates to `test`. Then,
|
2375
|
+
running `toys t` will have the same effect as `toys test`.
|
2376
|
+
|
2377
|
+
To delegate a tool, pass the `:delegate_to` keyword argument to the `tool`
|
2378
|
+
directive. For example:
|
2364
2379
|
|
2365
2380
|
tool "test" do
|
2366
2381
|
# Define test tool here...
|
2367
2382
|
end
|
2368
2383
|
|
2369
|
-
|
2384
|
+
tool "t", delegate_to: "test"
|
2385
|
+
|
2386
|
+
Tools can delegate to tools or namespaces. For example, you can delegate `sys`
|
2387
|
+
to the built-in namespace `system`:
|
2388
|
+
|
2389
|
+
tool "sys", delegate_to: "system"
|
2390
|
+
|
2391
|
+
That will let you run `toys sys version` (which will be the equivalent of
|
2392
|
+
`toys system version`).
|
2370
2393
|
|
2371
|
-
|
2372
|
-
|
2394
|
+
To delegate to a subtool, pass an array, or a string delimited by `":"` or
|
2395
|
+
`"."` characters, as the target:
|
2373
2396
|
|
2374
2397
|
tool "gem" do
|
2375
2398
|
tool "test" do
|
2376
|
-
# Define
|
2399
|
+
# Define the tool here
|
2377
2400
|
end
|
2401
|
+
end
|
2402
|
+
|
2403
|
+
tool "test", delegate_to: ["gem", "test"]
|
2378
2404
|
|
2379
|
-
|
2380
|
-
|
2405
|
+
In most cases, if a tool delegates to another tool, you should not do anything
|
2406
|
+
else with it. For example, it should not have its own implementation or contain
|
2407
|
+
any subtools. However, there are a few exceptions. You might, for example, want
|
2408
|
+
a namespace to delegate to one of its subtools:
|
2409
|
+
|
2410
|
+
tool "test", delegate_to: ["test", "unit"] do
|
2411
|
+
tool "unit" do
|
2412
|
+
# Run unit tests
|
2413
|
+
end
|
2414
|
+
tool "integration" do
|
2415
|
+
# Run integration tests
|
2416
|
+
end
|
2381
2417
|
end
|
2382
2418
|
|
2419
|
+
Now `toys test` delegates to, and thus has the same effect as `toys test unit`.
|
2420
|
+
|
2383
2421
|
### Custom acceptors
|
2384
2422
|
|
2385
2423
|
We saw earlier that flags and positional arguments can have acceptors, which
|
@@ -2411,7 +2449,7 @@ to accept integers from 1 to 5 is:
|
|
2411
2449
|
acceptor("1to5", [1, 2, 3, 4, 5])
|
2412
2450
|
|
2413
2451
|
There are various other options. See the reference documentation for
|
2414
|
-
[Toys::DSL::Tool#acceptor](https://
|
2452
|
+
[Toys::DSL::Tool#acceptor](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/DSL/Tool#acceptor-instance_method).
|
2415
2453
|
|
2416
2454
|
An acceptor is available to the tool in which it is defined, and any subtools
|
2417
2455
|
and descendants defined at the same point in the Toys search path, but not from
|
@@ -2544,7 +2582,7 @@ To disable argument parsing, use the `disable_argument_parsing` directive. This
|
|
2544
2582
|
directive disables parsing and validation of flags and positional arguments.
|
2545
2583
|
(Thus, it is incompatible with specifying any flags or arguments for the tool.)
|
2546
2584
|
Instead, you can retrieve the raw arguments using the
|
2547
|
-
[Toys::Context#args method](https://
|
2585
|
+
[Toys::Context#args method](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context#args-instance_method).
|
2548
2586
|
|
2549
2587
|
Here is an example that wraps calls to git:
|
2550
2588
|
|
@@ -2631,7 +2669,7 @@ handler.
|
|
2631
2669
|
|
2632
2670
|
If your handler block or method takes a parameter, Toys will pass it the array
|
2633
2671
|
of usage errors. Otherwise, you can get the array by calling
|
2634
|
-
[Toys::Context#usage_errors](https://
|
2672
|
+
[Toys::Context#usage_errors](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context#usage_errors-instance_method).
|
2635
2673
|
This array will provide you with a list of the usage errors encountered.
|
2636
2674
|
|
2637
2675
|
You can also get information about the arguments that could not be parsed from
|
@@ -2663,17 +2701,17 @@ provides a convenient place to put data files that can be looked up by tools
|
|
2663
2701
|
either during definition or runtime.
|
2664
2702
|
|
2665
2703
|
To use data files, you must define your tools inside a
|
2666
|
-
[Toys directory](#
|
2704
|
+
[Toys directory](#toys-directories). Within the Toys directory, create a
|
2667
2705
|
directory named `.data` and copy your data files there.
|
2668
2706
|
|
2669
2707
|
You may then "find" a data file by providing the relative path to the file from
|
2670
2708
|
the `.data` directory. When defining a tool, use the
|
2671
|
-
[Toys::DSL::Tool#find_data](https://
|
2709
|
+
[Toys::DSL::Tool#find_data](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/DSL/Tool#find_data-instance_method)
|
2672
2710
|
directive in a Toys file. Or, at tool execution time, call
|
2673
|
-
[Toys::Context#find_data](https://
|
2711
|
+
[Toys::Context#find_data](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/Context#find_data-instance_method)
|
2674
2712
|
(which is a convenience method for getting the tool source object using the
|
2675
2713
|
`TOOL_SOURCE` key, and calling
|
2676
|
-
[Toys::SourceInfo#find_data](https://
|
2714
|
+
[Toys::SourceInfo#find_data](https://dazuma.github.io/toys/gems/toys-core/latest/Toys/SourceInfo#find_data-instance_method)
|
2677
2715
|
on it). In either case, `find_data` locates a matching file (or directory)
|
2678
2716
|
among the data files, and returns the full path to that file system object. You
|
2679
2717
|
may then read the file or perform any other operation on it.
|
@@ -2820,7 +2858,7 @@ the entire toys directory structure. So if your tool definition is inside a
|
|
2820
2858
|
|
2821
2859
|
This behavior is particularly useful for build tools. Indeed, all the build
|
2822
2860
|
tools described in the section on
|
2823
|
-
[Toys as a Rake Replacement](#
|
2861
|
+
[Toys as a Rake Replacement](#toys-as-a-rake-replacement) automatically move
|
2824
2862
|
into the context directory when they execute.
|
2825
2863
|
|
2826
2864
|
#### Changing the context directory
|
@@ -2986,4 +3024,4 @@ line executable, simply by setting options or adding plugins. For example:
|
|
2986
3024
|
many other features.
|
2987
3025
|
|
2988
3026
|
For more information, see the
|
2989
|
-
[Toys-Core documentation](https://
|
3027
|
+
[Toys-Core documentation](https://dazuma.github.io/toys/gems/toys-core/latest/).
|
data/lib/toys/standard_cli.rb
CHANGED
@@ -92,7 +92,7 @@ module Toys
|
|
92
92
|
" and Toys will automatically organize them, parse arguments, and provide documentation." \
|
93
93
|
" Tools can be global or scoped to specific directories. You can also use Toys instead of" \
|
94
94
|
" Rake to provide build and maintenance scripts for your projects." \
|
95
|
-
" For detailed information, see https://
|
95
|
+
" For detailed information, see https://dazuma.github.io/toys"
|
96
96
|
|
97
97
|
##
|
98
98
|
# Short description for the version flag.
|
data/lib/toys/templates/rdoc.rb
CHANGED
@@ -111,8 +111,8 @@ module Toys
|
|
111
111
|
include :gems
|
112
112
|
|
113
113
|
to_run do
|
114
|
-
|
115
|
-
|
114
|
+
gem_requirements = Array(template.gem_version)
|
115
|
+
gem "rdoc", *gem_requirements
|
116
116
|
|
117
117
|
::Dir.chdir(context_directory || ::Dir.getwd) do
|
118
118
|
files = []
|
@@ -131,7 +131,11 @@ module Toys
|
|
131
131
|
args << "-T" << template.template if template.template
|
132
132
|
args << "-f" << template.generator if template.generator
|
133
133
|
|
134
|
-
|
134
|
+
exec_ruby([], in: :controller) do |controller|
|
135
|
+
controller.in.puts("gem 'rdoc', *#{gem_requirements.inspect}")
|
136
|
+
controller.in.puts("require 'rdoc'")
|
137
|
+
controller.in.puts("::RDoc::RDoc.new.document(*#{(args + files).inspect})")
|
138
|
+
end
|
135
139
|
end
|
136
140
|
end
|
137
141
|
end
|
data/lib/toys/templates/rspec.rb
CHANGED
@@ -151,7 +151,8 @@ module Toys
|
|
151
151
|
desc: "Paths to the specs to run (defaults to all specs)"
|
152
152
|
|
153
153
|
to_run do
|
154
|
-
|
154
|
+
gem_requirements = Array(template.gem_version)
|
155
|
+
gem "rspec", *gem_requirements
|
155
156
|
|
156
157
|
::Dir.chdir(context_directory || ::Dir.getwd) do
|
157
158
|
ruby_args = []
|
@@ -171,6 +172,7 @@ module Toys
|
|
171
172
|
ruby_args.concat(files)
|
172
173
|
|
173
174
|
result = exec_ruby(ruby_args, in: :controller) do |controller|
|
175
|
+
controller.in.puts("gem 'rspec', *#{gem_requirements.inspect}")
|
174
176
|
controller.in.puts("require 'rspec/core'")
|
175
177
|
controller.in.puts("::RSpec::Core::Runner.invoke")
|
176
178
|
end
|
@@ -158,8 +158,8 @@ module Toys
|
|
158
158
|
include :gems
|
159
159
|
|
160
160
|
to_run do
|
161
|
-
|
162
|
-
|
161
|
+
gem_requirements = Array(template.gem_version)
|
162
|
+
gem "yard", *gem_requirements
|
163
163
|
|
164
164
|
::Dir.chdir(context_directory || ::Dir.getwd) do
|
165
165
|
files = []
|
@@ -191,13 +191,21 @@ module Toys
|
|
191
191
|
end
|
192
192
|
run_options.concat(files)
|
193
193
|
|
194
|
-
result =
|
194
|
+
result = exec_ruby([], in: :controller) do |controller|
|
195
|
+
controller.in.puts("gem 'yard', *#{gem_requirements.inspect}")
|
196
|
+
controller.in.puts("require 'yard'")
|
197
|
+
controller.in.puts("::YARD::CLI::Yardoc.run(*#{run_options.inspect})")
|
198
|
+
end
|
195
199
|
if result.error?
|
196
200
|
puts("Yardoc encountered errors", :red, :bold) unless verbosity.negative?
|
197
201
|
exit(1)
|
198
202
|
end
|
199
203
|
unless stats_options.empty?
|
200
|
-
result =
|
204
|
+
result = exec_ruby([], in: :controller, out: :capture) do |controller|
|
205
|
+
controller.in.puts("gem 'yard', *#{gem_requirements.inspect}")
|
206
|
+
controller.in.puts("require 'yard'")
|
207
|
+
controller.in.puts("::YARD::CLI::Stats.run(*#{stats_options.inspect})")
|
208
|
+
end
|
201
209
|
puts result.captured_out
|
202
210
|
if result.error?
|
203
211
|
puts("Yardoc encountered errors", :red, :bold) unless verbosity.negative?
|
data/lib/toys/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: toys-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.9.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.9.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: highline
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '5.
|
61
|
+
version: '5.13'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '5.
|
68
|
+
version: '5.13'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: minitest-focus
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,42 +100,42 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '13.0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '13.0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '3.
|
117
|
+
version: '3.9'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '3.
|
124
|
+
version: '3.9'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rubocop
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
131
|
+
version: 0.77.0
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
138
|
+
version: 0.77.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: yard
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -192,7 +192,7 @@ metadata:
|
|
192
192
|
changelog_uri: https://github.com/dazuma/toys/blob/master/toys/CHANGELOG.md
|
193
193
|
source_code_uri: https://github.com/dazuma/toys
|
194
194
|
bug_tracker_uri: https://github.com/dazuma/toys/issues
|
195
|
-
documentation_uri: https://
|
195
|
+
documentation_uri: https://dazuma.github.io/toys/gems/toys-core/latest
|
196
196
|
post_install_message:
|
197
197
|
rdoc_options: []
|
198
198
|
require_paths:
|