infobar 0.7.4 → 0.8.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: 7061fc3e99db0f8b76334df9af9de312198af014e153361f0d0d71775fced1b5
4
- data.tar.gz: dbf71fc58e10a6ea5bb5c7c3f6a2f93eda759a1dc8dc4e080ce11a7700784fa4
3
+ metadata.gz: 554d10f56d722198aa5e5cf2c56086b8d17558c178a05e4187448f57d17dd607
4
+ data.tar.gz: 53ad075fe715f33917c7025c8e68d3444a0e6c1f58c2359073e2075d1ee76e08
5
5
  SHA512:
6
- metadata.gz: 30dd8616919176cfa34e184b8622fa4095ba53824ffb909e35d74bb7fb3efe3735b7eb4d4111cfc6bb333f726f5434fe52da7698da88437c3ec53c16fe4aac32
7
- data.tar.gz: 0e945992394da4592c6cd5b060e699a93b488fbfdeaff7338ad3d2efcc6895dbb51053f5da3372ed8665b12a5664e341d5afc27e2f08ec68be951fcbce173b85
6
+ metadata.gz: aa7f66552196bb3679cd513bcffa0a69afcc98272b12bcb198a8261fc8722d47f334c72c12dea4f0cfa2e32f25fcd45546ac7a3f59091327aba8596c302c8312
7
+ data.tar.gz: 9f6532f487c41ce12d179ae2d7db1df5800c41186df2ce586a9b0eec2264b5a016fd6c574d6aa746d7fb5ceb9cb088db89ed005f3d7933eaff98b475b432d99e
data/.all_images.yml CHANGED
@@ -1,17 +1,18 @@
1
1
  dockerfile: |-
2
2
  RUN apk add --no-cache build-base git
3
- RUN gem update --system
4
- RUN gem install gem_hadar bundler
3
+
5
4
  script: &script |-
6
5
  echo -e "\e[1m"
7
6
  ruby -v
8
7
  echo -e "\e[0m"
9
- bundle
10
- rake spec
8
+ gem install bundler
9
+ bundle install
10
+ bundle exec rake spec
11
11
 
12
12
  fail_fast: true
13
13
 
14
14
  images:
15
+ ruby:3.3-alpine: *script
15
16
  ruby:3.2-alpine: *script
16
17
  ruby:3.1-alpine: *script
17
18
  ruby:3.0-alpine: *script
