toys-core 0.14.7 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af0d0ca4cb5ad8e29460fbb43a4a2d1466375c5346a4e5ea311075650945b83b
4
- data.tar.gz: a2ee5cff31d49d7c028add28d8c64520e2dba5633d4cc01f8b97c5b26b2667d3
3
+ metadata.gz: fcf2b7517a237c398d900d9635fcb1cd95b00afff0df2e1e87253274ce038109
4
+ data.tar.gz: 291eb95c1deaeae4056f553f43dae8af016e89269c6c3f3d8e7e1872ce73c777
5
5
  SHA512:
6
- metadata.gz: 4fdc394813c50de79636b0146f9c163de53479212555d5a34e0b7138fe5d385b08c531419677f1e8bbf3174b01b4c23e9413eaa826e0528173e207ef4babb304
7
- data.tar.gz: 6d31d318b0a910c61a61ef1eccf4ca0086aaa67f6d8ed085096cd18b1f1a483fa0dcf9e9386d7260ec5dd94b27e1af55ffaa816a22c345ec99d7cb4c6598ef9c
6
+ metadata.gz: 82c2f97733439d9af71c3636a01b972c5ac890160fd67a7b6cd5959efd3f30d4eeac8fc72b01e93c179d02f21cfbb60e4e21d5978633e79ce07972719ade80a6
7
+ data.tar.gz: 696580a980190abc08686545f0ed44d8b145508aa3fc8094fbacb941125df312a0848819ce608515a481753edeb4c0924b5b8c5af872c2c81f08db605394b18c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Release History
2
2
 
3
+ ### v0.15.0 / 2023-10-12
4
+
5
+ Toys-Core 0.15.0 is a major release that overhauls error and signal handling, cleans up some warts around entrypoint and method definition, and fixes a few long-standing issues.
6
+
7
+ Breaking changes:
8
+
9
+ * The default error_handler for Toys::CLI now simply reraises the unhandled exception out of Toys::CLI#run. This was done to simplify the default behavior and reduce its dependencies. Additionally, the Toys::CLI::DefaultErrorHandler class has been removed, and replaced with the Toys::CLI.default_error_handler class method implementing the simplified behavior. You can restore the old behavior by passing Toys::Utils::StandardUI#error_handler to the CLI.
10
+ * The default logger_factory for Toys::CLI now uses a simple bare-bones logger instead of the nicely formatted logger previously used as default. This was done to simplify the default behavior and reduce its dependencies. You can restore the old behavior by passing Toys::Utils::StandardUI#logger_factory to the CLI.
11
+ * The Toys::CLI::DefaultCompletion class has been removed, and replaced with the Toys::CLI.default_completion class method.
12
+ * Passing a proc to Toys::ToolDefinition#run_handler= now sets the run handler directly to the proc rather than defining the run method.
13
+ * The default algorithm for determining whether flags and arguments add methods now allows overriding of methods of Toys::Context and any other included modules, but prevents collisions with private methods defined in the tool. (It continues to prevent overriding of public methods of Object and BasicObject.)
14
+
15
+ New functionality:
16
+
17
+ * New DSL directive on_signal lets tools provide signal handlers.
18
+ * New utility Toys::Utils::StandardUI implements the error handling and logger formatting used by the toys executable. (These implementations were moved out of the Toys::CLI base class.)
19
+ * Toys::ToolDefinition provides methods for managing signal handlers.
20
+ * Passing a symbol to Toys::ToolDefinition#run_handler= can set the run entrypoint to a method other than "run".
21
+ * Flags and arguments can be configured explicitly to add methods or not add methods, overriding the default behavior.
22
+
23
+ Fixes and other changes:
24
+
25
+ * The Bundler integration prevents Bundler from attempting to self-update to the version specified in a lockfile (which would often cause problems when Bundler is called from Toys).
26
+ * If a missing delegate or a delegation loop is detected, ToolDefinitionError is raised instead of RuntimeError.
27
+ * Some cleanup of various mixins to prevent issues if their methods ever get overridden.
28
+ * Progress on the toys-core user guide. It's not yet complete, but getting closer.
29
+ * Various improvements and clarifications in the reference documentation.
30
+
3
31
  ### v0.14.7 / 2023-07-19
4
32
 
5
33
  * FIXED: Fixed an exception when passing a non-string to puts in the terminal mixin
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # License
2
2
 
3
- Copyright 2019-2022 Daniel Azuma and the Toys contributors
3
+ Copyright 2019-2023 Daniel Azuma and the Toys contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -321,16 +321,21 @@ Clean up by uninstalling the gem:
321
321
  ### Learning more
322
322
 
323
323
  This introduction should be enough to get you started. However, Toys-Core is a
324
- deep framework with many more features. Learn about how to write tools using
325
- the Toys DSL, including validating and interpreting command line arguments,
326
- using templates and mixins, controlling subprocesses, and producing nice styled
327
- output, in the
324
+ deep framework with many more features.
325
+
326
+ Learn about how to write tools using the Toys DSL, including validating and
327
+ interpreting command line arguments, using templates and mixins, controlling
328
+ subprocesses, and producing nice styled output, in the
328
329
  [Toys User Guide](https://dazuma.github.io/toys/gems/toys/latest/file.guide.html).
330
+
329
331
  Learn more about how to customize and package your own executable, including
330
332
  handling errors, controlling log output, and providing your own mixins,
331
333
  templates, and middleware, in the
332
334
  [Toys-Core User Guide](https://dazuma.github.io/toys/gems/toys-core/latest/file.guide.html).
333
335
 
336
+ Detailed usage information can be found in the
337
+ [class reference documentation](https://dazuma.github.io/toys/gems/toys-core/lateset/Toys.html)
338
+
334
339
  ## System requirements
335
340
 
336
341
  Toys-Core requires Ruby 2.4 or later.
@@ -343,7 +348,7 @@ recommended because it has a few known bugs that affect Toys.
343
348
 
344
349
  ## License
345
350
 
346
- Copyright 2019-2022 Daniel Azuma and the Toys contributors
351
+ Copyright 2019-2023 Daniel Azuma and the Toys contributors
347
352
 
348
353
  Permission is hereby granted, free of charge, to any person obtaining a copy
349
354
  of this software and associated documentation files (the "Software"), to deal