toys 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +4 -4
- data/builtins/system.rb +1 -1
- data/docs/guide.md +14 -7
- data/lib/toys/standard_cli.rb +0 -7
- 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: f92113048faa9971b6ee6523ba02d445a675411532d29c0ee16cc31fc6a58f47
|
4
|
+
data.tar.gz: 15f35f8c92ced516dc646caf4b63b6cd736d5d22539caee830d40a1f69549d8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8313128eaa43f9615085613eaa714fbd2f51321d6f48c25bc562649d3b72cc38dc7816e8cca89110a547b1f2f48d8a897543419def4e2c1ac465dac367a9024e
|
7
|
+
data.tar.gz: 381ae7f1311fee5946e179c1ad960c9cacc0a27b2deca5a9df251a9dee971eee2f8562e70ec50781827d83d2defd050d84c8108c8d5445d3f80c09fc5b77fa66
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -19,7 +19,7 @@ https://www.rubydoc.info/gems/toys-core
|
|
19
19
|
|
20
20
|
Here's a five-minute tutorial to get a feel of what Toys can do.
|
21
21
|
|
22
|
-
### Install
|
22
|
+
### Install Toys
|
23
23
|
|
24
24
|
Install the **toys** gem using:
|
25
25
|
|
@@ -114,9 +114,9 @@ you find the script you need.
|
|
114
114
|
|
115
115
|
Toys can also be used to share scripts. For example, it can be used instead of
|
116
116
|
Rake to provide build and test scripts for a project—tools that, unlike Rake
|
117
|
-
tasks, can be invoked and passed arguments using familiar unix
|
118
|
-
|
119
|
-
instead of Rakefiles.
|
117
|
+
tasks, can be invoked and passed arguments and flags using familiar unix
|
118
|
+
command line conventions. The Toys github repo itself comes with Toys config
|
119
|
+
files instead of Rakefiles.
|
120
120
|
|
121
121
|
## License
|
122
122
|
|
data/builtins/system.rb
CHANGED
@@ -62,7 +62,7 @@ tool "update" do
|
|
62
62
|
latest_version = ::Gem::Version.new($1)
|
63
63
|
cur_version = ::Gem::Version.new(::Toys::VERSION)
|
64
64
|
if latest_version > cur_version
|
65
|
-
prompt = "Update Toys from #{cur_version} to #{latest_version}?"
|
65
|
+
prompt = "Update Toys from #{cur_version} to #{latest_version}? "
|
66
66
|
exit(1) unless yes || confirm(prompt, default: true)
|
67
67
|
result = terminal.spinner(leading_text: "Installing Toys version #{latest_version}... ",
|
68
68
|
final_text: "Done.\n") do
|
data/docs/guide.md
CHANGED
@@ -1740,7 +1740,8 @@ can use either or both tools, depending on your needs.
|
|
1740
1740
|
|
1741
1741
|
Toys provides a built-in template for minitest, called `:minitest`. It is
|
1742
1742
|
implemented by the template class {Toys::Templates::Minitest}, and it uses the
|
1743
|
-
minitest gem, which is provided with most recent versions of Ruby.
|
1743
|
+
minitest gem, which is provided with most recent versions of Ruby. The
|
1744
|
+
following directive uses the minitest template to create a tool called `test`:
|
1744
1745
|
|
1745
1746
|
expand :minitest, files: ["test/test*.rb"], libs: ["lib", "ext"]
|
1746
1747
|
|
@@ -1748,7 +1749,8 @@ See the {Toys::Templates::Minitest} documentation for details on the various
|
|
1748
1749
|
options.
|
1749
1750
|
|
1750
1751
|
If you want to enforce code style using the "rubocop" gem, you can use the
|
1751
|
-
built-in `:rubocop` template
|
1752
|
+
built-in `:rubocop` template. The following directive uses this template to
|
1753
|
+
create a tool called `rubocop`:
|
1752
1754
|
|
1753
1755
|
expand :rubocop
|
1754
1756
|
|
@@ -1759,9 +1761,12 @@ options.
|
|
1759
1761
|
|
1760
1762
|
The `:gem_build` built-in template can generate a variety of build and release
|
1761
1763
|
tools for gems, and is a useful alternative to the Rake tasks provided by
|
1762
|
-
bundler. It is implemented by {Toys::Templates::GemBuild}.
|
1764
|
+
bundler. It is implemented by {Toys::Templates::GemBuild}. The following
|
1765
|
+
directive uses this template to create a tool called `build`:
|
1763
1766
|
|
1764
|
-
|
1767
|
+
expand :gem_build
|
1768
|
+
|
1769
|
+
The `:gem_build` template by default looks for a gemspec file in the current
|
1765
1770
|
directory, and builds that gem into a `pkg` directory. You can also build a
|
1766
1771
|
specific gem if you have multiple gemspec files.
|
1767
1772
|
|
@@ -1775,7 +1780,7 @@ your gem:
|
|
1775
1780
|
See the {Toys::Templates::GemBuild} documentation for details on the various
|
1776
1781
|
options for build tools.
|
1777
1782
|
|
1778
|
-
To
|
1783
|
+
To create a "clean" tool, you can use the `:clean` built-in template. For
|
1779
1784
|
example:
|
1780
1785
|
|
1781
1786
|
expand :clean, paths: ["pkg", "doc", "tmp"]
|
@@ -1791,7 +1796,7 @@ Both templates provide a variety of options for controlling documentation
|
|
1791
1796
|
generation. See {Toys::Templates::Rdoc} and {Toys::Templates::Yardoc} for
|
1792
1797
|
detailed information.
|
1793
1798
|
|
1794
|
-
Here's an example for YARD
|
1799
|
+
Here's an example for YARD, creating a tool called `yardoc`:
|
1795
1800
|
|
1796
1801
|
expand :yardoc, protected: true, markup: "markdown"
|
1797
1802
|
|
@@ -1814,6 +1819,8 @@ into the gem source repo with minimal or no modifications. Indeed, it is
|
|
1814
1819
|
nearly identical to the Toys files provided for the **toys** and **toys-core**
|
1815
1820
|
gems themselves.
|
1816
1821
|
|
1822
|
+
# This file is .toys.rb
|
1823
|
+
|
1817
1824
|
# A "clean" tool that cleans out gem builds (from the pkg directory), and
|
1818
1825
|
# documentation builds (from doc and .yardoc)
|
1819
1826
|
expand :clean, paths: ["pkg", "doc", ".yardoc"]
|
@@ -1843,7 +1850,7 @@ gems themselves.
|
|
1843
1850
|
# credentials.
|
1844
1851
|
expand :gem_build, name: "release", push_gem: true
|
1845
1852
|
|
1846
|
-
# Now we
|
1853
|
+
# Now we create a full CI tool. It runs the test, rubocop, and yardoc tools
|
1847
1854
|
# and checks for errors. This tool could be invoked from Travis-CI or
|
1848
1855
|
# similar CI system.
|
1849
1856
|
tool "ci" do
|
data/lib/toys/standard_cli.rb
CHANGED
@@ -61,12 +61,6 @@ module Toys
|
|
61
61
|
#
|
62
62
|
INDEX_FILE_NAME = ".toys.rb"
|
63
63
|
|
64
|
-
##
|
65
|
-
# Standard toys preload file name
|
66
|
-
# @return [String]
|
67
|
-
#
|
68
|
-
PRELOAD_FILE_NAME = ".preload.rb"
|
69
|
-
|
70
64
|
##
|
71
65
|
# Name of standard toys binary
|
72
66
|
# @return [String]
|
@@ -109,7 +103,6 @@ module Toys
|
|
109
103
|
config_dir_name: CONFIG_DIR_NAME,
|
110
104
|
config_file_name: CONFIG_FILE_NAME,
|
111
105
|
index_file_name: INDEX_FILE_NAME,
|
112
|
-
preload_file_name: PRELOAD_FILE_NAME,
|
113
106
|
middleware_stack: default_middleware_stack,
|
114
107
|
template_lookup: default_template_lookup
|
115
108
|
)
|
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.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-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.4.
|
19
|
+
version: 0.4.5
|
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.4.
|
26
|
+
version: 0.4.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.58.2
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.58.2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: yard
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|