infobar 0.8.1 → 0.10.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 +54 -38
- data/README.md +0 -47
- data/Rakefile +3 -0
- data/infobar.gemspec +6 -6
- data/lib/infobar/spinner.rb +23 -21
- data/lib/infobar/version.rb +1 -1
- data/spec/infobar/display_spec.rb +3 -3
- data/spec/infobar/input_output_spec.rb +5 -7
- data/spec/infobar_spec.rb +15 -1
- data/spec/spec_helper.rb +3 -7
- metadata +5 -15
- data/.all_images.yml +0 -18
- data/.gitignore +0 -10
- data/.rspec +0 -2
- data/.travis.yml +0 -14
- data/.utilsrc +0 -26
- data/TODO.md +0 -25
- data/VERSION +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d11f37d2746f1c64362cba07dd0b47f74ac2a8bd89c0be0f97a443a853bbeeb
|
4
|
+
data.tar.gz: 112e07f8a8a353570e21e7a8509c16a971e6edf1adf5a25aa5e30cd8a6f6afe4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 500ec7026cd64406c980d866379ca07174b06fc5ea948a0cca9530e01274d83231372216e2e15e89917cf79d5bd12afb660466da8bd399a817d0a462e1b63497
|
7
|
+
data.tar.gz: 83eacbca63996916f8475f6b1b15d5a08574b5ffed2fb569f3f9c337a10e9c302036f5c7be7b4d6199cb5e88bbf08e8f739728c49e8c017f1e4095fc4bd15f7b
|
data/CHANGES.md
CHANGED
@@ -1,34 +1,50 @@
|
|
1
1
|
# Changes
|
2
2
|
|
3
|
+
## 2025-09-09 v0.10.0
|
4
|
+
|
5
|
+
### Changed
|
6
|
+
- Updated `gem_hadar` development dependency from `~> 2.2` to `~> 2.3`
|
7
|
+
- Removed `.travis.yml` from gem package and updated file inclusion logic
|
8
|
+
- Added `.utilsrc`, `.all_images.yml`, `VERSION`, `.rspec`, `.gitignore`, and
|
9
|
+
`TODO.md` to package ignore list
|
10
|
+
|
11
|
+
## 2025-01-10 v0.9.0
|
12
|
+
|
13
|
+
* Removed outdated changelogs for versions prior to **0.6.1** from README.md.
|
14
|
+
* Added `braille18` animation to `Infobar::Spinner` class.
|
15
|
+
* Added `braille181` character set to `PREDEFINED` in Infobar Spinner.
|
16
|
+
* Added Ruby 3.4-alpine to supported versions in `.all_images.yml` file.
|
17
|
+
* Replaced `allow` with `expect` in tests.
|
18
|
+
|
3
19
|
## 2024-09-08 v0.8.1
|
4
20
|
|
5
21
|
* **Dependency Updates**:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
22
|
+
+ Update `all_images` Dockerfile and Gem installation
|
23
|
+
- Removed gem update and `gem_hadar/bundler` installation from Dockerfile
|
24
|
+
- Replaced RUN commands with bundle install and rake spec using bundler
|
25
|
+
+ Upgrade `gem_hadar`
|
10
26
|
* **Refactor Infobar message formatting**
|
11
|
-
|
27
|
+
+ Update `@message` assignment to use a conditional format string
|
12
28
|
* **Miscellaneous**:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
29
|
+
+ Bump version and dependencies
|
30
|
+
- Update `.all_images.yml` to use `bundle install --full-index`
|
31
|
+
- Remove `.byebug_history` from `.gitignore`
|
32
|
+
- Remove `gem 'byebug', platform: :mri'` from `Gemfile`
|
33
|
+
- Bump version in `VERSION`, `infobar.gemspec`, and `lib/infobar/version.rb`
|
18
34
|
|
19
35
|
## 2024-09-01 v0.8.0
|
20
36
|
|
21
37
|
* **New Version:** 0.8.0
|
22
38
|
* **Significant Changes:**
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
39
|
+
+ *Update all_images Dockerfile and Gem installation*
|
40
|
+
- Removed gem update and gem_hadar/bundler installation from Dockerfile
|
41
|
+
- Replaced RUN commands with bundle install and rake spec using bundler
|
42
|
+
+ *Add string representation for Infobar::Counter*
|
43
|
+
- Added test for representing Infobar::Counter as a string
|
44
|
+
- Updated test to check progress method with different options
|
45
|
+
+ *Update Infobar busy method to accept frames option*
|
46
|
+
- Update busy method to take an optional frames parameter with default value :circle1
|
47
|
+
- Change message format in busy method to use frames option instead of hardcoded :circle1 symbol
|
32
48
|
|
33
49
|
## 2024-03-15 v0.7.4
|
34
50
|
|
@@ -37,10 +53,10 @@
|
|
37
53
|
## 2024-03-15 v0.7.3
|
38
54
|
|
39
55
|
* **New Features**
|
40
|
-
|
41
|
-
|
56
|
+
+ Updated homepage URL to use HTTPS
|
57
|
+
+ Integrated latest `gem_hadar` gem
|
42
58
|
* **Changes**
|
43
|
-
|
59
|
+
+ Homepage URL updated to secure protocol
|
44
60
|
|
45
61
|
## 2023-10-09 v0.7.2
|
46
62
|
|
@@ -54,17 +70,17 @@
|
|
54
70
|
## 2021-01-12 v0.7.0
|
55
71
|
|
56
72
|
* **New Features**
|
57
|
-
|
73
|
+
+ Support for Ruby 3.0
|
58
74
|
* **Dependencies**
|
59
|
-
|
75
|
+
+ Depend on the newest version of an unspecified library or framework
|
60
76
|
|
61
77
|
## 2020-05-15 v0.6.2
|
62
78
|
|
63
79
|
* **Significant Changes**:
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
80
|
+
+ Use keyword operator
|
81
|
+
+ Upgrade bundler
|
82
|
+
+ Test ruby 2.7
|
83
|
+
+ Remove unnecessary code
|
68
84
|
|
69
85
|
## 2019-04-11 v0.6.1
|
70
86
|
|
@@ -77,7 +93,7 @@
|
|
77
93
|
## 2018-11-01 v0.5.1
|
78
94
|
|
79
95
|
* **Allow busy bar message to be overwritten**
|
80
|
-
|
96
|
+
+ Added functionality to overwrite the default busy bar message.
|
81
97
|
|
82
98
|
## 2018-03-05 v0.5.0
|
83
99
|
|
@@ -86,9 +102,9 @@
|
|
86
102
|
## 2017-12-08 v0.4.0
|
87
103
|
|
88
104
|
* **New Feature**: Automatically iterate when `with_infobar` is passed a block.
|
89
|
-
|
105
|
+
+ This change allows for more flexible usage of the `with_infobar` method.
|
90
106
|
* **Documentation**: Add COPYING file
|
91
|
-
|
107
|
+
+ Provides licensing information for the project.
|
92
108
|
|
93
109
|
## 2017-06-29 v0.3.0
|
94
110
|
|
@@ -111,15 +127,15 @@
|
|
111
127
|
## 2017-04-24 v0.1.0
|
112
128
|
|
113
129
|
* **New Features**
|
114
|
-
|
130
|
+
+ Support for multiple colored progress bars
|
115
131
|
* **Bug Fixes**
|
116
|
-
|
117
|
-
|
132
|
+
+ Ensure bar is always long enough
|
133
|
+
+ Correct config environment settings
|
118
134
|
|
119
135
|
## 2017-04-13 v0.0.7
|
120
136
|
|
121
137
|
* **New Feature:** Forced display of Infobar updates:
|
122
|
-
|
138
|
+
+ When calling `Infobar.update`, the infobar will now always be displayed.
|
123
139
|
|
124
140
|
## 2017-03-24 v0.0.6
|
125
141
|
|
@@ -138,9 +154,9 @@
|
|
138
154
|
## 2017-03-09 v0.0.3
|
139
155
|
|
140
156
|
* **New Version Summary**
|
141
|
-
|
142
|
-
|
143
|
-
|
157
|
+
+ Reset frequency when calling `clear`
|
158
|
+
+ Added reminder to TODO list
|
159
|
+
+ Fixed a typo
|
144
160
|
|
145
161
|
## 2017-02-10 v0.0.2
|
146
162
|
|
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/Rakefile
CHANGED
@@ -13,6 +13,9 @@ GemHadar do
|
|
13
13
|
test_dir 'spec'
|
14
14
|
ignore '.*.sw[pon]', 'pkg', 'Gemfile.lock', 'coverage', '.rvmrc',
|
15
15
|
'.AppleDouble', 'tags', '.DS_Store', 'errors.lst', '.tool-versions'
|
16
|
+
package_ignore '.utilsrc', '.all_images.yml', 'VERSION', '.rspec',
|
17
|
+
'.gitignore', 'TODO.md'
|
18
|
+
|
16
19
|
readme 'README.md'
|
17
20
|
title "#{name.camelize}"
|
18
21
|
|
data/infobar.gemspec
CHANGED
@@ -1,28 +1,28 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: infobar 0.
|
2
|
+
# stub: infobar 0.10.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.10.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 = "
|
11
|
+
s.date = "1980-01-02"
|
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]
|
15
|
-
s.files = ["
|
15
|
+
s.files = ["CHANGES.md".freeze, "COPYING".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "infobar.gemspec".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, "spec/config/infobar.yml".freeze, "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]
|
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.
|
19
|
+
s.rubygems_version = "3.6.9".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, ["~>
|
25
|
+
s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 2.3".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])
|
data/lib/infobar/spinner.rb
CHANGED
@@ -1,26 +1,28 @@
|
|
1
1
|
class Infobar::Spinner
|
2
2
|
PREDEFINED = {
|
3
|
-
pipe:
|
4
|
-
arrow:
|
5
|
-
bar1:
|
6
|
-
bar2:
|
7
|
-
braille7:
|
8
|
-
braille1:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
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)
|
data/lib/infobar/version.rb
CHANGED
@@ -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
|
-
|
62
|
+
expect(counter).to receive(:as).and_return(
|
63
63
|
foo: 3,
|
64
64
|
bar: 2
|
65
65
|
)
|
66
|
-
|
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"
|
@@ -41,12 +41,10 @@ describe Infobar::InputOutput do
|
|
41
41
|
end
|
42
42
|
|
43
43
|
it 'does not puts if not showing' do
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
infobar.show = true
|
50
|
-
end
|
44
|
+
expect(infobar.display.output).not_to receive(:puts)
|
45
|
+
infobar.show = false
|
46
|
+
infobar.puts 'hello'
|
47
|
+
ensure
|
48
|
+
infobar.show = true
|
51
49
|
end
|
52
50
|
end
|
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
|
@@ -24,6 +28,17 @@ describe Infobar do
|
|
24
28
|
Infobar(total: 10, update: true)
|
25
29
|
end
|
26
30
|
|
31
|
+
it 'has display for Infobar' do
|
32
|
+
expect(Infobar.display).to be_a Infobar::Display
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'can convert message hashes into messages' do
|
36
|
+
message_hash = { foo: 'bar' }
|
37
|
+
message = Infobar.convert_to_message(message_hash)
|
38
|
+
expect(message).to be_a Infobar::Message
|
39
|
+
expect(message.opts).to eq('foo' => 'bar')
|
40
|
+
end
|
41
|
+
|
27
42
|
it 'can update display with force' do
|
28
43
|
Infobar(total: 10)
|
29
44
|
expect(infobar.display).to receive(:update).
|
@@ -182,7 +197,6 @@ describe Infobar do
|
|
182
197
|
Infobar(total: 10, style: { done_fill: ?X })
|
183
198
|
output = ''
|
184
199
|
infobar.display.output = output
|
185
|
-
allow(Tins::Terminal).to receive(:columns).and_return 80
|
186
200
|
infobar.progress(force: true)
|
187
201
|
expect(output).to include 'X'
|
188
202
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,12 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
SimpleCov.start do
|
4
|
-
add_filter "#{File.basename(File.dirname(__FILE__))}/"
|
5
|
-
end
|
6
|
-
end
|
1
|
+
require 'gem_hadar/simplecov'
|
2
|
+
GemHadar::SimpleCov.start
|
7
3
|
require 'rspec'
|
8
4
|
begin
|
9
|
-
require '
|
5
|
+
require 'debug'
|
10
6
|
rescue LoadError
|
11
7
|
end
|
12
8
|
require 'infobar'
|
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.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 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:
|
18
|
+
version: '2.3'
|
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:
|
25
|
+
version: '2.3'
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
27
|
name: rake
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -179,18 +178,11 @@ extra_rdoc_files:
|
|
179
178
|
- lib/infobar/trend.rb
|
180
179
|
- lib/infobar/version.rb
|
181
180
|
files:
|
182
|
-
- ".all_images.yml"
|
183
|
-
- ".gitignore"
|
184
|
-
- ".rspec"
|
185
|
-
- ".travis.yml"
|
186
|
-
- ".utilsrc"
|
187
181
|
- CHANGES.md
|
188
182
|
- COPYING
|
189
183
|
- Gemfile
|
190
184
|
- README.md
|
191
185
|
- Rakefile
|
192
|
-
- TODO.md
|
193
|
-
- VERSION
|
194
186
|
- infobar.gemspec
|
195
187
|
- lib/infobar.rb
|
196
188
|
- lib/infobar/counter.rb
|
@@ -226,7 +218,6 @@ files:
|
|
226
218
|
homepage: https://github.com/flori/infobar
|
227
219
|
licenses: []
|
228
220
|
metadata: {}
|
229
|
-
post_install_message:
|
230
221
|
rdoc_options:
|
231
222
|
- "--title"
|
232
223
|
- Infobar
|
@@ -245,8 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
236
|
- !ruby/object:Gem::Version
|
246
237
|
version: '0'
|
247
238
|
requirements: []
|
248
|
-
rubygems_version: 3.
|
249
|
-
signing_key:
|
239
|
+
rubygems_version: 3.6.9
|
250
240
|
specification_version: 4
|
251
241
|
summary: Gem to display information about computations.
|
252
242
|
test_files:
|
data/.all_images.yml
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
dockerfile: |-
|
2
|
-
RUN apk add --no-cache build-base git
|
3
|
-
|
4
|
-
script: &script |-
|
5
|
-
echo -e "\e[1m"
|
6
|
-
ruby -v
|
7
|
-
echo -e "\e[0m"
|
8
|
-
gem install bundler
|
9
|
-
bundle install --full-index
|
10
|
-
bundle exec rake spec
|
11
|
-
|
12
|
-
fail_fast: true
|
13
|
-
|
14
|
-
images:
|
15
|
-
ruby:3.3-alpine: *script
|
16
|
-
ruby:3.2-alpine: *script
|
17
|
-
ruby:3.1-alpine: *script
|
18
|
-
ruby:3.0-alpine: *script
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.travis.yml
DELETED
data/.utilsrc
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# vim: set ft=ruby:
|
2
|
-
|
3
|
-
search do
|
4
|
-
prune_dirs /\A(\.svn|\.git|CVS|tmp|tags|coverage|pkg)\z/
|
5
|
-
skip_files /(\A\.|\.sw[pon]\z|\.(log|fnm|jpg|jpeg|png|pdf|svg)\z|tags|~\z)/i
|
6
|
-
end
|
7
|
-
|
8
|
-
discover do
|
9
|
-
prune_dirs /\A(\.svn|\.git|CVS|tmp|tags|coverage|pkg)\z/
|
10
|
-
skip_files /(\A\.|\.sw[pon]\z|\.log\z|~\z)/
|
11
|
-
binary false
|
12
|
-
end
|
13
|
-
|
14
|
-
strip_spaces do
|
15
|
-
prune_dirs /\A(\..*|CVS|pkg)\z/
|
16
|
-
skip_files /(\A\.|\.sw[pon]\z|\.log\z|~\z)/
|
17
|
-
end
|
18
|
-
|
19
|
-
probe do
|
20
|
-
test_framework :rspec
|
21
|
-
#include_dirs 'features'
|
22
|
-
end
|
23
|
-
|
24
|
-
ssh_tunnel do
|
25
|
-
terminal_multiplexer :tmux
|
26
|
-
end
|
data/TODO.md
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# TODO
|
2
|
-
|
3
|
-
- add color gradients?
|
4
|
-
- cumulative counters to summarize several progress bars
|
5
|
-
- categorize do progress and display accordingly
|
6
|
-
- more documentation, lol
|
7
|
-
- add a pause mode?
|
8
|
-
|
9
|
-
## DONE
|
10
|
-
|
11
|
-
- add trend arrow to rate
|
12
|
-
- units
|
13
|
-
- configuration file?
|
14
|
-
- add finished directive
|
15
|
-
- add nicer `Message#to_s` method
|
16
|
-
- add output methods that clear b4 printing to allow output while progressing
|
17
|
-
- elapsed time as duration
|
18
|
-
- ETA as duration
|
19
|
-
- ETA as datetime
|
20
|
-
- rate
|
21
|
-
- better average idea
|
22
|
-
- Update Frequency
|
23
|
-
- spinner animation
|
24
|
-
- newline method
|
25
|
-
- Easily switch on/off output
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.8.1
|