progress 3.5.0 → 3.5.1
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/.rubocop.yml +4 -1
- data/.travis.yml +6 -6
- data/CHANGELOG.markdown +4 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +1 -1
- data/README.markdown +1 -1
- data/lib/progress.rb +1 -0
- data/lib/progress/active_record.rb +2 -0
- data/lib/progress/beeper.rb +2 -0
- data/lib/progress/class_methods.rb +2 -1
- data/lib/progress/enumerable.rb +2 -0
- data/lib/progress/eta.rb +2 -0
- data/lib/progress/integer.rb +2 -0
- data/lib/progress/kernel.rb +3 -1
- data/lib/progress/with_progress.rb +2 -0
- data/progress.gemspec +8 -1
- data/spec/progress_spec.rb +5 -2
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9c6656ecc53abb76bdb2dab90d3edcab0ee8ab7d44be05ac3107365a5b410db
|
4
|
+
data.tar.gz: fc6183213347b561fa6e8c05ded7100df53850c215974c3daaebad5e90e5ea62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eea0fea5cac40f654272d8e0250b310f136bad26b5aa4fdac811c673a51829d9397e1d84a4498657daa050744478fe4c707e96563017c2636df080f2f7d7a1d2
|
7
|
+
data.tar.gz: f1d3cf03b6b24311fca2f852e248b741f9a05b68790b8f71d4842b483755c7eb5bc362c921c4bf13732d9882bc8f4ba4cd99428de72241466d7da164ea84adb3
|
data/.rubocop.yml
CHANGED
@@ -14,7 +14,7 @@ Layout/DotPosition:
|
|
14
14
|
Layout/EndAlignment:
|
15
15
|
EnforcedStyleAlignWith: variable
|
16
16
|
|
17
|
-
Layout/
|
17
|
+
Layout/IndentFirstHashElement:
|
18
18
|
EnforcedStyle: consistent
|
19
19
|
|
20
20
|
Layout/SpaceBeforeBlockBraces:
|
@@ -73,6 +73,9 @@ Style/NumericPredicate:
|
|
73
73
|
Style/ParallelAssignment:
|
74
74
|
Enabled: false
|
75
75
|
|
76
|
+
Style/SafeNavigation:
|
77
|
+
Enabled: false
|
78
|
+
|
76
79
|
Style/Semicolon:
|
77
80
|
AllowAsExpressionSeparator: true
|
78
81
|
|
data/.travis.yml
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
sudo: false
|
2
2
|
language: ruby
|
3
3
|
before_install:
|
4
|
-
- gem
|
4
|
+
- gem install bundler || gem install bundler --version '< 2'
|
5
5
|
rvm:
|
6
6
|
- '1.9.3-p551'
|
7
7
|
- '2.0.0-p648'
|
8
8
|
- '2.1.10'
|
9
9
|
- '2.2.10'
|
10
10
|
- '2.3.8'
|
11
|
-
- '2.4.
|
12
|
-
- '2.5.
|
13
|
-
- '
|
11
|
+
- '2.4.6'
|
12
|
+
- '2.5.5'
|
13
|
+
- '2.6.3'
|
14
14
|
- 'jruby-9.1.9.0'
|
15
15
|
script: bundle exec rspec
|
16
16
|
matrix:
|
17
17
|
include:
|
18
18
|
- env: RUBOCOP=✓
|
19
|
-
rvm: '2.4.
|
19
|
+
rvm: '2.4.6'
|
20
20
|
script: bundle exec rubocop
|
21
21
|
- env: CHECK_RUBIES=✓
|
22
|
-
rvm: '2.4.
|
22
|
+
rvm: '2.4.6'
|
23
23
|
script: bundle exec travis_check_rubies
|
data/CHANGELOG.markdown
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
## unreleased
|
4
4
|
|
5
|
+
## v3.5.1 (2019-05-25)
|
6
|
+
|
7
|
+
* Enable frozen string literals [@toy](https://github.com/toy)
|
8
|
+
|
5
9
|
## v3.5.0 (2018-10-19)
|
6
10
|
|
7
11
|
* Add `Progress.without_beeper` for stopping periodical refresh of progress/eta for the duration of the block [@toy](https://github.com/toy)
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/README.markdown
CHANGED
data/lib/progress.rb
CHANGED
data/lib/progress/beeper.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# encoding: UTF-8
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
class Progress
|
4
5
|
# Class methods of Progress
|
@@ -181,7 +182,7 @@ class Progress
|
|
181
182
|
def message_for_output(options)
|
182
183
|
message = build_message(options)
|
183
184
|
|
184
|
-
out = ''
|
185
|
+
out = ''.dup
|
185
186
|
out << "\r" if stay_on_line?
|
186
187
|
out << message
|
187
188
|
out << "\e[K" if stay_on_line?
|
data/lib/progress/enumerable.rb
CHANGED
data/lib/progress/eta.rb
CHANGED
data/lib/progress/integer.rb
CHANGED
data/lib/progress/kernel.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'progress'
|
2
4
|
|
3
5
|
# Add Progress method as alias to Progress.start
|
4
6
|
module Kernel
|
5
|
-
private
|
7
|
+
private # rubocop:disable Layout/IndentationWidth
|
6
8
|
|
7
9
|
define_method :Progress do |*args, &block|
|
8
10
|
Progress.start(*args, &block)
|
data/progress.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'progress'
|
5
|
-
s.version = '3.5.
|
5
|
+
s.version = '3.5.1'
|
6
6
|
s.summary = %q{Show progress of long running tasks}
|
7
7
|
s.homepage = "http://github.com/toy/#{s.name}"
|
8
8
|
s.authors = ['Ivan Kuchin']
|
@@ -12,6 +12,13 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.rubyforge_project = s.name
|
14
14
|
|
15
|
+
s.metadata = {
|
16
|
+
'bug_tracker_uri' => "https://github.com/toy/#{s.name}/issues",
|
17
|
+
'changelog_uri' => "https://github.com/toy/#{s.name}/blob/master/CHANGELOG.markdown",
|
18
|
+
'documentation_uri' => "https://www.rubydoc.info/gems/#{s.name}/#{s.version}",
|
19
|
+
'source_code_uri' => "https://github.com/toy/#{s.name}",
|
20
|
+
}
|
21
|
+
|
15
22
|
s.files = `git ls-files`.split("\n")
|
16
23
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
24
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
data/spec/progress_spec.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rspec'
|
2
4
|
require 'progress'
|
3
5
|
require 'tempfile'
|
@@ -202,7 +204,7 @@ describe Progress do
|
|
202
204
|
|
203
205
|
describe String do
|
204
206
|
it 'calls each only once on StringIO' do
|
205
|
-
enum = "a\nb\nc"
|
207
|
+
enum = "a\nb\nc".dup
|
206
208
|
expect(enum).not_to receive(:each)
|
207
209
|
io = StringIO.new(enum)
|
208
210
|
expect(StringIO).to receive(:new).with(enum).and_return(io)
|
@@ -277,7 +279,8 @@ describe Progress do
|
|
277
279
|
|
278
280
|
with_progress = enum.with_progress
|
279
281
|
expect(with_progress).not_to receive(:warn)
|
280
|
-
expect(with_progress.each{}).
|
282
|
+
expect(with_progress.each{}).
|
283
|
+
to eq(CSV.open('spec/test.csv').each{})
|
281
284
|
end
|
282
285
|
else
|
283
286
|
it 'calls each only once for CSV and shows warning' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: progress
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Kuchin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -66,7 +66,11 @@ files:
|
|
66
66
|
homepage: http://github.com/toy/progress
|
67
67
|
licenses:
|
68
68
|
- MIT
|
69
|
-
metadata:
|
69
|
+
metadata:
|
70
|
+
bug_tracker_uri: https://github.com/toy/progress/issues
|
71
|
+
changelog_uri: https://github.com/toy/progress/blob/master/CHANGELOG.markdown
|
72
|
+
documentation_uri: https://www.rubydoc.info/gems/progress/3.5.1
|
73
|
+
source_code_uri: https://github.com/toy/progress
|
70
74
|
post_install_message:
|
71
75
|
rdoc_options: []
|
72
76
|
require_paths:
|
@@ -82,8 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
86
|
- !ruby/object:Gem::Version
|
83
87
|
version: '0'
|
84
88
|
requirements: []
|
85
|
-
|
86
|
-
rubygems_version: 2.7.7
|
89
|
+
rubygems_version: 3.0.3
|
87
90
|
signing_key:
|
88
91
|
specification_version: 4
|
89
92
|
summary: Show progress of long running tasks
|