progressbar 1.10.0 → 1.10.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: 42a39a30ce080777f2abab0c9933c96729bba11d09f759bce11966407874f9a8
4
- data.tar.gz: 91a9e9acc1ace5c43275967191a31aa1c0c3c1a020ae6272002e754f8d802598
3
+ metadata.gz: 67fc001f8d824714d07ba5104ff443279d56278237ef0dd3a38a4c37c14ea439
4
+ data.tar.gz: ababf036ac5d1dfab51a1bf81bf5ad6c20392c7076cb50bdc7243d4e12f6e47d
5
5
  SHA512:
6
- metadata.gz: fcff7e9e06e9160b2b6d7b0b091c08f1d54a4edd3c11658b8617b9460c3205c01e52636226b98e6d834c3390e4311982db6463549d23c5aa32d4459e5494d2a0
7
- data.tar.gz: be892fa50d58a306c2bdde5759213ac1f8f38b5a6eb330260e595f0ca2e5d5c64a31360ae396f868308a6b14e5c85b23a36184d00b85e1fbe6620f9ad80855cc
6
+ metadata.gz: 42b2df9371280cb1d2b49514f90902ee3da921fe7ec9cc50f5fc3e41f6fd4691cc0f64353c3b4f96cc8c74593b88a7060090a5f01eb59567685a3a32481b885a
7
+ data.tar.gz: 2af0570d34f69df8d82314840fe90da1348328648da99d80e0056fe9ae55a18821980b79c2cd3d8e1d47fee1a986d25430f2a1c3d8592221d8e8714ccf298498
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -34,5 +34,5 @@ The names and logos for The Kompanee are trademarks of The Kompanee, Ltd.
34
34
  License
35
35
  --------------------------------
36
36
 
37
- ruby-progressbar 1.0 is Copyright © 2011-2018 The Kompanee. It is free software, and may be redistributed under the terms specified in the LICENSE file.
37
+ ruby-progressbar 1.0 is Copyright © 2011-2019 The Kompanee. It is free software, and may be redistributed under the terms specified in the LICENSE file.
38
38
  ruby-progressbar 0.9.0 is Copyright © 2008 [Satoru Takabayashi](http://0xcc.net)
@@ -11,7 +11,9 @@ require 'ruby-progressbar/calculators/running_average'
11
11
  require 'ruby-progressbar/components'
12
12
  require 'ruby-progressbar/format'
13
13
  require 'ruby-progressbar/base'
14
- require 'ruby-progressbar/refinements' unless RUBY_VERSION.start_with?('1.')
14
+ require 'ruby-progressbar/refinements' if Module.
15
+ private_instance_methods.
16
+ include?(:using)
15
17
 
16
18
  class ProgressBar
17
19
  def self.create(*args)
@@ -55,7 +55,7 @@ class Length
55
55
  require 'io/console'
56
56
 
57
57
  def dynamic_width
58
- if output && output.tty?
58
+ if output && output.tty? && output.respond_to?(:winsize)
59
59
  dynamic_width_via_output_stream_object
60
60
  elsif IO.console
61
61
  dynamic_width_via_io_object
@@ -1,8 +1,8 @@
1
1
  class ProgressBar
2
2
  module Format
3
3
  class String < ::String
4
- MOLECULE_PATTERN = /%[a-zA-Z]/
5
- ANSI_SGR_PATTERN = /\e\[[\d;]+m/
4
+ MOLECULE_PATTERN = /%[a-zA-Z]/.freeze
5
+ ANSI_SGR_PATTERN = /\e\[[\d;]+m/.freeze
6
6
 
7
7
  def displayable_length
8
8
  gsub(ANSI_SGR_PATTERN, '').length
@@ -2,10 +2,10 @@
2
2
  class ProgressBar
3
3
  class Time
4
4
  TIME_MOCKING_LIBRARY_METHODS = [
5
- :__simple_stub__now, # ActiveSupport
6
- :now_without_mock_time, # Timecop
7
- :now_without_delorean, # Delorean
8
- :now # Actual
5
+ :__simple_stub__now, # ActiveSupport
6
+ :now_without_mock_time, # Timecop
7
+ :now_without_delorean, # Delorean
8
+ :now # Unmocked
9
9
  ].freeze
10
10
 
11
11
  def initialize(time = ::Time)
@@ -13,7 +13,7 @@ class Time
13
13
  end
14
14
 
15
15
  def now
16
- time.__send__ unmocked_time_method
16
+ time.__send__(unmocked_time_method)
17
17
  end
18
18
 
19
19
  def unmocked_time_method
@@ -6,7 +6,7 @@ class Timer
6
6
  :stopped_at
7
7
 
8
8
  def initialize(options = {})
9
- self.time = options[:time] || Time.new
9
+ self.time = options[:time] || ::ProgressBar::Time.new
10
10
  end
11
11
 
12
12
  def start
@@ -1,3 +1,3 @@
1
1
  class ProgressBar
2
- VERSION = '1.10.0'.freeze
2
+ VERSION = '1.10.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: progressbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - thekompanee
@@ -36,7 +36,7 @@ cert_chain:
36
36
  KuaMSG4L1U+uHNl3upTjh6wZjzKptsxE0eHSeTlt74ei2EZ4XpDQgMAdxnG19eUY
37
37
  Ew38fD/eb7KjFt6HWjaE88pp12uYoAUV0xTysHhml+rk1/rn/h3T1Exa
38
38
  -----END CERTIFICATE-----
39
- date: 2018-08-03 00:00:00.000000000 Z
39
+ date: 2019-05-28 00:00:00.000000000 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
@@ -150,10 +150,9 @@ homepage: https://github.com/jfelchner/ruby-progressbar
150
150
  licenses:
151
151
  - MIT
152
152
  metadata:
153
- allowed_push_host: https://rubygems.org
154
153
  bug_tracker_uri: https://github.com/jfelchner/ruby-progressbar/issues
155
- changelog_uri: https://github.com/jfelchner/ruby-progressbar/CHANGELOG.md
156
- documentation_uri: https://github.com/jfelchner/ruby-progressbar/tree/releases/v1.10.0
154
+ changelog_uri: https://github.com/jfelchner/ruby-progressbar/blob/master/CHANGELOG.md
155
+ documentation_uri: https://github.com/jfelchner/ruby-progressbar/tree/releases/v1.10.1
157
156
  homepage_uri: https://github.com/jfelchner/ruby-progressbar
158
157
  source_code_uri: https://github.com/jfelchner/ruby-progressbar
159
158
  wiki_uri: https://github.com/jfelchner/ruby-progressbar/wiki
@@ -172,8 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
171
  - !ruby/object:Gem::Version
173
172
  version: '0'
174
173
  requirements: []
175
- rubyforge_project:
176
- rubygems_version: 2.7.7
174
+ rubygems_version: 3.0.3
177
175
  signing_key:
178
176
  specification_version: 4
179
177
  summary: Ruby/ProgressBar is a flexible text progress bar library for Ruby.
metadata.gz.sig CHANGED
Binary file