toys 0.14.4 → 0.14.6

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: ed5fd749db5a06573013ec522a1bc68326bf7fbe4aee6e763b48c8eac2512049
4
+ data.tar.gz: 90cfac2dceb66fc7aa262a6d0fd5a067975a95834063337495abb4a384ec28b3
5
5
  SHA512:
6
- metadata.gz: 4a2815992be587d513de84ab570f889c7db0ecea00b82943a2968ec95d199d94c2313a396ff1d9277e372fc30cf5b21561da0598f4d3f15733844bf68e7b0a88
7
- data.tar.gz: d2622c8fc1561bfb30325cc2ed027d1f95f5155dd100a6343829b85633d7cbd7fcfff249efbb9e3275a2128de01fec112bb885347c0dd7925cd5145c5a483117
6
+ metadata.gz: 38ce1b82210b597c5db8d887cf5c7abbe881b79b9cea594740e9bce6b62429e2cd43ec5084416d99551d1d6c42224805b095a084fc5f1607a5569207e038cd0b
7
+ data.tar.gz: e4c9e71f609688efcd198db1afc87d529c33941861cf95346ed5be9d0734d85c9c4531bb3e5a9828a5028cf78a34074dd8ccd8f15a7ff1a9d69e636742d996ed
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Release History
2
2
 
3
+ ### v0.14.6 / 2023-06-29
4
+
5
+ * FIXED: Fixed a GitCache exception when loading a repository containing a broken symlink
6
+
7
+ ### v0.14.5 / 2023-03-20
8
+
9
+ * FIXED: Rescue broken pipe errors by default when running a pager
10
+
3
11
  ### v0.14.4 / 2023-01-23
4
12
 
5
13
  * (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.6"
13
13
  end
14
14
  end
@@ -8,16 +8,16 @@ module Toys
8
8
  # This mixin provides an instance of {Toys::Utils::GitCache}, providing
9
9
  # cached access to files from a remote git repo.
10
10
  #
11
- # Example usage:
11
+ # @example
12
12
  #
13
- # include :git_cache
13
+ # include :git_cache
14
14
  #
15
- # def run
16
- # # Pull and cache the HEAD commit from the Toys repo.
17
- # dir = git_cache.find("https://github.com/dazuma/toys.git")
18
- # # Display the contents of the readme file.
19
- # puts File.read(File.join(dir, "README.md"))
20
- # end
15
+ # def run
16
+ # # Pull and cache the HEAD commit from the Toys repo.
17
+ # dir = git_cache.get("https://github.com/dazuma/toys.git")
18
+ # # Display the contents of the readme file.
19
+ # puts File.read(File.join(dir, "README.md"))
20
+ # end
21
21
  #
22
22
  module GitCache
23
23
  include Mixin
@@ -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.6"
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.6
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-06-29 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.6
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.6
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.6/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.6
127
127
  post_install_message:
128
128
  rdoc_options: []
129
129
  require_paths: