ruby-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: 42ee7acdeadf208ea04bd6a634dbc999b264fe0914f1ffd7782ecbac90e50858
4
- data.tar.gz: 0e7ece6126e208f2636f8e4841c6fd26ee1d935c16ff5d84075e65ac70371b98
3
+ metadata.gz: 37022e1989dd1fd4e4dc54cf71175a0b6b582cf11489e96b5962f3019df68b49
4
+ data.tar.gz: 5cfd49785da0897226c6d3d6b679629cae0b926c1907322646a9515c7ab93140
5
5
  SHA512:
6
- metadata.gz: 36159642c868a944be95a1e6466366516096f7f875437ce3c304418ead4e97349cd8acac7123c2dc9550d18999f1ea629cc34aa622ae5497cea5cfa7a5563ee2
7
- data.tar.gz: fc513c2a18cbd165cc1b69dc47c17d9c8f7844f14d86707c15fbc8ecea8c7ff51a9872d9b1bb61e4d505ce054a993c61dcdc7c260cb97a36edb53de49805496c
6
+ metadata.gz: ac7fe3dffbad63b6e893a44e88ed5b3ba1353c518c521036e512a20cbd82ad2ee928d0739c66664438f47ed6e3030d47ed8085b225241cc51ce6ee31af2c9e6f
7
+ data.tar.gz: 3fc79b1ea373cd512c256ee1ab70669224d523dc4f1c09124078d3a04dbf15bf010582b91c9f79bc504a0dac6c020405e5cb40cb9ec0c3c1042d3f23e500fa07
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'ruby-progressbar/output'
2
4
  require 'ruby-progressbar/outputs/tty'
3
5
  require 'ruby-progressbar/outputs/non_tty'
@@ -9,7 +11,9 @@ require 'ruby-progressbar/calculators/running_average'
9
11
  require 'ruby-progressbar/components'
10
12
  require 'ruby-progressbar/format'
11
13
  require 'ruby-progressbar/base'
12
- require 'ruby-progressbar/refinements' unless RUBY_VERSION.start_with?('1.')
14
+ require 'ruby-progressbar/refinements' if Module.
15
+ private_instance_methods.
16
+ include?(:using)
13
17
 
14
18
  class ProgressBar
15
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: ruby-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-27 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