tty-progressbar 0.18.2 → 0.18.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e266e18a501b913609146035057b886fb5810fa9415b4ba217cf21901b4963e
4
- data.tar.gz: 7ef378c17f1d033f4ef38258591ece40267cf51f4867786f42c6aaec4734edf7
3
+ metadata.gz: b9d001da1f38dc2f722255b66f498763ddc3a3a55f04598866e25d33701d5ced
4
+ data.tar.gz: 49e83e50c0f6265b3f76f1536f825f5dbe1abb89353c2e3dc7124ff24b26af27
5
5
  SHA512:
6
- metadata.gz: b77549a6eafedcd5bbe077013f53a694cbcfe0b21fe3d098a8e790dbb8c95e37af1f49b2d3c928196002c26f3e0f1dbda0eb472a947f5c0f421e49cf9bfc3df1
7
- data.tar.gz: 22b5ea40361f6a300211a34031f39436120be9fcac78a62fb51a334c0f279422ad45229c5379584a85368478e72a242f376abbec6682833b4c82015d5bb3f816
6
+ metadata.gz: f035e2789509e8e56fd1480136b6c8d4c4c07c7497ca9d7409e85ff619957badbf281a76ec2b194c4787a1e0502c596cae6ae68912ba01e62cda6cd2ad7ac52f
7
+ data.tar.gz: 9cd2b4fd1cae46809e764329f55722ddb23d801977ec351727051671510402ea6774969f8b4b984369629f894e40d8b77459cb8133ff53efbbc7ebacb27e552e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change log
2
2
 
3
+ ## [v0.18.3] - 2024-11-10
4
+
5
+ ### Fixed
6
+ * Fix setting the current progress for an indeterminate bar by Alex Watt
7
+ (@alexcwatt)
8
+
3
9
  ## [v0.18.2] - 2021-03-08
4
10
 
5
11
  ### Fixed
@@ -242,6 +248,7 @@
242
248
 
243
249
  * Initial implementation and release
244
250
 
251
+ [v0.18.3]: https://github.com/piotrmurach/tty-progressbar/compare/v0.18.2...v0.18.3
245
252
  [v0.18.2]: https://github.com/piotrmurach/tty-progressbar/compare/v0.18.1...v0.18.2
246
253
  [v0.18.1]: https://github.com/piotrmurach/tty-progressbar/compare/v0.18.0...v0.18.1
