infobar 0.14.0 → 0.15.0
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 +4 -4
- data/CHANGES.md +15 -0
- data/infobar.gemspec +2 -2
- data/lib/infobar/display.rb +1 -0
- data/lib/infobar/version.rb +1 -1
- data/spec/infobar/config_spec.rb +2 -0
- data/spec/infobar/display_spec.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 78cbcd08f0a2d2ddd1094df459bf3ca54bf3daab8ce3414263f51df214292d16
|
|
4
|
+
data.tar.gz: 477e29d5f2e1fe56a422083c6efceb770eee9b570594c9ad6ba33f54104240ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d3f41bbf6ae87c63fc4183d229f12ce505f58bcd72eb7f6ba568a521d23ef48561929c19ded01d4154c5b38c5e11d9c3cb4052b609893c61eb746839b5824dd
|
|
7
|
+
data.tar.gz: af5a5669ff6057a85a76f9ecf07be72cc384359de19ea4b034d398c0bd2175e49d79d8c9b95ebd364c3c0a0202721ae8a6e098159f677f07a7451f62fe20ee16
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-11-16 v0.15.0
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- `Display#newline` now resets `@position_saved` to `false`, preventing the
|
|
8
|
+
next `Display#update` from restoring to a stale bar-line position after a
|
|
9
|
+
newline commit.
|
|
10
|
+
|
|
11
|
+
### Testing
|
|
12
|
+
|
|
13
|
+
- Updated spec expectations in `display_spec.rb` to include the trailing
|
|
14
|
+
`restore_position` escape sequence.
|
|
15
|
+
- Added singleton state isolation (`display.reset`) and the missing
|
|
16
|
+
`restore_position` expectation in `config_spec.rb`.
|
|
17
|
+
|
|
3
18
|
## 2026-11-15 v0.14.0
|
|
4
19
|
|
|
5
20
|
### Features
|
data/infobar.gemspec
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# stub: infobar 0.
|
|
2
|
+
# stub: infobar 0.15.0 ruby lib
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "infobar".freeze
|
|
6
|
-
s.version = "0.
|
|
6
|
+
s.version = "0.15.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]
|
data/lib/infobar/display.rb
CHANGED
data/lib/infobar/version.rb
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# by hand; it is rewritten on every `rake version` invocation.
|
|
6
6
|
class Infobar
|
|
7
7
|
# The current version of the Infobar gem as a String.
|
|
8
|
-
VERSION = '0.
|
|
8
|
+
VERSION = '0.15.0'
|
|
9
9
|
VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
|
|
10
10
|
VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
|
|
11
11
|
VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
|
data/spec/infobar/config_spec.rb
CHANGED
|
@@ -19,11 +19,13 @@ describe 'Infobar config' do
|
|
|
19
19
|
|
|
20
20
|
it 'configures default infobar' do
|
|
21
21
|
Infobar(total: 23)
|
|
22
|
+
infobar.display.reset
|
|
22
23
|
expect(infobar.display.output).to receive(:<<).with("\e[s")
|
|
23
24
|
expect(infobar.display.output).to receive(:<<).with(
|
|
24
25
|
"\e[38;5;22m\e[48;5;40m\e[0m\e[0m"
|
|
25
26
|
)
|
|
26
27
|
expect(infobar.display.output).to receive(:<<).with(%r(Progress 0/23.*⣽))
|
|
28
|
+
expect(infobar.display.output).to receive(:<<).with("\e[u")
|
|
27
29
|
infobar.update
|
|
28
30
|
expect(infobar).to be_show
|
|
29
31
|
end
|
|
@@ -21,7 +21,7 @@ describe Infobar::Display do
|
|
|
21
21
|
it 'can be updated' do
|
|
22
22
|
display.update message: 'test', counter: counter
|
|
23
23
|
expect(output.tap(&:rewind).read).to eq\
|
|
24
|
-
"\e[s\e[38;5;22m\e[48;5;40m░░░░░░░░░░░░░░░░░░te\e[0m\e[0m\e[38;5;40m\e[48;5;22mst \e[0m\e[0m"
|
|
24
|
+
"\e[s\e[38;5;22m\e[48;5;40m░░░░░░░░░░░░░░░░░░te\e[0m\e[0m\e[38;5;40m\e[48;5;22mst \e[0m\e[0m\e[u"
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
it 'update saves position first' do
|
|
@@ -69,7 +69,7 @@ describe Infobar::Display do
|
|
|
69
69
|
display.style = test_style
|
|
70
70
|
display.update message: 'test', counter: counter
|
|
71
71
|
expect(output.tap(&:rewind).read).to eq\
|
|
72
|
-
"\e[s\e[38;5;1m\e[48;5;9mXXXXXXXXXXXXXXXXXXte\e[0m\e[0m\e[38;5;0m\e[48;5;8mstOOOOOOOOOOOOOOOOOO\e[0m\e[0m"
|
|
72
|
+
"\e[s\e[38;5;1m\e[48;5;9mXXXXXXXXXXXXXXXXXXte\e[0m\e[0m\e[38;5;0m\e[48;5;8mstOOOOOOOOOOOOOOOOOO\e[0m\e[0m\e[u"
|
|
73
73
|
expect(display.style).to eq(test_style)
|
|
74
74
|
end
|
|
75
75
|
|
|
@@ -95,7 +95,7 @@ describe Infobar::Display do
|
|
|
95
95
|
).at_least(:once)
|
|
96
96
|
display.update message: 'test', counter: counter
|
|
97
97
|
expect(output.tap(&:rewind).read).to eq\
|
|
98
|
-
"\e[s\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"
|
|
98
|
+
"\e[s\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\e[u"
|
|
99
99
|
end
|
|
100
100
|
|
|
101
101
|
it 'can output newline' do
|