infobar 0.7.0 → 0.7.1

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: 7ff00588cfe8316910169b4c813a116ad0cea177a7154807731166d861789333
4
- data.tar.gz: 7a0ef6dc52e5ac91d8daba9e981180b703114aaccbebbd6d5d866ba98f7106f1
3
+ metadata.gz: 6a7bc8f14e10abb294f335faee99adf2682408d07d2dce2d5d4fe2135f8d3975
4
+ data.tar.gz: af0865c4269e721b4a2cc111ce13a6f59d2f60a8515dfe7343ca62c7f73bfd4a
5
5
  SHA512:
6
- metadata.gz: 1d4a8ddd85a1b2a47cf0d87a5cb0f8f2c71cfd07c53099525a45e3d973821695a213807c23808407ff17063eaffd080cd1a9bae5b594952e1f25b1a8b2c6d399
7
- data.tar.gz: ad9cc64ce01756bc8f722db025bca9d81be31c16623aa7f477f059169348b67266e60670c81670418de16eb473a47c698b3a887375455239691f295c9b3cebff
6
+ metadata.gz: 4cca3630a3872d27f82c73a25b00058ed66604c0a773038a8028892d200bf2f37225ef8a0a34f8b9766f34fe693b4ae931fd1cdf0cdfd713e643908615bd4c07
7
+ data.tar.gz: 6bbd9dc838c9eae82d145e8ce0ecc61a82c7a3df4eb836271b308f0a1ba575d77a4cde103c9e68c3e5341f3576e41b1cf32b85546344c00a4f67724625a6d109
data/.all_images.yml ADDED
@@ -0,0 +1,19 @@
1
+ dockerfile: |-
2
+ RUN apk add --no-cache build-base git
3
+ RUN gem update --system
4
+ RUN gem install gem_hadar bundler
5
+ script: &script |-
6
+ echo -e "\e[1m"
7
+ ruby -v
8
+ echo -e "\e[0m"
9
+ bundle
10
+ rake spec
11
+
12
+ fail_fast: true
13
+
14
+ images:
15
+ ruby:3.2-alpine: *script
16
+ ruby:3.1-alpine: *script
17
+ ruby:3.0-alpine: *script
18
+ ruby:2.7-alpine: *script
19
+ ruby:2.6-alpine: *script
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ GemHadar do
6
6
  name 'infobar'
7
7
  author 'Florian Frank'
8
8
  email 'flori@ping.de'
9
- homepage "http://flori.github.com/#{name}"
9
+ homepage "http://github.com/#{name}"
10
10
  summary 'Gem to display information about computations.'
11
11
  description 'This gem displays progress of computations and additional information to the terminal.'
12
12
  module_type :class
@@ -24,6 +24,8 @@ GemHadar do
24
24
  development_dependency 'rake'
25
25
  development_dependency 'simplecov'
26
26
  development_dependency 'rspec'
27
+ development_dependency 'debug'
28
+ development_dependency 'all_images'
27
29
  end
28
30
 
29
31
  task :default => :spec
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.0
1
+ 0.7.1
data/infobar.gemspec CHANGED
@@ -1,46 +1,35 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: infobar 0.7.0 ruby lib
2
+ # stub: infobar 0.7.1 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "infobar".freeze
6
- s.version = "0.7.0"
6
+ s.version = "0.7.1"
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 = "2021-01-12"
11
+ s.date = "2023-10-09"
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 = [".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]
16
- s.homepage = "http://flori.github.com/infobar".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]
16
+ s.homepage = "http://github.com/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.3.0.dev".freeze
19
+ s.rubygems_version = "3.4.10".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
- if s.respond_to? :specification_version then
24
- s.specification_version = 4
25
- end
23
+ s.specification_version = 4
26
24
 
