toys 0.12.2 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +2 -0
- data/CHANGELOG.md +35 -0
- data/LICENSE.md +1 -1
- data/README.md +7 -4
- data/builtins/system/git-cache.rb +238 -0
- data/builtins/system/test.rb +37 -2
- data/core-docs/toys/acceptor.rb +432 -0
- data/core-docs/toys/arg_parser.rb +397 -0
- data/core-docs/toys/cli.rb +493 -0
- data/core-docs/toys/compat.rb +2 -0
- data/core-docs/toys/completion.rb +329 -0
- data/core-docs/toys/context.rb +321 -0
- data/core-docs/toys/core.rb +14 -0
- data/core-docs/toys/dsl/base.rb +56 -0
- data/core-docs/toys/dsl/flag.rb +261 -0
- data/core-docs/toys/dsl/flag_group.rb +259 -0
- data/core-docs/toys/dsl/internal.rb +4 -0
- data/core-docs/toys/dsl/positional_arg.rb +139 -0
- data/core-docs/toys/dsl/tool.rb +1530 -0
- data/core-docs/toys/errors.rb +93 -0
- data/core-docs/toys/flag.rb +549 -0
- data/core-docs/toys/flag_group.rb +186 -0
- data/core-docs/toys/input_file.rb +8 -0
- data/core-docs/toys/loader.rb +222 -0
- data/core-docs/toys/middleware.rb +295 -0
- data/core-docs/toys/mixin.rb +142 -0
- data/core-docs/toys/module_lookup.rb +75 -0
- data/core-docs/toys/positional_arg.rb +145 -0
- data/core-docs/toys/settings.rb +507 -0
- data/core-docs/toys/source_info.rb +127 -0
- data/core-docs/toys/standard_middleware/add_verbosity_flags.rb +49 -0
- data/core-docs/toys/standard_middleware/apply_config.rb +24 -0
- data/core-docs/toys/standard_middleware/handle_usage_errors.rb +33 -0
- data/core-docs/toys/standard_middleware/set_default_descriptions.rb +222 -0
- data/core-docs/toys/standard_middleware/show_help.rb +190 -0
- data/core-docs/toys/standard_middleware/show_root_version.rb +45 -0
- data/core-docs/toys/standard_mixins/bundler.rb +83 -0
- data/core-docs/toys/standard_mixins/exec.rb +645 -0
- data/core-docs/toys/standard_mixins/fileutils.rb +18 -0
- data/core-docs/toys/standard_mixins/gems.rb +48 -0
- data/core-docs/toys/standard_mixins/git_cache.rb +41 -0
- data/core-docs/toys/standard_mixins/highline.rb +133 -0
- data/core-docs/toys/standard_mixins/terminal.rb +135 -0
- data/core-docs/toys/standard_mixins/xdg.rb +49 -0
- data/core-docs/toys/template.rb +112 -0
- data/core-docs/toys/tool_definition.rb +926 -0
- data/core-docs/toys/utils/completion_engine.rb +49 -0
- data/core-docs/toys/utils/exec.rb +721 -0
- data/core-docs/toys/utils/gems.rb +185 -0
- data/core-docs/toys/utils/git_cache.rb +353 -0
- data/core-docs/toys/utils/help_text.rb +134 -0
- data/core-docs/toys/utils/terminal.rb +310 -0
- data/core-docs/toys/utils/xdg.rb +253 -0
- data/core-docs/toys/wrappable_string.rb +120 -0
- data/core-docs/toys-core.rb +63 -0
- data/docs/guide.md +497 -156
- data/lib/toys/standard_cli.rb +50 -36
- data/lib/toys/templates/clean.rb +18 -0
- data/lib/toys/templates/gem_build.rb +24 -0
- data/lib/toys/templates/minitest.rb +21 -0
- data/lib/toys/templates/rake.rb +23 -3
- data/lib/toys/templates/rdoc.rb +29 -0
- data/lib/toys/templates/rspec.rb +32 -4
- data/lib/toys/templates/rubocop.rb +14 -1
- data/lib/toys/templates/yardoc.rb +55 -0
- data/lib/toys/testing.rb +186 -109
- data/lib/toys/version.rb +1 -1
- data/lib/toys.rb +4 -2
- metadata +56 -6
@@ -0,0 +1,63 @@
|
|
1
|
+
##
|
2
|
+
# **_Defined in the toys-core gem_**
|
3
|
+
#
|
4
|
+
# Toys is a configurable command line tool. Write commands in config files
|
5
|
+
# using a simple DSL, and Toys will provide the command line executable and
|
6
|
+
# take care of all the details such as argument parsing, online help, and error
|
7
|
+
# reporting. Toys is designed for software developers, IT professionals, and
|
8
|
+
# other power users who want to write and organize scripts to automate their
|
9
|
+
# workflows. It can also be used as a Rake replacement, providing a more
|
10
|
+
# natural command line interface for your project's build tasks.
|
11
|
+
#
|
12
|
+
# This module contains the command line framework underlying Toys. It can be
|
13
|
+
# used to create command line executables using the Toys DSL and classes.
|
14
|
+
#
|
15
|
+
module Toys
|
16
|
+
##
|
17
|
+
# **_Defined in the toys-core gem_**
|
18
|
+
#
|
19
|
+
# Namespace for DSL classes. These classes provide the directives that can be
|
20
|
+
# used in configuration files. Most are defined in {Toys::DSL::Tool}.
|
21
|
+
#
|
22
|
+
module DSL
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# **_Defined in the toys-core gem_**
|
27
|
+
#
|
28
|
+
# Namespace for standard middleware classes.
|
29
|
+
#
|
30
|
+
module StandardMiddleware
|
31
|
+
end
|
32
|
+
|
33
|
+
##
|
34
|
+
# **_Defined in the toys-core gem_**
|
35
|
+
#
|
36
|
+
# Namespace for standard mixin classes.
|
37
|
+
#
|
38
|
+
module StandardMixins
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# **_Defined in the toys-core gem_**
|
43
|
+
#
|
44
|
+
# Namespace for common utility classes.
|
45
|
+
#
|
46
|
+
# These classes are not loaded by default, and must be required explicitly.
|
47
|
+
# For example, before using {Toys::Utils::Exec}, you must
|
48
|
+
# `require "toys/utils/exec"`.
|
49
|
+
#
|
50
|
+
module Utils
|
51
|
+
end
|
52
|
+
|
53
|
+
class << self
|
54
|
+
##
|
55
|
+
# Path to the executable. This can, for example, be invoked to run a subtool
|
56
|
+
# in a clean environment.
|
57
|
+
#
|
58
|
+
# @return [String] if there is an executable
|
59
|
+
# @return [nil] if there is no such executable
|
60
|
+
#
|
61
|
+
attr_accessor :executable_path
|
62
|
+
end
|
63
|
+
end
|