data/CHANGES.md ADDED
@@ -0,0 +1,143 @@
1
+ # Changes
2
+
3
+ ## 2024-09-01 v0.8.0
4
+
5
+ * **New Version:** 0.8.0
6
+ * **Significant Changes:**
7
+ + *Update all_images Dockerfile and Gem installation*
8
+ - Removed gem update and gem_hadar/bundler installation from Dockerfile
9
+ - Replaced RUN commands with bundle install and rake spec using bundler
10
+ + *Add string representation for Infobar::Counter*
11
+ - Added test for representing Infobar::Counter as a string
12
+ - Updated test to check progress method with different options
13
+ + *Update Infobar busy method to accept frames option*
14
+ - Update busy method to take an optional frames parameter with default value :circle1
15
+ - Change message format in busy method to use frames option instead of hardcoded :circle1 symbol
16
+
17
+ ## 2024-03-15 v0.7.4
18
+
19
+ * **Ruby Compatibility**: Skip testing Rubies less than 3.
20
+
21
+ ## 2024-03-15 v0.7.3
22
+
23
+ * **New Features**
24
+ + Updated homepage URL to use HTTPS
25
+ + Integrated latest `gem_hadar` gem
26
+ * **Changes**
27
+ + Homepage URL updated to secure protocol
28
+
29
+ ## 2023-10-09 v0.7.2
30
+
31
+ * Changed homepage link.
32
+
33
+ ## 2023-10-09 v0.7.1
34
+
35
+ * **New Feature**: Added `all_images` feature for testing purposes.
36
+ * **Bug Fix**: Reset is now performed before entering busy mode.
37
+
38
+ ## 2021-01-12 v0.7.0
39
+
40
+ * **New Features**
41
+ + Support for Ruby 3.0
42
+ * **Dependencies**
43
+ + Depend on the newest version of an unspecified library or framework
44
+
45
+ ## 2020-05-15 v0.6.2
46
+
47
+ * **Significant Changes**:
48
+ + Use keyword operator
49
+ + Upgrade bundler
50
+ + Test ruby 2.7
51
+ + Remove unnecessary code
52
+
53
+ ## 2019-04-11 v0.6.1
54
+
55
+ * **Output Counter Results**: The `to_s` method has been added to output the results of counters.
56
+
57
+ ## 2019-01-31 v0.6.0
58
+
59
+ * **Progressing with '-' allowed**: The code now allows progressing with a '-' character, treating it as equivalent to `false`.
60
+
61
+ ## 2018-11-01 v0.5.1
62
+
63
+ * **Allow busy bar message to be overwritten**
64
+ + Added functionality to overwrite the default busy bar message.
65
+
66
+ ## 2018-03-05 v0.5.0
67
+
68
+ * **New Feature:** Allow counter values to be formatted with units.
69
+
70
+ ## 2017-12-08 v0.4.0
71
+
72
+ * **New Feature**: Automatically iterate when `with_infobar` is passed a block.
73
+ + This change allows for more flexible usage of the `with_infobar` method.
74
+ * **Documentation**: Add COPYING file
75
+ + Provides licensing information for the project.
76
+
77
+ ## 2017-06-29 v0.3.0
78
+
79
+ * **New Feature:** Smart duration formatting is now used by default.
80
+ * **New Feature:** Long integers are separated with underscores by default.
81
+
82
+ ## 2017-05-24 v0.2.0
83
+
84
+ * **New Feature**: Allow setting of input/output on initial call.
85
+
86
+ ### Changes:
87
+
88
+ * Added functionality to set input and output streams on the first method call.
89
+
90
+ ## 2017-05-04 v0.1.1
91
+
92
+ * **Avoid outputting to display during instance init**:
93
+ * Prevent unnecessary output during instance initialization.
94
+
95
+ ## 2017-04-24 v0.1.0
96
+
97
+ * **New Features**
98
+ + Support for multiple colored progress bars
99
+ * **Bug Fixes**
100
+ + Ensure bar is always long enough
101
+ + Correct config environment settings
102
+
103
+ ## 2017-04-13 v0.0.7
104
+
105
+ * **New Feature:** Forced display of Infobar updates:
106
+ + When calling `Infobar.update`, the infobar will now always be displayed.
107
+
108
+ ## 2017-03-24 v0.0.6
109
+
110
+ * Added busy bar functionality.
111
+
112
+ ## 2017-03-10 v0.0.5
113
+
114
+ * **Always Provide Default Unit**: Added functionality to always provide a
115
+ default unit, ensuring consistency in output.
116
+
117
+ ## 2017-03-10 v0.0.4
118
+
119
+ * **Rate Validation**: Fixed issue where invalid rates were not handled
120
+ correctly at the beginning of a calculation.
121
+
122
+ ## 2017-03-09 v0.0.3
123
+
124
+ * **New Version Summary**
125
+ + Reset frequency when calling `clear`
126
+ + Added reminder to TODO list
127
+ + Fixed a typo
128
+
129
+ ## 2017-02-10 v0.0.2
130
+
131
+ * Added trend arrow to rate directive.
132
+
133
+ ## 2017-02-08 v0.0.1
134
+
135
+ * Added new features and functionality.
136
+
137
+ ### Significant Changes:
138
+
139
+ * **New Features**: Additional tasks were added to the system.
140
+
141
+ ## 2017-02-08 v0.0.0
142
+
143
+ * Start
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.4
1
+ 0.8.0
data/infobar.gemspec CHANGED
@@ -1,35 +1,35 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: infobar 0.7.4 ruby lib
2
+ # stub: infobar 0.8.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "infobar".freeze
6
- s.version = "0.7.4"
6
+ s.version = "0.8.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-03-15"
11
+ s.date = "2024-09-01"
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 = [".all_images.yml".freeze, ".gitignore".freeze, ".rspec".freeze, ".travis.yml".freeze, ".utilsrc".freeze, "COPYING".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "TODO.md".freeze, "VERSION".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]
15
+ s.files = [".all_images.yml".freeze, ".gitignore".freeze, ".rspec".freeze, ".travis.yml".freeze, ".utilsrc".freeze, "CHANGES.md".freeze, "COPYING".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "TODO.md".freeze, "VERSION".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.4.19".freeze
19
+ s.rubygems_version = "3.5.16".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.14.0"])
26
- s.add_development_dependency(%q<rake>.freeze, [">= 0"])
27
- s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
28
- s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
29
- s.add_development_dependency(%q<debug>.freeze, [">= 0"])
30
- s.add_development_dependency(%q<all_images>.freeze, [">= 0"])
31
- s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.0", ">= 1.28.0"])
32
- s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.4"])
33
- s.add_runtime_dependency(%q<complex_config>.freeze, ["~> 0.10"])
34
- s.add_runtime_dependency(%q<more_math>.freeze, [">= 0"])
25
+ s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.17.0".freeze])
26
+ s.add_development_dependency(%q<rake>.freeze, [">= 0".freeze])
27
+ s.add_development_dependency(%q<simplecov>.freeze, [">= 0".freeze])
28
+ s.add_development_dependency(%q<rspec>.freeze, [">= 0".freeze])
29
+ s.add_development_dependency(%q<debug>.freeze, [">= 0".freeze])
30
+ s.add_development_dependency(%q<all_images>.freeze, [">= 0".freeze])
31
+ s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.0".freeze, ">= 1.28.0".freeze])
32
+ s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.4".freeze])
33
+ s.add_runtime_dependency(%q<complex_config>.freeze, ["~> 0.10".freeze])
34
+ s.add_runtime_dependency(%q<more_math>.freeze, [">= 0".freeze])
35
35
  end
@@ -1,6 +1,6 @@
1
1
  class Infobar
2
2
  # Infobar version
3
- VERSION = '0.7.4'
3
+ VERSION = '0.8.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:
data/lib/infobar.rb CHANGED
@@ -92,13 +92,13 @@ class Infobar
92
92
  instance.busy(**opts, &block)
93
93
  end
94
94
 
95
- def busy(**opts, &block)
95
+ def busy(frames: :circle1, **opts, &block)
96
96
  block_given? or raise ArgumentError, 'block is required as an argument'
97
97
  duration = opts.delete(:sleep) || 0.1
98
98
  reset
99
99
  call(**opts | {
100
100
  total: Float::INFINITY,
101
- message: { format: ' %l %te %s ', '%s' => { frames: :circle1 } },
101
+ message: { format: ' %l %te %s ', '%s' => { frames: frames } },
102
102
  })
103
103
  ib = Thread.new {
104
104
  loop do
@@ -19,6 +19,17 @@ describe Infobar::Counter do
19
19
  expect(counter.total).to eq 0
20
20
  end
21
21
 
22
+ it 'can be represented as string' do
23
+ expect(counter.progress(as: true)).to eq counter
24
+ expect(counter.progress(as: false)).to eq counter
25
+ expect(counter.progress(as: true)).to eq counter
26
+ expect(counter.to_s).to eq <<~end.chomp
27
+ default: 0
28
+ true: 2
29
+ false: 1
30
+ end
31
+ end
32
+
22
33
  it 'can progress by arbitrary value' do
23
34
  expect(counter.progress(by: 23)).to eq counter
24
35
  expect(counter).to be_started
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infobar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-15 00:00:00.000000000 Z
11
+ date: 2024-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.14.0
19
+ version: 1.17.0
20
20
  type: :development
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: 1.14.0
26
+ version: 1.17.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -184,6 +184,7 @@ files:
184
184
  - ".rspec"
185
185
  - ".travis.yml"
186
186
  - ".utilsrc"
187
+ - CHANGES.md
187
188
  - COPYING
188
189
  - Gemfile
189
190
  - README.md
@@ -244,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
245
  - !ruby/object:Gem::Version
245
246
  version: '0'
246
247
  requirements: []
247
- rubygems_version: 3.4.19
248
+ rubygems_version: 3.5.16
248
249
  signing_key:
249
250
  specification_version: 4
250
251
  summary: Gem to display information about computations.