toys 0.4.3 → 0.4.4
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 -0
- data/builtins/system.rb +1 -1
- data/docs/guide.md +9 -7
- data/lib/toys/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b139a0c2557f3b2d2c1d60b312601bd5c3b3961654e750ccab125df55e281655
|
4
|
+
data.tar.gz: bf69d3a6ec5bd83db10e4c8b8e8bf00850cb1e0ab1565ade586c034bc1e667d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e91e87e3e305e77745f13bcabca141efeddae84ac036d14a8289d7d0a517f4ccbb7f80da6f1e9304018aa45cc7c39582282ba51a9ed92d19a6eeee0852b61f6e
|
7
|
+
data.tar.gz: 7f8b4c1875a2a913bed9d136e5c88c6c52c25406035bd1aa284df0dd840687ea300891b001dcb94f1b94aab15f8cc55ccf97cdca381c55d9ece0611b33d908aa
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 0.4.4 / 2018-07-21
|
4
|
+
|
5
|
+
* FIXED: Utils::Exec wasn't closing streams after copying.
|
6
|
+
* IMPROVED: Utils::Exec::Controller can capture or redirect the remainder of a controlled stream.
|
7
|
+
* ADDED: Terminal#ask
|
8
|
+
|
3
9
|
### 0.4.3 / 2018-07-13
|
4
10
|
|
5
11
|
* IMPROVED: Exec mixin methods can now spawn subprocesses in the background
|
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
|
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
@@ -1286,7 +1286,7 @@ pass a value to the mixin's initializer:
|
|
1286
1286
|
|
1287
1287
|
### Using Constants
|
1288
1288
|
|
1289
|
-
You can define and use Ruby
|
1289
|
+
You can define and use Ruby constants, i.e. names beginning with a capital
|
1290
1290
|
letter, in a Toys file. However, they are subject to Ruby's rules regarding
|
1291
1291
|
constant scope and lookup, which can be confusing, especially in a DSL. Toys
|
1292
1292
|
tries to simplify those rules and make constant behavior somewhat tractable,
|
@@ -1294,10 +1294,10 @@ but if you do use constants (which includes modules and classes defined in a
|
|
1294
1294
|
Toys file), it is important to understand how they work.
|
1295
1295
|
|
1296
1296
|
Constants in Toys are visible only within the Toys file in which they are
|
1297
|
-
defined. They
|
1297
|
+
defined. They normally behave as though they are defined at the "top level" of
|
1298
1298
|
the file. Even if you define a constant lexically "inside" a tool or a mixin,
|
1299
|
-
the constant does _not_ end up connected to that tool or mixin; it is
|
1300
|
-
|
1299
|
+
the constant does _not_ end up connected to that tool or mixin; it is defined
|
1300
|
+
at the file level.
|
1301
1301
|
|
1302
1302
|
tool "test" do
|
1303
1303
|
tool "unit" do
|
@@ -1317,11 +1317,13 @@ defined at the file level.
|
|
1317
1317
|
end
|
1318
1318
|
end
|
1319
1319
|
|
1320
|
+
(Note it is still possible to attach constants to a tool or mixin by defining
|
1321
|
+
them with `self::`. However, this isn't very common practice in Ruby.)
|
1322
|
+
|
1320
1323
|
Because of this, it is highly recommended that you define constants only at the
|
1321
1324
|
top level of a Toys file, so it doesn't "look" like it is scoped to something
|
1322
|
-
smaller. In particular, do not attempt to define constants in a mixin
|
1323
|
-
|
1324
|
-
available to tools that include the mixin.
|
1325
|
+
smaller. In particular, do not attempt to define constants in a mixin, unless
|
1326
|
+
you scope them with `self::`.
|
1325
1327
|
|
1326
1328
|
Modules and classes defined using the `module` or `class` keyword, are also
|
1327
1329
|
constants, and thus follow the same rules. So you could, for example, define a
|
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.4
|
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-07-
|
11
|
+
date: 2018-07-22 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.4
|
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.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|