toys 0.15.6 → 0.16.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/CHANGELOG.md +6 -1
- data/README.md +2 -2
- data/builtins/system/tools.rb +1 -1
- data/lib/toys/templates/clean.rb +1 -1
- data/lib/toys/templates/gem_build.rb +1 -1
- data/lib/toys/templates/rubocop.rb +4 -1
- data/lib/toys/version.rb +1 -1
- metadata +8 -63
- data/core-docs/toys/acceptor.rb +0 -474
- data/core-docs/toys/arg_parser.rb +0 -397
- data/core-docs/toys/cli.rb +0 -466
- data/core-docs/toys/compat.rb +0 -2
- data/core-docs/toys/completion.rb +0 -340
- data/core-docs/toys/context.rb +0 -386
- data/core-docs/toys/core.rb +0 -14
- data/core-docs/toys/dsl/base.rb +0 -56
- data/core-docs/toys/dsl/flag.rb +0 -284
- data/core-docs/toys/dsl/flag_group.rb +0 -267
- data/core-docs/toys/dsl/internal.rb +0 -4
- data/core-docs/toys/dsl/positional_arg.rb +0 -155
- data/core-docs/toys/dsl/tool.rb +0 -1639
- data/core-docs/toys/errors.rb +0 -126
- data/core-docs/toys/flag.rb +0 -560
- data/core-docs/toys/flag_group.rb +0 -186
- data/core-docs/toys/input_file.rb +0 -17
- data/core-docs/toys/loader.rb +0 -363
- data/core-docs/toys/middleware.rb +0 -336
- data/core-docs/toys/mixin.rb +0 -142
- data/core-docs/toys/module_lookup.rb +0 -75
- data/core-docs/toys/positional_arg.rb +0 -145
- data/core-docs/toys/settings.rb +0 -524
- data/core-docs/toys/source_info.rb +0 -271
- data/core-docs/toys/standard_middleware/add_verbosity_flags.rb +0 -49
- data/core-docs/toys/standard_middleware/apply_config.rb +0 -24
- data/core-docs/toys/standard_middleware/handle_usage_errors.rb +0 -33
- data/core-docs/toys/standard_middleware/set_default_descriptions.rb +0 -222
- data/core-docs/toys/standard_middleware/show_help.rb +0 -190
- data/core-docs/toys/standard_middleware/show_root_version.rb +0 -45
- data/core-docs/toys/standard_mixins/bundler.rb +0 -98
- data/core-docs/toys/standard_mixins/exec.rb +0 -711
- data/core-docs/toys/standard_mixins/fileutils.rb +0 -18
- data/core-docs/toys/standard_mixins/gems.rb +0 -62
- data/core-docs/toys/standard_mixins/git_cache.rb +0 -41
- data/core-docs/toys/standard_mixins/highline.rb +0 -133
- data/core-docs/toys/standard_mixins/pager.rb +0 -50
- data/core-docs/toys/standard_mixins/terminal.rb +0 -135
- data/core-docs/toys/standard_mixins/xdg.rb +0 -49
- data/core-docs/toys/template.rb +0 -112
- data/core-docs/toys/tool_definition.rb +0 -1079
- data/core-docs/toys/utils/completion_engine.rb +0 -49
- data/core-docs/toys/utils/exec.rb +0 -776
- data/core-docs/toys/utils/gems.rb +0 -185
- data/core-docs/toys/utils/git_cache.rb +0 -353
- data/core-docs/toys/utils/help_text.rb +0 -134
- data/core-docs/toys/utils/pager.rb +0 -118
- data/core-docs/toys/utils/standard_ui.rb +0 -184
- data/core-docs/toys/utils/terminal.rb +0 -310
- data/core-docs/toys/utils/xdg.rb +0 -253
- data/core-docs/toys/wrappable_string.rb +0 -132
- data/core-docs/toys-core.rb +0 -111
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 655d198d4597ba9c37fcc968d0e8a79782ef6d54736c821d157dea3b9cb1bec1
|
|
4
|
+
data.tar.gz: 12b95827ad721652171dd6b0de05eda69ffa6fed5b823313de4626c9a8ed8f45
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b5d089ca709d0516a60d91ad8a47e92ba88aad1e761a3c78952cb3338c7146f761490baab0dd96f2cd9090179622772a04332c1eee124c85e4e86214afa67e39
|
|
7
|
+
data.tar.gz: f0b2471d424cc9da3d0570ff309f6bf2723a11b8fe0d5c2fb6e330c2e0deb768ebc13a4fa2238a30f9c602073539a2aedaf02bf4f63e3b05cb86ff6ccb5ea1a8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
### v0.16.0 / 2025-10-31
|
|
4
|
+
|
|
5
|
+
* ADDED: Updated minimum Ruby version to 2.7
|
|
6
|
+
* ADDED: Rubocop template now creates tools that respond to Rubocop command line flags and arguments
|
|
7
|
+
|
|
3
8
|
### v0.15.6 / 2024-05-15
|
|
4
9
|
|
|
5
10
|
* FIXED: Fixed argument parsing to allow a flag values delimited by "=" to contain newlines
|
|
@@ -48,7 +53,7 @@ Fixes and documentation:
|
|
|
48
53
|
|
|
49
54
|
* 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).
|
|
50
55
|
* Tools generated by the minitest and rspec standard templates can now interact properly with stdin (e.g. so you can invoke pry temporarily from a test.)
|
|
51
|
-
* Some cleanup of
|
|
56
|
+
* Some cleanup of various mixins to prevent issues if their methods ever get overridden.
|
|
52
57
|
* Various improvements and clarifications in the reference documentation and user guide.
|
|
53
58
|
|
|
54
59
|
### v0.14.7 / 2023-07-19
|
data/README.md
CHANGED
|
@@ -316,7 +316,7 @@ Toys scripts instead of Rakefiles.
|
|
|
316
316
|
|
|
317
317
|
## System requirements
|
|
318
318
|
|
|
319
|
-
Toys requires Ruby 2.
|
|
319
|
+
Toys requires Ruby 2.7 or later.
|
|
320
320
|
|
|
321
321
|
Most parts of Toys work on JRuby. However, JRuby is not recommended because of
|
|
322
322
|
JVM boot latency, lack of support for Kernel#fork, and other issues.
|
|
@@ -326,7 +326,7 @@ because it has a few known bugs that affect Toys.
|
|
|
326
326
|
|
|
327
327
|
## License
|
|
328
328
|
|
|
329
|
-
Copyright 2019-
|
|
329
|
+
Copyright 2019-2025 Daniel Azuma and the Toys contributors
|
|
330
330
|
|
|
331
331
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
332
332
|
of this software and associated documentation files (the "Software"), to deal
|
data/builtins/system/tools.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
mixin "tool-methods" do
|
|
4
4
|
def format_tool(tool, namespace, detailed: false)
|
|
5
5
|
output = {
|
|
6
|
-
"name" => tool.full_name[namespace.length
|
|
6
|
+
"name" => tool.full_name[namespace.length..].join(" "),
|
|
7
7
|
"desc" => tool.desc.to_s,
|
|
8
8
|
"runnable" => tool.runnable?,
|
|
9
9
|
}
|
data/lib/toys/templates/clean.rb
CHANGED
|
@@ -183,16 +183,19 @@ module Toys
|
|
|
183
183
|
bundler_settings = template.bundler_settings
|
|
184
184
|
include :bundler, **bundler_settings if bundler_settings
|
|
185
185
|
|
|
186
|
+
disable_argument_parsing
|
|
187
|
+
|
|
186
188
|
# @private
|
|
187
189
|
def run
|
|
188
190
|
gem "rubocop", *gem_version
|
|
189
191
|
|
|
190
192
|
::Dir.chdir(context_directory || ::Dir.getwd) do
|
|
191
193
|
logger.info "Running RuboCop..."
|
|
194
|
+
rubocop_args = rubocop_options + args
|
|
192
195
|
code = <<~CODE
|
|
193
196
|
gem 'rubocop', *#{gem_version.inspect}
|
|
194
197
|
require 'rubocop'
|
|
195
|
-
exit(::RuboCop::CLI.new.run(#{
|
|
198
|
+
exit(::RuboCop::CLI.new.run(#{rubocop_args.inspect}))
|
|
196
199
|
CODE
|
|
197
200
|
result = exec_ruby(["-e", code])
|
|
198
201
|
if result.error?
|
data/lib/toys/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: toys
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.16.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Azuma
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: toys-core
|
|
@@ -16,14 +15,14 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - '='
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.
|
|
18
|
+
version: 0.16.0
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - '='
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 0.
|
|
25
|
+
version: 0.16.0
|
|
27
26
|
description: Toys is a configurable command line tool. Write commands in Ruby using
|
|
28
27
|
a simple DSL, and Toys will provide the command line executable and take care of
|
|
29
28
|
all the details such as argument parsing, online help, and error reporting. Toys
|
|
@@ -50,58 +49,6 @@ files:
|
|
|
50
49
|
- builtins/system/test.rb
|
|
51
50
|
- builtins/system/tools.rb
|
|
52
51
|
- builtins/system/update.rb
|
|
53
|
-
- core-docs/toys-core.rb
|
|
54
|
-
- core-docs/toys/acceptor.rb
|
|
55
|
-
- core-docs/toys/arg_parser.rb
|
|
56
|
-
- core-docs/toys/cli.rb
|
|
57
|
-
- core-docs/toys/compat.rb
|
|
58
|
-
- core-docs/toys/completion.rb
|
|
59
|
-
- core-docs/toys/context.rb
|
|
60
|
-
- core-docs/toys/core.rb
|
|
61
|
-
- core-docs/toys/dsl/base.rb
|
|
62
|
-
- core-docs/toys/dsl/flag.rb
|
|
63
|
-
- core-docs/toys/dsl/flag_group.rb
|
|
64
|
-
- core-docs/toys/dsl/internal.rb
|
|
65
|
-
- core-docs/toys/dsl/positional_arg.rb
|
|
66
|
-
- core-docs/toys/dsl/tool.rb
|
|
67
|
-
- core-docs/toys/errors.rb
|
|
68
|
-
- core-docs/toys/flag.rb
|
|
69
|
-
- core-docs/toys/flag_group.rb
|
|
70
|
-
- core-docs/toys/input_file.rb
|
|
71
|
-
- core-docs/toys/loader.rb
|
|
72
|
-
- core-docs/toys/middleware.rb
|
|
73
|
-
- core-docs/toys/mixin.rb
|
|
74
|
-
- core-docs/toys/module_lookup.rb
|
|
75
|
-
- core-docs/toys/positional_arg.rb
|
|
76
|
-
- core-docs/toys/settings.rb
|
|
77
|
-
- core-docs/toys/source_info.rb
|
|
78
|
-
- core-docs/toys/standard_middleware/add_verbosity_flags.rb
|
|
79
|
-
- core-docs/toys/standard_middleware/apply_config.rb
|
|
80
|
-
- core-docs/toys/standard_middleware/handle_usage_errors.rb
|
|
81
|
-
- core-docs/toys/standard_middleware/set_default_descriptions.rb
|
|
82
|
-
- core-docs/toys/standard_middleware/show_help.rb
|
|
83
|
-
- core-docs/toys/standard_middleware/show_root_version.rb
|
|
84
|
-
- core-docs/toys/standard_mixins/bundler.rb
|
|
85
|
-
- core-docs/toys/standard_mixins/exec.rb
|
|
86
|
-
- core-docs/toys/standard_mixins/fileutils.rb
|
|
87
|
-
- core-docs/toys/standard_mixins/gems.rb
|
|
88
|
-
- core-docs/toys/standard_mixins/git_cache.rb
|
|
89
|
-
- core-docs/toys/standard_mixins/highline.rb
|
|
90
|
-
- core-docs/toys/standard_mixins/pager.rb
|
|
91
|
-
- core-docs/toys/standard_mixins/terminal.rb
|
|
92
|
-
- core-docs/toys/standard_mixins/xdg.rb
|
|
93
|
-
- core-docs/toys/template.rb
|
|
94
|
-
- core-docs/toys/tool_definition.rb
|
|
95
|
-
- core-docs/toys/utils/completion_engine.rb
|
|
96
|
-
- core-docs/toys/utils/exec.rb
|
|
97
|
-
- core-docs/toys/utils/gems.rb
|
|
98
|
-
- core-docs/toys/utils/git_cache.rb
|
|
99
|
-
- core-docs/toys/utils/help_text.rb
|
|
100
|
-
- core-docs/toys/utils/pager.rb
|
|
101
|
-
- core-docs/toys/utils/standard_ui.rb
|
|
102
|
-
- core-docs/toys/utils/terminal.rb
|
|
103
|
-
- core-docs/toys/utils/xdg.rb
|
|
104
|
-
- core-docs/toys/wrappable_string.rb
|
|
105
52
|
- docs/guide.md
|
|
106
53
|
- lib/toys.rb
|
|
107
54
|
- lib/toys/standard_cli.rb
|
|
@@ -121,11 +68,10 @@ homepage: https://github.com/dazuma/toys
|
|
|
121
68
|
licenses:
|
|
122
69
|
- MIT
|
|
123
70
|
metadata:
|
|
124
|
-
changelog_uri: https://dazuma.github.io/toys/gems/toys/v0.
|
|
71
|
+
changelog_uri: https://dazuma.github.io/toys/gems/toys/v0.16.0/file.CHANGELOG.html
|
|
125
72
|
source_code_uri: https://github.com/dazuma/toys/tree/main/toys
|
|
126
73
|
bug_tracker_uri: https://github.com/dazuma/toys/issues
|
|
127
|
-
documentation_uri: https://dazuma.github.io/toys/gems/toys/v0.
|
|
128
|
-
post_install_message:
|
|
74
|
+
documentation_uri: https://dazuma.github.io/toys/gems/toys/v0.16.0
|
|
129
75
|
rdoc_options: []
|
|
130
76
|
require_paths:
|
|
131
77
|
- lib
|
|
@@ -133,15 +79,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
133
79
|
requirements:
|
|
134
80
|
- - ">="
|
|
135
81
|
- !ruby/object:Gem::Version
|
|
136
|
-
version: 2.
|
|
82
|
+
version: 2.7.0
|
|
137
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
84
|
requirements:
|
|
139
85
|
- - ">="
|
|
140
86
|
- !ruby/object:Gem::Version
|
|
141
87
|
version: '0'
|
|
142
88
|
requirements: []
|
|
143
|
-
rubygems_version: 3.
|
|
144
|
-
signing_key:
|
|
89
|
+
rubygems_version: 3.6.9
|
|
145
90
|
specification_version: 4
|
|
146
91
|
summary: A configurable command line tool
|
|
147
92
|
test_files: []
|