247
254
  [v0.18.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.17.0...v0.18.0
data/README.md CHANGED
@@ -2,22 +2,19 @@
2
2
  <a href="https://ttytoolkit.org"><img width="130" src="https://github.com/piotrmurach/tty/raw/master/images/tty.png" alt="TTY Toolkit logo"/></a>
3
3
  </div>
4
4
 
5
- # TTY::ProgressBar [![Gitter](https://badges.gitter.im/Join%20Chat.svg)][gitter]
5
+ # TTY::ProgressBar
6
6
 
7
7
  [![Gem Version](https://badge.fury.io/rb/tty-progressbar.svg)][gem]
8
- [![Actions CI](https://github.com/piotrmurach/tty-progressbar/workflows/CI/badge.svg?branch=master)][gh_actions_ci]
8
+ [![Actions CI](https://github.com/piotrmurach/tty-progressbar/actions/workflows/ci.yml/badge.svg)][gh_actions_ci]
9
9
  [![Build status](https://ci.appveyor.com/api/projects/status/w3jafjeatt1ulufa?svg=true)][appveyor]
10
10
  [![Maintainability](https://api.codeclimate.com/v1/badges/e85416137d2057169575/maintainability)][codeclimate]
11
11
  [![Coverage Status](https://coveralls.io/repos/github/piotrmurach/tty-progressbar/badge.svg)][coverage]
12
- [![Inline docs](http://inch-ci.org/github/piotrmurach/tty-progressbar.svg?branch=master)][inchpages]
13
12
 
14
- [gitter]: https://gitter.im/piotrmurach/tty
15
- [gem]: http://badge.fury.io/rb/tty-progressbar
16
- [gh_actions_ci]: https://github.com/piotrmurach/tty-progressbar/actions?query=workflow%3ACI
13
+ [gem]: https://badge.fury.io/rb/tty-progressbar
14
+ [gh_actions_ci]: https://github.com/piotrmurach/tty-progressbar/actions/workflows/ci.yml
17
15
  [appveyor]: https://ci.appveyor.com/project/piotrmurach/tty-progressbar
18
16
  [codeclimate]: https://codeclimate.com/github/piotrmurach/tty-progressbar/maintainability
19
17
  [coverage]: https://coveralls.io/github/piotrmurach/tty-progressbar
20
- [inchpages]: http://inch-ci.org/github/piotrmurach/tty-progressbar
21
18
 
22
19
  > A flexible and extensible progress bar for terminal applications.
23
20
 
@@ -111,7 +108,7 @@ $ gem install tty-progressbar
111
108
  * [6.12 on](#612-on)
112
109
  * [6.13 :style](#613-style)
113
110
  * [7. Examples](#7-examples)
114
- * [7.1 Color](#71-color)
111
+ * [7.1 Colors](#71-colors)
115
112
  * [7.2 Speed](#72-speed)
116
113
 
117
114
  ## 1. Usage
@@ -222,7 +219,7 @@ By default, progress bar is advanced by `1` but you can change it by passing sec
222
219
  bar.iterate(30.times, 5)
223
220
  ```
224
221
 
225
- One particularly useful application of `iterate` are Ruby infamous [lazy enumerators](http://ruby-doc.org/core-2.5.0/Enumerator/Lazy.html), or slowly advancing enumerations, representing complex processes.
222
+ One particularly useful application of `iterate` are Ruby infamous [lazy enumerators](https://ruby-doc.org/core-2.5.0/Enumerator/Lazy.html), or slowly advancing enumerations, representing complex processes.
226
223
 
227
224
  For example, an `Enumerator` that downloads content from a remote server chunk at a time:
228
225
 
@@ -453,7 +450,7 @@ The progress bar's configuration can also be changed at runtime with `configure`
453
450
  ```ruby
454
451
  bar.configure do |config|
455
452
  config.total = 100 # takes precedence over the original value
456
- config.frequencye = 20
453
+ config.frequency = 20
457
454
  end
458
455
  ```
459
456
 
@@ -1058,7 +1055,7 @@ This will result in output similar to:
1058
1055
  4. Push to the branch (`git push origin my-new-feature`)
1059
1056
  5. Create a new Pull Request
1060
1057
 
1061
- This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
1058
+ This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://contributor-covenant.org) code of conduct.
1062
1059
 
1063
1060
  ## Code of Conduct
1064
1061
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TTY
4
4
  class ProgressBar
5
- VERSION = "0.18.2"
5
+ VERSION = "0.18.3"
6
6
  end # ProgressBar
7
7
  end # TTY
@@ -290,7 +290,12 @@ module TTY
290
290
  #
291
291
  # @api public
292
292
  def current=(value)
293
- value = [0, [value, total].min].max
293
+ unless value.is_a?(Numeric)
294
+ raise ArgumentError, "Expected a numeric value, " \
295
+ "got #{value.inspect} instead."
296
+ end
297
+
298
+ value = [0, [value, total].compact.min].max
294
299
  advance(value - @current)
295
300
  end
296
301
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tty-progressbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.2
4
+ version: 0.18.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Murach
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-08 00:00:00.000000000 Z
11
+ date: 2024-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: strings-ansi
@@ -163,9 +163,11 @@ metadata:
163
163
  bug_tracker_uri: https://github.com/piotrmurach/tty-progressbar/issues
164
164
  changelog_uri: https://github.com/piotrmurach/tty-progressbar/blob/master/CHANGELOG.md
165
165
  documentation_uri: https://www.rubydoc.info/gems/tty-progressbar
166
+ funding_uri: https://github.com/sponsors/piotrmurach
166
167
  homepage_uri: https://ttytoolkit.org
168
+ rubygems_mfa_required: 'true'
167
169
  source_code_uri: https://github.com/piotrmurach/tty-progressbar
168
- post_install_message:
170
+ post_install_message:
169
171
  rdoc_options: []
170
172
  require_paths:
171
173
  - lib
@@ -180,8 +182,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
182
  - !ruby/object:Gem::Version
181
183
  version: '0'
182
184
  requirements: []
183
- rubygems_version: 3.1.2
184
- signing_key:
185
+ rubygems_version: 3.4.10
186
+ signing_key:
185
187
  specification_version: 4
186
188
  summary: A flexible and extensible progress bar for terminal applications.
187
189
  test_files: []