toys 0.14.3 → 0.14.5

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: 265d41ef48b2c858476f6e9d612762b388835388bf417c2a547cd80cb7fb5844
4
- data.tar.gz: 8a9e83571cd471b4de2d9a769bcd3fb7e91ba77aa345b43f9ab682986ebbb1cd
3
+ metadata.gz: 9a837125eba12fa3f474e6d3be5f28a910812b2caf613ed4b141bd6e739b000a
4
+ data.tar.gz: f5ed73f297f6dca994669352e70eafc295c4fee0ab6c676c43f519ce712bf605
5
5
  SHA512:
6
- metadata.gz: a2043f0e6f135385e61d88b76265296f860d3258b6da4d63fd9e829ea403f7989407a1106ae55e916611fc75832d237ce1417b3332a20a34bfc4561019ba0da5
7
- data.tar.gz: 8bf00f2438349c6ced2e5a422d042d58d4749552421b45435e8aeaaa6b54ca463ce739633247136fce4b20420076a1d4290681795529083582f323872548c100
6
+ metadata.gz: af96fcb6f454ab4cd0c86e5ff1f75cf1eb0bd05146511623bc90cada3b5324b0bbb5a9953198e759ca0a324c082167380db22c81351ae1a2927d478f7929fa3f
7
+ data.tar.gz: 3fa9ba8cda05a804d729ee884a7e0da00a0839e264bb8874ad705f4b71d2b843a21c6b85c3efbda99721dcd8df66ee8b9c9df15f86f5b005c90c416fdd131fde
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Release History
2
2
 
3
+ ### v0.14.5 / 2023-03-20
4
+
5
+ * FIXED: Rescue broken pipe errors by default when running a pager
6
+
7
+ ### v0.14.4 / 2023-01-23
8
+
9
+ * (No significant changes)
10
+
3
11
  ### v0.14.3 / 2022-12-29
4
12
 
5
13
  * FIXED: Exit with a code -1 if a non-integer exit code is thrown
@@ -9,6 +9,6 @@ module Toys
9
9
  # Current version of Toys core.
10
10
  # @return [String]
11
11
  #
12
- VERSION = "0.14.3"
12
+ VERSION = "0.14.5"
13
13
  end
14
14
  end
@@ -8,6 +8,10 @@ module Toys
8
8
  # This mixin provides an instance of {Toys::Utils::Pager}, which invokes
9
9
  # an external pager for output.
10
10
  #
11
+ # You can also pass additional keyword arguments to the `include` directive
12
+ # to configure the pager object. These will be passed on to
13
+ # {Toys::Utils::Pager#initialize}.
14
+ #
11
15
  # @example
12
16
  #
13
17
  # include :pager
@@ -32,8 +32,13 @@ module Toys
32
32
  # executing commands, or `nil` (the default) to use a default.
33
33
  # @param fallback_io [IO] An IO-like object to write to if the pager is
34
34
  # disabled. Defaults to `$stdout`.
35
+ # @param rescue_broken_pipes [boolean] If `true` (the default), broken
36
+ # pipes are silently rescued. This prevents the exception from
37
+ # propagating out if the pager is interrupted. Set this parameter to
38
+ # `false` to disable this behavior.
35
39
  #
36
- def initialize(command: true, exec_service: nil, fallback_io: nil)
40
+ def initialize(command: true, exec_service: nil, fallback_io: nil,
41
+ rescue_broken_pipes: true)
37
42
  # Source available in the toys-core gem
38
43
  end
39
44
 
@@ -88,6 +93,10 @@ module Toys
88
93
  # executing commands, or `nil` (the default) to use a default.
89
94
  # @param fallback_io [IO] An IO-like object to write to if the pager is
90
95
  # disabled. Defaults to `$stdout`.
96
+ # @param rescue_broken_pipes [boolean] If `true` (the default), broken
97
+ # pipes are silently rescued. This prevents the exception from
98
+ # propagating out if the pager is interrupted. Set this parameter to
99
+ # `false` to disable this behavior.
91
100
  # @return [Integer] The exit code of the pager process.
92
101
  #
93
102
  # @example
@@ -95,7 +104,12 @@ module Toys
95
104
  # Toys::Utils::Pager.start do |io|
96
105
  # io.puts "A long string\n"
97
106
  # end
98
- def start(command: true, exec_service: nil, fallback_io: nil, &block)
107
+ #
108
+ def start(command: true,
109
+ exec_service: nil,
110
+ fallback_io: nil,
111
+ rescue_broken_pipes: true,
112
+ &block)
99
113
  # Source available in the toys-core gem
100
114
  end
101
115
  end
data/lib/toys/version.rb CHANGED
@@ -5,5 +5,5 @@ module Toys
5
5
  # Current version of the Toys command line executable.
6
6
  # @return [String]
7
7
  #
8
- VERSION = "0.14.3"
8
+ VERSION = "0.14.5"
9
9
  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.14.3
4
+ version: 0.14.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: 2022-12-29 00:00:00.000000000 Z
11
+ date: 2023-03-20 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.14.3
19
+ version: 0.14.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.14.3
26
+ version: 0.14.5
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
@@ -120,10 +120,10 @@ homepage: https://github.com/dazuma/toys
120
120
  licenses:
121
121
  - MIT
122
122
  metadata:
123
- changelog_uri: https://dazuma.github.io/toys/gems/toys/v0.14.3/file.CHANGELOG.html
123
+ changelog_uri: https://dazuma.github.io/toys/gems/toys/v0.14.5/file.CHANGELOG.html
124
124
  source_code_uri: https://github.com/dazuma/toys/tree/main/toys
125
125
  bug_tracker_uri: https://github.com/dazuma/toys/issues
126
- documentation_uri: https://dazuma.github.io/toys/gems/toys/v0.14.3
126
+ documentation_uri: https://dazuma.github.io/toys/gems/toys/v0.14.5
127
127
  post_install_message:
128
128
  rdoc_options: []
129
129
  require_paths: