infobar 0.8.1 → 0.9.0

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: 1d0b2e928a68a99137db85fa9d39b6c607fe4a1c5e951d108f83a2663227bce8
4
- data.tar.gz: 40c78fa220a062940757f7bdbaca204830af757af54a147581df258e0dc35a47
3
+ metadata.gz: a851b107c04ec6fc0244947964d8677886ee7cbe2516fbcbab69ad0997fc54d8
4
+ data.tar.gz: 8919fba2def59ff708b4f2a2d2b307e9a2b1e675a79ae4184f9dcd4aa7c35483
5
5
  SHA512:
6
- metadata.gz: 63455a33afd3efaf55a9c3e3ae30d902a1e92c2ea112afc2eb67738874105ca376c573410f24b8b1792e8efad44c4f208f2011ac9ce1b181dd2a4cbad2388680
7
- data.tar.gz: 470b3dda739a5768e3470c6e923a1e1acb87f137c9a3c300f6614b4cfae55994d68fc56d5ed471aa6038c0c0d543a4d5729298c2ebc8fad2a54d20288e57b0ef
6
+ metadata.gz: f05c0f568bc62c3afa048ea134b9c6567d98e975847d82b93446599501f7aa21b78c51c74e3ba18cae30c52f674c6460cf84ff5d0c93b3d85fc8515b1d41cb5f
7
+ data.tar.gz: a4c3ad5cf6f3ed3ea9b8d42f2d753a7a2e7901724ed438339e76aecd70841eda3d51ff320b51ff1d900440582fef283a6a5409c7b2e0350c2cd40626d9c545ea
data/.all_images.yml CHANGED
@@ -12,6 +12,7 @@ script: &script |-
12
12
  fail_fast: true
13
13
 
14
14
  images:
15
+ ruby:3.4-alpine: *script
15
16
  ruby:3.3-alpine: *script
16
17
  ruby:3.2-alpine: *script
17
18
  ruby:3.1-alpine: *script
data/.utilsrc CHANGED
@@ -8,7 +8,6 @@ end
8
8
  discover do
9
9
  prune_dirs /\A(\.svn|\.git|CVS|tmp|tags|coverage|pkg)\z/
10
10
  skip_files /(\A\.|\.sw[pon]\z|\.log\z|~\z)/
11
- binary false
12
11
  end
13
12
 
14
13
  strip_spaces do
data/CHANGES.md CHANGED
@@ -1,34 +1,42 @@
1
1
  # Changes
2
2
 
3
+ ## 2025-01-10 v0.9.0
4
+
5
+ * Removed outdated changelogs for versions prior to **0.6.1** from README.md.
6
+ * Added `braille18` animation to `Infobar::Spinner` class.
7
+ * Added `braille181` character set to `PREDEFINED` in Infobar Spinner.
8
+ * Added Ruby 3.4-alpine to supported versions in `.all_images.yml` file.
9
+ * Replaced `allow` with `expect` in tests.
10
+
3
11
  ## 2024-09-08 v0.8.1
4
12
 
5
13
  * **Dependency Updates**:
6
- + Update `all_images` Dockerfile and Gem installation
7
- - Removed gem update and `gem_hadar/bundler` installation from Dockerfile
8
- - Replaced RUN commands with bundle install and rake spec using bundler
9
- + Upgrade `gem_hadar`
14
+ + Update `all_images` Dockerfile and Gem installation
15
+ - Removed gem update and `gem_hadar/bundler` installation from Dockerfile
16
+ - Replaced RUN commands with bundle install and rake spec using bundler
17
+ + Upgrade `gem_hadar`
10
18
  * **Refactor Infobar message formatting**
11
- + Update `@message` assignment to use a conditional format string
19
+ + Update `@message` assignment to use a conditional format string
12
20
  * **Miscellaneous**:
13
- + Bump version and dependencies
14
- - Update `.all_images.yml` to use `bundle install --full-index`
15
- - Remove `.byebug_history` from `.gitignore`
16
- - Remove `gem 'byebug', platform: :mri'` from `Gemfile`
17
- - Bump version in `VERSION`, `infobar.gemspec`, and `lib/infobar/version.rb`
21
+ + Bump version and dependencies
22
+ - Update `.all_images.yml` to use `bundle install --full-index`
23
+ - Remove `.byebug_history` from `.gitignore`
24
+ - Remove `gem 'byebug', platform: :mri'` from `Gemfile`
25
+ - Bump version in `VERSION`, `infobar.gemspec`, and `lib/infobar/version.rb`
18
26
 
19
27
  ## 2024-09-01 v0.8.0
20
28
 
21
29
  * **New Version:** 0.8.0
22
30
  * **Significant Changes:**
23
- + *Update all_images Dockerfile and Gem installation*
24
- - Removed gem update and gem_hadar/bundler installation from Dockerfile
25
- - Replaced RUN commands with bundle install and rake spec using bundler
26
- + *Add string representation for Infobar::Counter*
27
- - Added test for representing Infobar::Counter as a string
28
- - Updated test to check progress method with different options
29
- + *Update Infobar busy method to accept frames option*
30
- - Update busy method to take an optional frames parameter with default value :circle1
31
- - Change message format in busy method to use frames option instead of hardcoded :circle1 symbol
31
+ + *Update all_images Dockerfile and Gem installation*
32
+ - Removed gem update and gem_hadar/bundler installation from Dockerfile
33
+ - Replaced RUN commands with bundle install and rake spec using bundler
34
+ + *Add string representation for Infobar::Counter*
35
+ - Added test for representing Infobar::Counter as a string
36
+ - Updated test to check progress method with different options
37
+ + *Update Infobar busy method to accept frames option*
38
+ - Update busy method to take an optional frames parameter with default value :circle1
39
+ - Change message format in busy method to use frames option instead of hardcoded :circle1 symbol
32
40
 
33
41
  ## 2024-03-15 v0.7.4
34
42
 
@@ -37,10 +45,10 @@
37
45
  ## 2024-03-15 v0.7.3
38
46
 
39
47
  * **New Features**
40
- + Updated homepage URL to use HTTPS
41
- + Integrated latest `gem_hadar` gem
48
+ + Updated homepage URL to use HTTPS
49
+ + Integrated latest `gem_hadar` gem
42
50
  * **Changes**
43
- + Homepage URL updated to secure protocol
51
+ + Homepage URL updated to secure protocol
44
52
 
45
53
  ## 2023-10-09 v0.7.2
46
54
 
@@ -54,17 +62,17 @@
54
62
  ## 2021-01-12 v0.7.0
55
63
 
56
64
  * **New Features**
57
- + Support for Ruby 3.0
65
+ + Support for Ruby 3.0
58
66
  * **Dependencies**
59
- + Depend on the newest version of an unspecified library or framework
67
+ + Depend on the newest version of an unspecified library or framework
60
68
 
61
69
  ## 2020-05-15 v0.6.2
62
70
 
63
71
  * **Significant Changes**:
64
- + Use keyword operator
65
- + Upgrade bundler
66
- + Test ruby 2.7
67
- + Remove unnecessary code
72
+ + Use keyword operator
73
+ + Upgrade bundler
74
+ + Test ruby 2.7
75
+ + Remove unnecessary code
68
76
 
69
77
  ## 2019-04-11 v0.6.1
70
78
 
@@ -77,7 +85,7 @@
77
85
  ## 2018-11-01 v0.5.1
78
86
 
79
87
  * **Allow busy bar message to be overwritten**
80
- + Added functionality to overwrite the default busy bar message.
88
+ + Added functionality to overwrite the default busy bar message.
81
89
 
82
90
  ## 2018-03-05 v0.5.0
83
91
 
@@ -86,9 +94,9 @@
86
94
  ## 2017-12-08 v0.4.0
87
95
 
88
96
  * **New Feature**: Automatically iterate when `with_infobar` is passed a block.
89
- + This change allows for more flexible usage of the `with_infobar` method.
97
+ + This change allows for more flexible usage of the `with_infobar` method.
90
98
  * **Documentation**: Add COPYING file
91
- + Provides licensing information for the project.
99
+ + Provides licensing information for the project.
92
100
 
93
101
  ## 2017-06-29 v0.3.0
94
102
 
@@ -111,15 +119,15 @@
111
119
  ## 2017-04-24 v0.1.0
112
120
 
113
121
  * **New Features**
114
- + Support for multiple colored progress bars
122
+ + Support for multiple colored progress bars
115
123
  * **Bug Fixes**
116
- + Ensure bar is always long enough
117
- + Correct config environment settings
124
+ + Ensure bar is always long enough
125
+ + Correct config environment settings
118
126
 
119
127
  ## 2017-04-13 v0.0.7
120
128
 
121
129
  * **New Feature:** Forced display of Infobar updates:
122
- + When calling `Infobar.update`, the infobar will now always be displayed.
130
+ + When calling `Infobar.update`, the infobar will now always be displayed.
123
131
 
124
132
  ## 2017-03-24 v0.0.6
125
133
 
@@ -138,9 +146,9 @@
138
146
  ## 2017-03-09 v0.0.3
139
147
 
140
148
  * **New Version Summary**
141
- + Reset frequency when calling `clear`
142
- + Added reminder to TODO list
143
- + Fixed a typo
149
+ + Reset frequency when calling `clear`
150
+ + Added reminder to TODO list
151
+ + Fixed a typo
144
152
 
145
153
  ## 2017-02-10 v0.0.2
146
154
 
data/README.md CHANGED
@@ -19,53 +19,6 @@ Display progress of computations and additional information to the terminal.
19
19
 
20
20
  > (1..23).with_infobar.each { |i| +infobar; sleep 1 }
21
21
 
22
- ## Changes
23
-
24
- * 2019-04-11 Release 0.6.1
25
- - Counter string representation shows results now.
26
-
27
- * 2019-01-31 Release 0.6.0
28
- - Allow progressing with - as false.
29
-
30
- * 2018-11-01 Release 0.5.1
31
- - Allow busy bar message to be overwritten.
32
-
33
- * 2018-03-05 Release 0.5.0
34
- - Allow counter values to be formatted with units.
35
-
36
- * 2017-12-08 Release 0.4.0
37
- - Automatically iterate when `with_infobar` is passed a block.
38
-
39
- * 2017-06-29 Release 0.3.0
40
- - Nicely format large numbers the Ruby way
41
-
42
- * 2017-05-24 Release 0.2.0
43
- - Allow setting of input/output on initial call.
44
-
45
-
46
-
47
- * 2017-03-24 Release 0.0.6
48
- - Add busybar functionality via Infobar.busy { … } call
49
-
50
- * 2017-03-10 Release 0.0.5
51
- - Always provide a default unit for rate display, 'i/s' for "items per second".
52
-
53
- * 2017-03-10 Release 0.0.4
54
- - Fix problem b/c at the beginning there might not be a valid rate.
55
-
56
- * 2017-03-09 Release 0.0.3
57
- - Reset frequency after calling clear. This means after calling output methods
58
- the next update will be forced.
59
-
60
- * 2017-02-10 Release 0.0.2
61
- - Add trend arrow to rate directive
62
-
63
- * 2017-02-08 Release 0.0.1
64
- - Allow disabling of delegated output via infobar.show = false
65
-
66
- * 2017-02-08 Release 0.0.0
67
- - Initial release
68
-
69
22
  ## Download
70
23
 
71
24
  The homepage of this library is located at
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.1
1
+ 0.9.0
data/infobar.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: infobar 0.8.1 ruby lib
2
+ # stub: infobar 0.9.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "infobar".freeze
6
- s.version = "0.8.1".freeze
6
+ s.version = "0.9.0".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Florian Frank".freeze]
11
- s.date = "2024-09-08"
11
+ s.date = "2025-01-10"
12
12
  s.description = "This gem displays progress of computations and additional information to the terminal.".freeze
13
13
  s.email = "flori@ping.de".freeze
14
14
  s.extra_rdoc_files = ["README.md".freeze, "lib/infobar.rb".freeze, "lib/infobar/counter.rb".freeze, "lib/infobar/display.rb".freeze, "lib/infobar/duration.rb".freeze, "lib/infobar/fancy_interface.rb".freeze, "lib/infobar/fifo.rb".freeze, "lib/infobar/frequency.rb".freeze, "lib/infobar/input_output.rb".freeze, "lib/infobar/message.rb".freeze, "lib/infobar/number.rb".freeze, "lib/infobar/rate.rb".freeze, "lib/infobar/spinner.rb".freeze, "lib/infobar/timer.rb".freeze, "lib/infobar/trend.rb".freeze, "lib/infobar/version.rb".freeze]
@@ -16,13 +16,13 @@ Gem::Specification.new do |s|
16
16
  s.homepage = "https://github.com/flori/infobar".freeze
17
17
  s.rdoc_options = ["--title".freeze, "Infobar".freeze, "--main".freeze, "README.md".freeze]
18
18
  s.required_ruby_version = Gem::Requirement.new(">= 2.3".freeze)
19
- s.rubygems_version = "3.5.18".freeze
19
+ s.rubygems_version = "3.6.2".freeze
20
20
  s.summary = "Gem to display information about computations.".freeze
21
21
  s.test_files = ["spec/infobar/config_spec.rb".freeze, "spec/infobar/counter_spec.rb".freeze, "spec/infobar/display_spec.rb".freeze, "spec/infobar/duration_spec.rb".freeze, "spec/infobar/fifo_spec.rb".freeze, "spec/infobar/frequency_spec.rb".freeze, "spec/infobar/input_output_spec.rb".freeze, "spec/infobar/message_spec.rb".freeze, "spec/infobar/number_spec.rb".freeze, "spec/infobar/rate_spec.rb".freeze, "spec/infobar/spinner_spec.rb".freeze, "spec/infobar/timer_spec.rb".freeze, "spec/infobar/trend_spec.rb".freeze, "spec/infobar_spec.rb".freeze, "spec/spec_helper.rb".freeze]
22
22
 
23
23
  s.specification_version = 4
24
24
 
25
- s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.17.0".freeze])
25
+ s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.19".freeze])
26
26
  s.add_development_dependency(%q<rake>.freeze, [">= 0".freeze])
27
27
  s.add_development_dependency(%q<simplecov>.freeze, [">= 0".freeze])
28
28
  s.add_development_dependency(%q<rspec>.freeze, [">= 0".freeze])
@@ -1,26 +1,28 @@
1
1
  class Infobar::Spinner
2
2
  PREDEFINED = {
3
- pipe: %w[ | / – \\ ],
4
- arrow: %w[ ↑ ↗ → ↘ ↓ ↙ ← ↖ ],
5
- bar1: %w[ ▁ ▂ ▃ ▄ ▅ ▆ ▇ █ ▇ ▆ ▅ ▄ ▃ ▂ ],
6
- bar2: %w[ █ ▉ ▊ ▋ ▌ ▍ ▎ ▏ ▎ ▍ ▌ ▋ ▊ ▉ ],
7
- braille7: %w[ ⣾ ⣽ ⣻ ⢿ ⡿ ⣟ ⣯ ⣷ ],
8
- braille1: %w[ ⠁ ⠂ ⠄ ⡀ ⢀ ⠠ ⠐ ⠈ ],
9
- square1: %w[ ],
10
- square2: %w[ ],
11
- tetris: %w[ ▐▄ ],
12
- eyes: %w[ ◡◡ ⊙⊙ ◠◠ ],
13
- corners: %w[ └ ├ ┌ ┬ ┐ ],
14
- triangle: %w[ ],
15
- circle1: %w[ ],
16
- circle2: %w[ ],
17
- circle3: %w[ ],
18
- cross: %w[ + × ],
19
- cylon: [ '● ', ' ', ' ●', ' ● ' ],
20
- pacman: [ 'ᗧ∙∙∙∙●', ' O∙∙∙●', ' ᗧ∙∙●',' O∙●', ' ᗧ●', 'ᗣ O', ' ᗣ ᗤ', ' ᗣ O ', ' ᗣ ᗤ ', ' ᗣO ', ' ᗤ ', 'O ∞ ', 'ᗧ ∞ ', 'O ' ],
21
- asteroids: [ ' ', 'ᐃ ◍', 'ᐓ ◍', 'ᐅ· ◍', 'ᐅ ·◍', 'ᐅ ', 'ᐅ ◌', 'ᐁ ' ],
22
- clock: %w[ 🕐 🕜 🕑 🕝 🕒 🕞 🕓 🕟 🕔 🕠 🕕 🕡 🕖 🕢 🕗 🕣 🕘 🕤 🕙 🕥 🕚 🕦 🕛 🕧 ],
23
- hourglass: %w[ ],
3
+ pipe: %w[ | / – \\ ],
4
+ arrow: %w[ ↑ ↗ → ↘ ↓ ↙ ← ↖ ],
5
+ bar1: %w[ ▁ ▂ ▃ ▄ ▅ ▆ ▇ █ ▇ ▆ ▅ ▄ ▃ ▂ ],
6
+ bar2: %w[ █ ▉ ▊ ▋ ▌ ▍ ▎ ▏ ▎ ▍ ▌ ▋ ▊ ▉ ],
7
+ braille7: %w[ ⣾ ⣽ ⣻ ⢿ ⡿ ⣟ ⣯ ⣷ ],
8
+ braille1: %w[ ⠁ ⠂ ⠄ ⡀ ⢀ ⠠ ⠐ ⠈ ],
9
+ braille18: %w[ ⣇ ⣧ ⣷ ⣿ ],
10
+ braille181: %w[ ⣇ ⣧ ⣷ ⣿ ⣷ ⣧ ⣇ ⡇ ⡆ ⡄ ⡀ ],
11
+ square1: %w[ ],
12
+ square2: %w[ ],
13
+ tetris: %w[ ▐▄ ],
14
+ eyes: %w[ ◡◡ ⊙⊙ ◠◠ ],
15
+ corners: %w[ ├ ┌ ┬ ┐ ],
16
+ triangle: %w[ ],
17
+ circle1: %w[ ],
18
+ circle2: %w[ ◑ ◒ ],
19
+ circle3: %w[ ],
20
+ cross: %w[ + × ],
21
+ cylon: [ ' ', ' ', ' ', ' ' ],
22
+ pacman: [ 'ᗧ∙∙∙∙●', ' O∙∙∙●', ' ᗧ∙∙●',' O∙●', ' ᗧ●', 'ᗣ O', ' ᗣ ᗤ', ' ᗣ O ', ' ᗤ ', ' ᗣO ', ' ᗤ ', 'O ∞ ', 'ᗧ ∞ ', 'O ' ],
23
+ asteroids: [ 'ᐊ ◍', 'ᐃ ◍', 'ᐓ ◍', 'ᐅ· ◍', 'ᐅ ·◍', 'ᐅ ○', 'ᐅ ◌', 'ᐁ ' ],
24
+ clock: %w[ 🕐 🕜 🕑 🕝 🕒 🕞 🕓 🕟 🕔 🕠 🕕 🕡 🕖 🕢 🕗 🕣 🕘 🕤 🕙 🕥 🕚 🕦 🕛 🕧 ],
25
+ hourglass: %w[ ⏳ ⌛ ],
24
26
  }
25
27
 
26
28
  def initialize(frames = nil)
@@ -1,6 +1,6 @@
1
1
  class Infobar
2
2
  # Infobar version
3
- VERSION = '0.8.1'
3
+ VERSION = '0.9.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
@@ -59,11 +59,11 @@ describe Infobar::Display do
59
59
 
60
60
  it 'styles are different as kinds differ' do
61
61
  counter = Infobar::Counter.new.reset(total: 7, current: 5)
62
- allow(counter).to receive(:as).and_return(
62
+ expect(counter).to receive(:as).and_return(
63
63
  foo: 3,
64
64
  bar: 2
65
65
  )
66
- allow(display).to receive(:as_styles).and_return(
66
+ expect(display).to receive(:as_styles).and_return(
67
67
  {
68
68
  foo: {
69
69
  done_fill: ?X,
@@ -76,7 +76,7 @@ describe Infobar::Display do
76
76
  done_bg_color: 10,
77
77
  }
78
78
  }
79
- )
79
+ ).at_least(:once)
80
80
  display.update message: 'test', counter: counter
81
81
  expect(output.tap(&:rewind).read).to eq\
82
82
  "\r\e[38;5;1m\e[48;5;9mXXXXXXXXXXXXXXXXX\e[0m\e[0m\e[38;5;0m\e[48;5;10m*test******\e[0m\e[0m\e[38;5;40m\e[48;5;22m \e[0m\e[0m"
data/spec/infobar_spec.rb CHANGED
@@ -1,6 +1,10 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Infobar do
4
+ before do
5
+ allow(Tins::Terminal).to receive(:columns).and_return 80
6
+ end
7
+
4
8
  after do
5
9
  infobar.reset
6
10
  infobar.show = true
@@ -182,7 +186,6 @@ describe Infobar do
182
186
  Infobar(total: 10, style: { done_fill: ?X })
183
187
  output = ''
184
188
  infobar.display.output = output
185
- allow(Tins::Terminal).to receive(:columns).and_return 80
186
189
  infobar.progress(force: true)
187
190
  expect(output).to include 'X'
188
191
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infobar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-09-08 00:00:00.000000000 Z
10
+ date: 2025-01-10 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: gem_hadar
@@ -16,14 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: 1.17.0
18
+ version: '1.19'
20
19
  type: :development
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: 1.17.0
25
+ version: '1.19'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: rake
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -226,7 +225,6 @@ files:
226
225
  homepage: https://github.com/flori/infobar
227
226
  licenses: []
228
227
  metadata: {}
229
- post_install_message:
230
228
  rdoc_options:
231
229
  - "--title"
232
230
  - Infobar
@@ -245,8 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
243
  - !ruby/object:Gem::Version
246
244
  version: '0'
247
245
  requirements: []
248
- rubygems_version: 3.5.18
249
- signing_key:
246
+ rubygems_version: 3.6.2
250
247
  specification_version: 4
251
248
  summary: Gem to display information about computations.
252
249
  test_files: