toys 0.14.4 → 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: f1d83f39b676bc473d96ce88a0595b5bf43cebadda8191e7c50d34b2e924d1ca
4
- data.tar.gz: a985ecb1929c1cc5283d383b5ef294f485cd9375ba95cfccca43ab45a36f9b60
3
+ metadata.gz: 9a837125eba12fa3f474e6d3be5f28a910812b2caf613ed4b141bd6e739b000a
4
+ data.tar.gz: f5ed73f297f6dca994669352e70eafc295c4fee0ab6c676c43f519ce712bf605
5
5
  SHA512:
6
- metadata.gz: 4a2815992be587d513de84ab570f889c7db0ecea00b82943a2968ec95d199d94c2313a396ff1d9277e372fc30cf5b21561da0598f4d3f15733844bf68e7b0a88
7
- data.tar.gz: d2622c8fc1561bfb30325cc2ed027d1f95f5155dd100a6343829b85633d7cbd7fcfff249efbb9e3275a2128de01fec112bb885347c0dd7925cd5145c5a483117
6
+ metadata.gz: af96fcb6f454ab4cd0c86e5ff1f75cf1eb0bd05146511623bc90cada3b5324b0bbb5a9953198e759ca0a324c082167380db22c81351ae1a2927d478f7929fa3f
7
+ data.tar.gz: 3fa9ba8cda05a804d729ee884a7e0da00a0839e264bb8874ad705f4b71d2b843a21c6b85c3efbda99721dcd8df66ee8b9c9df15f86f5b005c90c416fdd131fde
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
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
+
3
7
  ### v0.14.4 / 2023-01-23
4
8
 
5
9
  * (No significant changes)
@@ -9,6 +9,6 @@ module Toys
9
9
  # Current version of Toys core.
10
10
  # @return [String]
11
11
  #
12
- VERSION = "0.14.4"
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.4"
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.4
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: 2023-01-23 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.4
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.4
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.4/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.4
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: