toys 0.11.1 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +44 -39
- data/lib/toys/standard_cli.rb +17 -2
- 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: c52b606c7f0bd27e709c7e019bfb89e1b8772fdb0c112e80dc6e4a4f5ffc50bc
|
4
|
+
data.tar.gz: 2b2c90a882e812500c98bf89d3b13d90430e98acfcbedc2a60ef1bdc50a1ad20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e9ba6c9e241f6eace1ff585e0cd4968b81ecef04934c08aab5af5273c06b314e9d8314a293b462b5dfd3aaf467d567af024622035a98b49703bcbd473705023
|
7
|
+
data.tar.gz: 156b3848c0946853378c04e9aef6f0ecf434d9c5f978441c9a20b3d4311c973b6c5409600aad6d92aba9c74b55c2554c279405602c81023ef900bcd9aca0f8be
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,15 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
-
###
|
3
|
+
### v0.11.2 / 2020-09-06
|
4
|
+
|
5
|
+
* FIXED: Don't get confused when running toys from within a toys directory
|
6
|
+
* FIXED: Fix a JRuby-specific race condition when capturing exec streams
|
7
|
+
|
8
|
+
### v0.11.1 / 2020-08-24
|
4
9
|
|
5
10
|
* FIXED: The `.lib` directory actually works as advertised.
|
6
11
|
|
7
|
-
###
|
12
|
+
### v0.11.0 / 2020-08-21
|
8
13
|
|
9
14
|
* ADDED: The toys search path can be truncated using the `truncate_load_path!` directive.
|
10
15
|
* ADDED: The `:clean` template recognizes `:gitignore` as a path indicating all gitignored files.
|
@@ -16,7 +21,7 @@
|
|
16
21
|
* FIXED: Fixed a rare Exec capture failure that resulted from a race condition when closing streams.
|
17
22
|
* DOCS: The Toys user guide now covers static bundle loading and `truncate_load_path!`.
|
18
23
|
|
19
|
-
###
|
24
|
+
### v0.10.5 / 2020-07-18
|
20
25
|
|
21
26
|
* IMPROVED: The bundler mixin silences bundler output during bundle setup.
|
22
27
|
* IMPROVED: The bundler mixin allows toys and toys-core to be in the Gemfile. It checks their version requirements against the running Toys version, and either adds the corret version to the bundle or raises IncompatibleToysError.
|
@@ -24,24 +29,24 @@
|
|
24
29
|
* FIXED: Some cases of transitive dependency handling by the bundler mixin.
|
25
30
|
* FIXED: Fixed a crash when computing suggestions, when running with a bundle on Ruby 2.6 or earlier.
|
26
31
|
|
27
|
-
###
|
32
|
+
### v0.10.4 / 2020-07-11
|
28
33
|
|
29
34
|
* IMPROVED: Bundler integration can now handle Toys itself being in the bundle, as long as the version requirements cover the running Toys version.
|
30
35
|
* IMPROVED: Passing `static: true` to the `:bundler` mixin installs the bundle at definition rather than execution time.
|
31
36
|
|
32
|
-
###
|
37
|
+
### v0.10.3 / 2020-07-04
|
33
38
|
|
34
39
|
* FIXED: The `exec_separate_tool` method in the `:exec` mixin no longer throws ENOEXEC on Windows.
|
35
40
|
|
36
|
-
###
|
41
|
+
### v0.10.2 / 2020-07-03
|
37
42
|
|
38
43
|
* FIXED: The load path no longer loses the toys and toys-core directories after a bundle install.
|
39
44
|
|
40
|
-
###
|
45
|
+
### v0.10.1 / 2020-03-07
|
41
46
|
|
42
47
|
* FIXED: Setting `:exit_on_nonzero_status` explicitly to false now works as expected.
|
43
48
|
|
44
|
-
###
|
49
|
+
### v0.10.0 / 2020-02-24
|
45
50
|
|
46
51
|
* ADDED: `:bundler` mixin that installs and sets up a bundle for the tool
|
47
52
|
* ADDED: `bundler` options in the standard templates, to run those tools in a bundle
|
@@ -57,26 +62,26 @@
|
|
57
62
|
* FIXED: `rdoc` template crashed if any nonstandard options were given.
|
58
63
|
* FIXED: `rubocop` template would abort prematurely if standard streams were redirected.
|
59
64
|
|
60
|
-
###
|
65
|
+
### v0.9.4 / 2020-01-26
|
61
66
|
|
62
67
|
* FIXED: Crash in the loader when a non-ruby file appears in a toys directory
|
63
68
|
|
64
|
-
###
|
69
|
+
### v0.9.3 / 2020-01-05
|
65
70
|
|
66
71
|
* FIXED: `delegate_to` directive could crash if an overriding tool has already been defined.
|
67
72
|
* FIXED: A Ruby 2.7 warning when reporting a Toys file syntax error.
|
68
73
|
|
69
|
-
###
|
74
|
+
### v0.9.2 / 2020-01-03
|
70
75
|
|
71
76
|
* IMPROVED: Mixins can now take real keyword arguments, and will pass them on properly to `on_initialize` and `on_include` blocks.
|
72
77
|
* CHANGED: `Toys::Utils::Exec` and the `:exec` mixin methods now take real keyword arguments rather than an `opts` hash. This means you should use keywords (or the double-splat operator) to avoid a deprecation warning on Ruby 2.7.
|
73
78
|
|
74
|
-
###
|
79
|
+
### v0.9.1 / 2019-12-22
|
75
80
|
|
76
81
|
* IMPROVED: `delegate_to` and `alias_tool` can take symbols as well as strings.
|
77
82
|
* DOCS: Fixed user guide internal links on rubydoc.info.
|
78
83
|
|
79
|
-
###
|
84
|
+
### v0.9.0 / 2019-12-02
|
80
85
|
|
81
86
|
* 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.
|
82
87
|
* 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.)
|
@@ -87,12 +92,12 @@
|
|
87
92
|
* 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.
|
88
93
|
* FIXED: The the `tool` directive no longer crashes if not passed a block.
|
89
94
|
|
90
|
-
###
|
95
|
+
### v0.8.1 / 2019-11-19
|
91
96
|
|
92
97
|
* FIXED: Listing subtools would crash if a broken alias was present.
|
93
98
|
* DOCUMENTATION: Switched from redcarpet to kramdown, and tried to make some structural fixes.
|
94
99
|
|
95
|
-
###
|
100
|
+
### v0.8.0 / 2019-06-20
|
96
101
|
|
97
102
|
This is a major update with significant new features and a bunch of fixes.
|
98
103
|
It does include a few minor backward-incompatible changes. All signifiant
|
@@ -146,18 +151,18 @@ Details:
|
|
146
151
|
|
147
152
|
Additionally, a significant amount of internal reorganization and cleanup happened in the toys-core gem. See the changelog for toys-core for more details.
|
148
153
|
|
149
|
-
###
|
154
|
+
### v0.7.0 / 2019-01-23
|
150
155
|
|
151
156
|
* ADDED: A template for creating tools that invoke RSpec.
|
152
157
|
* ADDED: Flag groups, which enforce policies around which flags are required.
|
153
158
|
* CHANGED: Flags within a group are sorted in the help screens.
|
154
159
|
* IMPROVED: The minitest template now honors all standard minitest flags.
|
155
160
|
|
156
|
-
###
|
161
|
+
### v0.6.1 / 2019-01-07
|
157
162
|
|
158
163
|
* FIXED: The presence of aliases caused subtool listing to crash.
|
159
164
|
|
160
|
-
###
|
165
|
+
### v0.6.0 / 2018-10-22
|
161
166
|
|
162
167
|
* FIXED: Build tools cd into the context directory when running.
|
163
168
|
* FIXED: Rakefiles are evaluated and tasks are run in the Rakefile's directory.
|
@@ -169,7 +174,7 @@ Additionally, a significant amount of internal reorganization and cleanup happen
|
|
169
174
|
* IMPROVED: Non-runnable namespaces are no longer displayed in recursive subtool
|
170
175
|
lists if their children are already displayed.
|
171
176
|
|
172
|
-
###
|
177
|
+
### v0.5.0 / 2018-10-07
|
173
178
|
|
174
179
|
* ADDED: Period and colon are recognized as tool path delimiters.
|
175
180
|
* ADDED: New rake template that supports loading rake tasks as tools.
|
@@ -180,31 +185,31 @@ Additionally, a significant amount of internal reorganization and cleanup happen
|
|
180
185
|
* IMPROVED: The tool directive can now take an `if_defined` argument.
|
181
186
|
* FIXED: Template instantiation was failing if the hosting tool was priority-masked.
|
182
187
|
|
183
|
-
###
|
188
|
+
### v0.4.5 / 2018-08-05
|
184
189
|
|
185
190
|
* CHANGED: Dropped preload file feature
|
186
191
|
|
187
|
-
###
|
192
|
+
### v0.4.4 / 2018-07-21
|
188
193
|
|
189
194
|
* FIXED: Utils::Exec wasn't closing streams after copying.
|
190
195
|
* IMPROVED: Utils::Exec::Controller can capture or redirect the remainder of a controlled stream.
|
191
196
|
* ADDED: Terminal#ask
|
192
197
|
|
193
|
-
###
|
198
|
+
### v0.4.3 / 2018-07-13
|
194
199
|
|
195
200
|
* IMPROVED: Exec mixin methods can now spawn subprocesses in the background
|
196
201
|
* IMPROVED: Exec mixin capture methods can now yield a controller
|
197
202
|
|
198
|
-
###
|
203
|
+
### v0.4.2 / 2018-07-08
|
199
204
|
|
200
205
|
* FIXED: Raise an error rather than cause unexpected behavior if a mixin is included twice.
|
201
206
|
* IMPROVED: The `include?` method extended to support mixin names in a tool dsl.
|
202
207
|
|
203
|
-
###
|
208
|
+
### v0.4.1 / 2018-07-03
|
204
209
|
|
205
210
|
* FIXED: Terminal#confirm uppercased "N" for the wrong default.
|
206
211
|
|
207
|
-
###
|
212
|
+
### v0.4.0 / 2018-07-03
|
208
213
|
|
209
214
|
Now declaring this alpha quality. Backward-incompatible changes are still
|
210
215
|
possible from this point, but I'll try to avoid them.
|
@@ -214,24 +219,24 @@ possible from this point, but I'll try to avoid them.
|
|
214
219
|
* IMPROVED: Toys::Utils::Gems can suppress the confirmation prompt
|
215
220
|
* IMPROVED: Magic comments are now honored in toys files.
|
216
221
|
|
217
|
-
###
|
222
|
+
### v0.3.11 / 2018-07-02
|
218
223
|
|
219
224
|
* CHANGED: Require Ruby 2.3 or later
|
220
225
|
* CHANGED: Renamed "set" directive to "static" to reduce confusion with Tool#set.
|
221
226
|
* ADDED: Convenience methods for getting option values
|
222
227
|
|
223
|
-
###
|
228
|
+
### v0.3.10 / 2018-06-30
|
224
229
|
|
225
230
|
* CHANGED: Dropped Tool#option. Use Tool#get instead.
|
226
231
|
* CHANGED: "run" directive renamed to "to_run"
|
227
232
|
* CHANGED: Highline mixin now uses Highline 2.0
|
228
233
|
* ADDED: Mixins can provide initializers
|
229
234
|
|
230
|
-
###
|
235
|
+
### v0.3.9.1 / 2018-06-24
|
231
236
|
|
232
237
|
* FIXED: Built-in flags were interfering with disable_argument_parsing
|
233
238
|
|
234
|
-
###
|
239
|
+
### v0.3.9 / 2018-06-24
|
235
240
|
|
236
241
|
* CHANGED: Removed alias_as directive since it's incompatible with selective loading.
|
237
242
|
* ADDED: Ability to define named templates in Toys files
|
@@ -241,18 +246,18 @@ possible from this point, but I'll try to avoid them.
|
|
241
246
|
* IMPROVED: Acceptors can be looked up recursively in the same way as mixins and templates
|
242
247
|
* FIXED: Templates were not activating needed gems
|
243
248
|
|
244
|
-
###
|
249
|
+
### v0.3.8 / 2018-06-10
|
245
250
|
|
246
251
|
* CHANGED: Renamed helpers to mixins.
|
247
252
|
* CHANGED: Renamed :in_from, :out_to, and :err_to exec options to :in, :out, :err
|
248
253
|
* IMPROVED: Exec raises an error if passed an unknown option.
|
249
254
|
* IMPROVED: Exec now accepts nearly all the same stream specifications as Process#spawn.
|
250
255
|
|
251
|
-
###
|
256
|
+
### v0.3.7.1 / 2018-05-30
|
252
257
|
|
253
258
|
* FIXED: Fix crash in system update.
|
254
259
|
|
255
|
-
###
|
260
|
+
### v0.3.7 / 2018-05-30
|
256
261
|
|
257
262
|
* CHANGED: Execution runs in the same scope as the DSL, which lets us use normal methods instead of helper-blocks.
|
258
263
|
* CHANGED: Renamed "script" to "run", and allow setting of runnable by defining a "run" method
|
@@ -261,7 +266,7 @@ possible from this point, but I'll try to avoid them.
|
|
261
266
|
* CHANGED: Removed spinner helper and added terminal helper.
|
262
267
|
* ADDED: Helper modules scoped to the tool hierarchy
|
263
268
|
|
264
|
-
###
|
269
|
+
### v0.3.6 / 2018-05-21
|
265
270
|
|
266
271
|
* CHANGED: Removed Context#new_cli and exposed Context#cli instead.
|
267
272
|
* CHANGED: Raises ToolDefinitionError if you declare a duplicate flag.
|
@@ -270,13 +275,13 @@ possible from this point, but I'll try to avoid them.
|
|
270
275
|
* IMPROVED: Support custom acceptors.
|
271
276
|
* IMPROVED: Highline helper automatically sets use_color based on the type of stdout.
|
272
277
|
|
273
|
-
###
|
278
|
+
### v0.3.5 / 2018-05-15
|
274
279
|
|
275
280
|
* CHANGED: Flag and arg blocks in the DSL have an interface more similar to the rest of the DSL.
|
276
281
|
* CHANGED: Renamed `execute do` to `script do`.
|
277
282
|
* IMPROVED: Help display uses `less` if available.
|
278
283
|
|
279
|
-
###
|
284
|
+
### v0.3.4 / 2018-05-14
|
280
285
|
|
281
286
|
* CHANGED: Renamed switch to flag
|
282
287
|
* CHANGED: Renamed docs: parameter again, to desc: and long_desc: to match tool desc.
|
@@ -293,7 +298,7 @@ possible from this point, but I'll try to avoid them.
|
|
293
298
|
* FIXED: Subtools with no desc now properly pick up the default
|
294
299
|
* FIXED: Usage errors and show-help now interact in the right way
|
295
300
|
|
296
|
-
###
|
301
|
+
### v0.3.3 / 2018-05-09
|
297
302
|
|
298
303
|
* CHANGED: Renamed file_utils helper to fileutils.
|
299
304
|
* CHANGED: Renamed doc: parameter to docs:
|
@@ -303,7 +308,7 @@ possible from this point, but I'll try to avoid them.
|
|
303
308
|
* ADDED: WrappableString for descriptions and docs
|
304
309
|
* IMPROVED: Descriptions can have multiple lines
|
305
310
|
|
306
|
-
###
|
311
|
+
### v0.3.2 / 2018-05-07
|
307
312
|
|
308
313
|
* CHANGED: Split core engine out into separate "toys-core" gem. See the
|
309
314
|
toys-core changelog for additional changes in core.
|
@@ -314,7 +319,7 @@ possible from this point, but I'll try to avoid them.
|
|
314
319
|
* IMPROVED: Help shows the config file path on "--verbose".
|
315
320
|
* IMPROVED: You can now run a sub-instance of toys from an executor.
|
316
321
|
|
317
|
-
###
|
322
|
+
### v0.3.1 / 2018-05-02
|
318
323
|
|
319
324
|
* CHANGED: Subcommand display is now recursive by default.
|
320
325
|
* IMPROVED: Improved error messaging for bad switch syntax.
|
@@ -323,6 +328,6 @@ possible from this point, but I'll try to avoid them.
|
|
323
328
|
* DOCS: Completed a first pass on class and method documentation.
|
324
329
|
* INTERNAL: Adjusted naming of switch-related methods.
|
325
330
|
|
326
|
-
###
|
331
|
+
### v0.3.0 / 2018-04-30
|
327
332
|
|
328
333
|
* Initial generally usable release
|
data/lib/toys/standard_cli.rb
CHANGED
@@ -110,7 +110,7 @@ module Toys
|
|
110
110
|
middleware_stack: default_middleware_stack,
|
111
111
|
template_lookup: default_template_lookup
|
112
112
|
)
|
113
|
-
add_standard_paths(cur_dir: cur_dir)
|
113
|
+
add_standard_paths(cur_dir: cur_dir, toys_dir_name: CONFIG_DIR_NAME)
|
114
114
|
end
|
115
115
|
|
116
116
|
private
|
@@ -132,8 +132,9 @@ module Toys
|
|
132
132
|
# directories, or `nil` to use the defaults.
|
133
133
|
# @return [self]
|
134
134
|
#
|
135
|
-
def add_standard_paths(cur_dir: nil, global_dirs: nil)
|
135
|
+
def add_standard_paths(cur_dir: nil, global_dirs: nil, toys_dir_name: nil)
|
136
136
|
cur_dir ||= ::Dir.pwd
|
137
|
+
cur_dir = skip_toys_dir(cur_dir, toys_dir_name) if toys_dir_name
|
137
138
|
global_dirs ||= default_global_dirs
|
138
139
|
add_search_path_hierarchy(start: cur_dir, terminate: global_dirs)
|
139
140
|
global_dirs.each { |path| add_search_path(path) }
|
@@ -142,6 +143,20 @@ module Toys
|
|
142
143
|
self
|
143
144
|
end
|
144
145
|
|
146
|
+
# Step out of any toys dir
|
147
|
+
def skip_toys_dir(dir, toys_dir_name)
|
148
|
+
cur_dir = dir
|
149
|
+
loop do
|
150
|
+
parent = ::File.dirname(dir)
|
151
|
+
return cur_dir if parent == dir
|
152
|
+
if ::File.basename(dir) == toys_dir_name
|
153
|
+
cur_dir = dir = parent
|
154
|
+
else
|
155
|
+
dir = parent
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
145
160
|
# rubocop:disable Metrics/MethodLength
|
146
161
|
|
147
162
|
##
|
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.11.
|
4
|
+
version: 0.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-06 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.11.
|
19
|
+
version: 0.11.2
|
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.11.
|
26
|
+
version: 0.11.2
|
27
27
|
description: Toys is a configurable command line tool. Write commands in Ruby using
|
28
28
|
a simple DSL, and Toys will provide the command line executable and take care of
|
29
29
|
all the details such as argument parsing, online help, and error reporting. Toys
|
@@ -63,10 +63,10 @@ homepage: https://github.com/dazuma/toys
|
|
63
63
|
licenses:
|
64
64
|
- MIT
|
65
65
|
metadata:
|
66
|
-
changelog_uri: https://dazuma.github.io/toys/gems/toys/v0.11.
|
66
|
+
changelog_uri: https://dazuma.github.io/toys/gems/toys/v0.11.2/file.CHANGELOG.html
|
67
67
|
source_code_uri: https://github.com/dazuma/toys
|
68
68
|
bug_tracker_uri: https://github.com/dazuma/toys/issues
|
69
|
-
documentation_uri: https://dazuma.github.io/toys/gems/toys/v0.11.
|
69
|
+
documentation_uri: https://dazuma.github.io/toys/gems/toys/v0.11.2
|
70
70
|
post_install_message:
|
71
71
|
rdoc_options: []
|
72
72
|
require_paths:
|