27
- if s.respond_to? :add_runtime_dependency then
28
- s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.11.0"])
29
- s.add_development_dependency(%q<rake>.freeze, [">= 0"])
30
- s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
31
- s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
32
- s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.0", ">= 1.28.0"])
33
- s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.4"])
34
- s.add_runtime_dependency(%q<complex_config>.freeze, ["~> 0.10"])
35
- s.add_runtime_dependency(%q<more_math>.freeze, [">= 0"])
36
- else
37
- s.add_dependency(%q<gem_hadar>.freeze, ["~> 1.11.0"])
38
- s.add_dependency(%q<rake>.freeze, [">= 0"])
39
- s.add_dependency(%q<simplecov>.freeze, [">= 0"])
40
- s.add_dependency(%q<rspec>.freeze, [">= 0"])
41
- s.add_dependency(%q<tins>.freeze, ["~> 1.0", ">= 1.28.0"])
42
- s.add_dependency(%q<term-ansicolor>.freeze, ["~> 1.4"])
43
- s.add_dependency(%q<complex_config>.freeze, ["~> 0.10"])
44
- s.add_dependency(%q<more_math>.freeze, [">= 0"])
45
- end
25
+ s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.12.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"])
46
35
  end
@@ -1,6 +1,6 @@
1
1
  class Infobar
2
2
  # Infobar version
3
- VERSION = '0.7.0'
3
+ VERSION = '0.7.1'
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
@@ -95,6 +95,7 @@ class Infobar
95
95
  def busy(**opts, &block)
96
96
  block_given? or raise ArgumentError, 'block is required as an argument'
97
97
  duration = opts.delete(:sleep) || 0.1
98
+ reset
98
99
  call(**opts | {
99
100
  total: Float::INFINITY,
100
101
  message: { format: ' %l %te %s ', '%s' => { frames: :circle1 } },
@@ -17,7 +17,7 @@ default: &default
17
17
  todo_fill: ' '
18
18
  todo_fg_color: 124
19
19
  todo_bg_color: 214
20
- show: <%= STDIN.tty? %>
20
+ show: true
21
21
 
22
22
  development: *default
23
23
  test: *default
data/spec/infobar_spec.rb CHANGED
@@ -14,17 +14,17 @@ describe Infobar do
14
14
 
15
15
  it 'can be used to signal being busy with a block' do
16
16
  expect { Infobar.busy }.to raise_error ArgumentError
17
- #x expect(infobar.display).to receive(:update).at_least(1).and_call_original
18
- #x Infobar.busy { sleep 0.2 }
17
+ expect(infobar.display).to receive(:update).at_least(1).and_call_original
18
+ Infobar.busy { sleep 0.2 }
19
19
  end
20
20
 
21
- xit 'can be called and update instantly' do
21
+ it 'can be called and update instantly' do
22
22
  expect(infobar).to receive(:update).with(message: anything, force: true).
23
23
  and_call_original
24
24
  Infobar(total: 10, update: true)
25
25
  end
26
26
 
27
- xit 'can update display with force' do
27
+ it 'can update display with force' do
28
28
  Infobar(total: 10)
29
29
  expect(infobar.display).to receive(:update).
30
30
  with(
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.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-12 00:00:00.000000000 Z
11
+ date: 2023-10-09 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.11.0
19
+ version: 1.12.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.11.0
26
+ version: 1.12.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +66,34 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: debug
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: all_images
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: tins
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -151,6 +179,7 @@ extra_rdoc_files:
151
179
  - lib/infobar/trend.rb
152
180
  - lib/infobar/version.rb
153
181
  files:
182
+ - ".all_images.yml"
154
183
  - ".gitignore"
155
184
  - ".rspec"
156
185
  - ".travis.yml"
@@ -193,7 +222,7 @@ files:
193
222
  - spec/infobar/trend_spec.rb
194
223
  - spec/infobar_spec.rb
195
224
  - spec/spec_helper.rb
196
- homepage: http://flori.github.com/infobar
225
+ homepage: http://github.com/infobar
197
226
  licenses: []
198
227
  metadata: {}
199
228
  post_install_message:
@@ -215,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
244
  - !ruby/object:Gem::Version
216
245
  version: '0'
217
246
  requirements: []
218
- rubygems_version: 3.3.0.dev
247
+ rubygems_version: 3.4.10
219
248
  signing_key:
220
249
  specification_version: 4
221
250
  summary: Gem to display information about computations.