toys 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2197d6be8f0369e9cba02822b8ca39c835ef79eed983e06f33ec2ebd36f989ab
4
- data.tar.gz: ebddd22ccccb8078be5f29af411b2eded3c690181ff0aa0460f54d717518465e
3
+ metadata.gz: b139a0c2557f3b2d2c1d60b312601bd5c3b3961654e750ccab125df55e281655
4
+ data.tar.gz: bf69d3a6ec5bd83db10e4c8b8e8bf00850cb1e0ab1565ade586c034bc1e667d2
5
5
  SHA512:
6
- metadata.gz: e8fb64f31d7baf0b35ef4c3870b762287a71eef701541fefdc688bb395bfe02d5e65b395d4d71b5a2de65fc252d5789e02b5cb64340a5a1a8edbe0de07135391
7
- data.tar.gz: a9949d11bb7bca264ceb5d8049da00cbf5effe86d2de15002582be7e8d2642757582dff5494839ef9435ddfa2077b8904040d8f4599bf7f61ed24f04445f5856
6
+ metadata.gz: e91e87e3e305e77745f13bcabca141efeddae84ac036d14a8289d7d0a517f4ccbb7f80da6f1e9304018aa45cc7c39582282ba51a9ed92d19a6eeee0852b61f6e
7
+ data.tar.gz: 7f8b4c1875a2a913bed9d136e5c88c6c52c25406035bd1aa284df0dd840687ea300891b001dcb94f1b94aab15f8cc55ccf97cdca381c55d9ece0611b33d908aa
@@ -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
@@ -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
@@ -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 cconstants, i.e. names beginning with a capital
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 always behave as though they are defined at the "top level" of
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 always
1300
- defined at the file level.
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. The
1323
- constants will not actually be connected to the mixin, and may not be
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
@@ -34,5 +34,5 @@ module Toys
34
34
  # Current version of the Toys command line binary
35
35
  # @return [String]
36
36
  #
37
- VERSION = "0.4.3"
37
+ VERSION = "0.4.4"
38
38
  end
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.3
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-13 00:00:00.000000000 Z
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.3
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.3
26
+ version: 0.4.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement